refactor(grfn): Stop importing nixpkgs a bunch of times

Once is enough!

<grfn> https://tazj.in/blobs/touch-garbage.jpg

Change-Id: I68f66669e82d35a71752638450fa4b820e137172
Signed-Off-By: Florian Klink <flokli@flokli.de>
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3048
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
This commit is contained in:
Vincent Ambo 2021-04-20 00:09:39 +02:00 committed by tazjin
parent 5f19e8e6a7
commit b75dd136cb
9 changed files with 12 additions and 35 deletions

View file

@ -1,8 +0,0 @@
with import <nixpkgs> {};
fetchgit {
url = "https://github.com/glittershark/dotfiles.git";
rev = "e0c7f2592fbc2f9942763d2146d362a1314630e9";
# date = "2020-03-25T20:38:51-04:00";
sha256 = "126zy4ff6nl2vma2s74waksim7j5h3n6qpaxnnn17vkc1cq0fcd9";
fetchSubmodules = false;
}

View file

@ -5,13 +5,16 @@ with lib;
rec { rec {
home = confPath: (import "${pkgs.home-manager.src}/modules" { home = confPath: (import "${pkgs.home-manager.src}/modules" {
inherit pkgs; inherit pkgs;
configuration = { config, lib, ... }: { configuration = { config, lib, ... }: {
imports = [confPath]; imports = [ confPath ];
_module.args.pkgs = mkForce
(import pkgs.path (filterAttrs (n: v: v != null) config.nixpkgs));
lib.depot = depot; lib.depot = depot;
# home-manager exposes no API to override the package set that
# is used, unless called from the NixOS module.
#
# To get around it, the module argument is overridden here.
_module.args.pkgs = mkForce pkgs;
}; };
}); });

View file

@ -37,9 +37,6 @@ in
cachix cachix
]; ];
nixpkgs.config.allowUnfree = true;
programs.password-store.enable = true; programs.password-store.enable = true;
programs.home-manager.enable = true; programs.home-manager.enable = true;

View file

@ -13,8 +13,6 @@
../modules/lib/cloneRepo.nix ../modules/lib/cloneRepo.nix
]; ];
nixpkgs.config.allowUnfree = true;
programs.password-store.enable = true; programs.password-store.enable = true;
grfn.impure.clonedRepos.passwordStore = { grfn.impure.clonedRepos.passwordStore = {

View file

@ -43,13 +43,6 @@ in {
gnutls gnutls
]; ];
nixpkgs.overlays = [
(import (builtins.fetchTarball {
url = "https://github.com/nix-community/emacs-overlay/archive/54afb061bdd12c61bbfcc13bad98b7a3aab7d8d3.tar.gz";
sha256 = "0hrbg65d5h0cb0nky7a46md7vlvhajq1hf0328l2f7ln9hznqz6j";
}))
];
programs.emacs = { programs.emacs = {
enable = true; enable = true;
package = pkgs.emacsUnstable; package = pkgs.emacsUnstable;

View file

@ -37,10 +37,6 @@ in {
msmtp msmtp
]; ];
# nixpkgs.overlays = [(self: super: {
# notifymuch = self.python3Packages.callPackage ../../pkgs/notifymuch.nix {};
# })];
systemd.user.services = mapAttrs' (name: account: { systemd.user.services = mapAttrs' (name: account: {
name = escapeUnitName "lieer-${name}"; name = escapeUnitName "lieer-${name}";
value.Service = { value.Service = {

View file

@ -21,12 +21,12 @@ rec {
"${pkgs.home-manager.src}/nixos" "${pkgs.home-manager.src}/nixos"
]; ];
# Use the same nixpkgs as everything else
home-manager.useGlobalPkgs = true;
home-manager.users.grfn = { config, lib, ... }: { home-manager.users.grfn = { config, lib, ... }: {
imports = [ ../home/machines/roswell.nix ]; imports = [ ../home/machines/roswell.nix ];
lib.depot = depot; lib.depot = depot;
_module.args.pkgs = lib.mkForce
(import pkgs.path
(lib.filterAttrs (n: v: v != null) config.nixpkgs));
}; };
})).system; })).system;

View file

@ -56,8 +56,6 @@ with lib;
shell = pkgs.zsh; shell = pkgs.zsh;
}; };
nixpkgs.config.allowUnfree = true;
nix = { nix = {
trustedUsers = [ "grfn" ]; trustedUsers = [ "grfn" ];
autoOptimiseStore = true; autoOptimiseStore = true;

View file

@ -1,9 +1,9 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
{ {
# Enable sound. # Enable sound.
sound.enable = true; sound.enable = true;
hardware.pulseaudio.enable = true; hardware.pulseaudio.enable = true;
nixpkgs.config.pulseaudio = true;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
pulseaudio-ctl pulseaudio-ctl