make user option
This commit is contained in:
parent
b780a2d51e
commit
f699955913
@ -11,6 +11,13 @@ in {
|
|||||||
enable = lib.mkEnableOption "my custom config";
|
enable = lib.mkEnableOption "my custom config";
|
||||||
desktop = lib.mkEnableOption "custom config with desktop support";
|
desktop = lib.mkEnableOption "custom config with desktop support";
|
||||||
laptop = lib.mkEnableOption "extra stuff for laptops like wifi";
|
laptop = lib.mkEnableOption "extra stuff for laptops like wifi";
|
||||||
|
user = lib.mkOption {
|
||||||
|
default = "max";
|
||||||
|
example = "foo";
|
||||||
|
description = "The main user working on this machine";
|
||||||
|
type = lib.types.nonEmptyStr;
|
||||||
|
readOnly = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config.myConfig = lib.mkIf cfg.enable {
|
config.myConfig = lib.mkIf cfg.enable {
|
||||||
|
@ -14,7 +14,7 @@ in {
|
|||||||
enable = true;
|
enable = true;
|
||||||
rtcqs.enable = true;
|
rtcqs.enable = true;
|
||||||
};
|
};
|
||||||
users.users.max.extraGroups = ["audio"];
|
users.users.${config.myConfig.user}.extraGroups = ["audio"];
|
||||||
|
|
||||||
services.pipewire = {
|
services.pipewire = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -38,7 +38,7 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
# make brightness keys work
|
# make brightness keys work
|
||||||
users.users.max.extraGroups = ["video" "input"];
|
users.users.${config.myConfig.user}.extraGroups = ["video" "input"];
|
||||||
programs.light.enable = lib.mkIf cfg.laptop true;
|
programs.light.enable = lib.mkIf cfg.laptop true;
|
||||||
|
|
||||||
# make swaylock work
|
# make swaylock work
|
||||||
|
Loading…
x
Reference in New Issue
Block a user