From 1212373b88e7a4f5449f8d8e16124bb75a841a46 Mon Sep 17 00:00:00 2001 From: Minijackson Date: Fri, 18 Jun 2021 12:09:38 +0200 Subject: firefox: re-enable betterttv, fix unfree packages in hydra --- common/default.nix | 9 +++++++-- common/unfree.nix | 15 +++++++++++++++ flake.nix | 6 +++++- usecases/desktop/graphical/firefox.nix | 1 + 4 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 common/unfree.nix 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 @@ inputs: -{ config, ... }: +{ config, lib, ... }: { imports = [ @@ -10,13 +10,18 @@ inputs: (import ./ssh.nix inputs) (import ./theme.nix inputs) (import ./tinc.nix inputs) + (import ./unfree.nix inputs) (import ./vim.nix inputs) (import ./zram.nix inputs) ]; nixpkgs.overlays = [ (final: prev: { - unstable = inputs.nixpkgs-unstable.legacyPackages.${config.nixpkgs.system}; + # Inheriting config allows adding unfree package using the option + # nixpkgs.config.allowUnfreePredicate + unstable = import inputs.nixpkgs-unstable { + inherit (config.nixpkgs) system config; + }; }) inputs.nur.overlay ]; 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 @@ +inputs: + +{ lib, ... }: + +{ + # List accepted unfree packages in a common place, since somehow the merge + # operation of this attribute is broken + nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ + "betterttv" + + "steam" + "steam-original" + "steam-runtime" + ]; +} diff --git a/flake.nix b/flake.nix index b6e2b02..b097118 100644 --- a/flake.nix +++ b/flake.nix @@ -182,7 +182,11 @@ hydraJobs = let - inherit (nixpkgs.legacyPackages.x86_64-linux) nixosTest; + # Use the nixpkgs configuration of the testDefault machine, so that it + # contains the list of allowed unfree packages + nixpkgsConfig = self.nixosConfigurations.testDefault.config.nixpkgs.config; + pkgs = import nixpkgs { system = "x86_64-linux"; config = nixpkgsConfig; }; + inherit (pkgs) nixosTest; in { 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: umatrix # Additional features + betterttv sidebery stylus #firenvim -- cgit v1.2.3