OOKNET                             [ /  search the index  ]  
──────────────────────────────────────────────────────────────────────────────────────
══════════════════════════════════════════════════════════════════════════════════════
OOKNET   [ /  search  ]  
────────────────────────────────────────────────
════════════════════════════════════════════════
 
HASH      9ddef5c89143
DATE      2025-04-30
SUBJECT   colmena --> deploy-rs
FILES     6 CHANGED
HASH      9ddef5c89143
DATE      2025-04-30
SUBJECT   colmena --> deploy-rs
FILES     6 CHANGED
 

diff --git a/flake.lock b/flake.lock
index 1e36393..3cc2919 100644
--- a/flake.lock
+++ b/flake.lock
@@ -124,6 +124,30 @@
         "type": "github"
       }
     },
+    "deploy-rs": {
+      "inputs": {
+        "flake-compat": "flake-compat",
+        "nixpkgs": [
+          "nixpkgs"
+        ],
+        "utils": [
+          "flake-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"
+      }
+    },
     "devshell": {
       "inputs": {
         "nixpkgs": [
@@ -185,6 +209,22 @@
       }
     },
     "flake-compat_2": {
+      "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-compat_3": {
       "flake": false,
       "locked": {
         "lastModified": 1733328505,
@@ -200,7 +240,7 @@
         "type": "github"
       }
     },
-    "flake-compat_3": {
+    "flake-compat_4": {
       "flake": false,
       "locked": {
         "lastModified": 1696426674,
@@ -382,6 +422,27 @@
         "type": "github"
       }
     },
+    "home-manager_3": {
+      "inputs": {
+        "nixpkgs": [
+          "zen-browser",
+          "nixpkgs"
+        ]
+      },
+      "locked": {
+        "lastModified": 1743604125,
+        "narHash": "sha256-ZD61DNbsBt1mQbinAaaEqKaJk2RFo9R/j+eYWeGMx7A=",
+        "owner": "nix-community",
+        "repo": "home-manager",
+        "rev": "180fd43eea296e62ae68e079fcf56aba268b9a1a",
+        "type": "github"
+      },
+      "original": {
+        "owner": "nix-community",
+        "repo": "home-manager",
+        "type": "github"
+      }
+    },
     "hyprcursor": {
       "inputs": {
         "hyprlang": [
@@ -750,7 +811,7 @@
     },
     "nix-minecraft": {
       "inputs": {
-        "flake-compat": "flake-compat_2",
+        "flake-compat": "flake-compat_3",
         "flake-utils": [
           "flake-utils"
         ],
@@ -911,7 +972,7 @@
     },
     "pre-commit-hooks": {
       "inputs": {
-        "flake-compat": "flake-compat",
+        "flake-compat": "flake-compat_2",
         "gitignore": "gitignore",
         "nixpkgs": [
           "hyprland-plugins",
@@ -936,7 +997,7 @@
     },
     "pre-commit-hooks_2": {
       "inputs": {
-        "flake-compat": "flake-compat_3",
+        "flake-compat": "flake-compat_4",
         "gitignore": "gitignore_2",
         "nixpkgs": [
           "secrets",
@@ -960,6 +1021,7 @@
     },
     "root": {
       "inputs": {
+        "deploy-rs": "deploy-rs",
         "firefox-addons": "firefox-addons",
         "flake-parts": "flake-parts",
         "flake-utils": "flake-utils",
@@ -974,6 +1036,7 @@
         "ookscraft": "ookscraft",
         "secrets": "secrets",
         "systems": "systems_4",
+        "zen-browser": "zen-browser",
         "zjstatus": "zjstatus"
       }
     },
@@ -1192,6 +1255,27 @@
         "type": "github"
       }
     },
+    "zen-browser": {
+      "inputs": {
+        "home-manager": "home-manager_3",
+        "nixpkgs": [
+          "nixpkgs"
+        ]
+      },
+      "locked": {
+        "lastModified": 1745968669,
+        "narHash": "sha256-0g0/eM/w48VX3uocJflbaTnHEIxZJ/SHW4dqDYI8E3E=",
+        "owner": "0xc000022070",
+        "repo": "zen-browser-flake",
+        "rev": "e957cee0b859929b0ac9a7fdb69e8f4e3297ad25",
+        "type": "github"
+      },
+      "original": {
+        "owner": "0xc000022070",
+        "repo": "zen-browser-flake",
+        "type": "github"
+      }
+    },
     "zjstatus": {
       "inputs": {
         "crane": "crane",

diff --git a/flake.lock b/flake.lock
index 1e36393..3cc2919 100644
--- a/flake.lock
+++ b/flake.lock
@@ -124,6 +124,30 @@
         "type": "github"
       }
     },
+    "deploy-rs": {
+      "inputs": {
+        "flake-compat": "flake-compat",
+        "nixpkgs": [
+          "nixpkgs"
+        ],
+        "utils": [
+          "flake-utils"
+        ]
+      },
+      "locked": {
+        "lastModified": 1727447169,
+        "narHash": "sha256-3KyjMPUKHkiWhwR9
1J1YchF6zb6gvckCAY1jOE+ne0U=",
+        "owner": "serokell",
+        "repo": "deploy-rs",
+        "rev": "aa07eb05537d4cd025e2310397a
6adcedfe72c76",
+        "type": "github"
+      },
+      "original": {
+        "owner": "serokell",
+        "repo": "deploy-rs",
+        "type": "github"
+      }
+    },
     "devshell": {
       "inputs": {
         "nixpkgs": [
@@ -185,6 +209,22 @@
       }
     },
     "flake-compat_2": {
+      "flake": false,
+      "locked": {
+        "lastModified": 1696426674,
+        "narHash": "sha256-kvjfFW7WAETZlt09
AgDn1MrtKzP7t90Vf7vypd3OL1U=",
+        "owner": "edolstra",
+        "repo": "flake-compat",
+        "rev": "0f9255e01c2351cc7d116c072cb
317785dd33b33",
+        "type": "github"
+      },
+      "original": {
+        "owner": "edolstra",
+        "repo": "flake-compat",
+        "type": "github"
+      }
+    },
+    "flake-compat_3": {
       "flake": false,
       "locked": {
         "lastModified": 1733328505,
@@ -200,7 +240,7 @@
         "type": "github"
       }
     },
-    "flake-compat_3": {
+    "flake-compat_4": {
       "flake": false,
       "locked": {
         "lastModified": 1696426674,
@@ -382,6 +422,27 @@
         "type": "github"
       }
     },
+    "home-manager_3": {
+      "inputs": {
+        "nixpkgs": [
+          "zen-browser",
+          "nixpkgs"
+        ]
+      },
+      "locked": {
+        "lastModified": 1743604125,
+        "narHash": "sha256-ZD61DNbsBt1mQbin
AaaEqKaJk2RFo9R/j+eYWeGMx7A=",
+        "owner": "nix-community",
+        "repo": "home-manager",
+        "rev": "180fd43eea296e62ae68e079fcf
56aba268b9a1a",
+        "type": "github"
+      },
+      "original": {
+        "owner": "nix-community",
+        "repo": "home-manager",
+        "type": "github"
+      }
+    },
     "hyprcursor": {
       "inputs": {
         "hyprlang": [
@@ -750,7 +811,7 @@
     },
     "nix-minecraft": {
       "inputs": {
-        "flake-compat": "flake-compat_2",
+        "flake-compat": "flake-compat_3",
         "flake-utils": [
           "flake-utils"
         ],
@@ -911,7 +972,7 @@
     },
     "pre-commit-hooks": {
       "inputs": {
-        "flake-compat": "flake-compat",
+        "flake-compat": "flake-compat_2",
         "gitignore": "gitignore",
         "nixpkgs": [
           "hyprland-plugins",
@@ -936,7 +997,7 @@
     },
     "pre-commit-hooks_2": {
       "inputs": {
-        "flake-compat": "flake-compat_3",
+        "flake-compat": "flake-compat_4",
         "gitignore": "gitignore_2",
         "nixpkgs": [
           "secrets",
@@ -960,6 +1021,7 @@
     },
     "root": {
       "inputs": {
+        "deploy-rs": "deploy-rs",
         "firefox-addons": "firefox-addons",
         "flake-parts": "flake-parts",
         "flake-utils": "flake-utils",
@@ -974,6 +1036,7 @@
         "ookscraft": "ookscraft",
         "secrets": "secrets",
         "systems": "systems_4",
+        "zen-browser": "zen-browser",
         "zjstatus": "zjstatus"
       }
     },
@@ -1192,6 +1255,27 @@
         "type": "github"
       }
     },
+    "zen-browser": {
+      "inputs": {
+        "home-manager": "home-manager_3",
+        "nixpkgs": [
+          "nixpkgs"
+        ]
+      },
+      "locked": {
+        "lastModified": 1745968669,
+        "narHash": "sha256-0g0/eM/w48VX3uoc
JflbaTnHEIxZJ/SHW4dqDYI8E3E=",
+        "owner": "0xc000022070",
+        "repo": "zen-browser-flake",
+        "rev": "e957cee0b859929b0ac9a7fdb69
e8f4e3297ad25",
+        "type": "github"
+      },
+      "original": {
+        "owner": "0xc000022070",
+        "repo": "zen-browser-flake",
+        "type": "github"
+      }
+    },
     "zjstatus": {
       "inputs": {
         "crane": "crane",
 

diff --git a/flake.nix b/flake.nix
index 8ba1c17..da13815 100644
--- a/flake.nix
+++ b/flake.nix
@@ -31,6 +31,14 @@
       inputs.nixpkgs.follows = "nixpkgs";
     };
 
+    deploy-rs = {
+      url = "github:serokell/deploy-rs";
+      inputs = {
+        nixpkgs.follows = "nixpkgs";
+        utils.follows = "flake-utils";
+      };
+    };
+
     nix-index-db = {
       url = "github:nix-community/nix-index-database";
       inputs.nixpkgs.follows = "nixpkgs";
@@ -72,6 +80,11 @@
       };
     };
 
+    zen-browser = {
+      url = "github:0xc000022070/zen-browser-flake";
+      inputs.nixpkgs.follows = "nixpkgs";
+    };
+
     nvf = {
       url = "github:notashelf/nvf";
       inputs = {

diff --git a/flake.nix b/flake.nix
index 8ba1c17..da13815 100644
--- a/flake.nix
+++ b/flake.nix
@@ -31,6 +31,14 @@
       inputs.nixpkgs.follows = "nixpkgs";
     };
 
+    deploy-rs = {
+      url = "github:serokell/deploy-rs";
+      inputs = {
+        nixpkgs.follows = "nixpkgs";
+        utils.follows = "flake-utils";
+      };
+    };
+
     nix-index-db = {
       url = "github:nix-community/nix-index
-database";
       inputs.nixpkgs.follows = "nixpkgs";
@@ -72,6 +80,11 @@
       };
     };
 
+    zen-browser = {
+      url = "github:0xc000022070/zen-browse
r-flake";
+      inputs.nixpkgs.follows = "nixpkgs";
+    };
+
     nvf = {
       url = "github:notashelf/nvf";
       inputs = {
 

diff --git a/modules/common/base/options.nix b/modules/common/base/options.nix
index 2aa473a..1035cc2 100644
--- a/modules/common/base/options.nix
+++ b/modules/common/base/options.nix
@@ -1,11 +1,14 @@
 {
   lib,
   pkgs,
+  config,
   ...
 }: let
   inherit (lib) mkEnableOption mkOption;
   inherit (lib.types) str enum bool package;
 
+  cfg = config.ooknet.host;
+
   userOptions = {
     name = mkOption {
       type = str;
@@ -42,10 +45,28 @@ in {
       type = enum ["workstation" "server" "installer" "live"];
     };
 
+    system = mkOption {
+      type = str;
+      default = pkgs.stdenv.system;
+      readOnly = true;
+    };
+
     syncthing = {
       enable = mkEnableOption "Enable syncthing";
     };
 
+    # mapping deploy-rs options
+    deployment = {
+      enable = mkEnableOption "Enable remote deployment";
+      remoteBuild = mkEnableOption "Build the system on the target machine";
+      fastConnection = mkEnableOption "Copy whole closrure instead of lettting no
de substitute";
+      sshUser = mkOption {
+        type = str;
+        default = cfg.admin.name;
+        description = "User that deploy-rs will use when connecting";
+      };
+    };
+
     boot = {
       loader = mkOption {
         type = enum ["systemd" "grub"];

diff --git a/modules/common/base/options.nix
 b/modules/common/base/options.nix
index 2aa473a..1035cc2 100644
--- a/modules/common/base/options.nix
+++ b/modules/common/base/options.nix
@@ -1,11 +1,14 @@
 {
   lib,
   pkgs,
+  config,
   ...
 }: let
   inherit (lib) mkEnableOption mkOption;
   inherit (lib.types) str enum bool package
;
 
+  cfg = config.ooknet.host;
+
   userOptions = {
     name = mkOption {
       type = str;
@@ -42,10 +45,28 @@ in {
       type = enum ["workstation" "server" "
installer" "live"];
     };
 
+    system = mkOption {
+      type = str;
+      default = pkgs.stdenv.system;
+      readOnly = true;
+    };
+
     syncthing = {
       enable = mkEnableOption "Enable synct
hing";
     };
 
+    # mapping deploy-rs options
+    deployment = {
+      enable = mkEnableOption "Enable remot
e deployment";
+      remoteBuild = mkEnableOption "Build t
he system on the target machine";
+      fastConnection = mkEnableOption "Copy
 whole closrure instead of lettting node sub
stitute";
+      sshUser = mkOption {
+        type = str;
+        default = cfg.admin.name;
+        description = "User that deploy-rs 
will use when connecting";
+      };
+    };
+
     boot = {
       loader = mkOption {
         type = enum ["systemd" "grub"];
 

diff --git a/outputs/colmena.nix b/outputs/colmena.nix
deleted file mode 100644
index a13dbaf..0000000
--- a/outputs/colmena.nix
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-  inputs,
-  self,
-}: {
-  flake.colmena = {
-    meta = {
-      description = "ooknet colmena hive";
-      nixpkgs = import inputs.nixpkgs {system = "x86_64-linux";};
-    };
-    inherit (self.nixosConfigurations.system.build.toplevel) ooksdesk ooknode ook
smedia ookst480s;
-  };
-}

diff --git a/outputs/colmena.nix b/outputs/c
olmena.nix
deleted file mode 100644
index a13dbaf..0000000
--- a/outputs/colmena.nix
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-  inputs,
-  self,
-}: {
-  flake.colmena = {
-    meta = {
-      description = "ooknet colmena hive";
-      nixpkgs = import inputs.nixpkgs {syst
em = "x86_64-linux";};
-    };
-    inherit (self.nixosConfigurations.syste
m.build.toplevel) ooksdesk ooknode ooksmedia
 ookst480s;
-  };
-}
 

diff --git a/outputs/default.nix b/outputs/default.nix
index 560febe..70ea828 100644
--- a/outputs/default.nix
+++ b/outputs/default.nix
@@ -6,6 +6,7 @@
     ./hosts
     ./pkgs
     ./images.nix
+    ./deploy.nix
     ./devshells
     ./templates
     ./modules

diff --git a/outputs/default.nix b/outputs/d
efault.nix
index 560febe..70ea828 100644
--- a/outputs/default.nix
+++ b/outputs/default.nix
@@ -6,6 +6,7 @@
     ./hosts
     ./pkgs
     ./images.nix
+    ./deploy.nix
     ./devshells
     ./templates
     ./modules
 

diff --git a/outputs/deploy.nix b/outputs/deploy.nix
new file mode 100644
index 0000000..0d79af8
--- /dev/null
+++ b/outputs/deploy.nix
@@ -0,0 +1,37 @@
+{
+  inputs,
+  self,
+  lib,
+  ...
+}: let
+  inherit (lib) filterAttrs mapAttrs elem;
+
+  mkNode = hostname: cfg: let
+    inherit (cfg.config.ooknet.host) system;
+    deployLib = inputs.deploy-rs.lib.${system};
+  in {
+    inherit hostname;
+    inherit (cfg.config.ooknet.host.deployment) remoteBuild fastConnection;
+    profiles.system = {
+      path = deployLib.activate.nixos cfg;
+    };
+  };
+  nodes = let
+    allowedTargets = [
+      "ooksmedia"
+    ];
+    deployableTargets = filterAttrs (name: _: elem name allowedTargets) self.nixo
sConfigurations;
+  in
+    mapAttrs mkNode deployableTargets;
+in {
+  flake = {
+    deploy = {
+      inherit nodes;
+      magicRollback = true;
+      autoRollback = true;
+      user = "root";
+    };
+
+    checks = mapAttrs (_: deployLib: deployLib.deployChecks self.deploy) inputs.d
eploy-rs.lib;
+  };
+}

diff --git a/outputs/deploy.nix b/outputs/de
ploy.nix
new file mode 100644
index 0000000..0d79af8
--- /dev/null
+++ b/outputs/deploy.nix
@@ -0,0 +1,37 @@
+{
+  inputs,
+  self,
+  lib,
+  ...
+}: let
+  inherit (lib) filterAttrs mapAttrs elem;
+
+  mkNode = hostname: cfg: let
+    inherit (cfg.config.ooknet.host) system
;
+    deployLib = inputs.deploy-rs.lib.${syst
em};
+  in {
+    inherit hostname;
+    inherit (cfg.config.ooknet.host.deploym
ent) remoteBuild fastConnection;
+    profiles.system = {
+      path = deployLib.activate.nixos cfg;
+    };
+  };
+  nodes = let
+    allowedTargets = [
+      "ooksmedia"
+    ];
+    deployableTargets = filterAttrs (name: 
_: elem name allowedTargets) self.nixosConfi
gurations;
+  in
+    mapAttrs mkNode deployableTargets;
+in {
+  flake = {
+    deploy = {
+      inherit nodes;
+      magicRollback = true;
+      autoRollback = true;
+      user = "root";
+    };
+
+    checks = mapAttrs (_: deployLib: deploy
Lib.deployChecks self.deploy) inputs.deploy-
rs.lib;
+  };
+}
 
[ BACK TO LOG ]
──────────────────────────────────────────────────────────────────────────────────────
OOKNET
────────────────────────────────────────────────
OOKNET