Skip to content

Commit 300e0fa

Browse files
committed
home-manager: Update the home-manager config for nicer usability
1 parent 2a22c42 commit 300e0fa

File tree

6 files changed

+29
-36
lines changed

6 files changed

+29
-36
lines changed

flake.nix

+5-5
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@
176176
homeManagerModules = nixpkgs.lib.attrsets.foldAttrs (item: acc: item ++ acc) [ ] [
177177
{
178178
root = [
179-
./generic/users/root/home-manager.nix
179+
./generic/users/raoul.nix
180180
];
181181
}
182182
homeManagerModules
@@ -385,8 +385,8 @@
385385
secureboot = false;
386386
genericHomeManagerModules = [ ];
387387
homeManagerModules = {
388-
root = [ ./generic/users/root/home-manager.nix ];
389-
nixos = [ ./generic/users/default.nix ];
388+
root = [ ./generic/users/raoul.nix ];
389+
nixos = [ ];
390390
};
391391
};
392392
};
@@ -406,8 +406,8 @@
406406
secureboot = false;
407407
genericHomeManagerModules = [ ];
408408
homeManagerModules = {
409-
root = [ ./generic/users/root/home-manager.nix ];
410-
nixos = [ ./generic/users/default.nix ];
409+
root = [ ./generic/users/raoul.nix ];
410+
nixos = [ ];
411411
};
412412
};
413413
};

generic/newDefault.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ in
7878
the following will change the users to attribute sets with home manager config
7979
*/
8080
users = builtins.mapAttrs (userName: modules: {
81-
imports = modules;
81+
imports = modules ++ [ ./users/default.nix ];
8282

8383
home.username = userName;
8484
home.homeDirectory = if userName == "root" then "/root" else "/home/${userName}";

generic/users/default.nix

-23
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,15 @@ in
1212
{
1313
home.file = {
1414
".ssh/keys".source = ../sshPubkeys;
15-
".p10k.zsh".source = ./p10k.zsh;
1615
#".zshrc".source = ./zshrc;
1716
};
1817

19-
home.packages = with pkgs; [
20-
grepcidr
21-
];
22-
2318
programs.zsh = {
2419
enable = true;
2520
enableVteIntegration = true;
2621
autosuggestion.enable = true;
2722
initExtra = "[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh";
2823
localVariables = {
29-
YSU_HARDCORE = 1;
3024
YSU_IGNORED_ALIASES = [ "g" ];
3125
};
3226
};
@@ -41,7 +35,6 @@ in
4135
ssh = {
4236
enable = true;
4337
extraConfig = ''
44-
user raoul
4538
identitiesOnly yes
4639
'';
4740
matchBlocks = rec {
@@ -133,20 +126,4 @@ in
133126
};
134127
};
135128

136-
# Signal start in tray fix
137-
home.file.".local/share/applications/signal-desktop.desktop" = {
138-
enable = osConfig.services.desktopManager.plasma6.enable;
139-
text = ''
140-
[Desktop Entry]
141-
Name=Signal
142-
Exec=LANGUAGE="de-DE:en-US" ${pkgs.signal-desktop}/bin/signal-desktop --no-sandbox --start-in-tray %U
143-
Terminal=false
144-
Type=Application
145-
Icon=signal-desktop
146-
StartupWMClass=Signal
147-
Comment=Private messaging from your desktop
148-
MimeType=x-scheme-handler/sgnl;x-scheme-handler/signalcaptcha;
149-
Categories=Network;InstantMessaging;Chat;
150-
'';
151-
};
152129
}

generic/users/raoul.nix

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
...
3+
}:
4+
{
5+
home.file = {
6+
".p10k.zsh".source = ./p10k.zsh;
7+
8+
};
9+
10+
programs.zsh = {
11+
localVariables.YSU_HARDCORE = 1;
12+
};
13+
14+
programs.ssh = {
15+
extraConfig = ''
16+
user raoul
17+
'';
18+
};
19+
}

generic/users/raoul/home-manager.nix

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
}:
88
with lib;
99
{
10-
imports = [ ./../default.nix ];
10+
imports = [
11+
./../default.nix
12+
../raoul.nix
13+
];
1114
# home.stateVersion = "23.05";
1215

1316
home.packages = with pkgs; [

generic/users/root/home-manager.nix

-6
This file was deleted.

0 commit comments

Comments
 (0)