From d38563f4a180534d662b192cbb78a85fdd858546 Mon Sep 17 00:00:00 2001 From: Stefan Junker Date: Sat, 26 Jan 2019 23:59:31 +0100 Subject: [PATCH] nix: create overlay and use it throughout the repo --- nix/home-manager/profiles/common.nix | 3 --- nix/os/devices/steveej-t480s-work/system.nix | 1 - nix/os/profiles/common/configuration.nix | 4 ++++ nix/overlay.nix | 5 +++++ shell.nix | 4 ++-- 5 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 nix/overlay.nix diff --git a/nix/home-manager/profiles/common.nix b/nix/home-manager/profiles/common.nix index bcc1d27..1f6ffc0 100644 --- a/nix/home-manager/profiles/common.nix +++ b/nix/home-manager/profiles/common.nix @@ -25,9 +25,6 @@ in { dropbearStatic = dropbear.override { enableStatic = true; }; - - just = pkgs.callPackage ../../pkgs/just.nix {}; - duplicacy = pkgs.callPackage ../../pkgs/duplicacy {}; }; }; diff --git a/nix/os/devices/steveej-t480s-work/system.nix b/nix/os/devices/steveej-t480s-work/system.nix index e974b08..c280844 100644 --- a/nix/os/devices/steveej-t480s-work/system.nix +++ b/nix/os/devices/steveej-t480s-work/system.nix @@ -5,7 +5,6 @@ let keys = import ../../../variables/keys.nix; - mfcl3770cdw = pkgs.callPackage ../../../pkgs/mfcl3770cdw.nix {}; in { # TASK: new device diff --git a/nix/os/profiles/common/configuration.nix b/nix/os/profiles/common/configuration.nix index 0540f85..63c44de 100644 --- a/nix/os/profiles/common/configuration.nix +++ b/nix/os/profiles/common/configuration.nix @@ -1,6 +1,10 @@ { ... }: { + nixpkgs.overlays = [ + (import ../../../overlay.nix) + ]; + imports = [ ./boot.nix ./pkg.nix diff --git a/nix/overlay.nix b/nix/overlay.nix new file mode 100644 index 0000000..1d13c4f --- /dev/null +++ b/nix/overlay.nix @@ -0,0 +1,5 @@ +self: super: { + duplicay = super.callPackage ./pkgs/duplicacy {}; + mfcl3770cdw = super.callPackage ./pkgs/mfcl3770cdw.nix {}; + just = super.callPackage ./pkgs/just.nix {}; +} diff --git a/shell.nix b/shell.nix index d83e92f..999eba0 100644 --- a/shell.nix +++ b/shell.nix @@ -2,7 +2,7 @@ let channels-nixos-stable-path = (builtins.fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/7e88992a8c7b2de0bcb89182d8686b27bd93e46a.tar.gz); - channels-nixos-stable = import channels-nixos-stable-path {}; + channels-nixos-stable = import channels-nixos-stable-path { overlays = [ (import ./nix/overlay.nix) ]; }; in with channels-nixos-stable; @@ -10,7 +10,7 @@ stdenv.mkDerivation { name = "infra-env"; buildInputs = [ (with import (channels-nixos-stable-path+"/nixos") { configuration = {}; }; with config.system.build; [ nixos-generate-config nixos-install nixos-enter manual.manpages ]) - (pkgs.callPackage ./nix/pkgs/just.nix {}) + just git-crypt vcsh gnupg