Add multi-user support for various applications and services
Enhanced the configuration files to support multi-user management by introducing user options for multiple applications, including art, gaming, multimedia, and development tools. Updated existing modules to utilize these new user options, improving flexibility and maintainability in user package installations.
This commit is contained in:
@@ -6,9 +6,16 @@
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.my.emacs.enable = lib.mkEnableOption "Doom Emacs configuration";
|
||||
options.my.emacs = {
|
||||
enable = lib.mkEnableOption "Doom Emacs configuration";
|
||||
users = lib.mkOption {
|
||||
type = lib.types.either lib.types.str (lib.types.listOf lib.types.str);
|
||||
default = config.my.toggleUsers.dev;
|
||||
description = "Users to install Emacs packages for";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf config.my.emacs.enable {
|
||||
home-manager.users = inputs.self.lib.mkHomeManagerUsers lib config.my.toggleUsers.dev (_user: {
|
||||
home-manager.users = inputs.self.lib.mkHomeManagerUsers lib config.my.emacs.users (_user: {
|
||||
xdg.dataFile = {
|
||||
"doom/templates/events.org".source = ../../dotfiles/doom/templates/events.org;
|
||||
"doom/templates/default.org".source = ../../dotfiles/doom/templates/default.org;
|
||||
@@ -48,7 +55,7 @@
|
||||
;
|
||||
};
|
||||
in
|
||||
inputs.self.lib.mkUserPackages lib config.my.toggleUsers.dev packages;
|
||||
inputs.self.lib.mkUserPackages lib config.my.emacs.users packages;
|
||||
services.emacs = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
@@ -60,7 +67,7 @@
|
||||
epkgs:
|
||||
let
|
||||
inherit
|
||||
(config.home-manager.users.${inputs.self.lib.getFirstUser config.my.toggleUsers.dev}.programs.emacs)
|
||||
(config.home-manager.users.${inputs.self.lib.getFirstUser config.my.emacs.users}.programs.emacs)
|
||||
extraPackages
|
||||
extraConfig
|
||||
;
|
||||
|
||||
Reference in New Issue
Block a user