mirror of
https://github.com/nmasur/dotfiles
synced 2025-07-06 21:20:13 +00:00
initial refactoring
This commit is contained in:
25
platforms/nixos/modules/nmasur/profiles/shared-media.nix
Normal file
25
platforms/nixos/modules/nmasur/profiles/shared-media.nix
Normal file
@ -0,0 +1,25 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.nmasur.profiles.shared-media;
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
options.nmasur.profiles.shared-media.enable = lib.mkEnableOption "shared media groups";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
# Create a shared group for many services
|
||||
users.groups.shared = { };
|
||||
|
||||
# Give the human user access to the shared group
|
||||
users.users.${config.user}.extraGroups = [ config.users.groups.shared.name ];
|
||||
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user