diff options
-rw-r--r-- | common/default.nix | 9 | ||||
-rw-r--r-- | common/unfree.nix | 15 | ||||
-rw-r--r-- | flake.nix | 6 | ||||
-rw-r--r-- | usecases/desktop/graphical/firefox.nix | 1 |
4 files changed, 28 insertions, 3 deletions
diff --git a/common/default.nix b/common/default.nix index c2caaaf..b94f0dc 100644 --- a/common/default.nix +++ b/common/default.nix | |||
@@ -1,6 +1,6 @@ | |||
1 | inputs: | 1 | inputs: |
2 | 2 | ||
3 | { config, ... }: | 3 | { config, lib, ... }: |
4 | 4 | ||
5 | { | 5 | { |
6 | imports = [ | 6 | imports = [ |
@@ -10,13 +10,18 @@ inputs: | |||
10 | (import ./ssh.nix inputs) | 10 | (import ./ssh.nix inputs) |
11 | (import ./theme.nix inputs) | 11 | (import ./theme.nix inputs) |
12 | (import ./tinc.nix inputs) | 12 | (import ./tinc.nix inputs) |
13 | (import ./unfree.nix inputs) | ||
13 | (import ./vim.nix inputs) | 14 | (import ./vim.nix inputs) |
14 | (import ./zram.nix inputs) | 15 | (import ./zram.nix inputs) |
15 | ]; | 16 | ]; |
16 | 17 | ||
17 | nixpkgs.overlays = [ | 18 | nixpkgs.overlays = [ |
18 | (final: prev: { | 19 | (final: prev: { |
19 | unstable = inputs.nixpkgs-unstable.legacyPackages.${config.nixpkgs.system}; | 20 | # Inheriting config allows adding unfree package using the option |
21 | # nixpkgs.config.allowUnfreePredicate | ||
22 | unstable = import inputs.nixpkgs-unstable { | ||
23 | inherit (config.nixpkgs) system config; | ||
24 | }; | ||
20 | }) | 25 | }) |
21 | inputs.nur.overlay | 26 | inputs.nur.overlay |
22 | ]; | 27 | ]; |
diff --git a/common/unfree.nix b/common/unfree.nix new file mode 100644 index 0000000..b07b151 --- /dev/null +++ b/common/unfree.nix | |||
@@ -0,0 +1,15 @@ | |||
1 | inputs: | ||
2 | |||
3 | { lib, ... }: | ||
4 | |||
5 | { | ||
6 | # List accepted unfree packages in a common place, since somehow the merge | ||
7 | # operation of this attribute is broken | ||
8 | nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ | ||
9 | "betterttv" | ||
10 | |||
11 | "steam" | ||
12 | "steam-original" | ||
13 | "steam-runtime" | ||
14 | ]; | ||
15 | } | ||
@@ -182,7 +182,11 @@ | |||
182 | 182 | ||
183 | hydraJobs = | 183 | hydraJobs = |
184 | let | 184 | let |
185 | inherit (nixpkgs.legacyPackages.x86_64-linux) nixosTest; | 185 | # Use the nixpkgs configuration of the testDefault machine, so that it |
186 | # contains the list of allowed unfree packages | ||
187 | nixpkgsConfig = self.nixosConfigurations.testDefault.config.nixpkgs.config; | ||
188 | pkgs = import nixpkgs { system = "x86_64-linux"; config = nixpkgsConfig; }; | ||
189 | inherit (pkgs) nixosTest; | ||
186 | in | 190 | in |
187 | { | 191 | { |
188 | 192 | ||
diff --git a/usecases/desktop/graphical/firefox.nix b/usecases/desktop/graphical/firefox.nix index 20cac71..3953503 100644 --- a/usecases/desktop/graphical/firefox.nix +++ b/usecases/desktop/graphical/firefox.nix | |||
@@ -23,6 +23,7 @@ inputs: | |||
23 | umatrix | 23 | umatrix |
24 | 24 | ||
25 | # Additional features | 25 | # Additional features |
26 | betterttv | ||
26 | sidebery | 27 | sidebery |
27 | stylus | 28 | stylus |
28 | #firenvim | 29 | #firenvim |