diff --git a/krops.nix b/krops.nix index 22d9c2e..57a3041 100644 --- a/krops.nix +++ b/krops.nix @@ -1,6 +1,13 @@ { writeCommand, lib, ... }: let + # command that ensures we use flake.nix during switch + command = targetPath: '' + nix-shell \ + -E "with import {}; mkShell { buildInputs = [ git (nixos { nix.package = nixFlakes; }).nixos-rebuild ]; }" \ + --run 'nixos-rebuild build --flake ${targetPath} -L --keep-going' + ''; + secrets = name: { secrets.pass = { dir = toString ~/.password-store; @@ -31,6 +38,7 @@ let #mqtt.file = toString ./mqtt; pkgs.file = toString ./pkgs; system.file = toString ./system; + "flake.nix".file = toString ./flake.nix; #backup-module.file = toString ~/dev/backup; backup-module.git = { @@ -57,5 +65,6 @@ in { #source = lib.evalSource [ source (secrets "sterni") desktopSecrets ]; source = lib.evalSource [ source ]; target = lib.mkTarget "root@sterni.private"; + inherit command; }; } diff --git a/system/all/default.nix b/system/all/default.nix index 5150961..5e3be3e 100644 --- a/system/all/default.nix +++ b/system/all/default.nix @@ -1,13 +1,13 @@ { lib, config, pkgs, ... }: { imports = [ - - - - + # + # + # + # # needed - + # # cross-compiling #