From 5d8413a85a5bafb977995d154a4c57bfd7d551e3 Mon Sep 17 00:00:00 2001 From: Timothy DeHerrera Date: Sun, 26 Jul 2020 22:18:59 -0600 Subject: [PATCH] pkgs#unstable: remove specialArgs The `specialArgs` defined in `hosts` has kept some modules from working in external flakes. Instead, we simply enumerate packages in `hosts` which should be pulled from `unstablePkgs`. --- hosts/default.nix | 30 ++++++++++++---------- profiles/core.nix | 10 +------- profiles/games/default.nix | 9 +++---- profiles/graphical/qutebrowser/default.nix | 17 ++++++------ profiles/im/default.nix | 4 +-- 5 files changed, 31 insertions(+), 39 deletions(-) diff --git a/hosts/default.nix b/hosts/default.nix index 2e4b092c..c29bfd0a 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -12,18 +12,6 @@ let lib.nixosSystem { inherit system; - specialArgs = { - inherit unstablePkgs; - - flakes = { - nixpkgs = nixpkgs; - master = inputs.unstable; - nixflk = self; - }; - - usr = { inherit utils; }; - }; - modules = let inherit (home.nixosModules) home-manager; @@ -38,6 +26,22 @@ let ]; nixpkgs = { inherit pkgs; }; + + nix.registry = { + nixpkgs.flake = nixpkgs; + nixflk.flake = self; + master.flake = inputs.unstable; + }; + }; + + unstables = { + systemd.package = unstablePkgs.systemd; + nixpkgs.overlays = [ + (final: prev: + with unstablePkgs; { + inherit starship element-desktop discord signal-desktop mpv; + }) + ]; }; local = import "${toString ./.}/${hostName}.nix"; @@ -46,7 +50,7 @@ let flakeModules = attrValues (removeAttrs self.nixosModules [ "profiles" ]); - in flakeModules ++ [ core global local home-manager ]; + in flakeModules ++ [ core global local home-manager unstables ]; }; diff --git a/profiles/core.nix b/profiles/core.nix index 2c8b1878..3bac7f0e 100644 --- a/profiles/core.nix +++ b/profiles/core.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, unstablePkgs, flakes, ... }: +{ config, lib, pkgs, ... }: let inherit (lib) fileContents; in { @@ -6,12 +6,6 @@ in { nix.systemFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ]; - nix.registry = with flakes; { - nixpkgs.flake = nixpkgs; - nixflk.flake = nixflk; - master.flake = master; - }; - imports = [ ../local/locale.nix ]; environment = { @@ -126,8 +120,6 @@ in { }; - systemd.package = unstablePkgs.systemd; - services.earlyoom.enable = true; users.mutableUsers = false; diff --git a/profiles/games/default.nix b/profiles/games/default.nix index a364e04f..65cf9fd8 100644 --- a/profiles/games/default.nix +++ b/profiles/games/default.nix @@ -1,6 +1,6 @@ -{ unstablePkgs, ... }: { +{ pkgs, ... }: { imports = [ ../graphical ./udev.nix ]; - environment.systemPackages = with unstablePkgs; [ + environment.systemPackages = with pkgs; [ retroarchBare steam-run pcsx2 @@ -15,10 +15,7 @@ services.xserver.libinput.disableWhileTyping = false; # Launch steam from display managers - services.xserver.windowManager.steam = { - enable = true; - package = unstablePkgs.steam; - }; + services.xserver.windowManager.steam = { enable = true; }; # 32-bit support needed for steam hardware.opengl.driSupport32Bit = true; diff --git a/profiles/graphical/qutebrowser/default.nix b/profiles/graphical/qutebrowser/default.nix index 6f3a8206..f6709bbd 100644 --- a/profiles/graphical/qutebrowser/default.nix +++ b/profiles/graphical/qutebrowser/default.nix @@ -1,20 +1,19 @@ -{ unstablePkgs, ... }: +{ pkgs, ... }: let inherit (builtins) readFile; in { sound.enable = true; environment = { - etc."xdg/qutebrowser/config.py".text = - let mpv = "${unstablePkgs.mpv}/bin/mpv"; - in '' - ${readFile ./config.py} + etc."xdg/qutebrowser/config.py".text = let mpv = "${pkgs.mpv}/bin/mpv"; + in '' + ${readFile ./config.py} - config.bind(',m', 'hint links spawn -d ${mpv} {hint-url}') - config.bind(',v', 'spawn -d ${mpv} {url}') - ''; + config.bind(',m', 'hint links spawn -d ${mpv} {hint-url}') + config.bind(',v', 'spawn -d ${mpv} {url}') + ''; sessionVariables.BROWSER = "qute"; - systemPackages = with unstablePkgs; [ qute qutebrowser mpv youtubeDL ]; + systemPackages = with pkgs; [ qute qutebrowser mpv youtubeDL ]; }; } diff --git a/profiles/im/default.nix b/profiles/im/default.nix index 4a9335c2..373e9fb9 100644 --- a/profiles/im/default.nix +++ b/profiles/im/default.nix @@ -1,5 +1,5 @@ -{ unstablePkgs, ... }: { - environment.systemPackages = with unstablePkgs; [ +{ pkgs, ... }: { + environment.systemPackages = with pkgs; [ discord element-desktop signal-desktop