chore(nix): remove legacy non-flake configuration

This commit is contained in:
Serĉanto de Scio 2024-08-22 13:43:53 +10:00
parent 82a5341774
commit 549251e04a
Signed by: sercanto
GPG key ID: A4122FF3971B6865
5 changed files with 11 additions and 37 deletions

View file

@ -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}";
};
}

View file

@ -1 +0,0 @@
{}

View file

@ -1,11 +0,0 @@
self: super: {
globals =
import ./globals-defaults.nix
// rec {
deploymentName = "mio-ops";
domain = "mcwhirter.io";
environment = "${deploymentName}";
};
}

View file

@ -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;

View file

@ -1,8 +1,9 @@
{
pkgs ? import <nixpkgs> {},
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}
'';
}