refactor2

This commit is contained in:
Lilith 2025-03-12 15:52:56 +01:00
parent 7fa104b722
commit f0a79a07f1
Signed by: lilith
GPG key ID: 8712A0F317C37175
3 changed files with 25 additions and 19 deletions

View file

@ -2,6 +2,7 @@
imports = [ imports = [
./nfs.nix ./nfs.nix
./desktop.nix ./desktop.nix
./steam.nix ./gaming.nix
./stylix.nix
]; ];
} }

View file

@ -1,4 +1,4 @@
{ config, lib, ...}: { { pkgs, config, lib, ...}: {
options.gaming.enable = lib.mkEnableOption "Enable steam and related software"; options.gaming.enable = lib.mkEnableOption "Enable steam and related software";

View file

@ -3,21 +3,26 @@
options.nfs.client.enable = lib.mkEnableOption "Enable Nas (via NFS) as a client"; options.nfs.client.enable = lib.mkEnableOption "Enable Nas (via NFS) as a client";
options.nfs.server.enable = lib.mkEnableOption "Enable Nas (via NFS) as the server"; options.nfs.server.enable = lib.mkEnableOption "Enable Nas (via NFS) as the server";
config = lib.mkIf config.nfs.client.enable { config = lib.mkMerge [
fileSystems."/mnt/nas" = { (
device = "nixserver:/share"; lib.mkIf config.nfs.client.enable {
fsType = "nfs"; fileSystems."/mnt/nas" = {
options = [ device = "nixserver:/share";
"nfsvers=4.2" fsType = "nfs";
"noauto" options = [
"x-systemd.automount" "nfsvers=4.2"
"x-systemd.idle-timeout=600" "noauto"
"_netdev" "x-systemd.automount"
]; "x-systemd.idle-timeout=600"
}; "_netdev"
}; ];
};
config = lib.mkIf config.nfs.server.enable { }
)
}; (
lib.mkIf config.nfs.server.enable {
}
)
];
} }