feat(nixos): Mount BabeShare
This commit is contained in:
parent
8c5d0e2dbd
commit
fefab6e9f4
2 changed files with 42 additions and 0 deletions
38
modules/nixos/mounts/babeshare/default.nix
Normal file
38
modules/nixos/mounts/babeshare/default.nix
Normal file
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
|
||||
cfg = config.marleyos.mounts.babeshare;
|
||||
|
||||
user = config.users.users."${config.marleyos.my.name}";
|
||||
uid =
|
||||
if user.uid != null
|
||||
then user.uid
|
||||
else 1000;
|
||||
|
||||
options = [
|
||||
"username=marley"
|
||||
"password=granola chaos lend splendid"
|
||||
"uid=${toString uid}"
|
||||
"gid=${toString config.users.groups."wheel".gid}"
|
||||
];
|
||||
in {
|
||||
options.marleyos.mounts.babeshare.enable = mkEnableOption "babeshare";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
fileSystems."/mnt/babeshare/babez" = {
|
||||
device = "//truenas.blackcat.vip/babez";
|
||||
fsType = "cifs";
|
||||
inherit options;
|
||||
};
|
||||
|
||||
fileSystems."/mnt/babeshare/marley" = {
|
||||
device = "//truenas.blackcat.vip/marley";
|
||||
fsType = "cifs";
|
||||
inherit options;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -30,5 +30,9 @@ in {
|
|||
|
||||
environment.systemPackages = [pkgs.vim pkgs.git];
|
||||
|
||||
marleyos = {
|
||||
mounts.babeshare = enabled;
|
||||
};
|
||||
|
||||
system.stateVersion = "24.05";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue