From bcd317f23df6d076470879c706ca025659bfa722 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sun, 4 Mar 2018 22:08:07 +0100 Subject: [PATCH] refactor(pkgs): Add wallpapers to top-level package set --- desktop.nix | 5 ++--- packages.nix | 9 +++++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/desktop.nix b/desktop.nix index bb3041f1c..6ff41cbfd 100644 --- a/desktop.nix +++ b/desktop.nix @@ -2,8 +2,7 @@ { config, lib, pkgs, ... }: -let wallpapers = import ./pkgs/wallpapers.nix; - emacs = import ./emacs.nix { inherit pkgs; }; +let emacs = import ./emacs.nix { inherit pkgs; }; in { # Configure basic X-server stuff: services.xserver = { @@ -52,7 +51,7 @@ in { description = "Randomly set wallpaper via feh"; serviceConfig = { Type = "oneshot"; - WorkingDirectory = "${wallpapers}/share/wallpapers"; + WorkingDirectory = "${pkgs.wallpapers}/share/wallpapers"; # Manually shuffle because feh's --randomize option can't be restricted to # just certain file types. diff --git a/packages.nix b/packages.nix index 27435e545..4cbe8ba60 100644 --- a/packages.nix +++ b/packages.nix @@ -8,8 +8,13 @@ let unstable = import { config.allowUnfree = true; }; rust-overlay = import nixpkgs-mozilla/rust-overlay.nix; in { # Configure the Nix package manager - nixpkgs.config.allowUnfree = true; - nixpkgs.overlays = [ rust-overlay ]; + nixpkgs = { + overlays = [ rust-overlay ]; + config.allowUnfree = true; + config.packageOverrides = oldPkgs: oldPkgs // { + wallpapers = import ./pkgs/wallpapers.nix; + }; + }; # ... and declare packages to be installed. environment.systemPackages = with pkgs; [