Add smb share to anzu, will manage secrets better later

This commit is contained in:
2025-05-28 15:48:49 -04:00
parent 70a90cf707
commit 3bf1ee4552
3 changed files with 28 additions and 17 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
smb-secrets

View File

@@ -21,13 +21,13 @@
anzu = nixpkgs.lib.nixosSystem { anzu = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = { inherit inputs; }; specialArgs = { inherit inputs; };
modules = [ modules = [
# Import the previous configuration.nix we used, # Import the previous configuration.nix we used,
# so the old configuration file still takes effect # so the old configuration file still takes effect
./configuration.nix ./configuration.nix
./hosts/anzu/hardware-configuration.nix ./hosts/anzu/hardware-configuration.nix
# Add NUR overlay # Add NUR overlay
nur.modules.nixos.default nur.modules.nixos.default
# Add home-manager # Add home-manager
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
{ {
@@ -39,18 +39,18 @@
}; };
ichigo = nixpkgs.lib.nixosSystem { ichigo = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = { inherit inputs; }; specialArgs = { inherit inputs; };
modules = [ modules = [
./configuration.nix ./configuration.nix
./hosts/ichigo/hardware-configuration.nix ./hosts/ichigo/hardware-configuration.nix
nur.modules.nixos.default nur.modules.nixos.default
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
{ {
home-manager.backupFileExtension = "backup"; home-manager.backupFileExtension = "backup";
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.users.chase = ./home/home.nix; home-manager.users.chase = ./home/home.nix;
} }
]; ];
}; };
}; };
}; };

View File

@@ -36,6 +36,16 @@
[ { device = "/dev/disk/by-uuid/dd48a14e-2c90-465b-81a3-661d31ebf39f"; } [ { 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 # 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 # (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 # still possible to use this option, but it's recommended to use it in conjunction