deployment changes

This commit is contained in:
RingOfStorms (Joshua Bell) 2025-12-17 23:41:47 -06:00
parent a4136e2e58
commit fca1bd9d8f
6 changed files with 1454 additions and 175 deletions

1420
flake.lock generated

File diff suppressed because it is too large Load diff

View file

@ -4,58 +4,33 @@
deploy-rs.url = "github:serokell/deploy-rs";
i001.url = "path:./hosts/i001";
l001.url = "path:./hosts/linode/l001";
o001.url = "path:./hosts/oracle/o001";
};
outputs =
{
nixpkgs,
deploy-rs,
...
}@inputs:
let
# Utilities
inherit (nixpkgs) lib;
inherit (inputs.nixpkgs) lib;
# Define the systems to support: https://github.com/NixOS/nixpkgs/blob/master/lib/systems/flake-systems.nix
forAllSystems = lib.genAttrs lib.systems.flakeExposed;
# Create a mapping from system to corresponding nixpkgs : https://nixos.wiki/wiki/Overlays#In_a_Nix_flake
nixpkgsFor = forAllSystems (system: nixpkgs.legacyPackages.${system});
nixpkgsFor = forAllSystems (system: inputs.nixpkgs.legacyPackages.${system});
in
{
devShells = forAllSystems (
system:
let
pkgs = nixpkgsFor.${system};
deploy_linode = pkgs.writeShellScriptBin "deploy_linode" ''
cwd=$(pwd)
root=$(git rev-parse --show-toplevel)
if [ ! -d "$root/hosts/linode/$1" ]; then
echo "Host $1 does not exist"
exit 1
fi
cd "$root/hosts/linode/$1"
echo "Deploying linode $(basename "$(pwd)")..."
deploy
cd "$cwd"
'';
deploy_oracle = pkgs.writeShellScriptBin "deploy_oracle" ''
cwd=$(pwd)
root=$(git rev-parse --show-toplevel)
if [ ! -d "$root/hosts/oracle/$1" ]; then
echo "Host $1 does not exist"
exit 1
fi
cd "$root/hosts/oracle/$1"
echo "Deploying oracle $(basename "$(pwd)")..."
deploy
cd "$cwd"
'';
in
{
default = pkgs.mkShell {
packages = [
deploy_oracle
deploy_linode
pkgs.deploy-rs
inputs.deploy-rs.packages.${system}.default
];
};
}
@ -76,6 +51,30 @@
path = deploy-rs.lib.x86_64-linux.activate.nixos inputs.i001.nixosConfigurations.i001;
};
};
l001 = {
sshOpts = [
"-i"
"/run/agenix/nix2linode"
];
hostname = "172.236.111.33";
profiles.system = {
user = "root";
path = deploy-rs.lib.x86_64-linux.activate.nixos inputs.l001.nixosConfigurations.l001;
};
};
o001 = {
sshOpts = [
"-i"
"/run/agenix/nix2oracle"
];
hostname = "64.181.210.7";
profiles.system = {
user = "root";
path = deploy-rs.lib.aarch64-linux.activate.nixos inputs.o001.nixosConfigurations.o001;
};
};
};
};
};

112
hosts/i001/flake.lock generated
View file

