Improve secrets management with sops-nix
This commit is contained in:
@@ -18,5 +18,17 @@
|
||||
];
|
||||
};
|
||||
|
||||
# Mount SMB share
|
||||
fileSystems."/mnt/share" = {
|
||||
device = "//haruko/share";
|
||||
fsType = "cifs";
|
||||
options = let
|
||||
automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users";
|
||||
username = "chase";
|
||||
password = "$(cat ${config.sops.secrets."smb-password".path})";
|
||||
in ["${automount_opts},username=${username},password=${password},uid=1000,gid=100"];
|
||||
};
|
||||
|
||||
|
||||
system.stateVersion = "24.11";
|
||||
}
|
||||
|
@@ -40,15 +40,6 @@
|
||||
{device = "/dev/disk/by-uuid/dd48a14e-2c90-465b-81a3-661d31ebf39f";}
|
||||
];
|
||||
|
||||
# Mount SMB share
|
||||
fileSystems."/mnt/share" = {
|
||||
device = "//haruko/share";
|
||||
fsType = "cifs";
|
||||
options = let
|
||||
automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users";
|
||||
in ["${automount_opts},credentials=/etc/nixos/smb-secrets,uid=1000,gid=100"];
|
||||
};
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
|
Reference in New Issue
Block a user