-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
162 lines (148 loc) · 5.21 KB
/
Copy pathflake.nix
File metadata and controls
162 lines (148 loc) · 5.21 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
159
160
161
162
{
description = "System config";
nixConfig = {
extra-substituters = [
"https://vicinae.cachix.org"
"https://cuda-maintainers.cachix.org"
"https://cache.numtide.com"
];
extra-trusted-public-keys = [
"vicinae.cachix.org-1:1kDrfienkGHPYbkpNj1mWTr7Fm1+zcenzgTizIcI3oc="
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
"niks3.numtide.com-1:DTx8wZduET09hRmMtKdQDxNNthLQETkc/yaX7M4qK0g="
];
};
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix.url = "github:Mic92/sops-nix";
claude-code.url = "github:numtide/llm-agents.nix";
vicinae.url = "github:vicinaehq/vicinae";
grabit.url = "git+file:///home/fobos/dev/grabit?ref=edit-existing-file";
hyprland-preview-share-picker.url = "git+https://github.com/WhySoBad/hyprland-preview-share-picker?submodules=1";
mt7927-dkms = {
url = "github:jetm/mediatek-mt7927-dkms";
flake = false;
};
nix-index-database = {
url = "github:nix-community/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
net-tui = {
url = "github:yofsh/net-tui";
inputs.nixpkgs.follows = "nixpkgs";
};
glide = {
url = "github:glide-browser/glide.nix";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
};
outputs = { self, nixpkgs, home-manager, sops-nix, ... }@inputs:
let
system = "x86_64-linux";
# file 5.48's landlock sandbox can't spawn decompressors, breaking archive
# MIME detection and patool's tests (→ bottles → system build).
# Backport of nixpkgs#540742; drop once it reaches nixos-unstable.
patoolLandlockFix = _: prev: {
pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
(_: pyprev: {
patool = pyprev.patool.override {
file = prev.file.overrideAttrs (old: {
postPatch = (old.postPatch or "") + ''
substituteInPlace src/landlock.c --replace-fail \
"LANDLOCK_ACCESS_FS_READ_FILE | LANDLOCK_ACCESS_FS_READ_DIR" \
"LANDLOCK_ACCESS_FS_READ_FILE | LANDLOCK_ACCESS_FS_READ_DIR | LANDLOCK_ACCESS_FS_EXECUTE"
'';
});
};
})
];
};
pkgs = import nixpkgs {
inherit system;
overlays = [
# drop once nixpkgs#539806 (click-threading: rm docs before check) reaches nixos-unstable
(_: prev: {
pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
(_: pyprev: {
click-threading = pyprev.click-threading.overridePythonAttrs (old: {
preCheck = (old.preCheck or "") + ''
rm -rf docs
'';
});
})
];
})
];
};
in {
nixosConfigurations.iso = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs; };
modules = [
./hosts/iso/configuration.nix
{ nixpkgs.overlays = [ patoolLandlockFix ]; }
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit inputs; hostname = "iso"; };
home-manager.sharedModules = [
inputs.vicinae.homeManagerModules.default
inputs.nix-index-database.homeModules.nix-index
];
home-manager.users.fobos = import ./home/default.nix;
}
];
};
nixosConfigurations.ares = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs; };
modules = [
sops-nix.nixosModules.sops
./hosts/ares/configuration.nix
{
nixpkgs.overlays = [
(_: prev: { monique = prev.callPackage ./pkgs/monique.nix { }; })
patoolLandlockFix
];
}
];
};
nixosConfigurations.athena = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs; };
modules = [
./hosts/athena/configuration.nix
sops-nix.nixosModules.sops
{ nixpkgs.overlays = [ patoolLandlockFix ]; }
];
};
nixosConfigurations.hermes = nixpkgs.lib.nixosSystem {
inherit system;
modules = [ ./hosts/hermes/configuration.nix ];
};
nixosConfigurations.demeter = nixpkgs.lib.nixosSystem {
inherit system;
modules = [ ./hosts/demeter/configuration.nix ];
};
homeConfigurations = let
mkHome = hostname: home-manager.lib.homeManagerConfiguration {
extraSpecialArgs = { inherit inputs hostname; };
inherit pkgs;
modules = [
./home/default.nix
inputs.vicinae.homeManagerModules.default
inputs.nix-index-database.homeModules.nix-index
];
};
in {
"fobos@ares" = mkHome "ares";
"fobos@athena" = mkHome "athena";
};
};
}