tangled
alpha
login
or
join now
da157.id
/
nix-config
0
fork
atom
0xda157's home-manager and nixos config
0
fork
atom
overview
issues
pulls
pipelines
move hosts into modules, etc
0xda157
4 months ago
f766e392
b2515761
+99
-134
26 changed files
expand all
collapse all
unified
split
flake.nix
hosts
home-manager
flake-module.nix
nixos
flake-module.nix
modules
default.nix
flake-module.nix
hosts
default.nix
home-manager
default.nix
nixGL.nix
potato@archOwO
default.nix
nixos
dione
default.nix
disko.nix
hardware.nix
enceladus
default.nix
disko.nix
fcitx5-settings.nix
hardware.nix
janus
default.nix
disko.nix
hardware.nix
tethys
default.nix
disko.nix
hardware.nix
titan
default.nix
disko.nix
hardware.nix
users
default.nix
+4
-6
flake.nix
···
5
5
inputs:
6
6
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
7
7
imports = [
8
8
-
# keep-sorted start prefix_order=inputs,./
8
8
+
# keep-sorted start
9
9
inputs.git-hooks.flakeModule
10
10
inputs.home-manager.flakeModules.home-manager
11
11
inputs.pkgs-by-name-for-flake-parts.flakeModule
12
12
-
./hosts/home-manager/flake-module.nix
13
13
-
./hosts/nixos/flake-module.nix
14
14
-
./lib.nix
15
15
-
./modules/flake-module.nix
12
12
+
# keep-sorted end
13
13
+
./modules
16
14
./templates/flake-module.nix
17
17
-
# keep-sorted end
15
15
+
./lib.nix
18
16
];
19
17
20
18
systems = import inputs.systems;
hosts/home-manager/default.nix
modules/hosts/home-manager/default.nix
-40
hosts/home-manager/flake-module.nix
···
1
1
-
{ }
2
2
-
# {
3
3
-
# inputs,
4
4
-
# self,
5
5
-
# lib,
6
6
-
# ...
7
7
-
# }:
8
8
-
# {
9
9
-
# flake.homeConfigurations =
10
10
-
# {
11
11
-
# "potato@archOwO" = "x86_64-linux";
12
12
-
# }
13
13
-
# |> lib.mapAttrs (
14
14
-
# name: system:
15
15
-
# let
16
16
-
# username = name |> lib.strings.splitString "@" |> lib.head;
17
17
-
# in
18
18
-
# inputs.home-manager.lib.homeManagerConfiguration {
19
19
-
# pkgs = inputs.nixpkgs.legacyPackages.${system};
20
20
-
# modules = [
21
21
-
# # keep-sorted start prefix_order=inputs,self,./
22
22
-
# inputs.potatofox.homeModules.potatofox
23
23
-
# inputs.sops-nix.homeManagerModules.sops
24
24
-
# inputs.stylix.homeModules.stylix
25
25
-
# inputs.zen-browser.homeModules.beta
26
26
-
# self.homeModules.root
27
27
-
# ./${name}
28
28
-
# ./.
29
29
-
# # keep-sorted end
30
30
-
# ];
31
31
-
# extraSpecialArgs = {
32
32
-
# inherit
33
33
-
# inputs
34
34
-
# lib
35
35
-
# self
36
36
-
# ;
37
37
-
# };
38
38
-
# }
39
39
-
# );
40
40
-
# }
hosts/home-manager/nixGL.nix
modules/hosts/home-manager/nixGL.nix
hosts/home-manager/potato@archOwO/default.nix
modules/hosts/home-manager/potato@archOwO/default.nix
hosts/nixos/dione/default.nix
modules/hosts/nixos/dione/default.nix
hosts/nixos/dione/disko.nix
modules/hosts/nixos/dione/disko.nix
hosts/nixos/dione/hardware.nix
modules/hosts/nixos/dione/hardware.nix
+1
-1
hosts/nixos/enceladus/default.nix
modules/hosts/nixos/enceladus/default.nix
···
58
58
steam.enable = true;
59
59
};
60
60
61
61
-
stylix.image = ../../../media/wallpapers/pink-flower-catpuccin.png;
61
61
+
stylix.image = ../../../../media/wallpapers/pink-flower-catpuccin.png;
62
62
63
63
home-manager.users.da157 = {
64
64
l.suites = {
hosts/nixos/enceladus/disko.nix
modules/hosts/nixos/enceladus/disko.nix
hosts/nixos/enceladus/fcitx5-settings.nix
modules/hosts/nixos/enceladus/fcitx5-settings.nix
hosts/nixos/enceladus/hardware.nix
modules/hosts/nixos/enceladus/hardware.nix
-52
hosts/nixos/flake-module.nix
···
1
1
-
{
2
2
-
inputs,
3
3
-
lib,
4
4
-
self,
5
5
-
...
6
6
-
}:
7
7
-
{
8
8
-
flake.nixosConfigurations =
9
9
-
(name: {
10
10
-
${name} = inputs.nixpkgs.lib.nixosSystem {
11
11
-
modules = [
12
12
-
# keep-sorted start block=yes prefix_order=inputs,self,./,{
13
13
-
inputs.disko.nixosModules.disko
14
14
-
inputs.home-manager.nixosModules.home-manager
15
15
-
inputs.sops-nix.nixosModules.sops
16
16
-
inputs.stylix.nixosModules.stylix
17
17
-
self.nixosModules.default
18
18
-
self.nixosModules.homelab
19
19
-
./${name}
20
20
-
{
21
21
-
home-manager = {
22
22
-
sharedModules = [
23
23
-
inputs.potatofox.homeModules.potatofox
24
24
-
inputs.sops-nix.homeManagerModules.sops
25
25
-
inputs.zen-browser.homeModules.beta
26
26
-
self.homeModules.default
27
27
-
];
28
28
-
users.da157 = {
29
29
-
imports = [ self.homeModules.da157 ];
30
30
-
l.secrets.enable = true;
31
31
-
};
32
32
-
};
33
33
-
}
34
34
-
# keep-sorted end
35
35
-
];
36
36
-
specialArgs = {
37
37
-
inherit
38
38
-
inputs
39
39
-
lib
40
40
-
name
41
41
-
self
42
42
-
;
43
43
-
};
44
44
-
};
45
45
-
})
46
46
-
|> lib.forEach (
47
47
-
builtins.readDir ./.
48
48
-
|> lib.mapAttrsToList (name: kind: lib.optional (kind == "directory") name)
49
49
-
|> builtins.concatLists
50
50
-
)
51
51
-
|> lib.mergeAttrsList;
52
52
-
}
hosts/nixos/janus/default.nix
modules/hosts/nixos/janus/default.nix
hosts/nixos/janus/disko.nix
modules/hosts/nixos/janus/disko.nix
hosts/nixos/janus/hardware.nix
modules/hosts/nixos/janus/hardware.nix
hosts/nixos/tethys/default.nix
modules/hosts/nixos/tethys/default.nix
hosts/nixos/tethys/disko.nix
modules/hosts/nixos/tethys/disko.nix
hosts/nixos/tethys/hardware.nix
modules/hosts/nixos/tethys/hardware.nix
+1
-1
hosts/nixos/titan/default.nix
modules/hosts/nixos/titan/default.nix
···
43
43
steam.enable = true;
44
44
};
45
45
46
46
-
stylix.image = ../../../media/wallpapers/mountain-range.png;
46
46
+
stylix.image = ../../../../media/wallpapers/mountain-range.png;
47
47
48
48
home-manager.users.da157 = {
49
49
l.suites = {
hosts/nixos/titan/disko.nix
modules/hosts/nixos/titan/disko.nix
hosts/nixos/titan/hardware.nix
modules/hosts/nixos/titan/hardware.nix
+29
modules/default.nix
···
1
1
+
{ lib, self, ... }:
2
2
+
let
3
3
+
inherit (self.lib) loadDir;
4
4
+
in
5
5
+
{
6
6
+
imports = [
7
7
+
./hosts
8
8
+
./users
9
9
+
];
10
10
+
flake = {
11
11
+
nixosModules = {
12
12
+
default = {
13
13
+
imports = loadDir ./shared ++ loadDir ./root ++ loadDir ./nixos;
14
14
+
};
15
15
+
homelab = {
16
16
+
imports = loadDir ./homelab;
17
17
+
};
18
18
+
};
19
19
+
homeModules = rec {
20
20
+
default = {
21
21
+
imports = loadDir ./shared ++ loadDir ./home;
22
22
+
};
23
23
+
root = lib.mkMerge [
24
24
+
default
25
25
+
{ imports = loadDir ./root; }
26
26
+
];
27
27
+
};
28
28
+
};
29
29
+
}
-34
modules/flake-module.nix
···
1
1
-
{ lib, self, ... }:
2
2
-
let
3
3
-
inherit (self.lib) loadDir;
4
4
-
in
5
5
-
{
6
6
-
flake = {
7
7
-
nixosModules = {
8
8
-
default = {
9
9
-
imports = loadDir ./shared ++ loadDir ./root ++ loadDir ./nixos;
10
10
-
};
11
11
-
homelab = {
12
12
-
imports = loadDir ./homelab;
13
13
-
};
14
14
-
};
15
15
-
homeModules = lib.mkMerge [
16
16
-
(rec {
17
17
-
default = {
18
18
-
imports = loadDir ./shared ++ loadDir ./home;
19
19
-
};
20
20
-
root = lib.mkMerge [
21
21
-
default
22
22
-
{ imports = loadDir ./root; }
23
23
-
];
24
24
-
})
25
25
-
(
26
26
-
builtins.readDir ./users
27
27
-
|> lib.filterAttrs (n: k: k == "directory")
28
28
-
|> lib.mapAttrs (
29
29
-
path: kind: { imports = [ self.homeModules.default ] ++ self.lib.loadDir (./users + "/${path}"); }
30
30
-
)
31
31
-
)
32
32
-
];
33
33
-
};
34
34
-
}
+55
modules/hosts/default.nix
···
1
1
+
{
2
2
+
inputs,
3
3
+
lib,
4
4
+
self,
5
5
+
...
6
6
+
}:
7
7
+
{
8
8
+
flake = {
9
9
+
homeConfigurations = { };
10
10
+
nixosConfigurations =
11
11
+
(name: {
12
12
+
${name} = inputs.nixpkgs.lib.nixosSystem {
13
13
+
modules = [
14
14
+
# keep-sorted start block=yes prefix_order=inputs,self,./,{
15
15
+
inputs.disko.nixosModules.disko
16
16
+
inputs.home-manager.nixosModules.home-manager
17
17
+
inputs.sops-nix.nixosModules.sops
18
18
+
inputs.stylix.nixosModules.stylix
19
19
+
self.nixosModules.default
20
20
+
self.nixosModules.homelab
21
21
+
./nixos/${name}
22
22
+
{
23
23
+
home-manager = {
24
24
+
sharedModules = [
25
25
+
inputs.potatofox.homeModules.potatofox
26
26
+
inputs.sops-nix.homeManagerModules.sops
27
27
+
inputs.zen-browser.homeModules.beta
28
28
+
self.homeModules.default
29
29
+
];
30
30
+
users.da157 = {
31
31
+
imports = [ self.homeModules.da157 ];
32
32
+
l.secrets.enable = true;
33
33
+
};
34
34
+
};
35
35
+
}
36
36
+
# keep-sorted end
37
37
+
];
38
38
+
specialArgs = {
39
39
+
inherit
40
40
+
inputs
41
41
+
lib
42
42
+
name
43
43
+
self
44
44
+
;
45
45
+
};
46
46
+
};
47
47
+
})
48
48
+
|> lib.forEach (
49
49
+
builtins.readDir ./nixos
50
50
+
|> lib.mapAttrsToList (name: kind: lib.optional (kind == "directory") name)
51
51
+
|> builtins.concatLists
52
52
+
)
53
53
+
|> lib.mergeAttrsList;
54
54
+
};
55
55
+
}
+9
modules/users/default.nix
···
1
1
+
{ lib, self, ... }:
2
2
+
{
3
3
+
flake.homeModules =
4
4
+
builtins.readDir ./.
5
5
+
|> lib.filterAttrs (n: k: k == "directory")
6
6
+
|> lib.mapAttrs (
7
7
+
path: kind: { imports = [ self.homeModules.default ] ++ self.lib.loadDir (./. + "/${path}"); }
8
8
+
);
9
9
+
}