converting modules to options

This commit is contained in:
Kopatz
2024-04-16 19:33:19 +02:00
parent ec12a6b917
commit 206a1d0324
8 changed files with 21 additions and 6 deletions

View File

@@ -43,6 +43,7 @@
nixosConfigurations.server = nixpkgs-unstable.lib.nixosSystem { nixosConfigurations.server = nixpkgs-unstable.lib.nixosSystem {
inherit system; inherit system;
modules = [ modules = [
./modules
./users/anon ./users/anon
./modules/collections/server.nix ./modules/collections/server.nix
./systems/server/configuration.nix ./systems/server/configuration.nix
@@ -86,6 +87,7 @@
modules = [ modules = [
### User specific ### ### User specific ###
./users/kopatz ./users/kopatz
./modules
./modules/cli-tools.nix ./modules/cli-tools.nix
./modules/ecryptfs.nix ./modules/ecryptfs.nix
./modules/graphical/audio.nix ./modules/graphical/audio.nix
@@ -102,7 +104,6 @@
./modules/nix/settings.nix ./modules/nix/settings.nix
./modules/support/ntfs.nix ./modules/support/ntfs.nix
./modules/thunderbolt.nix ./modules/thunderbolt.nix
./modules/tmpfs.nix
./modules/virt-manager.nix ./modules/virt-manager.nix
./modules/vmware-host.nix ./modules/vmware-host.nix
./modules/wireshark.nix ./modules/wireshark.nix

View File

@@ -28,13 +28,12 @@
../services/syncthing.nix ../services/syncthing.nix
../static-ip.nix ../static-ip.nix
../support/ntfs.nix ../support/ntfs.nix
../tmpfs.nix
../virt-manager.nix ../virt-manager.nix
../wireshark.nix ../wireshark.nix
]; ];
kop.wooting.enable = true; kop.wooting.enable = true;
#kop.tmpfs.enabled = true; kop.tmpfs.enable = true;
#kop.wireshark.enabled = true; #kop.wireshark.enabled = true;
#kop.virt-manager.enabled = true; #kop.virt-manager.enabled = true;
} }

View File

@@ -31,8 +31,9 @@
../motd.nix ../motd.nix
../nix/settings.nix ../nix/settings.nix
../static-ip.nix ../static-ip.nix
../tmpfs.nix
### Hardware ### ### Hardware ###
../hardware/ssd.nix ../hardware/ssd.nix
]; ];
kop.tmpfs.enabled = true;
} }

View File

@@ -2,11 +2,11 @@
{ {
imports = [ imports = [
./fh ./fh
./games
./graphical ./graphical
./hardware ./hardware
./nix ./nix
./services ./services
./support ./support
./tmpfs.nix
]; ];
} }

View File

@@ -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;
};
} }

View File

@@ -14,6 +14,8 @@
#<home-manager/nixos> #<home-manager/nixos>
]; ];
kop.tmpfs.enabled = true;
# Bootloader. # Bootloader.
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;