summaryrefslogtreecommitdiff
path: root/modules/root
diff options
context:
space:
mode:
authorTim Keller <tjkeller.xyz>2024-10-31 19:58:51 -0500
committerTim Keller <tjkeller.xyz>2024-10-31 19:58:51 -0500
commitd5644331a09b8eb0645b40003cb8a1281bc165d9 (patch)
tree087a0dcdcce19c182b077e85e62671921b8e8b9b /modules/root
parent5cd716012f0a75a9f740b90d4afe7a205dee1b3b (diff)
downloadnixos-d5644331a09b8eb0645b40003cb8a1281bc165d9.tar.xz
nixos-d5644331a09b8eb0645b40003cb8a1281bc165d9.zip
filesystems and other
Diffstat (limited to 'modules/root')
-rw-r--r--modules/root/cups.nix9
-rw-r--r--modules/root/default.nix3
-rw-r--r--modules/root/filesystems.nix23
-rw-r--r--modules/root/hosts.nix4
-rw-r--r--modules/root/powerkeys.nix1
-rw-r--r--modules/root/resources/secrets/secrets.yaml6
-rw-r--r--modules/root/wifi.nix2
7 files changed, 33 insertions, 15 deletions
diff --git a/modules/root/cups.nix b/modules/root/cups.nix
deleted file mode 100644
index 39f8434..0000000
--- a/modules/root/cups.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ lib, config, ... }: {
- options = {
- cups.enable = lib.mkEnableOption "enables printing";
- };
-
- config = lib.mkIf config.cups.enable {
- services.printing.enable = true;
- };
-}
diff --git a/modules/root/default.nix b/modules/root/default.nix
index bd30787..9b3bedd 100644
--- a/modules/root/default.nix
+++ b/modules/root/default.nix
@@ -4,6 +4,7 @@
./awesome.nix
./doas.nix
./docker.nix
+ ./filesystems.nix
./fonts.nix
./grub.nix
./home-manager.nix
@@ -29,6 +30,8 @@
btrfsSupport = lib.mkDefault true;
};
fonts.enable = lib.mkDefault true;
+ #fs.networkFS.enable = lib.mkDefault false;
+ fs.networkFS.enable = lib.mkDefault false;
grub = {
enable = lib.mkDefault true;
mode = lib.mkDefault "bios";
diff --git a/modules/root/filesystems.nix b/modules/root/filesystems.nix
new file mode 100644
index 0000000..1784feb
--- /dev/null
+++ b/modules/root/filesystems.nix
@@ -0,0 +1,23 @@
+{ lib, config, ... } :
+let
+ mkNetworkFileSystem = device : {
+ device = "${device}";
+ fsType = "nfs";
+ options = [ "noauto" "defaults" ];
+ };
+in {
+ options = {
+ fs.networkFS.enable = lib.mkEnableOption "enable network shares";
+ };
+ config = {
+ fileSystems = lib.mkIf config.fs.networkFS.enable {
+ "/media/Storage/Media" = mkNetworkFileSystem "truenas-home:/mnt/Storage/Media";
+ "/media/Storage/Backups" = mkNetworkFileSystem "truenas-home:/mnt/Storage/Backups";
+ "/media/Storage/Tapes" = mkNetworkFileSystem "truenas-home:/mnt/Storage/Backups/Tapes";
+ "/media/Family Photos" = mkNetworkFileSystem "truenas-home:/mnt/Media/Photos";
+ "/media/chexx/chexx" = mkNetworkFileSystem "truenas-office:/mnt/Storage/chexx";
+ "/media/chexx/tkdocs" = mkNetworkFileSystem "truenas-office:/mnt/Storage/Users/Tim-Keller";
+ "/media/chexx/scans" = mkNetworkFileSystem "truenas-office:/mnt/Storage/Scans";
+ };
+ };
+}
diff --git a/modules/root/hosts.nix b/modules/root/hosts.nix
index 27422ee..f8794ff 100644
--- a/modules/root/hosts.nix
+++ b/modules/root/hosts.nix
@@ -1,5 +1,7 @@
{
networking.hosts = {
- "192.168.1.30" = [ "localgit" ];
+ "192.168.1.30" = [ "localgit" ];
+ "192.168.1.11" = [ "truenas-home" ];
+ "192.168.77.11" = [ "truenas-office" ];
};
}
diff --git a/modules/root/powerkeys.nix b/modules/root/powerkeys.nix
index 0a47cde..fd4aa00 100644
--- a/modules/root/powerkeys.nix
+++ b/modules/root/powerkeys.nix
@@ -1,7 +1,6 @@
{
services.logind = {
hibernateKey = "suspend";
- lidSwitch = "suspend";
powerKey = "ignore";
powerKeyLongPress = "poweroff";
};
diff --git a/modules/root/resources/secrets/secrets.yaml b/modules/root/resources/secrets/secrets.yaml
index 9214cca..d3076ad 100644
--- a/modules/root/resources/secrets/secrets.yaml
+++ b/modules/root/resources/secrets/secrets.yaml
@@ -1,4 +1,4 @@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j5yff+Ynio+Rf+jjIlbBgeNf/ZNsNpqUW3uq8Iggod1JVotgk3SFL14L4Y=,iv:EqvSQfLzHB8gP7vS7o5vNT8qFWGmXJNq5+pJMLKP7D0=,tag:1dphoQHLMFyz28lOJYWp0g==,type:str]
sops:
kms: []
gcp_kms: []
@@ -14,8 +14,8 @@ sops:
STJsY1BEeCswc29NbUg4eFB2VXZ0NHcKfT5NbcKhEw4dD106nCa4gE3UiIWnpRDZ
r0cbU0q6qWIbh2SUbkoEvaGTBJ9BQVL2L4isQ42EaPq5LdQDQajp+A==
-----END AGE ENCRYPTED FILE-----
- lastmodified: "2024-10-21T00:36:42Z"
- mac: ENC[AES256_GCM,data:a3CeKSdfXv/VXJHoQ++qalywvqdl4amdk+FM3dAgJQtMZWzWrIsBOvsqBfojIhak6HEUvfdkyvXKRFlXiZyfYBx10Vv1r4QvSRgogYIQU5HhgsSKyIZAxxlwViJcEl4V0lFAUdwPSLByl37YvrvjVMC2tMRlX395eT0aabFkTmM=,iv:agDd5ADjO8kalJ0lsb9H9C/IZ2F57di0+loSpyNen5I=,tag:btS0AUmWq/mvOF2T0+dsEA==,type:str]
+ lastmodified: "2024-11-01T00:54:56Z"
+ mac: ENC[AES256_GCM,data:zwAv3vmTAhEoQpil+4tgweExbR1Vl5Vk3YJOhda2WHlVxXuZeN1wXOBOGVIFbwJOzcgY9nwcNfVlCKWXA/V3f8Znx+5mG72NbervLXmUpyBBfr9ALejlRrNT6r6r3BgPXuDHTw+66pq8L2oi3671D8rIWjddHtoJOmhNWv89ZoQ=,iv:oWdKV7bpRwGKcG0wCUUZ4qJhbk0JLkFhPRuk4JnHwQ0=,tag:A7EPpyjz2lugmkXGlnh8rQ==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.8.1
diff --git a/modules/root/wifi.nix b/modules/root/wifi.nix
index 6de8598..ff143b9 100644
--- a/modules/root/wifi.nix
+++ b/modules/root/wifi.nix
@@ -11,7 +11,7 @@ let
);
environmentFile = config.sops.secrets.wireless-env.path;
#networks = mkNetworksFromEnvironmentFile ((builtins.length (lib.strings.splitString "\n" (builtins.readFile environmentFile))) / 2);
- networks = mkNetworksFromEnvironmentFile 10; # Number of networks listed in wireless-env
+ networks = mkNetworksFromEnvironmentFile 9; # Number of networks listed in wireless-env
in {
options = {
wifi.enable = lib.mkEnableOption "enables wifi";