mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-25 04:51:55 -05:00
nixos: added option to automount mauville Samba shares for user aly at boot
This commit is contained in:
parent
9f10655a6c
commit
47d1432434
|
@ -31,6 +31,7 @@
|
|||
alyraffauf = {
|
||||
base = {
|
||||
enable = true;
|
||||
sambaAutoMount = true;
|
||||
plymouth.enable = true;
|
||||
zramSwap = {enable = true;};
|
||||
};
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
alyraffauf = {
|
||||
base = {
|
||||
enable = true;
|
||||
sambaAutoMount = true;
|
||||
plymouth.enable = true;
|
||||
zramSwap = {enable = true;};
|
||||
};
|
||||
|
|
|
@ -21,45 +21,10 @@
|
|||
|
||||
networking.hostName = "rustboro"; # Define your hostname.
|
||||
|
||||
fileSystems = {
|
||||
"/mnt/Archive" = {
|
||||
device = "//mauville/Archive";
|
||||
fsType = "cifs";
|
||||
options = [
|
||||
"gid=100"
|
||||
"guest"
|
||||
"nofail"
|
||||
"uid=${toString config.users.users.aly.uid}"
|
||||
"x-systemd.after=network.target"
|
||||
"x-systemd.after=tailscaled.service"
|
||||
"x-systemd.automount"
|
||||
"x-systemd.device-timeout=5s"
|
||||
"x-systemd.idle-timeout=60"
|
||||
"x-systemd.mount-timeout=5s"
|
||||
];
|
||||
};
|
||||
|
||||
"/mnt/Media" = {
|
||||
device = "//mauville/Media";
|
||||
fsType = "cifs";
|
||||
options = [
|
||||
"gid=100"
|
||||
"guest"
|
||||
"nofail"
|
||||
"uid=${toString config.users.users.aly.uid}"
|
||||
"x-systemd.after=network.target"
|
||||
"x-systemd.after=tailscaled.service"
|
||||
"x-systemd.automount"
|
||||
"x-systemd.device-timeout=5s"
|
||||
"x-systemd.idle-timeout=60"
|
||||
"x-systemd.mount-timeout=5s"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
alyraffauf = {
|
||||
base = {
|
||||
enable = true;
|
||||
sambaAutoMount = true;
|
||||
plymouth.enable = true;
|
||||
zramSwap = {
|
||||
enable = true;
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [./sambaAutoMount.nix];
|
||||
config = lib.mkIf config.alyraffauf.base.enable {
|
||||
age.secrets.wifi.file = ../../../secrets/wifi.age;
|
||||
|
||||
|
|
45
nixosModules/base/networking/sambaAutoMount.nix
Normal file
45
nixosModules/base/networking/sambaAutoMount.nix
Normal file
|
@ -0,0 +1,45 @@
|
|||
{
|
||||
config,
|
||||
inputs,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
config = lib.mkIf config.alyraffauf.base.sambaAutoMount {
|
||||
fileSystems = {
|
||||
"/mnt/Archive" = {
|
||||
device = "//mauville/Archive";
|
||||
fsType = "cifs";
|
||||
options = [
|
||||
"gid=100"
|
||||
"guest"
|
||||
"nofail"
|
||||
"uid=${toString config.users.users.aly.uid}"
|
||||
"x-systemd.after=network.target"
|
||||
"x-systemd.after=tailscaled.service"
|
||||
"x-systemd.automount"
|
||||
"x-systemd.device-timeout=5s"
|
||||
"x-systemd.idle-timeout=60"
|
||||
"x-systemd.mount-timeout=5s"
|
||||
];
|
||||
};
|
||||
|
||||
"/mnt/Media" = {
|
||||
device = "//mauville/Media";
|
||||
fsType = "cifs";
|
||||
options = [
|
||||
"gid=100"
|
||||
"guest"
|
||||
"nofail"
|
||||
"uid=${toString config.users.users.aly.uid}"
|
||||
"x-systemd.after=network.target"
|
||||
"x-systemd.after=tailscaled.service"
|
||||
"x-systemd.automount"
|
||||
"x-systemd.device-timeout=5s"
|
||||
"x-systemd.idle-timeout=60"
|
||||
"x-systemd.mount-timeout=5s"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -22,9 +22,6 @@
|
|||
lib.mkEnableOption "Virt-manager for virtual machines with TPM and EFI support.";
|
||||
};
|
||||
|
||||
base.enable =
|
||||
lib.mkEnableOption "Basic system configuration and sane defaults.";
|
||||
|
||||
containers = {
|
||||
nixos = {
|
||||
audiobookshelf = {
|
||||
|
@ -235,6 +232,9 @@
|
|||
tailscale.enable = lib.mkEnableOption "Tailscale WireGuard VPN.";
|
||||
};
|
||||
base = {
|
||||
enable =
|
||||
lib.mkEnableOption "Basic system configuration and sane defaults.";
|
||||
sambaAutoMount = lib.mkEnableOption "Automounting of mauville Samba Shares.";
|
||||
plymouth.enable =
|
||||
lib.mkEnableOption "Plymouth boot screen with catppuccin theme.";
|
||||
power-profiles-daemon.enable = lib.mkOption {
|
||||
|
|
Loading…
Reference in a new issue