1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-07-29 19:17:45 +00:00

chore: migrate nine host

This commit is contained in:
RGBCube 2025-02-22 17:38:46 +03:00
parent f67d2760f7
commit bf396257de
34 changed files with 400 additions and 177 deletions

View file

@ -1,18 +1,11 @@
lib: lib.nixosSystem ({ config, keys, lib, ... }: let
inherit (lib) collect remove;
inherit (lib) collectNix remove;
in {
imports = collect ./. |> remove ./default.nix;
nixpkgs.hostPlatform = "aarch64-linux";
system.stateVersion = "23.11";
home-manager.sharedModules = [{
home.stateVersion = "23.11";
}];
imports = collectNix ./. |> remove ./default.nix;
networking.hostName = "nine";
secrets.id.file = ./id.age;
secrets.id.file = ./id.age;
services.openssh.hostKeys = [{
type = "ed25519";
path = config.secrets.id.path;
@ -26,6 +19,7 @@ in {
description = "Hungry Seven";
openssh.authorizedKeys.keys = keys.admins;
hashedPasswordFile = config.secrets.sevenPassword.path;
isNormalUser = true;
extraGroups = [ "wheel" ];
};
@ -33,9 +27,16 @@ in {
description = "Backup";
openssh.authorizedKeys.keys = keys.all;
hashedPasswordFile = config.secrets.sevenPassword.path;
isNormalUser = true;
};
};
home-manager.users = {
root = {};
seven = {};
backup = {};
};
networking = {
ipv4 = "152.53.2.105";
ipv6 = "2a0a:4cc0::12d9";
@ -57,4 +58,10 @@ in {
}];
};
};
nixpkgs.hostPlatform = "aarch64-linux";
system.stateVersion = "23.11";
home-manager.sharedModules = [{
home.stateVersion = "23.11";
}];
})

Binary file not shown.

View file

@ -0,0 +1,12 @@
{ config, lib, ... }: let
inherit (lib) enabled;
in {
secrets.github2forgejoEnvironment = {
file = ./environment.age;
owner = "github2forgejo";
};
services.github2forgejo = enabled {
environmentFile = config.secrets.github2forgejoEnvironment.path;
};
}

Binary file not shown.

14
hosts/nine/mail.nix Normal file
View file

@ -0,0 +1,14 @@
{ config, self, ... }: let
inherit (config.networking) domain;
fqdn = "mail2.${domain}";
in {
imports = [(self + /modules/mail)];
mailserver = {
inherit fqdn;
# Not [ domain ] because this is a backup mailserver. contact@mail2.rgbcu.be.
domains = [ fqdn ];
};
}

Binary file not shown.

View file

@ -1,4 +1,6 @@
lib: lib.darwinSystem {
type = "desktop";
networking.hostName = "pala";
users.users.pala = {