From 45448d1099bf1bcd4dc1f471068a290a31bd465a Mon Sep 17 00:00:00 2001 From: uku Date: Wed, 25 Dec 2024 19:20:30 +0100 Subject: [PATCH] feat: replace nixinate with just recipe --- flake.lock | 21 --------------------- flake.nix | 11 +---------- justfile | 8 ++++++-- 3 files changed, 7 insertions(+), 33 deletions(-) diff --git a/flake.lock b/flake.lock index 4dddd09..40aded4 100644 --- a/flake.lock +++ b/flake.lock @@ -253,26 +253,6 @@ "type": "github" } }, - "nixinate": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1708891350, - "narHash": "sha256-VOQrKK7Df/IVuNki+NshVuGkTa/Tw0GigPjWcZff6kk=", - "owner": "matthewcroughan", - "repo": "nixinate", - "rev": "452f33c60df5b72ad0858f5f2cf224bdf1f17746", - "type": "github" - }, - "original": { - "owner": "matthewcroughan", - "repo": "nixinate", - "type": "github" - } - }, "nixos-wsl": { "inputs": { "flake-compat": [], @@ -325,7 +305,6 @@ "home-manager": "home-manager", "lanzaboote": "lanzaboote", "mystia": "mystia", - "nixinate": "nixinate", "nixos-wsl": "nixos-wsl", "nixpkgs": "nixpkgs", "systems": "systems_2", diff --git a/flake.nix b/flake.nix index 2a66a77..3b405d4 100644 --- a/flake.nix +++ b/flake.nix @@ -3,10 +3,8 @@ outputs = { - self, - flake-parts, - nixinate, agenix, + flake-parts, treefmt-nix, ... }@inputs: @@ -29,8 +27,6 @@ ... }: { - apps = (nixinate.nixinate.${system} self).nixinate; - devShells.default = pkgs.mkShellNoCC { packages = with pkgs; [ agenix.packages.${system}.default @@ -118,11 +114,6 @@ inputs.flake-compat.follows = ""; }; - nixinate = { - url = "github:matthewcroughan/nixinate"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - nixos-wsl = { url = "github:nix-community/NixOS-WSL"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/justfile b/justfile index b55b0b4..0226131 100644 --- a/justfile +++ b/justfile @@ -16,8 +16,12 @@ boot *args: @sudo -v sudo nixos-rebuild boot --flake . --keep-going {{args}} -deploy system: - nix run .#{{system}} +deploy system user="leo": + #!/usr/bin/env bash + set -euxo pipefail + flake=$(nix eval --impure --raw --expr "(builtins.getFlake \"$PWD\").outPath") + nix copy "$flake" --to "ssh://{{user}}@{{system}}" + ssh -t "{{user}}@{{system}}" "sudo flock -w 60 /dev/shm/deploy-{{system}} nixos-rebuild switch --flake $flake#{{system}}" lint *args: statix check -i flake.nix **/hardware-configuration.nix {{args}}