Enable basic home config for root user

Emacs: always create new workspace when switching to project
This commit is contained in:
Evie Litherland-Smith 2023-10-18 06:43:41 +01:00
parent 6423dd73d8
commit 30e145ada1
2 changed files with 30 additions and 19 deletions

View file

@ -143,19 +143,31 @@
inherit extraSpecialArgs;
useGlobalPkgs = true;
useUserPackages = true;
users.${user} = let
username = user;
homeDirectory = "/home/${user}";
in {
imports = [ ./hosts/${hostName}/home.nix ./home/default.nix ]
++ homeModules;
home = { inherit username homeDirectory stateVersion; };
programs.home-manager.enable = true;
xdg.userDirs = {
enable = true;
createDirectories = true;
extraConfig = {
XDG_PROJECTS_DIR = "${homeDirectory}/Projects";
users = {
root = {
imports = [ ./home/default.nix ];
home = {
inherit stateVersion;
username = "root";
homeDirectory = "/root";
};
programs.home-manager.enable = true;
};
${user} = let
username = user;
homeDirectory = "/home/${user}";
in {
imports =
[ ./hosts/${hostName}/home.nix ./home/default.nix ]
++ homeModules;
home = { inherit username homeDirectory stateVersion; };
programs.home-manager.enable = true;
xdg.userDirs = {
enable = true;
createDirectories = true;
extraConfig = {
XDG_PROJECTS_DIR = "${homeDirectory}/Projects";
};
};
};
};

View file

@ -30,10 +30,6 @@
(set-frame-parameter nil 'alpha-background 80)
(add-to-list 'default-frame-alist '(alpha-background . 80))
(after! projectile
(setq +workspaces-switch-project-function 'doom-project-browse
doom-projectile-cache-purge-non-projects t))
;; DOOM Dashboard customisation
(setq +doom-dashboard-menu-sections
'(("Recently opened files"
@ -76,8 +72,11 @@
;; projectile auto-discover projects
(after! projectile
(setq projectile-auto-discover t)
(setq projectile-project-search-path '("~/Projects/")))
(setq projectile-auto-discover t
projectile-project-search-path '("~/Projects/")
doom-projectile-cache-purge-non-projects t
+workspaces-switch-project-function 'doom-project-browse
+workspaces-on-switch-project-behavior t))
(after! (magit magit-delta)
(add-hook 'magit-mode-hook (lambda () (magit-delta-mode +1))))