Both system and home builds are now pure
diff --git a/flake.lock b/flake.lock
index f4b96f3..f570edb 100644
--- a/flake.lock
+++ b/flake.lock
@@ -1,5 +1,42 @@
{
"nodes": {
+ "comma": {
+ "inputs": {
+ "flake-compat": "flake-compat",
+ "naersk": "naersk",
+ "nixpkgs": "nixpkgs",
+ "utils": "utils"
+ },
+ "locked": {
+ "lastModified": 1650481854,
+ "narHash": "sha256-CZQLigKovJbMoTbPuWT3SBSMymjD58m72O/oy+HilQg=",
+ "owner": "nix-community",
+ "repo": "comma",
+ "rev": "034a9ca440370fc1eccbed43ff345fb6ea1f0d27",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-community",
+ "repo": "comma",
+ "type": "github"
+ }
+ },
+ "flake-compat": {
+ "flake": false,
+ "locked": {
+ "lastModified": 1648199409,
+ "narHash": "sha256-JwPKdC2PoVBkG6E+eWw3j6BMR6sL3COpYWfif7RVb8Y=",
+ "owner": "edolstra",
+ "repo": "flake-compat",
+ "rev": "64a525ee38886ab9028e6f61790de0832aa3ef03",
+ "type": "github"
+ },
+ "original": {
+ "owner": "edolstra",
+ "repo": "flake-compat",
+ "type": "github"
+ }
+ },
"home-manager": {
"inputs": {
"nixpkgs": [
@@ -21,8 +58,46 @@
"type": "github"
}
},
+ "naersk": {
+ "inputs": {
+ "nixpkgs": [
+ "comma",
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1650101877,
+ "narHash": "sha256-IYxYc5Z1ZHQDTQbTWsOZ9HlZepsVjgV5oZwmbKzxSJs=",
+ "owner": "nix-community",
+ "repo": "naersk",
+ "rev": "8cc379478819e6a22ce7595a761fe1e17c8d7458",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-community",
+ "ref": "master",
+ "repo": "naersk",
+ "type": "github"
+ }
+ },
"nixpkgs": {
"locked": {
+ "lastModified": 1650109093,
+ "narHash": "sha256-tqlnKrAdJktRLXTou9le0oTqrYBAFpGscV5RADdpArU=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "faad370edcb37162401be50d45526f52bb16a713",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "ref": "nixpkgs-unstable",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "nixpkgs_2": {
+ "locked": {
"lastModified": 1652881001,
"narHash": "sha256-k9JmPCojaJnqGz4aRXXT1HZqJKHCXijoMfBAb24abXk=",
"owner": "nixos",
@@ -37,10 +112,42 @@
"type": "github"
}
},
+ "nurpkgs": {
+ "locked": {
+ "lastModified": 1653157530,
+ "narHash": "sha256-9JC7EGOBwkxQ+MUuKXNvCjaQZzZxXYyG9kPlTNVziak=",
+ "owner": "nix-community",
+ "repo": "NUR",
+ "rev": "768c7d968dc9b90b6fa6f85374669de3e57d70ca",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-community",
+ "repo": "NUR",
+ "type": "github"
+ }
+ },
"root": {
"inputs": {
+ "comma": "comma",
"home-manager": "home-manager",
- "nixpkgs": "nixpkgs"
+ "nixpkgs": "nixpkgs_2",
+ "nurpkgs": "nurpkgs"
+ }
+ },
+ "utils": {
+ "locked": {
+ "lastModified": 1649676176,
+ "narHash": "sha256-OWKJratjt2RW151VUlJPRALb7OU2S5s+f0vLj4o1bHM=",
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "rev": "a4b154ebbdc88c8498a5c7b01589addc9e9cb678",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "type": "github"
}
}
},
diff --git a/flake.nix b/flake.nix
index aad38c5..94cd4f5 100644
--- a/flake.nix
+++ b/flake.nix
@@ -4,12 +4,14 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-21.11";
home-manager.url = "github:nix-community/home-manager/release-21.11";
+ nurpkgs.url = "github:nix-community/NUR";
+ comma.url = "github:nix-community/comma";
# Make sure flakes we depend on use the same version of nixpkgs as we do
home-manager.inputs.nixpkgs.follows = "nixpkgs";
};
- outputs = { self, nixpkgs, home-manager }:
+ outputs = extraInputs@{ self, nixpkgs, home-manager, ... }:
let
system = "x86_64-linux"; # TOOD: Add options for MacOS
@@ -39,6 +41,8 @@
minion = home-manager.lib.homeManagerConfiguration rec {
inherit system pkgs;
+ extraSpecialArgs = extraInputs;
+
username = variables.username;
homeDirectory = "/home/${username}";
stateVersion = variables.stateVersion;
diff --git a/scripts/rebuild-home.sh b/scripts/rebuild-home.sh
index 31674b8..a30706a 100755
--- a/scripts/rebuild-home.sh
+++ b/scripts/rebuild-home.sh
@@ -9,6 +9,6 @@
/usr/bin/env git commit -am "$changes"
fi
-nix build .#homeManagerConfigurations.minion.activationPackage $1 --impure
+nix build .#homeManagerConfigurations.minion.activationPackage $1
./result/activate
unlink ./result
diff --git a/scripts/rebuild-system.sh b/scripts/rebuild-system.sh
index 6f00ad8..1eddeb9 100755
--- a/scripts/rebuild-system.sh
+++ b/scripts/rebuild-system.sh
@@ -9,4 +9,4 @@
/usr/bin/env git commit -am "$changes"
fi
-sudo nixos-rebuild switch --impure --flake .#default $1
+sudo nixos-rebuild switch --flake .#default $1
diff --git a/src/apps/personal/comma.nix b/src/apps/personal/comma.nix
index 1616641..0c4f334 100644
--- a/src/apps/personal/comma.nix
+++ b/src/apps/personal/comma.nix
@@ -1,11 +1,5 @@
-{ pkgs, ... }:
-let
- comma = (import ( pkgs.fetchFromGitHub {
- owner = "nix-community";
- repo = "comma";
- rev = "034a9ca440370fc1eccbed43ff345fb6ea1f0d27";
- sha256 = "sha256-CZQLigKovJbMoTbPuWT3SBSMymjD58m72O/oy+HilQg=";
- })).default;
-in {
- home.packages = [ comma ];
+{ comma, pkgs, ... }: {
+ home.packages = [
+ comma.packages.${pkgs.system}.default
+ ];
}
diff --git a/src/apps/personal/overlays/nur.nix b/src/apps/personal/overlays/nur.nix
deleted file mode 100644
index 9373b18..0000000
--- a/src/apps/personal/overlays/nur.nix
+++ /dev/null
@@ -1,8 +0,0 @@
-final: prev: let
- nur = import (builtins.fetchTarball "https://github.com/nix-community/NUR/archive/master.tar.gz");
-in {
- nur = nur {
- nurpkgs = prev;
- pkgs = prev;
- };
-}
\ No newline at end of file
diff --git a/src/home.nix b/src/home.nix
index ad3d2fb..0ab74ca 100644
--- a/src/home.nix
+++ b/src/home.nix
@@ -1,4 +1,4 @@
-{ pkgs, lib, ... }:
+{ pkgs, lib, nurpkgs, ... }:
let
variables = import ./common/variables.nix;
personalPackages = import ./utils/nixFilesIn.nix lib ./apps/personal;
@@ -15,6 +15,7 @@
value = super.lib.callPackageWith (self) (import f) {};
}) packages
)))
+ nurpkgs.overlay
];
home.packages = with pkgs; [ # New apps should be on new lines