-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
175 lines (157 loc) · 5.15 KB
/
Copy pathflake.nix
File metadata and controls
175 lines (157 loc) · 5.15 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
163
164
165
166
167
168
169
170
171
172
173
174
175
{
description = "DuskyElf's dotfiles";
nixConfig = {
extra-substituters = [
"https://cuda-maintainers.cachix.org/"
];
extra-trusted-public-keys = [
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
];
};
inputs = {
self.submodules = true;
nixpkgs.url = "nixpkgs/nixos-26.05";
# pkgs from release-26.05 are not cached, I compile my kernel myself either way
nixpkgs-fast-release.url = "nixpkgs/release-26.05";
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
# for opencoode and pi-coding-agent
# which I want to be on the latest version but don't want to wait for the whole nixpkgs-unstable to build
nixpkgs-unstable-small.url = "nixpkgs/nixos-unstable-small";
jail-nix = {
url = "sourcehut:~alexdavid/jail.nix";
};
neovimBTW = {
url = ./neovimBTW;
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager/release-26.05";
inputs.nixpkgs.follows = "nixpkgs";
};
stylix = {
url = "github:nix-community/stylix/release-26.05";
inputs.nixpkgs.follows = "nixpkgs";
};
niri = {
url = "github:sodiboo/niri-flake";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
zen-browser = {
url = "github:0xc000022070/zen-browser-flake/beta";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
};
outputs =
{
self,
nixpkgs,
home-manager,
...
}@inputs:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
overlays = [
# Workaround: Module-CPANTS-Analyse test fails with Archive::Any::Lite 0.11
# because SECURE EXTRACT MODE rejects the absolute-symlink test tarball.
# This cascades: Test-Kwalitee → Finance-Quote → gnucash breaks.
#
# Using `perl5.override { overrides = ... }` with the base `prev.perl5.pkgs`
# creates a top-level `//` merge that does NOT propagate to internal fixpoint
# references inside makeScopeWithSplicing'. Test-Kwalitee would still use the
# original ModuleCPANTSAnalyse (with tests enabled).
#
# Instead, use overrideScope on the perl package set itself. This rebuilds
# the entire scope fixpoint, so ALL packages that depend on ModuleCPANTSAnalyse
# (Test-Kwalitee, Finance-Quote, etc.) will use the overridden version internally.
(final: prev: {
perl5 = prev.perl5.override {
overrides =
_:
prev.perl5.pkgs.overrideScope (
finalself: prevself: {
ModuleCPANTSAnalyse = prevself.ModuleCPANTSAnalyse.overrideAttrs (old: {
doCheck = false;
});
}
);
};
})
];
};
pkgs-unstable = inputs.nixpkgs-unstable.legacyPackages.${system};
pkgs-unstable-small = inputs.nixpkgs-unstable-small.legacyPackages.${system};
pkgs-fast-release = import inputs.nixpkgs-fast-release {
system = system;
config.allowUnfree = true;
};
baseJail = inputs.jail-nix.lib.extend {
inherit pkgs;
additionalCombinators =
c: with c; {
xdg-app =
home: appName:
compose [
(set-env "XDG_CONFIG_HOME" "${home}/.config")
(set-env "XDG_DATA_HOME" "${home}/.local/share")
(set-env "XDG_CACHE_HOME" "${home}/.cache")
(try-rw-bind "${home}/.config/${appName}" "${home}/.config/${appName}")
(try-rw-bind "${home}/.local/share/${appName}" "${home}/.local/share/${appName}")
(try-rw-bind "${home}/.cache/${appName}" "${home}/.cache/${appName}")
(try-rw-bind "${home}/.${appName}" "${home}/.${appName}")
];
};
};
jail =
name: pkg: combinators:
pkgs.symlinkJoin {
name = "${name}-jailed";
paths = [
(baseJail name pkg combinators)
pkg
];
};
in
{
nixosConfigurations.asus = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit
inputs
jail
pkgs-unstable
pkgs-fast-release
;
};
modules = [
./system.nix
./hosts/asus/system.nix
./cli/system.nix
./gui/system.nix
];
};
homeConfigurations."duskyelf@asus" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
./home.nix
./cli/home.nix
./gui/home.nix
inputs.niri.homeModules.config
inputs.niri.homeModules.stylix
inputs.stylix.homeModules.stylix
inputs.zen-browser.homeModules.beta
];
extraSpecialArgs = {
inherit
inputs
pkgs-unstable
pkgs-unstable-small
jail
;
};
};
formatter.${system} = pkgs.nixfmt-tree;
};
}