@ -3,11 +3,11 @@
"common": {
"locked": {
"dir": "flakes/common",
"lastModified": 1766010612,
"narHash": "sha256-3aKy/FcWFSeA/1bJbslAvWDSXLF4yygykt5OpHK6cTQ=",
"lastModified": 1766036343,
"narHash": "sha256-0+0fzyLOC3SXADKGMeEjH6clv5RfpZva7qhwTDnMetM=",
"ref": "refs/heads/master",
"rev": "ece48b65b79ac2caf6c6be771a9f1809de8bc65b",
"revCount": 949,
"rev": "a4136e2e58419d2b9e8971f478b4fc836d384d10",
"revCount": 951,
"type": "git",
"url": "https://git.joshuabell.xyz/ringofstorms/dotfiles"
},
@ -23,11 +23,11 @@
},
"locked": {
"dir": "flakes/de_plasma",
"lastModified": 1766010612,
"narHash": "sha256-3aKy/FcWFSeA/1bJbslAvWDSXLF4yygykt5OpHK6cTQ=",
"lastModified": 1766036343,
"narHash": "sha256-0+0fzyLOC3SXADKGMeEjH6clv5RfpZva7qhwTDnMetM=",
"ref": "refs/heads/master",
"rev": "ece48b65b79ac2caf6c6be771a9f1809de8bc65b",
"revCount": 949,
"rev": "a4136e2e58419d2b9e8971f478b4fc836d384d10",
"revCount": 951,
"type": "git",
"url": "https://git.joshuabell.xyz/ringofstorms/dotfiles"
},
@ -37,42 +37,6 @@
"url": "https://git.joshuabell.xyz/ringofstorms/dotfiles"
}
},
"deploy-rs": {
"inputs": {
"flake-compat": "flake-compat",
"nixpkgs": "nixpkgs_2",
"utils": "utils"
},
"locked": {
"lastModified": 1762286984,
"narHash": "sha256-9I2H9x5We6Pl+DBYHjR1s3UT8wgwcpAH03kn9CqtdQc=",
"owner": "serokell",
"repo": "deploy-rs",
"rev": "9c870f63e28ec1e83305f7f6cb73c941e699f74f",
"type": "github"
},
"original": {
"owner": "serokell",
"repo": "deploy-rs",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1733328505,
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@ -97,7 +61,7 @@
},
"home-manager_2": {
"inputs": {
"nixpkgs": "nixpkgs_3"
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1765979862,
@ -146,22 +110,6 @@
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1743014863,
"narHash": "sha256-jAIUqsiN2r3hCuHji80U7NNEafpIMBXiwKlSrjWMlpg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "bd3bac8bfb542dbde7ffffb6987a1a1f9d41699f",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1765762245,
"narHash": "sha256-3iXM/zTqEskWtmZs3gqNiVtRTsEjYAedIaLL0mSBsrk=",
@ -177,7 +125,7 @@
"type": "github"
}
},
"nixpkgs_4": {
"nixpkgs_3": {
"locked": {
"lastModified": 1765838191,
"narHash": "sha256-m5KWt1nOm76ILk/JSCxBM4MfK3rYY7Wq9/TZIIeGnT8=",
@ -193,7 +141,7 @@
"type": "github"
}
},
"nixpkgs_5": {
"nixpkgs_4": {
"locked": {
"lastModified": 1764776358,
"narHash": "sha256-MxXSCRiV7DI5U3Ra1UxVJTTUyKsONAE8+8QdSXsGIhA=",
@ -1095,16 +1043,15 @@
"inputs": {
"common": "common",
"de_plasma": "de_plasma",
"deploy-rs": "deploy-rs",
"home-manager": "home-manager_2",
"impermanence": "impermanence",
"nixpkgs": "nixpkgs_4",
"nixpkgs": "nixpkgs_3",
"ros_neovim": "ros_neovim"
}
},
"ros_neovim": {
"inputs": {
"nixpkgs": "nixpkgs_5",
"nixpkgs": "nixpkgs_4",
"nvim_plugin-Almo7aya/openingh.nvim": "nvim_plugin-Almo7aya/openingh.nvim",
"nvim_plugin-CopilotC-Nvim/CopilotChat.nvim": "nvim_plugin-CopilotC-Nvim/CopilotChat.nvim",
"nvim_plugin-JoosepAlviste/nvim-ts-context-commentstring": "nvim_plugin-JoosepAlviste/nvim-ts-context-commentstring",
@ -1195,39 +1142,6 @@
"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": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
}
},
"root": "root",

View file

@ -48,6 +48,7 @@
enable = true;
gpu.intel.enable = true;
sddm.autologinUser = "luser";
disableKeyd = true;
};
})

View file

@ -2,7 +2,6 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
home-manager.url = "github:rycee/home-manager/release-25.11";
deploy-rs.url = "github:serokell/deploy-rs";
# Use relative to get current version for testing
# common.url = "path:../../flakes/common";
@ -15,7 +14,6 @@
nixpkgs,
home-manager,
common,
deploy-rs,
...
}@inputs:
let
@ -25,21 +23,6 @@
lib = nixpkgs.lib;
in
{
deploy = {
sshUser = "root";
sshOpts = [
"-i"
"/run/agenix/nix2linode"
];
nodes.${configuration_name} = {
hostname = "172.236.111.33";
profiles.system = {
user = "root";
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.${configuration_name};
};
};
};
nixosConfigurations = {
"${configuration_name}" = (
lib.nixosSystem {

View file

@ -2,7 +2,6 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
home-manager.url = "github:rycee/home-manager/release-25.11";
deploy-rs.url = "github:serokell/deploy-rs";
ros_neovim.url = "git+https://git.joshuabell.xyz/ringofstorms/nvim";
# Use relative to get current version for testing
@ -23,7 +22,6 @@
secrets,
beszel,
ros_neovim,
deploy-rs,
...
}@inputs:
let
@ -34,24 +32,6 @@
lib = nixpkgs.lib;
in
{
deploy = {
sshUser = "root";
sshOpts = [
"-i"
"/run/agenix/nix2oracle"
];
nodes.${configuration_name} = rec {
hostname = "64.181.210.7";
targetPlatform = "aarch64-linux";
profiles.system = {
user = "root";
path =
deploy-rs.lib.${targetPlatform}.activate.nixos
self.nixosConfigurations.${configuration_name};
};
};
};
nixosConfigurations = {
"${configuration_name}" = (
lib.nixosSystem {