feat(nixosmodules): add udisks2
This commit is contained in:
parent
d816825ac3
commit
0b393ab562
6 changed files with 9 additions and 3 deletions
|
@ -23,6 +23,7 @@
|
|||
inputs.nixpkgs.lib.nixosSystem {
|
||||
specialArgs = args;
|
||||
modules = [
|
||||
./modules/nixos
|
||||
./hosts/common.nix
|
||||
./hosts/${hostname}.nix
|
||||
];
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
{
|
||||
imports =
|
||||
[
|
||||
../nixosModules
|
||||
../configs/security.nix
|
||||
../configs/users.nix
|
||||
../configs/networking.nix
|
||||
|
@ -15,5 +14,5 @@
|
|||
nixosModules.enable = true;
|
||||
nix-config.enable = true;
|
||||
boot-config.enable = true;
|
||||
hardware-config.enable = true;
|
||||
hardware-config.usbAutoMount = true;
|
||||
}
|
||||
|
|
|
@ -11,7 +11,6 @@ in
|
|||
{
|
||||
options = {
|
||||
"${moduleName}" = {
|
||||
enable = lib.mkEnableOption "Enable ${moduleName}.";
|
||||
cpu = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
|
@ -24,6 +23,7 @@ in
|
|||
example = "nvidia";
|
||||
description = "What GPU is being used.";
|
||||
};
|
||||
usbAutoMount = lib.mkEnableOption "Enable auto mounting USB drives.";
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -77,5 +77,11 @@ in
|
|||
"nvidia_drm"
|
||||
];
|
||||
})
|
||||
(lib.mkIf cfg.usbAutoMount {
|
||||
services.udisks2 = {
|
||||
enable = true;
|
||||
mountOnMedia = true;
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue