diff --git a/default.nix b/default.nix deleted file mode 100644 index 81b9a6c..0000000 --- a/default.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ - sources ? import ./nix/sources.nix, - system ? builtins.currentSystem, - crossSystem ? null, - config ? {}, - alejandraUnstable ? (import sources.nixpkgsUnstable {}).alejandra, - cardanoNodeProject ? import sources.cardano-node {}, -} @ args: -with import ./nix args; { - shell = mkShell { - inherit (import sources.niv {}) niv; - buildInputs = [ - alejandraUnstable # The Uncompromising Nix Code Formatter - cardanoNodeProject.cardano-cli # required for KES key rotation - niv - nixops_unstable_minimal # work around for issue #127423 - tea # Gitea official CLI client - treefmt # one CLI to format the code tree - ]; - NIX_PATH = "nixpkgs=${sources.nixpkgs}"; - NIXOPS_DEPLOYMENT = "${globals.deploymentName}"; - }; -} diff --git a/globals-defaults.nix b/globals-defaults.nix deleted file mode 100644 index 0967ef4..0000000 --- a/globals-defaults.nix +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/globals.nix b/globals.nix deleted file mode 100644 index ace84e5..0000000 --- a/globals.nix +++ /dev/null @@ -1,11 +0,0 @@ -self: super: { - globals = - import ./globals-defaults.nix - // rec { - deploymentName = "mio-ops"; - - domain = "mcwhirter.io"; - - environment = "${deploymentName}"; - }; -} diff --git a/outputs.nix b/outputs.nix index 8c03d6a..af7d38b 100644 --- a/outputs.nix +++ b/outputs.nix @@ -8,13 +8,16 @@ ... } @ inputs: (utils.lib.eachDefaultSystem (system: let + deploymentName = "mio-ops"; pkgs = nixpkgs.legacyPackages."${system}"; + nix_path = "nixpkgs=${nixpkgs}"; in { devShell = pkgs.callPackage ./shell.nix { inherit (nix.packages."${pkgs.system}") nix; - inherit (nixpkgsUnstable.legacyPackages."${pkgs.system}") alejandra; + inherit deploymentName; + inherit nix_path; }; nixopsConfigurations."${pkgs.system}".default = { inherit (inputs) nixpkgs; @@ -23,6 +26,7 @@ in { enableRollback = true; storage.legacy = {databasefile = "~/.nixops/deployments.nixops";}; }; + defaults = {}; airgead = import hosts/airgead.nix; brighde = import hosts/brighde.nix; ceilidh = import hosts/ceilidh.nix; diff --git a/shell.nix b/shell.nix index cb05f0b..fe46bf7 100644 --- a/shell.nix +++ b/shell.nix @@ -1,8 +1,9 @@ { pkgs ? import {}, + deploymentName, mkShell, - alejandra, nix, + nix_path, }: with pkgs; mkShell { @@ -13,4 +14,8 @@ with pkgs; tea # Gitea official CLI client treefmt # one CLI to format the code tree ]; + shellHook = '' + export NIX_PATH=${nix_path} + export NIXOPS_DEPLOYMENT=${deploymentName} + ''; }