Flakify pulsebert

This commit is contained in:
Ehmry - 2021-02-22 13:21:31 +01:00
parent cc1d97ba4f
commit ec81b6a28d
3 changed files with 26 additions and 42 deletions

View File

@ -37,20 +37,24 @@
${self}#nixosConfigurations.${name}.config.system.build.toplevel \ ${self}#nixosConfigurations.${name}.config.system.build.toplevel \
--command switch-to-configuration $@ --command switch-to-configuration $@
''; '';
mkWake = name:
pkgs.writeScriptBin "${name}-wake" ''
#!${pkgs.runtimeShell}
exec ${pkgs.wol}/bin/wol ${hostRegistry.hosts.${name}.ether}
'';
in { in {
glotzbert-nixos-rebuild = mkDeploy "glotzbert" "glotzbert.hq.c3d2.de"; glotzbert-nixos-rebuild = mkDeploy "glotzbert" "glotzbert.hq.c3d2.de";
glotzbert-wake = pkgs.writeScriptBin "glotzbert-wake" '' glotzbert-wake = mkWake "glotzbert";
#!${pkgs.runtimeShell}
exec ${pkgs.wol}/bin/wol ${hostRegistry.hosts.glotzbert.ether} pulsebert-nixos-rebuild = mkDeploy "pulsebert" "pulsebert.hq.c3d2.de";
''; pulsebert-wake = mkWake "pulsebert";
}); });
nixosConfigurations = let nixosConfigurations = let
nixosSystem' = nixosSystem' =
# Our custom NixOS builder # Our custom NixOS builder
{ system ? "x86_64-linux", ... }@args: { ... }@args:
nixpkgs.lib.nixosSystem (args // { nixpkgs.lib.nixosSystem (args // {
inherit system;
extraModules = [ extraModules = [
self.nixosModules.c3d2 self.nixosModules.c3d2
({ pkgs, ... }: { ({ pkgs, ... }: {
@ -63,7 +67,15 @@
}); });
in { in {
glotzbert = nixosSystem' { modules = [ ./hosts/glotzbert ]; }; glotzbert = nixosSystem' {
modules = [ ./hosts/glotzbert ];
system = "x86_64-linux";
};
pulsebert = nixosSystem' {
modules = [ ./hosts/pulsebert ];
system = "aarch64-linux";
};
}; };

View File

@ -21,8 +21,11 @@ rec {
nfs = { }; nfs = { };
ncdc.publicKey = ncdc.publicKey =
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGzWhy2T7avsFf+ZS8R99kah2wPQs7MYWUP+t4VBi28a"; "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGzWhy2T7avsFf+ZS8R99kah2wPQs7MYWUP+t4VBi28a";
pulsebert.publicKey = pulsebert = {
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAnEWn/8CKIiCtehh6Ha3XUQqjODj0ygyo3aGAsFWgfG"; ether = "dc:a6:32:31:b6:32";
publicKey =
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAnEWn/8CKIiCtehh6Ha3XUQqjODj0ygyo3aGAsFWgfG";
};
samba = { }; samba = { };
storage-ng.publicKey = storage-ng.publicKey =
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMeg5ojU7U8+Lx824y+brazVJ007mEJDM7C7aUruOWGP"; "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMeg5ojU7U8+Lx824y+brazVJ007mEJDM7C7aUruOWGP";

View File

@ -9,7 +9,7 @@ let
espCam = "http://172.20.78.164:81"; espCam = "http://172.20.78.164:81";
in { in {
imports = [ # Include the results of the hardware scan. imports = [ # Include the results of the hardware scan.
<this-host/hardware-configuration.nix> ./hardware-configuration.nix
]; ];
boot.loader.grub.enable = false; boot.loader.grub.enable = false;
@ -27,7 +27,6 @@ in {
nix.maxJobs = 4; nix.maxJobs = 4;
networking.hostName = "pulsebert"; # Define your hostname. networking.hostName = "pulsebert"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# The global useDHCP flag is deprecated, therefore explicitly set to false here. # The global useDHCP flag is deprecated, therefore explicitly set to false here.
# Per-interface useDHCP will be mandatory in the future, so this generated config # Per-interface useDHCP will be mandatory in the future, so this generated config
@ -36,33 +35,10 @@ in {
networking.interfaces.eth0.useDHCP = true; networking.interfaces.eth0.useDHCP = true;
networking.interfaces.wlan0.useDHCP = true; networking.interfaces.wlan0.useDHCP = true;
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Select internationalisation properties.
# i18n.defaultLocale = "en_US.UTF-8";
# console = {
# font = "Lat2-Terminus16";
# keyMap = "us";
# };
# Set your time zone.
# time.timeZone = "Europe/Amsterdam";
# List packages installed in system profile. To search, run: # List packages installed in system profile. To search, run:
# $ nix search wget # $ nix search wget
environment.systemPackages = with pkgs; [ wget vim git raspberrypi-tools ]; environment.systemPackages = with pkgs; [ wget vim git raspberrypi-tools ];
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# pinentryFlavor = "gnome3";
# };
# List services that you want to enable: # List services that you want to enable:
# Do not log to flash: # Do not log to flash:
@ -83,15 +59,8 @@ in {
extraGroups = [ "wheel" "audio" ]; extraGroups = [ "wheel" "audio" ];
}; };
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
networking.firewall.enable = false; networking.firewall.enable = false;
# Enable CUPS to print documents.
# services.printing.enable = true;
# Enable sound. # Enable sound.
sound.enable = true; sound.enable = true;
hardware.bluetooth = { hardware.bluetooth = {
@ -196,7 +165,7 @@ in {
[ "dialout" "gpio" ]; [ "dialout" "gpio" ];
systemd.services.mjpeg-stream = systemd.services.mjpeg-stream =
let mjpeg-proxy = pkgs.callPackage <lib/pkgs/mjpeg-proxy.nix> { }; let mjpeg-proxy = pkgs.callPackage ../../lib/pkgs/mjpeg-proxy.nix { };
in { in {
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
after = [ "network.target" ]; after = [ "network.target" ];