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 e47519137b
commit ae3b0ddf0f
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: } @ inputs:
(utils.lib.eachDefaultSystem (system: let (utils.lib.eachDefaultSystem (system: let
deploymentName = "mio-ops";
pkgs = nixpkgs.legacyPackages."${system}"; pkgs = nixpkgs.legacyPackages."${system}";
nix_path = "nixpkgs=${nixpkgs}";
in { in {
devShell = devShell =
pkgs.callPackage pkgs.callPackage
./shell.nix { ./shell.nix {
inherit (nix.packages."${pkgs.system}") nix; inherit (nix.packages."${pkgs.system}") nix;
inherit (nixpkgsUnstable.legacyPackages."${pkgs.system}") alejandra; inherit deploymentName;
inherit nix_path;
}; };
nixopsConfigurations."${pkgs.system}".default = { nixopsConfigurations."${pkgs.system}".default = {
inherit (inputs) nixpkgs; inherit (inputs) nixpkgs;
@ -23,6 +26,7 @@ in {
enableRollback = true; enableRollback = true;
storage.legacy = {databasefile = "~/.nixops/deployments.nixops";}; storage.legacy = {databasefile = "~/.nixops/deployments.nixops";};
}; };
defaults = {};
airgead = import hosts/airgead.nix; airgead = import hosts/airgead.nix;
brighde = import hosts/brighde.nix; brighde = import hosts/brighde.nix;
ceilidh = import hosts/ceilidh.nix; ceilidh = import hosts/ceilidh.nix;

View file

@ -1,8 +1,9 @@
{ {
pkgs ? import <nixpkgs> {}, pkgs ? import <nixpkgs> {},
deploymentName,
mkShell, mkShell,
alejandra,
nix, nix,
nix_path,
}: }:
with pkgs; with pkgs;
mkShell { mkShell {
@ -13,4 +14,8 @@ with pkgs;
tea # Gitea official CLI client tea # Gitea official CLI client
treefmt # one CLI to format the code tree treefmt # one CLI to format the code tree
]; ];
shellHook = ''
export NIX_PATH=${nix_path}
export NIXOPS_DEPLOYMENT=${deploymentName}
'';
} }