Compare commits

..

No commits in common. "2f6611998a054f04b07381f1a1208c5f62872631" and "81bc14dcb9b649451939a01d3828ca4c170dc897" have entirely different histories.

4 changed files with 75 additions and 183 deletions

View file

@ -1,22 +0,0 @@
## 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

View file

@ -1,7 +1,7 @@
{
# Ensure this is unique among all clans you want to use.
meta = {
name = "amarth-infra";
name = "amarth";
description = "Amarth cloud";
};
@ -43,15 +43,6 @@
roles.peer.tags.all = { };
};
zitadel = {
module = {
name = "@amarth/zitadel";
input = "amarth-services";
};
roles.controller.machines."m1" = {};
};
k3s = {
module = {
name = "@amarth/k3s";
@ -62,7 +53,6 @@
roles.agent.machines."c2" = {};
roles.agent.machines."c3" = {};
>>>>>>> 81bc14dcb9b649451939a01d3828ca4c170dc897
};
};

117
flake.lock generated
View file

@ -1,27 +1,27 @@
{
"nodes": {
"amarth-services": {
"amarth": {
"inputs": {
"clan-core": "clan-core",
"flake-parts": "flake-parts_2",
"nixpkgs": [
"amarth-services",
"amarth",
"clan-core",
"nixpkgs"
]
},
"locked": {
"lastModified": 1758130572,
"narHash": "sha256-OB5KCrv3X1x2aTT9tE/6w2H/FD8EZurh7debKLtDyBM=",
"lastModified": 1758024845,
"narHash": "sha256-aMhb+b0LA3IxoaXJ+5YoGSs5mf/N18z+/tj+NjASTmU=",
"ref": "refs/heads/main",
"rev": "7e0a5243647dceeb09ff3095938282370f4047d4",
"revCount": 10,
"rev": "ceed1a0cdf5b72c290ad5e060f8a68539847df67",
"revCount": 8,
"type": "git",
"url": "https://git.amarth.cloud/amarth/services"
"url": "https://git.amarth.cloud/amarth/services.git"
},
"original": {
"type": "git",
"url": "https://git.amarth.cloud/amarth/services"
"url": "https://git.amarth.cloud/amarth/services.git"
}
},
"clan-core": {
@ -53,25 +53,21 @@
"inputs": {
"data-mesher": "data-mesher_2",
"disko": "disko_2",
"flake-parts": [
"flake-parts"
],
"flake-parts": "flake-parts_3",
"nix-darwin": "nix-darwin_2",
"nix-select": "nix-select_2",
"nixos-facter-modules": "nixos-facter-modules_2",
"nixpkgs": [
"nixpkgs"
],
"nixpkgs": "nixpkgs_2",
"sops-nix": "sops-nix_2",
"systems": "systems_2",
"treefmt-nix": "treefmt-nix_2"
},
"locked": {
"lastModified": 1758121565,
"narHash": "sha256-y37cz5A+EFMBvWi0/S+wrkTMHGQnDb7cifqZoIfSRHE=",
"rev": "b7798f54666fe61d8b16b5c45c39fac97e2d2e60",
"lastModified": 1758021280,
"narHash": "sha256-tnXjO1KpfFRKqe9tPZ5ZrM6O2E1DG2nJiE0QKJACPG8=",
"rev": "f2134754c5f0fdca982487de82a16428021a0e0e",
"type": "tarball",
"url": "https://git.clan.lol/api/v1/repos/clan/clan-core/archive/b7798f54666fe61d8b16b5c45c39fac97e2d2e60.tar.gz"
"url": "https://git.clan.lol/api/v1/repos/clan/clan-core/archive/f2134754c5f0fdca982487de82a16428021a0e0e.tar.gz"
},
"original": {
"type": "tarball",
@ -81,17 +77,17 @@
"data-mesher": {
"inputs": {
"flake-parts": [
"amarth-services",
"amarth",
"clan-core",
"flake-parts"
],
"nixpkgs": [
"amarth-services",
"amarth",
"clan-core",
"nixpkgs"
],
"treefmt-nix": [
"amarth-services",
"amarth",
"clan-core",
"treefmt-nix"
]
@ -135,28 +131,10 @@
"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": {
"inputs": {
"nixpkgs": [
"amarth-services",
"amarth",
"clan-core",
"nixpkgs"
]
@ -199,7 +177,7 @@
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"amarth-services",
"amarth",
"clan-core",
"nixpkgs"
]
@ -221,7 +199,7 @@
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": [
"amarth-services",
"amarth",
"nixpkgs"
]
},
@ -242,6 +220,7 @@
"flake-parts_3": {
"inputs": {
"nixpkgs-lib": [
"clan-core",
"nixpkgs"
]
},
@ -262,7 +241,7 @@
"nix-darwin": {
"inputs": {
"nixpkgs": [
"amarth-services",
"amarth",
"clan-core",
"nixpkgs"
]
@ -289,11 +268,11 @@
]
},
"locked": {
"lastModified": 1758102940,
"narHash": "sha256-wwqf3+A8EiqwWpcAaPN20QXJLlpGPpwtLTrzgnngI2o=",
"lastModified": 1757430124,
"narHash": "sha256-MhDltfXesGH8VkGv3hmJ1QEKl1ChTIj9wmGAFfWj/Wk=",
"owner": "nix-darwin",
"repo": "nix-darwin",
"rev": "ebd0bfc11fc2b5cff37401e9b3703881ad5fabbd",
"rev": "830b3f0b50045cf0bcfd4dab65fad05bf882e196",
"type": "github"
},
"original": {
@ -373,49 +352,31 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1722073938,
"narHash": "sha256-OpX0StkL8vpXyWOGUD6G+MA26wAXK6SpT94kLJXo6B4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e36e9f57337d0ff0cf77aceb58af4c805472bfae",
"type": "github"
"lastModified": 315532800,
"narHash": "sha256-h8Sx4S+/0FpodZji6W9lHzwY5BcuUG85Aj3GfhvGC2o=",
"rev": "a650b5d0de99158323597f048667c4d914243224",
"type": "tarball",
"url": "https://releases.nixos.org/nixpkgs/nixpkgs-25.11pre845298.a650b5d0de99/nixexprs.tar.xz"
},
"original": {
"owner": "NixOS",
"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"
"type": "tarball",
"url": "https://nixos.org/channels/nixpkgs-unstable/nixexprs.tar.xz"
}
},
"root": {
"inputs": {
"amarth-services": "amarth-services",
"amarth": "amarth",
"clan-core": "clan-core_2",
"devshell": "devshell",
"flake-parts": "flake-parts_3",
"nixpkgs": "nixpkgs_3"
"nixpkgs": [
"clan-core",
"nixpkgs"
]
}
},
"sops-nix": {
"inputs": {
"nixpkgs": [
"amarth-services",
"amarth",
"clan-core",
"nixpkgs"
]
@ -488,7 +449,7 @@
"treefmt-nix": {
"inputs": {
"nixpkgs": [
"amarth-services",
"amarth",
"clan-core",
"nixpkgs"
]

107
flake.nix
View file

@ -1,81 +1,44 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
clan-core.url = "https://git.clan.lol/clan/clan-core/archive/main.tar.gz";
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
nixpkgs.follows = "clan-core/nixpkgs";
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";
};
amarth.url = "git+https://git.amarth.cloud/amarth/services.git";
};
outputs =
inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } ({ self, pkgs, ... }: {
systems = [
"x86_64-linux"
];
imports = [
inputs.clan-core.flakeModules.default
inputs.devshell.flakeModule
./clan.nix
];
perSystem = { system, ... }: {
devshells = {
default = {
packages = [ inputs.clan-core.packages.${system}.clan-cli ];
};
};
{
self,
clan-core,
nixpkgs,
...
}@inputs:
let
# Usage see: https://docs.clan.lol
clan = clan-core.lib.clan {
inherit self;
imports = [ ./clan.nix ];
specialArgs = { inherit inputs; };
};
});
# outputs =
# {
# self,
# clan-core,
# nixpkgs,
# ...
# }@inputs:
# let
# # Usage see: https://docs.clan.lol
# clan = clan-core.lib.clan {
# inherit self;
# imports = [ ./clan.nix ];
# specialArgs = { inherit inputs; };
# };
# 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 ];
# };
# });
# };
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 ];
};
});
};
}