make user option
This commit is contained in:
		| @@ -11,6 +11,13 @@ in { | ||||
|     enable = lib.mkEnableOption "my custom config"; | ||||
|     desktop = lib.mkEnableOption "custom config with desktop support"; | ||||
|     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 { | ||||
|   | ||||
| @@ -14,7 +14,7 @@ in { | ||||
|       enable = true; | ||||
|       rtcqs.enable = true; | ||||
|     }; | ||||
|     users.users.max.extraGroups = ["audio"]; | ||||
|     users.users.${config.myConfig.user}.extraGroups = ["audio"]; | ||||
|  | ||||
|     services.pipewire = { | ||||
|       enable = true; | ||||
|   | ||||
| @@ -38,7 +38,7 @@ in { | ||||
|     }; | ||||
|  | ||||
|     # 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; | ||||
|  | ||||
|     # make swaylock work | ||||
|   | ||||
		Reference in New Issue
	
	Block a user