diff --git a/nixos/hosts/olympus/bastion/configuration.nix b/nixos/hosts/olympus/bastion/configuration.nix index af23838..e1fa0cd 100644 --- a/nixos/hosts/olympus/bastion/configuration.nix +++ b/nixos/hosts/olympus/bastion/configuration.nix @@ -36,9 +36,7 @@ in { # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). system.stateVersion = "22.11"; # Did you read the comment? - virtualisation.podman = { - enable = true; - }; + virtualisation.podman.enable = true; # Additional packages environment.systemPackages = with pkgs; [ @@ -52,7 +50,6 @@ in { nixpkgs-fmt nixpkgs-review ripgrep - rnix-lsp rsync tmux vault diff --git a/nixos/hosts/olympus/mailserver/configuration.nix b/nixos/hosts/olympus/mailserver/configuration.nix index 780413f..6cc3f26 100644 --- a/nixos/hosts/olympus/mailserver/configuration.nix +++ b/nixos/hosts/olympus/mailserver/configuration.nix @@ -15,9 +15,6 @@ let vs = config.vault-secrets.secrets; in # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). system.stateVersion = "22.11"; # Did you read the comment? - # Additional packages - environment.systemPackages = with pkgs; [ ]; - networking.firewall.allowedTCPPorts = [ 80 443 ]; # needed as the mailserver configures its down DNS resolver diff --git a/nixos/hosts/thalassa/null/configuration.nix b/nixos/hosts/thalassa/null/configuration.nix index f0ab358..342b3ef 100644 --- a/nixos/hosts/thalassa/null/configuration.nix +++ b/nixos/hosts/thalassa/null/configuration.nix @@ -34,6 +34,7 @@ in { imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix + ./rescue-boot.nix ./networking.nix ]; @@ -80,7 +81,7 @@ in { kernelPackages = pkgs.linuxPackages_latest; loader.systemd-boot.editor = false; loader.systemd-boot.enable = true; - loader.systemd-boot.configurationLimit = 6; + # loader.systemd-boot.configurationLimit = 6; loader.efi.canTouchEfiVariables = true; loader.efi.efiSysMountPoint = "/boot/efi"; }; @@ -89,6 +90,7 @@ in { fileSystems."/".options = [ "compress=zstd" ]; fileSystems."/home".options = [ "compress=zstd" ]; + fileSystems."/nix".options = [ "compress=zstd" "noatime" ]; # Filesystem dedup services.beesd.filesystems = { diff --git a/nixos/hosts/thalassa/null/hardware-configuration.nix b/nixos/hosts/thalassa/null/hardware-configuration.nix index 527975b..79e4113 100644 --- a/nixos/hosts/thalassa/null/hardware-configuration.nix +++ b/nixos/hosts/thalassa/null/hardware-configuration.nix @@ -19,8 +19,20 @@ options = [ "subvol=@" ]; }; + fileSystems."/nix" = + { device = "/dev/disk/by-uuid/d4f56e5b-2509-4e63-8324-65a35c71e90c"; + fsType = "btrfs"; + options = [ "subvol=@/nix" ]; + }; + + fileSystems."/home" = + { device = "/dev/disk/by-uuid/d4f56e5b-2509-4e63-8324-65a35c71e90c"; + fsType = "btrfs"; + options = [ "subvol=@home" ]; + }; + fileSystems."/boot/efi" = - { device = "/dev/disk/by-uuid/445C-AF67"; + { device = "/dev/disk/by-uuid/D478-6F66"; fsType = "vfat"; }; diff --git a/nixos/hosts/thalassa/null/rescue-boot.nix b/nixos/hosts/thalassa/null/rescue-boot.nix new file mode 100644 index 0000000..1234042 --- /dev/null +++ b/nixos/hosts/thalassa/null/rescue-boot.nix @@ -0,0 +1,33 @@ +{ pkgs, ... }: +let + netboot = import (pkgs.path + "/nixos/lib/eval-config.nix") { + inherit (pkgs) system; + modules = [ + (pkgs.path + "/nixos/modules/installer/netboot/netboot-minimal.nix") + module + ]; + }; + module = { + system.stateVersion = "22.11"; + boot.supportedFilesystems = [ "btrfs" "ext4" ]; + environment.systemPackages = with pkgs; [ + git + ]; + }; +in { + boot.loader.systemd-boot = { + extraEntries = { + "rescue.conf" = '' + title Rescue Boot + linux /rescue-kernel + initrd /rescue-initrd + options init=${netboot.config.system.build.toplevel}/init ${toString netboot.config.boot.kernelParams} + ''; + }; + + extraFiles = { + "rescue-kernel" = "${netboot.config.system.build.kernel}/bzImage"; + "rescue-initrd" = "${netboot.config.system.build.netbootRamdisk}/initrd"; + }; + }; +} diff --git a/nixos/iso.nix b/nixos/iso.nix index 40e8283..bbd3dbe 100644 --- a/nixos/iso.nix +++ b/nixos/iso.nix @@ -6,6 +6,10 @@ # use the latest Linux kernel boot.kernelPackages = pkgs.linuxPackages_latest; + environment.systemPackages = with pkgs; [ + git + ]; + # Needed for https://github.com/NixOS/nixpkgs/issues/58959 boot.supportedFilesystems = lib.mkForce [ "btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs" ]; }