Compare commits
3 commits
81bc14dcb9
...
2f6611998a
| Author | SHA1 | Date | |
|---|---|---|---|
| 2f6611998a | |||
| 04ea332ccf | |||
| ca0926da82 |
4 changed files with 183 additions and 75 deletions
22
README.md
Normal file
22
README.md
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
## Installing to a new machine
|
||||||
|
|
||||||
|
1. add the config
|
||||||
|
2. boot to installer iso on target host
|
||||||
|
3. gather the hardware information
|
||||||
|
4. create disk configuration
|
||||||
|
5. install system
|
||||||
|
|
||||||
|
m1
|
||||||
|
root
|
||||||
|
flatware-theorize-sleet
|
||||||
|
|
||||||
|
names
|
||||||
|
|
||||||
|
- foundry
|
||||||
|
- anvil
|
||||||
|
- cauldron
|
||||||
|
- bellows
|
||||||
|
- hammer
|
||||||
|
- strike
|
||||||
|
- temper
|
||||||
|
- quench
|
||||||
12
clan.nix
12
clan.nix
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
# Ensure this is unique among all clans you want to use.
|
# Ensure this is unique among all clans you want to use.
|
||||||
meta = {
|
meta = {
|
||||||
name = "amarth";
|
name = "amarth-infra";
|
||||||
description = "Amarth cloud";
|
description = "Amarth cloud";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -43,6 +43,15 @@
|
||||||
roles.peer.tags.all = { };
|
roles.peer.tags.all = { };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
zitadel = {
|
||||||
|
module = {
|
||||||
|
name = "@amarth/zitadel";
|
||||||
|
input = "amarth-services";
|
||||||
|
};
|
||||||
|
|
||||||
|
roles.controller.machines."m1" = {};
|
||||||
|
};
|
||||||
|
|
||||||
k3s = {
|
k3s = {
|
||||||
module = {
|
module = {
|
||||||
name = "@amarth/k3s";
|
name = "@amarth/k3s";
|
||||||
|
|
@ -53,6 +62,7 @@
|
||||||
|
|
||||||
roles.agent.machines."c2" = {};
|
roles.agent.machines."c2" = {};
|
||||||
roles.agent.machines."c3" = {};
|
roles.agent.machines."c3" = {};
|
||||||
|
>>>>>>> 81bc14dcb9b649451939a01d3828ca4c170dc897
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
117
flake.lock
generated
117
flake.lock
generated
|
|
@ -1,27 +1,27 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"amarth": {
|
"amarth-services": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"clan-core": "clan-core",
|
"clan-core": "clan-core",
|
||||||
"flake-parts": "flake-parts_2",
|
"flake-parts": "flake-parts_2",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"amarth",
|
"amarth-services",
|
||||||
"clan-core",
|
"clan-core",
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1758024845,
|
"lastModified": 1758130572,
|
||||||
"narHash": "sha256-aMhb+b0LA3IxoaXJ+5YoGSs5mf/N18z+/tj+NjASTmU=",
|
"narHash": "sha256-OB5KCrv3X1x2aTT9tE/6w2H/FD8EZurh7debKLtDyBM=",
|
||||||
"ref": "refs/heads/main",
|
"ref": "refs/heads/main",
|
||||||
"rev": "ceed1a0cdf5b72c290ad5e060f8a68539847df67",
|
"rev": "7e0a5243647dceeb09ff3095938282370f4047d4",
|
||||||
"revCount": 8,
|
"revCount": 10,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.amarth.cloud/amarth/services.git"
|
"url": "https://git.amarth.cloud/amarth/services"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.amarth.cloud/amarth/services.git"
|
"url": "https://git.amarth.cloud/amarth/services"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"clan-core": {
|
"clan-core": {
|
||||||
|
|
@ -53,21 +53,25 @@
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"data-mesher": "data-mesher_2",
|
"data-mesher": "data-mesher_2",
|
||||||
"disko": "disko_2",
|
"disko": "disko_2",
|
||||||
"flake-parts": "flake-parts_3",
|
"flake-parts": [
|
||||||
|
"flake-parts"
|
||||||
|
],
|
||||||
"nix-darwin": "nix-darwin_2",
|
"nix-darwin": "nix-darwin_2",
|
||||||
"nix-select": "nix-select_2",
|
"nix-select": "nix-select_2",
|
||||||
"nixos-facter-modules": "nixos-facter-modules_2",
|
"nixos-facter-modules": "nixos-facter-modules_2",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
"sops-nix": "sops-nix_2",
|
"sops-nix": "sops-nix_2",
|
||||||
"systems": "systems_2",
|
"systems": "systems_2",
|
||||||
"treefmt-nix": "treefmt-nix_2"
|
"treefmt-nix": "treefmt-nix_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1758021280,
|
"lastModified": 1758121565,
|
||||||
"narHash": "sha256-tnXjO1KpfFRKqe9tPZ5ZrM6O2E1DG2nJiE0QKJACPG8=",
|
"narHash": "sha256-y37cz5A+EFMBvWi0/S+wrkTMHGQnDb7cifqZoIfSRHE=",
|
||||||
"rev": "f2134754c5f0fdca982487de82a16428021a0e0e",
|
"rev": "b7798f54666fe61d8b16b5c45c39fac97e2d2e60",
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://git.clan.lol/api/v1/repos/clan/clan-core/archive/f2134754c5f0fdca982487de82a16428021a0e0e.tar.gz"
|
"url": "https://git.clan.lol/api/v1/repos/clan/clan-core/archive/b7798f54666fe61d8b16b5c45c39fac97e2d2e60.tar.gz"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
|
|
@ -77,17 +81,17 @@
|
||||||
"data-mesher": {
|
"data-mesher": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": [
|
"flake-parts": [
|
||||||
"amarth",
|
"amarth-services",
|
||||||
"clan-core",
|
"clan-core",
|
||||||
"flake-parts"
|
"flake-parts"
|
||||||
],
|
],
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"amarth",
|
"amarth-services",
|
||||||
"clan-core",
|
"clan-core",
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
],
|
||||||
"treefmt-nix": [
|
"treefmt-nix": [
|
||||||
"amarth",
|
"amarth-services",
|
||||||
"clan-core",
|
"clan-core",
|
||||||
"treefmt-nix"
|
"treefmt-nix"
|
||||||
]
|
]
|
||||||
|
|
@ -131,10 +135,28 @@
|
||||||
"url": "https://git.clan.lol/clan/data-mesher/archive/main.tar.gz"
|
"url": "https://git.clan.lol/clan/data-mesher/archive/main.tar.gz"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"devshell": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs_2"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1741473158,
|
||||||
|
"narHash": "sha256-kWNaq6wQUbUMlPgw8Y+9/9wP0F8SHkjy24/mN3UAppg=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "devshell",
|
||||||
|
"rev": "7c9e793ebe66bcba8292989a68c0419b737a22a0",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "devshell",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"disko": {
|
"disko": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"amarth",
|
"amarth-services",
|
||||||
"clan-core",
|
"clan-core",
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
|
|
@ -177,7 +199,7 @@
|
||||||
"flake-parts": {
|
"flake-parts": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-lib": [
|
"nixpkgs-lib": [
|
||||||
"amarth",
|
"amarth-services",
|
||||||
"clan-core",
|
"clan-core",
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
|
|
@ -199,7 +221,7 @@
|
||||||
"flake-parts_2": {
|
"flake-parts_2": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-lib": [
|
"nixpkgs-lib": [
|
||||||
"amarth",
|
"amarth-services",
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
@ -220,7 +242,6 @@
|
||||||
"flake-parts_3": {
|
"flake-parts_3": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-lib": [
|
"nixpkgs-lib": [
|
||||||
"clan-core",
|
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
@ -241,7 +262,7 @@
|
||||||
"nix-darwin": {
|
"nix-darwin": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"amarth",
|
"amarth-services",
|
||||||
"clan-core",
|
"clan-core",
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
|
|
@ -268,11 +289,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1757430124,
|
"lastModified": 1758102940,
|
||||||
"narHash": "sha256-MhDltfXesGH8VkGv3hmJ1QEKl1ChTIj9wmGAFfWj/Wk=",
|
"narHash": "sha256-wwqf3+A8EiqwWpcAaPN20QXJLlpGPpwtLTrzgnngI2o=",
|
||||||
"owner": "nix-darwin",
|
"owner": "nix-darwin",
|
||||||
"repo": "nix-darwin",
|
"repo": "nix-darwin",
|
||||||
"rev": "830b3f0b50045cf0bcfd4dab65fad05bf882e196",
|
"rev": "ebd0bfc11fc2b5cff37401e9b3703881ad5fabbd",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -352,31 +373,49 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 315532800,
|
"lastModified": 1722073938,
|
||||||
"narHash": "sha256-h8Sx4S+/0FpodZji6W9lHzwY5BcuUG85Aj3GfhvGC2o=",
|
"narHash": "sha256-OpX0StkL8vpXyWOGUD6G+MA26wAXK6SpT94kLJXo6B4=",
|
||||||
"rev": "a650b5d0de99158323597f048667c4d914243224",
|
"owner": "NixOS",
|
||||||
"type": "tarball",
|
"repo": "nixpkgs",
|
||||||
"url": "https://releases.nixos.org/nixpkgs/nixpkgs-25.11pre845298.a650b5d0de99/nixexprs.tar.xz"
|
"rev": "e36e9f57337d0ff0cf77aceb58af4c805472bfae",
|
||||||
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"type": "tarball",
|
"owner": "NixOS",
|
||||||
"url": "https://nixos.org/channels/nixpkgs-unstable/nixexprs.tar.xz"
|
"ref": "nixpkgs-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_3": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1757745802,
|
||||||
|
"narHash": "sha256-hLEO2TPj55KcUFUU1vgtHE9UEIOjRcH/4QbmfHNF820=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "c23193b943c6c689d70ee98ce3128239ed9e32d1",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"amarth": "amarth",
|
"amarth-services": "amarth-services",
|
||||||
"clan-core": "clan-core_2",
|
"clan-core": "clan-core_2",
|
||||||
"nixpkgs": [
|
"devshell": "devshell",
|
||||||
"clan-core",
|
"flake-parts": "flake-parts_3",
|
||||||
"nixpkgs"
|
"nixpkgs": "nixpkgs_3"
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sops-nix": {
|
"sops-nix": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"amarth",
|
"amarth-services",
|
||||||
"clan-core",
|
"clan-core",
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
|
|
@ -449,7 +488,7 @@
|
||||||
"treefmt-nix": {
|
"treefmt-nix": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"amarth",
|
"amarth-services",
|
||||||
"clan-core",
|
"clan-core",
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
|
|
|
||||||
107
flake.nix
107
flake.nix
|
|
@ -1,44 +1,81 @@
|
||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
clan-core.url = "https://git.clan.lol/clan/clan-core/archive/main.tar.gz";
|
nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
|
||||||
|
|
||||||
nixpkgs.follows = "clan-core/nixpkgs";
|
flake-parts = {
|
||||||
|
url = "github:hercules-ci/flake-parts";
|
||||||
|
inputs.nixpkgs-lib.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
amarth.url = "git+https://git.amarth.cloud/amarth/services.git";
|
clan-core = {
|
||||||
|
url = "https://git.clan.lol/clan/clan-core/archive/main.tar.gz";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
inputs.flake-parts.follows = "flake-parts";
|
||||||
|
};
|
||||||
|
|
||||||
|
devshell = {
|
||||||
|
url = "github:numtide/devshell";
|
||||||
|
};
|
||||||
|
|
||||||
|
amarth-services = {
|
||||||
|
url = "git+https://git.amarth.cloud/amarth/services";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
{
|
inputs@{ flake-parts, ... }:
|
||||||
self,
|
flake-parts.lib.mkFlake { inherit inputs; } ({ self, pkgs, ... }: {
|
||||||
clan-core,
|
systems = [
|
||||||
nixpkgs,
|
"x86_64-linux"
|
||||||
...
|
];
|
||||||
}@inputs:
|
|
||||||
let
|
imports = [
|
||||||
# Usage see: https://docs.clan.lol
|
inputs.clan-core.flakeModules.default
|
||||||
clan = clan-core.lib.clan {
|
inputs.devshell.flakeModule
|
||||||
inherit self;
|
./clan.nix
|
||||||
imports = [ ./clan.nix ];
|
];
|
||||||
specialArgs = { inherit inputs; };
|
|
||||||
|
perSystem = { system, ... }: {
|
||||||
|
devshells = {
|
||||||
|
default = {
|
||||||
|
packages = [ inputs.clan-core.packages.${system}.clan-cli ];
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
in
|
});
|
||||||
{
|
|
||||||
inherit (clan.config) nixosConfigurations nixosModules clanInternals;
|
# outputs =
|
||||||
clan = clan.config;
|
# {
|
||||||
# Add the Clan cli tool to the dev shell.
|
# self,
|
||||||
# Use "nix develop" to enter the dev shell.
|
# clan-core,
|
||||||
devShells =
|
# nixpkgs,
|
||||||
nixpkgs.lib.genAttrs
|
# ...
|
||||||
[
|
# }@inputs:
|
||||||
"x86_64-linux"
|
# let
|
||||||
"aarch64-linux"
|
# # Usage see: https://docs.clan.lol
|
||||||
"aarch64-darwin"
|
# clan = clan-core.lib.clan {
|
||||||
"x86_64-darwin"
|
# inherit self;
|
||||||
]
|
# imports = [ ./clan.nix ];
|
||||||
(system: {
|
# specialArgs = { inherit inputs; };
|
||||||
default = clan-core.inputs.nixpkgs.legacyPackages.${system}.mkShell {
|
# };
|
||||||
packages = [ clan-core.packages.${system}.clan-cli ];
|
# in
|
||||||
};
|
# {
|
||||||
});
|
# inherit (clan.config) nixosConfigurations nixosModules clanInternals;
|
||||||
};
|
# clan = clan.config;
|
||||||
|
# # Add the Clan cli tool to the dev shell.
|
||||||
|
# # Use "nix develop" to enter the dev shell.
|
||||||
|
# devShells =
|
||||||
|
# nixpkgs.lib.genAttrs
|
||||||
|
# [
|
||||||
|
# "x86_64-linux"
|
||||||
|
# "aarch64-linux"
|
||||||
|
# "aarch64-darwin"
|
||||||
|
# "x86_64-darwin"
|
||||||
|
# ]
|
||||||
|
# (system: {
|
||||||
|
# default = clan-core.inputs.nixpkgs.legacyPackages.${system}.mkShell {
|
||||||
|
# packages = [ clan-core.packages.${system}.clan-cli ];
|
||||||
|
# };
|
||||||
|
# });
|
||||||
|
# };
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue