diff --git a/deploy.sh b/deploy.sh index 7dd24a3..6f3d692 100755 --- a/deploy.sh +++ b/deploy.sh @@ -4,7 +4,7 @@ set -ex USERNAME="root" IP="gerd.fricloud.dk" -NIXPKGS=$(jq -r '.nixpkgs.url' ./shared/sources/sources.json) +NIXPKGS=$(nix build --impure --json --expr '(import ./shared/sources).nixpkgs' | jq -r '.[].outputs.out') export NIX_PATH="nixpkgs=$NIXPKGS" diff --git a/shared/default.nix b/shared/default.nix index ffbfcee..87d56e6 100644 --- a/shared/default.nix +++ b/shared/default.nix @@ -1,7 +1,7 @@ { config, ... }: let - sources = import ./sources/sources.nix; + sources = import ./sources; in { imports = [ # secrets diff --git a/shared/modules/disko.nix b/shared/modules/disko.nix index 613705a..689b4f0 100644 --- a/shared/modules/disko.nix +++ b/shared/modules/disko.nix @@ -72,7 +72,7 @@ let }; }; - sources = import ./../sources/sources.nix; + sources = import ./../sources; in { imports = [ (sources.disko + "/module.nix") diff --git a/shared/modules/state.nix b/shared/modules/state.nix index 10264a7..3cb9547 100644 --- a/shared/modules/state.nix +++ b/shared/modules/state.nix @@ -3,7 +3,7 @@ with lib; let - sources = import ./../sources/sources.nix; + sources = import ./../sources; in { options.mine.state.enable = mkOption { type = types.bool; diff --git a/shared/sources/default.nix b/shared/sources/default.nix new file mode 100644 index 0000000..5222bb1 --- /dev/null +++ b/shared/sources/default.nix @@ -0,0 +1,7 @@ +let + sources = import ./sources.nix; + + # declare pkgs from sources + pkgs = import sources.nixpkgs { }; +in sources // { +}