deployment changes
This commit is contained in:
parent
a4136e2e58
commit
fca1bd9d8f
6 changed files with 1454 additions and 175 deletions
1420
flake.lock
generated
1420
flake.lock
generated
File diff suppressed because it is too large
Load diff
59
flake.nix
59
flake.nix
|
|
@ -4,58 +4,33 @@
|
||||||
deploy-rs.url = "github:serokell/deploy-rs";
|
deploy-rs.url = "github:serokell/deploy-rs";
|
||||||
|
|
||||||
i001.url = "path:./hosts/i001";
|
i001.url = "path:./hosts/i001";
|
||||||
|
l001.url = "path:./hosts/linode/l001";
|
||||||
|
o001.url = "path:./hosts/oracle/o001";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
{
|
{
|
||||||
nixpkgs,
|
|
||||||
deploy-rs,
|
deploy-rs,
|
||||||
...
|
...
|
||||||
}@inputs:
|
}@inputs:
|
||||||
let
|
let
|
||||||
# Utilities
|
# 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
|
# Define the systems to support: https://github.com/NixOS/nixpkgs/blob/master/lib/systems/flake-systems.nix
|
||||||
forAllSystems = lib.genAttrs lib.systems.flakeExposed;
|
forAllSystems = lib.genAttrs lib.systems.flakeExposed;
|
||||||
# Create a mapping from system to corresponding nixpkgs : https://nixos.wiki/wiki/Overlays#In_a_Nix_flake
|
# 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
|
in
|
||||||
{
|
{
|
||||||
devShells = forAllSystems (
|
devShells = forAllSystems (
|
||||||
system:
|
system:
|
||||||
let
|
let
|
||||||
pkgs = nixpkgsFor.${system};
|
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
|
in
|
||||||
{
|
{
|
||||||
default = pkgs.mkShell {
|
default = pkgs.mkShell {
|
||||||
packages = [
|
packages = [
|
||||||
deploy_oracle
|
inputs.deploy-rs.packages.${system}.default
|
||||||
deploy_linode
|
|
||||||
pkgs.deploy-rs
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -76,6 +51,30 @@
|
||||||
path = deploy-rs.lib.x86_64-linux.activate.nixos inputs.i001.nixosConfigurations.i001;
|
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
112
hosts/i001/flake.lock
generated
|
|
@ -3,11 +3,11 @@
|
||||||
"common": {
|
"common": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"dir": "flakes/common",
|
"dir": "flakes/common",
|
||||||
"lastModified": 1766010612,
|
"lastModified": 1766036343,
|
||||||
"narHash": "sha256-3aKy/FcWFSeA/1bJbslAvWDSXLF4yygykt5OpHK6cTQ=",
|
"narHash": "sha256-0+0fzyLOC3SXADKGMeEjH6clv5RfpZva7qhwTDnMetM=",
|
||||||
"ref": "refs/heads/master",
|
"ref": "refs/heads/master",
|
||||||
"rev": "ece48b65b79ac2caf6c6be771a9f1809de8bc65b",
|
"rev": "a4136e2e58419d2b9e8971f478b4fc836d384d10",
|
||||||
"revCount": 949,
|
"revCount": 951,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.joshuabell.xyz/ringofstorms/dotfiles"
|
"url": "https://git.joshuabell.xyz/ringofstorms/dotfiles"
|
||||||
},
|
},
|
||||||
|
|
@ -23,11 +23,11 @@
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"dir": "flakes/de_plasma",
|
"dir": "flakes/de_plasma",
|
||||||
"lastModified": 1766010612,
|
"lastModified": 1766036343,
|
||||||
"narHash": "sha256-3aKy/FcWFSeA/1bJbslAvWDSXLF4yygykt5OpHK6cTQ=",
|
"narHash": "sha256-0+0fzyLOC3SXADKGMeEjH6clv5RfpZva7qhwTDnMetM=",
|
||||||
"ref": "refs/heads/master",
|
"ref": "refs/heads/master",
|
||||||
"rev": "ece48b65b79ac2caf6c6be771a9f1809de8bc65b",
|
"rev": "a4136e2e58419d2b9e8971f478b4fc836d384d10",
|
||||||
"revCount": 949,
|
"revCount": 951,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.joshuabell.xyz/ringofstorms/dotfiles"
|
"url": "https://git.joshuabell.xyz/ringofstorms/dotfiles"
|
||||||
},
|
},
|
||||||
|
|
@ -37,42 +37,6 @@
|
||||||
"url": "https://git.joshuabell.xyz/ringofstorms/dotfiles"
|
"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": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
|
@ -97,7 +61,7 @@
|
||||||
},
|
},
|
||||||
"home-manager_2": {
|
"home-manager_2": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs_3"
|
"nixpkgs": "nixpkgs_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765979862,
|
"lastModified": 1765979862,
|
||||||
|
|
@ -146,22 +110,6 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"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": {
|
"locked": {
|
||||||
"lastModified": 1765762245,
|
"lastModified": 1765762245,
|
||||||
"narHash": "sha256-3iXM/zTqEskWtmZs3gqNiVtRTsEjYAedIaLL0mSBsrk=",
|
"narHash": "sha256-3iXM/zTqEskWtmZs3gqNiVtRTsEjYAedIaLL0mSBsrk=",
|
||||||
|
|
@ -177,7 +125,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_4": {
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765838191,
|
"lastModified": 1765838191,
|
||||||
"narHash": "sha256-m5KWt1nOm76ILk/JSCxBM4MfK3rYY7Wq9/TZIIeGnT8=",
|
"narHash": "sha256-m5KWt1nOm76ILk/JSCxBM4MfK3rYY7Wq9/TZIIeGnT8=",
|
||||||
|
|
@ -193,7 +141,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_5": {
|
"nixpkgs_4": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1764776358,
|
"lastModified": 1764776358,
|
||||||
"narHash": "sha256-MxXSCRiV7DI5U3Ra1UxVJTTUyKsONAE8+8QdSXsGIhA=",
|
"narHash": "sha256-MxXSCRiV7DI5U3Ra1UxVJTTUyKsONAE8+8QdSXsGIhA=",
|
||||||
|
|
@ -1095,16 +1043,15 @@
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"common": "common",
|
"common": "common",
|
||||||
"de_plasma": "de_plasma",
|
"de_plasma": "de_plasma",
|
||||||
"deploy-rs": "deploy-rs",
|
|
||||||
"home-manager": "home-manager_2",
|
"home-manager": "home-manager_2",
|
||||||
"impermanence": "impermanence",
|
"impermanence": "impermanence",
|
||||||
"nixpkgs": "nixpkgs_4",
|
"nixpkgs": "nixpkgs_3",
|
||||||
"ros_neovim": "ros_neovim"
|
"ros_neovim": "ros_neovim"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ros_neovim": {
|
"ros_neovim": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs_5",
|
"nixpkgs": "nixpkgs_4",
|
||||||
"nvim_plugin-Almo7aya/openingh.nvim": "nvim_plugin-Almo7aya/openingh.nvim",
|
"nvim_plugin-Almo7aya/openingh.nvim": "nvim_plugin-Almo7aya/openingh.nvim",
|
||||||
"nvim_plugin-CopilotC-Nvim/CopilotChat.nvim": "nvim_plugin-CopilotC-Nvim/CopilotChat.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",
|
"nvim_plugin-JoosepAlviste/nvim-ts-context-commentstring": "nvim_plugin-JoosepAlviste/nvim-ts-context-commentstring",
|
||||||
|
|
@ -1195,39 +1142,6 @@
|
||||||
"repo": "rust-overlay",
|
"repo": "rust-overlay",
|
||||||
"type": "github"
|
"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",
|
"root": "root",
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,7 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
gpu.intel.enable = true;
|
gpu.intel.enable = true;
|
||||||
sddm.autologinUser = "luser";
|
sddm.autologinUser = "luser";
|
||||||
|
disableKeyd = true;
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
|
||||||
home-manager.url = "github:rycee/home-manager/release-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
|
# Use relative to get current version for testing
|
||||||
# common.url = "path:../../flakes/common";
|
# common.url = "path:../../flakes/common";
|
||||||
|
|
@ -15,7 +14,6 @@
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
home-manager,
|
home-manager,
|
||||||
common,
|
common,
|
||||||
deploy-rs,
|
|
||||||
...
|
...
|
||||||
}@inputs:
|
}@inputs:
|
||||||
let
|
let
|
||||||
|
|
@ -25,21 +23,6 @@
|
||||||
lib = nixpkgs.lib;
|
lib = nixpkgs.lib;
|
||||||
in
|
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 = {
|
nixosConfigurations = {
|
||||||
"${configuration_name}" = (
|
"${configuration_name}" = (
|
||||||
lib.nixosSystem {
|
lib.nixosSystem {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
|
||||||
home-manager.url = "github:rycee/home-manager/release-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";
|
ros_neovim.url = "git+https://git.joshuabell.xyz/ringofstorms/nvim";
|
||||||
|
|
||||||
# Use relative to get current version for testing
|
# Use relative to get current version for testing
|
||||||
|
|
@ -23,7 +22,6 @@
|
||||||
secrets,
|
secrets,
|
||||||
beszel,
|
beszel,
|
||||||
ros_neovim,
|
ros_neovim,
|
||||||
deploy-rs,
|
|
||||||
...
|
...
|
||||||
}@inputs:
|
}@inputs:
|
||||||
let
|
let
|
||||||
|
|
@ -34,24 +32,6 @@
|
||||||
lib = nixpkgs.lib;
|
lib = nixpkgs.lib;
|
||||||
in
|
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 = {
|
nixosConfigurations = {
|
||||||
"${configuration_name}" = (
|
"${configuration_name}" = (
|
||||||
lib.nixosSystem {
|
lib.nixosSystem {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue