diff --git a/flake.nix b/flake.nix index 8cf4a0dc..cbaa4147 100644 --- a/flake.nix +++ b/flake.nix @@ -38,6 +38,12 @@ { nixosConfigurations = { + foureighty = mkWorkstation nixpkgs-stable "x86_64-linux" "foureighty"; + skinnyv = mkWorkstation nixpkgs-stable "x86_64-linux" "skinnyv"; + thinky = mkWorkstation nixpkgs-stable "x86_64-linux" "thinky"; + bolty = mkServer nixpkgs-stable "x86_64-linux" "bolty"; + vultr1 = mkServer nixpkgs-stable "x86_64-linux" "vultr1"; + bootstrap = nixpkgs-stable.lib.nixosSystem { system = "x86_64-linux"; modules = [ @@ -45,11 +51,25 @@ ]; specialArgs = { inherit inputs; }; }; - foureighty = mkWorkstation nixpkgs-stable "x86_64-linux" "foureighty"; - skinnyv = mkWorkstation nixpkgs-stable "x86_64-linux" "skinnyv"; - thinky = mkWorkstation nixpkgs-stable "x86_64-linux" "thinky"; - bolty = mkServer nixpkgs-stable "x86_64-linux" "bolty"; - vultr1 = mkServer nixpkgs-stable "x86_64-linux" "vultr1"; + # nix build .#nixosConfigurations.raspiimage.config.system.build.sdImage + raspiimage = nixpkgs-stable.lib.nixosSystem { + system = "aarch64-linux"; + modules = [ + (import "${inputs.nixpkgs-stable}/nixos/modules/installer/sd-card/sd-image-aarch64-installer.nix") + { + services.openssh = { + enable = true; + permitRootLogin = inputs.nixpkgs-stable.lib.mkForce "prohibit-password"; + passwordAuthentication = false; + }; + users.extraUsers.root.openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIE5Ejx5CAPUfHVXi4GL4WmnZaG8eiiOmsW/a0o1bs1GF cyryl@foureighty" + ]; + sdImage.compressImage = false; + } + ]; + specialArgs = { inherit inputs; }; + }; }; }; inputs = { diff --git a/nixos/boxes/foureighty/default.nix b/nixos/boxes/foureighty/default.nix index c6233602..9129ef59 100644 --- a/nixos/boxes/foureighty/default.nix +++ b/nixos/boxes/foureighty/default.nix @@ -24,6 +24,8 @@ options = [ "compress=zstd" ]; }; + boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; + zramSwap = { enable = true; algorithm = "zstd"; diff --git a/nixos/boxes/skinnyv/default.nix b/nixos/boxes/skinnyv/default.nix index 25250f86..41a94ae9 100644 --- a/nixos/boxes/skinnyv/default.nix +++ b/nixos/boxes/skinnyv/default.nix @@ -16,7 +16,7 @@ ../../backups.nix ]; - boot.kernelPackages = pkgs.linuxPackages_latest_hardened; + boot.kernelPackages = pkgs.linuxPackages_latest; boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; time.timeZone = "Europe/London";