1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
|
diff --git a/flake.nix b/flake.nix
index 50b132e138ceaad1dcc8fe9e812193860cabb3e4..b978fb079b5ea6c2517f9fc7b78e3b54221a9f5e 100644
--- a/flake.nix
+++ b/flake.nix
@@ -124,28 +124,22 @@ templ = inputs.templ.packages.${prev.system}.templ;
})
inputs.golink.overlay
];
+ pkgs = import nixpkgs {
+ inherit overlays;
+ system = "x86_64-linux";
+ config.allowUnfree = true;
+ };
userSecret = path: {
file = path;
owner = username;
};
- commonConfig = {gui ? true}: {config, ...}: {
+ commonConfig = {config, ...}: {
config = {
nixpkgs.overlays = overlays;
# TODO Remove when apps are updated
nixpkgs.config.permittedInsecurePackages = [
"electron-25.9.0"
];
- home-manager = {
- useGlobalPkgs = true;
- useUserPackages = true;
- users.${username}.imports =
- if gui
- then [./apps/gui]
- else [./apps/nogui];
- extraSpecialArgs = {
- flakePath = "/home/${username}/.config/nixpkgs";
- };
- };
age.secrets = {
ssh-config = userSecret ./secrets/shared/ssh-config.age;
ssh-config-work = userSecret ./secrets/shared/ssh-config-work.age;
@@ -166,9 +160,8 @@ };
};
};
workModules = [
- home-manager.nixosModules.home-manager
agenix.nixosModules.default
- (commonConfig {})
+ commonConfig
({pkgs, ...}: {
config = {
nixpkgs.overlays = [
@@ -176,10 +169,6 @@ (_: _: {
py39 = import nixpkgs-py39 {inherit (pkgs) system;};
})
];
- home-manager.users.${username}.programs = {
- git.package = pkgs.gitSVN;
- firefox.profiles.default.bookmarks = [(import ./apps/gui/firefox/work.nix)];
- };
age.secrets = {
netrc = {
file = ./secrets/work/netrc.age;
@@ -204,6 +193,40 @@ ];
username = "jolheiser";
in
{
+ homeConfigurations = let
+ commonModules = [
+ {
+ home = {
+ inherit username;
+ homeDirectory = "/home/${username}";
+ };
+ }
+ ./apps/gui
+ ];
+ in {
+ "jolheiser" = home-manager.lib.homeManagerConfiguration {
+ inherit pkgs;
+ modules = commonModules;
+ };
+ "work" = home-manager.lib.homeManagerConfiguration {
+ inherit pkgs;
+ modules =
+ commonModules
+ ++ [
+ {
+ nixpkgs.overlays = [
+ (_: _: {
+ py39 = import nixpkgs-py39 {inherit (pkgs) system;};
+ })
+ ];
+ programs = {
+ git.package = pkgs.gitSVN;
+ firefox.profiles.default.bookmarks = [(import ./apps/gui/firefox/work.nix)];
+ };
+ }
+ ];
+ };
+ };
nixosConfigurations = {
"chai" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
@@ -233,29 +256,26 @@ };
"matcha" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
- home-manager.nixosModules.home-manager
agenix.nixosModules.default
./machines/matcha
- (commonConfig {})
+ commonConfig
];
};
"genmaicha" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
- home-manager.nixosModules.home-manager
nixos-hardware.nixosModules.framework-13-7040-amd
agenix.nixosModules.default
./machines/genmaicha
- (commonConfig {})
+ commonConfig
];
};
"sencha" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
- home-manager.nixosModules.home-manager
agenix.nixosModules.default
./machines/sencha
- (commonConfig {})
+ commonConfig
];
};
};
|