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 \
--command switch-to-configuration $@
'';
mkWake = name:
pkgs.writeScriptBin "${name}-wake" ''
#!${pkgs.runtimeShell}
exec ${pkgs.wol}/bin/wol ${hostRegistry.hosts.${name}.ether}
'';
in {
glotzbert-nixos-rebuild = mkDeploy "glotzbert" "glotzbert.hq.c3d2.de";
glotzbert-wake = pkgs.writeScriptBin "glotzbert-wake" ''
#!${pkgs.runtimeShell}
exec ${pkgs.wol}/bin/wol ${hostRegistry.hosts.glotzbert.ether}
'';
glotzbert-wake = mkWake "glotzbert";
pulsebert-nixos-rebuild = mkDeploy "pulsebert" "pulsebert.hq.c3d2.de";
pulsebert-wake = mkWake "pulsebert";
});
nixosConfigurations = let
nixosSystem' =
# Our custom NixOS builder
{ system ? "x86_64-linux", ... }@args:
{ ... }@args:
nixpkgs.lib.nixosSystem (args // {
inherit system;
extraModules = [
self.nixosModules.c3d2
({ pkgs, ... }: {
@ -63,7 +67,15 @@
});
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 = { };
ncdc.publicKey =
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGzWhy2T7avsFf+ZS8R99kah2wPQs7MYWUP+t4VBi28a";
pulsebert.publicKey =
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAnEWn/8CKIiCtehh6Ha3XUQqjODj0ygyo3aGAsFWgfG";
pulsebert = {
ether = "dc:a6:32:31:b6:32";
publicKey =
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAnEWn/8CKIiCtehh6Ha3XUQqjODj0ygyo3aGAsFWgfG";
};
samba = { };
storage-ng.publicKey =
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMeg5ojU7U8+Lx824y+brazVJ007mEJDM7C7aUruOWGP";

View File

@ -9,7 +9,7 @@ let
espCam = "http://172.20.78.164:81";
in {
imports = [ # Include the results of the hardware scan.
<this-host/hardware-configuration.nix>
./hardware-configuration.nix
];
boot.loader.grub.enable = false;
@ -27,7 +27,6 @@ in {
nix.maxJobs = 4;
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.
# 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.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:
# $ nix search wget
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:
# Do not log to flash:
@ -83,15 +59,8 @@ in {
extraGroups = [ "wheel" "audio" ];
};
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
networking.firewall.enable = false;
# Enable CUPS to print documents.
# services.printing.enable = true;
# Enable sound.
sound.enable = true;
hardware.bluetooth = {
@ -196,7 +165,7 @@ in {
[ "dialout" "gpio" ];
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 {
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];