mirror of
https://github.com/RGBCube/ncc
synced 2025-07-27 18:17:44 +00:00
chore: decomission cube host
This commit is contained in:
parent
20875f0632
commit
765cc3ca49
9 changed files with 2 additions and 119 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -15,8 +15,6 @@
|
||||||
!hosts/best/nextcloud/
|
!hosts/best/nextcloud/
|
||||||
!hosts/best/nextcloud/*.gif
|
!hosts/best/nextcloud/*.gif
|
||||||
|
|
||||||
!hosts/cube/
|
|
||||||
|
|
||||||
!hosts/disk/
|
!hosts/disk/
|
||||||
|
|
||||||
!hosts/nine/
|
!hosts/nine/
|
||||||
|
|
|
@ -1,72 +0,0 @@
|
||||||
lib: lib.nixosSystem ({ config, keys, lib, ... }: let
|
|
||||||
inherit (lib) collectNix remove;
|
|
||||||
in {
|
|
||||||
imports = collectNix ./. |> remove ./default.nix;
|
|
||||||
|
|
||||||
secrets.id.file = ./id.age;
|
|
||||||
services.openssh.hostKeys = [{
|
|
||||||
type = "ed25519";
|
|
||||||
path = config.secrets.id.path;
|
|
||||||
}];
|
|
||||||
|
|
||||||
services.openssh.banner = ''
|
|
||||||
_______________________________________
|
|
||||||
/ If God doesn't destroy San Francisco, \
|
|
||||||
| He should apologize to Sodom and |
|
|
||||||
\ Gomorrah. /
|
|
||||||
---------------------------------------
|
|
||||||
\ ^__^
|
|
||||||
\ (oo)\_______
|
|
||||||
(__)\ )\/\
|
|
||||||
||----w |
|
|
||||||
|| ||
|
|
||||||
'';
|
|
||||||
|
|
||||||
secrets.rgbPassword.file = ./password.rgb.age;
|
|
||||||
users.users = {
|
|
||||||
root.hashedPasswordFile = config.secrets.rgbPassword.path;
|
|
||||||
|
|
||||||
rgb = {
|
|
||||||
description = "RGB";
|
|
||||||
openssh.authorizedKeys.keys = keys.admins;
|
|
||||||
hashedPasswordFile = config.secrets.rgbPassword.path;
|
|
||||||
isNormalUser = true;
|
|
||||||
extraGroups = [ "wheel" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
backup = {
|
|
||||||
description = "Backup";
|
|
||||||
openssh.authorizedKeys.keys = keys.all;
|
|
||||||
hashedPasswordFile = config.secrets.rgbPassword.path;
|
|
||||||
isNormalUser = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
home-manager.users = {
|
|
||||||
root = {};
|
|
||||||
rgb = {};
|
|
||||||
backup = {};
|
|
||||||
};
|
|
||||||
|
|
||||||
networking = let
|
|
||||||
interface = "ens18";
|
|
||||||
in {
|
|
||||||
hostName = "cube";
|
|
||||||
|
|
||||||
ipv4.address = "5.255.78.70";
|
|
||||||
ipv4.prefixLength = 24;
|
|
||||||
|
|
||||||
domain = "rgbcu.be";
|
|
||||||
|
|
||||||
defaultGateway = {
|
|
||||||
inherit interface;
|
|
||||||
|
|
||||||
address = "5.255.78.1";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
system.stateVersion = "23.05";
|
|
||||||
home-manager.sharedModules = [{
|
|
||||||
home.stateVersion = "23.11";
|
|
||||||
}];
|
|
||||||
})
|
|
|
@ -1,25 +0,0 @@
|
||||||
{ lib, modulesPath, ... }: let
|
|
||||||
inherit (lib) enabled;
|
|
||||||
in {
|
|
||||||
imports = [(modulesPath + "/profiles/qemu-guest.nix")];
|
|
||||||
|
|
||||||
boot.loader.grub = enabled {
|
|
||||||
device = "/dev/vda";
|
|
||||||
};
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [
|
|
||||||
"ata_piix"
|
|
||||||
"sr_mod"
|
|
||||||
"uhci_hcd"
|
|
||||||
"virtio_blk"
|
|
||||||
"virtio_pci"
|
|
||||||
];
|
|
||||||
|
|
||||||
fileSystems."/" = {
|
|
||||||
device = "/dev/disk/by-label/root";
|
|
||||||
fsType = "ext4";
|
|
||||||
options = [ "noatime" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = "x86_64-linux";
|
|
||||||
}
|
|
Binary file not shown.
|
@ -1,7 +0,0 @@
|
||||||
age-encryption.org/v1
|
|
||||||
-> ssh-ed25519 +rZ0Tw BqDKOhzKwsfB9r6GklGp+S3mXx+DdX09g41NXnacjl8
|
|
||||||
70wY8mCl2g8AGtMYpav5NPF5g5u+RNGoR6JoET40FN4
|
|
||||||
-> ssh-ed25519 CzqbPQ KZzxhYghah9YxLv0Ne+eEMGArYme4QV4iKk9NIVt4kM
|
|
||||||
WSSR9XCPC/EmPZeh6xvtPTLy6f4fqLl+Xsh6WBw9htM
|
|
||||||
--- JGLEyZKYrGTH9nXuuxIF3OYpyRZyGmEVAdyju4TKRUo
|
|
||||||
1ŸÄâä<>×EK.ØA´ûŽ3=´<>®ÍúÔD!…;%{HGÔ º<>ÔG´óî±±:Fë÷2<s€ádv&òî<C3B2>ýGV<Ä5ô¶¼àwC³3ðj*'(`V½fWþÅU]ÉvÞ<76>‘$Û´
|
|
1
keys.nix
1
keys.nix
|
@ -1,7 +1,6 @@
|
||||||
let
|
let
|
||||||
keys = {
|
keys = {
|
||||||
best = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBUsMV591/9VqzjBiMqdxJId0C7PlZTIXQByHEILWMwc the@best";
|
best = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBUsMV591/9VqzjBiMqdxJId0C7PlZTIXQByHEILWMwc the@best";
|
||||||
cube = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINMkCJeHcD0SIOZ4HkyF6rqUmbvlKhSha3HWMZ0hbIjp rgb@cube";
|
|
||||||
disk = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIItpYQ3Pz6zFifKXvFX7xAC8aby9RW/m5PkW8T9SOee4 floppy@disk";
|
disk = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIItpYQ3Pz6zFifKXvFX7xAC8aby9RW/m5PkW8T9SOee4 floppy@disk";
|
||||||
pala = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBVkWUQ6Z4OK539tore/R5wnueNPPaX532RUAld8UOCo pala@pala";
|
pala = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBVkWUQ6Z4OK539tore/R5wnueNPPaX532RUAld8UOCo pala@pala";
|
||||||
nine = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILJDqnItmvXZMTSwzbalr+9jzS4kSJm5PWEpI8GOpebF seven@nine";
|
nine = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILJDqnItmvXZMTSwzbalr+9jzS4kSJm5PWEpI8GOpebF seven@nine";
|
||||||
|
|
|
@ -40,12 +40,6 @@ in {
|
||||||
port = 2222;
|
port = 2222;
|
||||||
};
|
};
|
||||||
|
|
||||||
cube = {
|
|
||||||
hostname = self.cube.networking.ipv4.address;
|
|
||||||
user = "rgb";
|
|
||||||
port = 2222;
|
|
||||||
};
|
|
||||||
|
|
||||||
disk = {
|
disk = {
|
||||||
hostname = self.disk.networking.ipv4.address;
|
hostname = self.disk.networking.ipv4.address;
|
||||||
user = "floppy";
|
user = "floppy";
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ config, lib, ... }: let
|
{ config, lib, ... }: let
|
||||||
inherit (lib) genAttrs mkConst mkIf remove;
|
inherit (lib) genAttrs mkConst mkIf remove;
|
||||||
in{
|
in{
|
||||||
options.services.restic.hosts = mkConst <| remove config.networking.hostName [ "cube" "disk" "nine" "best" ];
|
options.services.restic.hosts = mkConst <| remove config.networking.hostName [ "disk" "nine" "best" ];
|
||||||
|
|
||||||
config.secrets.resticPassword.file = mkIf config.isServer ./password.age;
|
config.secrets.resticPassword.file = mkIf config.isServer ./password.age;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
let
|
let
|
||||||
inherit (import ./keys.nix) best cube disk nine admins all;
|
inherit (import ./keys.nix) best disk nine admins all;
|
||||||
in {
|
in {
|
||||||
# best
|
# best
|
||||||
"hosts/best/id.age".publicKeys = [ best ] ++ admins;
|
"hosts/best/id.age".publicKeys = [ best ] ++ admins;
|
||||||
|
@ -20,10 +20,6 @@ in {
|
||||||
|
|
||||||
"hosts/best/nextcloud/password.age".publicKeys = [ best ] ++ admins;
|
"hosts/best/nextcloud/password.age".publicKeys = [ best ] ++ admins;
|
||||||
|
|
||||||
# cube
|
|
||||||
"hosts/cube/id.age".publicKeys = [ cube ] ++ admins;
|
|
||||||
"hosts/cube/password.rgb.age".publicKeys = [ cube ] ++ admins;
|
|
||||||
|
|
||||||
# disk
|
# disk
|
||||||
"hosts/disk/id.age".publicKeys = [ disk ] ++ admins;
|
"hosts/disk/id.age".publicKeys = [ disk ] ++ admins;
|
||||||
"hosts/disk/password.floppy.age".publicKeys = [ disk ] ++ admins;
|
"hosts/disk/password.floppy.age".publicKeys = [ disk ] ++ admins;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue