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 {
|
inputs.nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = args;
|
specialArgs = args;
|
||||||
modules = [
|
modules = [
|
||||||
|
./modules/nixos
|
||||||
./hosts/common.nix
|
./hosts/common.nix
|
||||||
./hosts/${hostname}.nix
|
./hosts/${hostname}.nix
|
||||||
];
|
];
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[
|
[
|
||||||
../nixosModules
|
|
||||||
../configs/security.nix
|
../configs/security.nix
|
||||||
../configs/users.nix
|
../configs/users.nix
|
||||||
../configs/networking.nix
|
../configs/networking.nix
|
||||||
|
@ -15,5 +14,5 @@
|
||||||
nixosModules.enable = true;
|
nixosModules.enable = true;
|
||||||
nix-config.enable = true;
|
nix-config.enable = true;
|
||||||
boot-config.enable = true;
|
boot-config.enable = true;
|
||||||
hardware-config.enable = true;
|
hardware-config.usbAutoMount = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,6 @@ in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
"${moduleName}" = {
|
"${moduleName}" = {
|
||||||
enable = lib.mkEnableOption "Enable ${moduleName}.";
|
|
||||||
cpu = lib.mkOption {
|
cpu = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
default = "";
|
default = "";
|
||||||
|
@ -24,6 +23,7 @@ in
|
||||||
example = "nvidia";
|
example = "nvidia";
|
||||||
description = "What GPU is being used.";
|
description = "What GPU is being used.";
|
||||||
};
|
};
|
||||||
|
usbAutoMount = lib.mkEnableOption "Enable auto mounting USB drives.";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -77,5 +77,11 @@ in
|
||||||
"nvidia_drm"
|
"nvidia_drm"
|
||||||
];
|
];
|
||||||
})
|
})
|
||||||
|
(lib.mkIf cfg.usbAutoMount {
|
||||||
|
services.udisks2 = {
|
||||||
|
enable = true;
|
||||||
|
mountOnMedia = true;
|
||||||
|
};
|
||||||
|
})
|
||||||
];
|
];
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue