diff --git a/configuration.nix b/configuration.nix index 889d81d..ec26ed5 100644 --- a/configuration.nix +++ b/configuration.nix @@ -11,6 +11,9 @@ networking.hostName = "virtmsi"; # Define your hostname. + # Allowing ssh auth + security.pam.sshAgentAuth.enable = true; + # Allow unfree packages nixpkgs.config.allowUnfree = true; nix.settings = { @@ -30,8 +33,6 @@ isNormalUser = true; description = "Zynh Ludwig"; extraGroups = [ "networkmanager" "wheel" ]; - packages = with pkgs; [ - ]; }; # List packages installed in system profile. To search, run: diff --git a/flake.lock b/flake.lock index fdb8156..a54ece8 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,41 @@ { "nodes": { + "deploy-rs": { + "inputs": { + "flake-compat": "flake-compat", + "nixpkgs": "nixpkgs", + "utils": "utils" + }, + "locked": { + "lastModified": 1727447169, + "narHash": "sha256-3KyjMPUKHkiWhwR91J1YchF6zb6gvckCAY1jOE+ne0U=", + "owner": "serokell", + "repo": "deploy-rs", + "rev": "aa07eb05537d4cd025e2310397a6adcedfe72c76", + "type": "github" + }, + "original": { + "owner": "serokell", + "repo": "deploy-rs", + "type": "github" + } + }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-parts": { "inputs": { "nixpkgs-lib": "nixpkgs-lib" @@ -20,16 +56,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1735141468, - "narHash": "sha256-VIAjBr1qGcEbmhLwQJD6TABppPMggzOvqFsqkDoMsAY=", + "lastModified": 1702272962, + "narHash": "sha256-D+zHwkwPc6oYQ4G3A1HuadopqRwUY/JkMwHz1YF7j4Q=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4005c3ff7505313cbc21081776ad0ce5dfd7a3ce", + "rev": "e97b3e4186bcadf0ef1b6be22b8558eab1cdeb5d", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-24.11", + "ref": "nixpkgs-unstable", "repo": "nixpkgs", "type": "github" } @@ -47,6 +83,22 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1735141468, + "narHash": "sha256-VIAjBr1qGcEbmhLwQJD6TABppPMggzOvqFsqkDoMsAY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "4005c3ff7505313cbc21081776ad0ce5dfd7a3ce", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-24.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1724479785, "narHash": "sha256-pP3Azj5d6M5nmG68Fu4JqZmdGt4S4vqI5f8te+E/FTw=", @@ -65,7 +117,7 @@ "nyazoom": { "inputs": { "flake-parts": "flake-parts", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "rust-overlay": "rust-overlay" }, "locked": { @@ -84,7 +136,8 @@ }, "root": { "inputs": { - "nixpkgs": "nixpkgs", + "deploy-rs": "deploy-rs", + "nixpkgs": "nixpkgs_2", "nyazoom": "nyazoom" } }, @@ -108,6 +161,39 @@ "repo": "rust-overlay", "type": "github" } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1701680307, + "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 08fd15b..45ea756 100644 --- a/flake.nix +++ b/flake.nix @@ -4,12 +4,12 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; - nyazoom = { - url = "git+https://git.zynh.me/Zynh0722/nyazoom.git"; - }; + deploy-rs.url = "github:serokell/deploy-rs"; + + nyazoom.url = "git+https://git.zynh.me/Zynh0722/nyazoom.git"; }; - outputs = inputs@{ nixpkgs, self, ... }: { + outputs = inputs@{ nixpkgs, self, deploy-rs, ... }: { nixosConfigurations = { virtmsi = nixpkgs.lib.nixosSystem { specialArgs = { inherit inputs self; }; @@ -20,5 +20,17 @@ ]; }; }; + + deploy.nodes.virtmsi = { + sshUser = "ravenshade"; + user = "root"; + hostname = "virtmsi"; + sshOpts = [ "-A" ]; + profiles.system.path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.virtmsi; + fastConnection = true; + interactiveSudo = true; + }; + + checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib; }; }