diff --git a/README.md b/README.md index 0b4a2a1c..b8791525 100644 --- a/README.md +++ b/README.md @@ -104,7 +104,6 @@ See [./secrets](./secrets) for details. > :red_circle: **IMPORTANT**: **You should NOT deploy this flake directly on your machine > :exclamation: It will not succeed.** This flake contains my hardware configuration(such as > [hardware-configuration.nix](hosts/idols-ai/hardware-configuration.nix), -> [cifs-mount.nix](https://github.com/ryan4yin/nix-config/blob/v0.1.1/hosts/idols_ai/cifs-mount.nix), > [Nvidia Support](https://github.com/ryan4yin/nix-config/blob/v0.1.1/hosts/idols-ai/default.nix#L77-L91), > etc.) which is not suitable for your hardwares, and requires my private secrets repository > [ryan4yin/nix-secrets](https://github.com/ryan4yin/nix-config/tree/main/secrets) to deploy. You diff --git a/hosts/12kingdoms-shoukei/hardware-configuration.nix b/hosts/12kingdoms-shoukei/hardware-configuration.nix index bad6d2c5..3a7a17a9 100644 --- a/hosts/12kingdoms-shoukei/hardware-configuration.nix +++ b/hosts/12kingdoms-shoukei/hardware-configuration.nix @@ -37,14 +37,13 @@ "ntfs" "fat" "vfat" - "cifs" # mount windows share ]; # clear /tmp on boot to get a stateless /tmp directory. boot.tmp.cleanOnBoot = true; boot.initrd = { # unlocked luks devices via a keyfile or prompt a passphrase. - luks.devices."crypted-nixos" = { + luks.devices."encrypted-nixos" = { device = "/dev/nvme0n1p4"; # the keyfile(or device partition) that should be used as the decryption key for the encrypted device. # if not specified, you will be prompted for a passphrase instead. diff --git a/hosts/idols-ai/cifs-mount.nix b/hosts/idols-ai/cifs-mount.nix deleted file mode 100644 index 851e187a..00000000 --- a/hosts/idols-ai/cifs-mount.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ - config, - myvars, - ... -}: { - # mount a smb/cifs share - fileSystems."/home/${myvars.username}/SMB-Downloads" = { - device = "//192.168.5.194/Downloads"; - fsType = "cifs"; - options = [ - # https://www.freedesktop.org/software/systemd/man/latest/systemd.mount.html - "nofail,_netdev" - "uid=1000,gid=100,dir_mode=0755,file_mode=0755" - "vers=3.0,credentials=${config.age.secrets.smb-credentials.path}" - ]; - }; -} diff --git a/hosts/idols-ai/default.nix b/hosts/idols-ai/default.nix index 339470d2..f967408b 100644 --- a/hosts/idols-ai/default.nix +++ b/hosts/idols-ai/default.nix @@ -8,7 +8,7 @@ let hostName = "ai"; # Define your hostname. in { imports = [ - ./cifs-mount.nix + ./netdev-mount.nix # Include the results of the hardware scan. ./hardware-configuration.nix diff --git a/hosts/idols-ai/hardware-configuration.nix b/hosts/idols-ai/hardware-configuration.nix index b242d194..96bc1590 100644 --- a/hosts/idols-ai/hardware-configuration.nix +++ b/hosts/idols-ai/hardware-configuration.nix @@ -40,7 +40,6 @@ "ntfs" "fat" "vfat" - "cifs" # mount windows share ]; boot.initrd = { diff --git a/hosts/idols-ai/netdev-mount.nix b/hosts/idols-ai/netdev-mount.nix new file mode 100644 index 00000000..d5eaa08e --- /dev/null +++ b/hosts/idols-ai/netdev-mount.nix @@ -0,0 +1,37 @@ +{ + config, + myvars, + ... +}: { + # supported file systems, so we can mount any removable disks with these filesystems + boot.supportedFilesystems = [ + # "cifs" + "davfs" + ]; + + # mount a smb/cifs share + # fileSystems."/home/${myvars.username}/SMB-Downloads" = { + # device = "//windows-server-nas/Downloads"; + # fsType = "cifs"; + # options = [ + # # https://www.freedesktop.org/software/systemd/man/latest/systemd.mount.html + # "nofail,_netdev" + # "uid=1000,gid=100,dir_mode=0755,file_mode=0755" + # "vers=3.0,credentials=${config.age.secrets.smb-credentials.path}" + # ]; + # }; + + # mount a webdav share + # https://wiki.archlinux.org/title/Davfs2 + # fileSystems."/home/${myvars.username}/webdav-downloads" = { + # device = "https://webdav.writefor.fun/Downloads"; + # fsType = "davfs"; + # options = [ + # # https://www.freedesktop.org/software/systemd/man/latest/systemd.mount.html + # "nofail,_netdev" + # "uid=1000,gid=100,dir_mode=0755,file_mode=0755" + # ]; + # }; + # davfs2 reads its credentials from /etc/davfs2/secrets + # environment.etc."davfs2/secrets".source = config.age.secrets."davfs-secrets".path; +} diff --git a/hosts/idols-kana/default.nix b/hosts/idols-kana/default.nix index c5579341..d227ae8a 100644 --- a/hosts/idols-kana/default.nix +++ b/hosts/idols-kana/default.nix @@ -23,7 +23,6 @@ in { "fat" "vfat" "exfat" - "cifs" # mount windows share ]; boot.kernelModules = ["kvm-amd"]; diff --git a/hosts/idols-ruby/default.nix b/hosts/idols-ruby/default.nix index dccec52a..72effb0b 100644 --- a/hosts/idols-ruby/default.nix +++ b/hosts/idols-ruby/default.nix @@ -25,7 +25,6 @@ in { "fat" "vfat" "exfat" - "cifs" # mount windows share ]; boot.kernelModules = ["kvm-amd"]; diff --git a/hosts/k8s/kubevirt-shoryu/hardware-configuration.nix b/hosts/k8s/kubevirt-shoryu/hardware-configuration.nix index 6302c527..7382354d 100644 --- a/hosts/k8s/kubevirt-shoryu/hardware-configuration.nix +++ b/hosts/k8s/kubevirt-shoryu/hardware-configuration.nix @@ -32,7 +32,6 @@ "ntfs" "fat" "vfat" - "cifs" # mount windows share ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking diff --git a/lib/genKubeVirtHostModule.nix b/lib/genKubeVirtHostModule.nix index 2006cf28..9a7e3484 100644 --- a/lib/genKubeVirtHostModule.nix +++ b/lib/genKubeVirtHostModule.nix @@ -17,7 +17,6 @@ in { "vfat" "exfat" "nfs" # required by longhorn - "cifs" # mount windows share ]; boot.kernelModules = ["kvm-amd" "vfio-pci"];