tangled
alpha
login
or
join now
ladas552.me
/
Flake-ocean
0
fork
atom
My NixOS config Part 3: Flake-Parts Crusaders
nix.ladas552.me
hjem
nix
nixos
impermanence
flake-parts
nvfetcher
niri
noctalia
0
fork
atom
overview
issues
pulls
pipelines
trying to resurrect nixmux
Ladas552
2 weeks ago
14a3624e
abda861e
+50
-50
2 changed files
expand all
collapse all
unified
split
modules
flake-parts
host-machines.nix
hosts
NixMux
nixmux.nix
+49
-49
modules/flake-parts/host-machines.nix
···
5
5
...
6
6
}:
7
7
{
8
8
-
flake.nixosConfigurations =
8
8
+
flake =
9
9
let
10
10
prefix = "hosts/";
11
11
+
prefixAndroid = "nixOnDroidConfigurations/";
11
12
in
12
12
-
lib.pipe config.flake.modules.nixos [
13
13
-
(lib.filterAttrs (name: _: lib.hasPrefix prefix name))
14
14
-
(lib.mapAttrs' (
15
15
-
name: module: {
16
16
-
name = lib.removePrefix prefix name;
17
17
-
value = inputs.nixpkgs.lib.nixosSystem {
18
18
-
modules = [
19
19
-
module
20
20
-
config.flake.modules.nixos.hjem
21
21
-
config.flake.modules.nixos.homeManager
22
22
-
config.flake.modules.generic.options
23
23
-
{
24
24
-
hjem.extraModules = [
25
25
-
inputs.hjem-rum.hjemModules.default
26
26
-
config.flake.modules.generic.options
27
27
-
config.flake.modules.hjem.homebrewModules
28
28
-
];
29
29
-
home-manager.sharedModules = [
30
30
-
config.flake.modules.generic.options
31
31
-
config.flake.modules.homeManager.base
32
32
-
# minimal as different module only exists because I am not bothered to add minimal = true; to nix-on-droid
33
33
-
config.flake.modules.homeManager.homeManager-minimal
34
34
-
];
35
35
-
}
36
36
-
];
37
37
-
};
38
38
-
}
39
39
-
))
40
40
-
];
13
13
+
{
14
14
+
nixosConfigurations = lib.pipe config.flake.modules.nixos [
15
15
+
(lib.filterAttrs (name: _: lib.hasPrefix prefix name))
16
16
+
(lib.mapAttrs' (
17
17
+
name: module: {
18
18
+
name = lib.removePrefix prefix name;
19
19
+
value = inputs.nixpkgs.lib.nixosSystem {
20
20
+
modules = [
21
21
+
module
22
22
+
config.flake.modules.nixos.hjem
23
23
+
config.flake.modules.nixos.homeManager
24
24
+
config.flake.modules.generic.options
25
25
+
{
26
26
+
hjem.extraModules = [
27
27
+
inputs.hjem-rum.hjemModules.default
28
28
+
config.flake.modules.generic.options
29
29
+
config.flake.modules.hjem.homebrewModules
30
30
+
];
31
31
+
home-manager.sharedModules = [
32
32
+
config.flake.modules.generic.options
33
33
+
config.flake.modules.homeManager.base
34
34
+
# minimal as different module only exists because I am not bothered to add minimal = true; to nix-on-droid
35
35
+
config.flake.modules.homeManager.homeManager-minimal
36
36
+
];
37
37
+
}
38
38
+
];
39
39
+
};
40
40
+
}
41
41
+
))
42
42
+
];
41
43
42
42
-
flake.nixOnDroidConfigurations =
43
43
-
let
44
44
-
prefix = "nixOnDroidConfigurations/";
45
45
-
in
46
46
-
lib.pipe config.flake.modules.nixOnDroid [
47
47
-
(lib.filterAttrs (name: _: lib.hasPrefix prefix name))
48
48
-
(lib.mapAttrs' (
49
49
-
name: module: {
50
50
-
name = lib.removePrefix prefix name;
51
51
-
value = inputs.nix-on-droid.lib.nixOnDroidConfiguration {
52
52
-
pkgs = import inputs.nixpkgs { system = "aarch64-linux"; };
53
53
-
modules = [
54
54
-
module
55
55
-
config.flake.modules.nixOnDroid.options
56
56
-
];
57
57
-
};
58
58
-
}
59
59
-
))
60
60
-
];
44
44
+
# Having a let in for `prefix` breaks treesitter for some reason
45
45
+
nixOnDroidConfigurations = lib.pipe config.flake.modules.nixOnDroid [
46
46
+
(lib.filterAttrs (name: _: lib.hasPrefix prefixAndroid name))
47
47
+
(lib.mapAttrs' (
48
48
+
name: module: {
49
49
+
name = lib.removePrefix prefixAndroid name;
50
50
+
value = inputs.nix-on-droid.lib.nixOnDroidConfiguration {
51
51
+
pkgs = import inputs.nixpkgs { system = "aarch64-linux"; };
52
52
+
modules = [
53
53
+
module
54
54
+
config.flake.modules.generic.options
55
55
+
];
56
56
+
};
57
57
+
}
58
58
+
))
59
59
+
];
60
60
+
};
61
61
}
+1
-1
modules/hosts/NixMux/nixmux.nix
···
31
31
nix.registry = (lib.mapAttrs (_: flake: { inherit flake; }) inputs);
32
32
nix.nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") inputs;
33
33
# Better Error messages
34
34
-
nix.package = pkgs.nixVersions.latest;
34
34
+
nix.package = pkgs.lixPackageSets.git.lix;
35
35
# Read the changelog before changing this value
36
36
system.stateVersion = "24.05"; # Set up nix for flakes
37
37
# Set your time zone