-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathflake.nix
More file actions
158 lines (144 loc) · 4.34 KB
/
Copy pathflake.nix
File metadata and controls
158 lines (144 loc) · 4.34 KB
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
{
description = "NixOS configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-26.05";
nixpkgs-oldstable.url = "github:nixos/nixpkgs/nixos-25.11";
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-26.05";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
nix-index-database = {
url = "github:nix-community/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager/release-26.05";
inputs.nixpkgs.follows = "nixpkgs";
};
nur = {
url = "github:nix-community/NUR";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
self,
nixpkgs,
nix-index-database,
home-manager,
...
}:
let
user = "excigma";
config.allowUnfree = true;
system = "x86_64-linux";
pkgs = import nixpkgs { inherit config system; };
specialArgs = {
inherit
self
user
home-manager
nix-index-database
;
};
in
{
formatter.${system} = pkgs.nixfmt;
# Exposes repl accessible with `nix develop`
devShells.${system} = with pkgs; rec {
default = repl;
repl = mkShellNoCC {
shellHook = ''
exec nix repl --expr "let
flake = builtins.getFlake \"\''${builtins.getEnv \"PWD\"}?submodules=1\";
in flake
// flake.nixosConfigurations.default
// flake.nixosConfigurations.default.config.home-manager.users"
'';
};
};
nixosConfigurations = rec {
default = latitude-nixos;
# Dell Latitude Daily Driver
latitude-nixos = nixpkgs.lib.nixosSystem {
inherit specialArgs;
modules = [
./hosts/latitude
./modules/overlays
];
};
# Fujitsu Desktop (Akl)
akl-fujitsu-nixos = nixpkgs.lib.nixosSystem {
inherit specialArgs;
modules = [
./hosts/akl-fujitsu-nixos
./modules/overlays
];
};
# Orange Pi Zero 2W (Akl)
akl-opi-zero-2w = nixpkgs.lib.nixosSystem {
inherit specialArgs;
modules = [
./hosts/akl-opi-zero-2w
./modules/overlays
];
};
# Sydney ARM Server
syd-arm = nixpkgs.lib.nixosSystem {
inherit specialArgs;
modules = [
./hosts/syd-arm
./modules/overlays
];
};
# Sydney AMD Server
syd-amd = nixpkgs.lib.nixosSystem {
inherit specialArgs;
modules = [
./hosts/syd-amd
./modules/overlays
];
};
};
homeConfigurations = {
"${user}@latitude-nixos" = home-manager.lib.homeManagerConfiguration {
extraSpecialArgs = specialArgs;
modules = [ ./profiles/home-manager/daily-driver.nix ];
inherit pkgs;
};
"${user}@akl-fujitsu-nixos" = home-manager.lib.homeManagerConfiguration {
extraSpecialArgs = specialArgs;
modules = [ ./profiles/home-manager/desktop.nix ];
inherit pkgs;
};
"${user}@akl-opi-zero-2w" = home-manager.lib.homeManagerConfiguration {
extraSpecialArgs = specialArgs;
modules = [ ./profiles/home-manager/base.nix ];
pkgs = import nixpkgs {
inherit config;
system = "aarch64-linux";
};
};
"${user}@syd-arm" = home-manager.lib.homeManagerConfiguration {
extraSpecialArgs = specialArgs;
modules = [ ./profiles/home-manager/base.nix ];
pkgs = import nixpkgs {
inherit config;
system = "aarch64-linux";
};
};
"${user}@syd-amd" = home-manager.lib.homeManagerConfiguration {
extraSpecialArgs = specialArgs;
modules = [ ./profiles/home-manager/base.nix ];
inherit pkgs;
};
# Termux (Nix-in-Termux, aarch64) - CLI only
"${user}@termux" = home-manager.lib.homeManagerConfiguration {
extraSpecialArgs = specialArgs;
modules = [ ./profiles/home-manager/termux-cli.nix ];
pkgs = import nixpkgs {
inherit config;
system = "aarch64-linux";
};
};
};
};
}