diff --git a/README.md b/README.md index ec711888..7d72e4e4 100644 --- a/README.md +++ b/README.md @@ -75,4 +75,4 @@ terraform plan ## To-dos -- [ ] Figure out roles/ vs profiles more. \ No newline at end of file +- [ ] Figure out roles/ vs profiles more. diff --git a/nixos/common/ssh.nix b/nixos/common/ssh.nix index 05c727fb..44bd170d 100644 --- a/nixos/common/ssh.nix +++ b/nixos/common/ssh.nix @@ -25,8 +25,8 @@ in { publicKey = builtins.readFile ./ca-pubkey.pem; }; */ - kexAlgorithms = ["curve25519-sha256@libssh.org"]; settings = { + KexAlgorithms = ["curve25519-sha256@libssh.org"]; PasswordAuthentication = false; KbdInteractiveAuthentication = false; PermitRootLogin = mkDefault "prohibit-password"; diff --git a/nixos/roles/bootable.nix b/nixos/roles/bootable.nix index a8678a6f..9e554dda 100644 --- a/nixos/roles/bootable.nix +++ b/nixos/roles/bootable.nix @@ -22,9 +22,10 @@ in { grub.configurationLimit = 8; systemd-boot.configurationLimit = 8; }; - tmpOnTmpfs = true; - tmpOnTmpfsSize = "80%"; - kernelPackages = mkIf (list.elem "zfs" config.boot.supportedFilesystems) (mkDefault config.boot.zfs.package.latestCompatibleLinuxPackages); + tmp = { + tmpfsSize = "80%"; + useTmpfs = true; + }; } (mkIf (list.elem "zfs" config.boot.supportedFilesystems) { kernelPackages = mkDefault config.boot.zfs.package.latestCompatibleLinuxPackages; diff --git a/nixos/roles/gnome/gnome.nix b/nixos/roles/gnome/gnome.nix index d94608f0..b7c65ff8 100644 --- a/nixos/roles/gnome/gnome.nix +++ b/nixos/roles/gnome/gnome.nix @@ -1,4 +1,12 @@ -{pkgs, ...}: { +{ + pkgs, + tree, + ... +}: { + imports = with tree.nixos.roles; [ + graphical + ]; + services.xserver.enable = true; services.xserver.displayManager.gdm.enable = true; services.xserver.desktopManager.gnome.enable = true; diff --git a/nixos/roles/graphical/bootable.nix b/nixos/roles/graphical/bootable.nix new file mode 100644 index 00000000..c2dafdde --- /dev/null +++ b/nixos/roles/graphical/bootable.nix @@ -0,0 +1,5 @@ +{tree, ...}: { + imports = with tree.nixos.roles; [ + bootable + ]; +} diff --git a/nixos/rosetta.nix b/nixos/roles/rosetta.nix similarity index 100% rename from nixos/rosetta.nix rename to nixos/roles/rosetta.nix diff --git a/nixos/roles/server.nix b/nixos/roles/server.nix index 71f34c19..6becfcbd 100644 --- a/nixos/roles/server.nix +++ b/nixos/roles/server.nix @@ -1,10 +1,15 @@ { std, config, + tree, ... }: let inherit (std) set; in { + imports = with tree.nixos.roles; [ + bootable + ]; + systemd.tmpfiles.rules = set.mapToValues (username: _: "f /var/lib/systemd/linger/${username}") config.users.users; networking.firewall = { diff --git a/nixos/roles/sway/sway.nix b/nixos/roles/sway/sway.nix index 1a304215..aa0db41a 100644 --- a/nixos/roles/sway/sway.nix +++ b/nixos/roles/sway/sway.nix @@ -8,6 +8,9 @@ inherit (std) set list; inherit (lib.modules) mkForce; in { + imports = with tree.nixos.roles; [ + graphical + ]; programs.sway = { enable = list.any (user: user.wayland.windowManager.sway.enable) (set.values config.home-manager.users); extraPackages = with pkgs; mkForce [xwayland swaylock swayidle swaylock-fancy wmctrl]; diff --git a/systems/goliath.nix b/systems/goliath.nix index 5cfd131e..b3238564 100644 --- a/systems/goliath.nix +++ b/systems/goliath.nix @@ -12,10 +12,8 @@ _: let sound ] ++ (with tree.nixos.roles; [ - graphical - gaming gnome - bootable + gaming ]) ++ (with tree.kat; [ gui diff --git a/systems/koishi.nix b/systems/koishi.nix index 23f7e39a..737562db 100644 --- a/systems/koishi.nix +++ b/systems/koishi.nix @@ -10,10 +10,8 @@ _: let common-pc-laptop-ssd ] ++ (with tree.nixos.roles; [ - graphical sway laptop - bootable ]) ++ (with tree; [ kat.gui diff --git a/systems/renko.nix b/systems/renko.nix index ca7f0993..19a4292e 100644 --- a/systems/renko.nix +++ b/systems/renko.nix @@ -6,9 +6,9 @@ _: let }: let inherit (lib.modules) mkDefault; in { - imports = with tree; [ - nixos.rosetta - nixos.roles.bootable + imports = with tree.nixos.roles; [ + rosetta + bootable ]; boot = {