diff --git a/flake.nix b/flake.nix index 8627cce..3f71e17 100644 --- a/flake.nix +++ b/flake.nix @@ -43,6 +43,7 @@ nixosConfigurations.server = nixpkgs-unstable.lib.nixosSystem { inherit system; modules = [ + ./modules ./users/anon ./modules/collections/server.nix ./systems/server/configuration.nix @@ -86,6 +87,7 @@ modules = [ ### User specific ### ./users/kopatz + ./modules ./modules/cli-tools.nix ./modules/ecryptfs.nix ./modules/graphical/audio.nix @@ -102,7 +104,6 @@ ./modules/nix/settings.nix ./modules/support/ntfs.nix ./modules/thunderbolt.nix - ./modules/tmpfs.nix ./modules/virt-manager.nix ./modules/vmware-host.nix ./modules/wireshark.nix diff --git a/modules/collections/desktop.nix b/modules/collections/desktop.nix index bd5e3d6..ad7c4b8 100644 --- a/modules/collections/desktop.nix +++ b/modules/collections/desktop.nix @@ -28,13 +28,12 @@ ../services/syncthing.nix ../static-ip.nix ../support/ntfs.nix - ../tmpfs.nix ../virt-manager.nix ../wireshark.nix ]; kop.wooting.enable = true; - #kop.tmpfs.enabled = true; + kop.tmpfs.enable = true; #kop.wireshark.enabled = true; #kop.virt-manager.enabled = true; } diff --git a/modules/collections/server.nix b/modules/collections/server.nix index 261a35a..681eeaf 100644 --- a/modules/collections/server.nix +++ b/modules/collections/server.nix @@ -31,8 +31,9 @@ ../motd.nix ../nix/settings.nix ../static-ip.nix - ../tmpfs.nix ### Hardware ### ../hardware/ssd.nix ]; + + kop.tmpfs.enabled = true; } diff --git a/modules/default.nix b/modules/default.nix index 622b8f5..39d6318 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -2,11 +2,11 @@ { imports = [ ./fh - ./games ./graphical ./hardware ./nix ./services ./support + ./tmpfs.nix ]; } diff --git a/modules/games/default.nix b/modules/services/games/default.nix similarity index 100% rename from modules/games/default.nix rename to modules/services/games/default.nix diff --git a/modules/games/palworld.nix b/modules/services/games/palworld.nix similarity index 100% rename from modules/games/palworld.nix rename to modules/services/games/palworld.nix diff --git a/modules/tmpfs.nix b/modules/tmpfs.nix index 7177b8a..74d85b3 100644 --- a/modules/tmpfs.nix +++ b/modules/tmpfs.nix @@ -1,3 +1,15 @@ +{config, lib, ...}: +with lib; +let + cfg = config.kop.tmpfs; +in { - boot.tmp.useTmpfs = true; + options.kop.tmpfs = { + enable = mkEnableOption "Enables tmpfs"; + }; + + config = mkIf cfg.enable { + boot.tmp.useTmpfs = true; + }; } + diff --git a/systems/laptop/main.nix b/systems/laptop/main.nix index c9b3ce2..2d5f05b 100644 --- a/systems/laptop/main.nix +++ b/systems/laptop/main.nix @@ -14,6 +14,8 @@ # ]; + kop.tmpfs.enabled = true; + # Bootloader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true;