Signed-off-by: Xe <me@christine.website>
This commit is contained in:
Cadey Ratio 2022-01-31 19:44:53 -05:00
parent f9ad27771d
commit e155ab6b88
6 changed files with 114 additions and 7 deletions

View File

@ -41,12 +41,7 @@
};
nixosConfigurations = {
logos = mkSystem [ ./hosts/logos ./hardware/alrest ({...}: {
within.services.printerfacts = {
enable = true;
domain = "logos.shark-harmonic.ts.net";
};
}) ];
logos = mkSystem [ ./hosts/logos ./hardware/alrest ];
# vms
## logos

View File

@ -1,7 +1,7 @@
{ config, pkgs, ... }:
{
imports = [ ./hardware-configuration.nix ./zfs.nix ];
imports = [ ./hardware-configuration.nix ./zfs.nix ./zrepl.nix ];
within.users.enableSystem = true;

51
hardware/alrest/zrepl.nix Normal file
View File

@ -0,0 +1,51 @@
{ config, pkgs, lib, ... }:
{
services.zrepl = {
enable = true;
settings = {
global = {
logging = [{
type = "syslog";
level = "info";
format = "human";
}];
};
jobs = [{
name = "backups";
type = "push";
connect = {
type = "tcp";
address = "100.68.185.47:29491";
};
filesystems = { "rpool/safe<" = true; };
send = {
#encrypted = true;
compressed = true;
raw = true;
};
snapshotting = {
type = "periodic";
prefix = "zrepl_";
interval = "60m";
};
pruning = {
keep_sender = [
{ type = "not_replicated"; }
{
type = "last_n";
count = 10;
}
];
keep_receiver = [{
type = "grid";
regex = "^zrepl_";
grid =
lib.concatStringsSep " | " [ "1x1h(keep=all)" "24x1h" "30x1d" ];
}];
};
}];
};
};
}

View File

@ -0,0 +1,41 @@
{ config, pkgs, ... }:
{
imports = [ ./maisem.nix ];
services.corerad = {
enable = true;
settings = {
interfaces = [
{
name = "virbr0";
advertise = false;
prefix = [{ prefix = "fd69:420:e621:278a::/64"; }];
}
{
name = "enp2s0";
advertise = true;
prefix = [{ prefix = "fd69:420:e621::/64"; }];
}
];
debug = {
address = "[::]:38177";
prometheus = true;
};
};
};
users.motd = builtins.readFile ./motd;
environment.systemPackages = with pkgs; [ nodejs-14_x ];
services.tailscale.port = 15428;
# networking.interfaces."virbr0".ipv6.addresses = [{
# address = "fda2:d982:1da2:278a::";
# prefixLength = 64;
# }];
networking.interfaces."enp2s0".ipv6.addresses = [{
address = "fd69:420:e621::fe34:97ff:fe0d:1ecd";
prefixLength = 64;
}];
}

11
hosts/kos-mos/maisem.nix Normal file
View File

@ -0,0 +1,11 @@
{ config, pkgs, ... }:
{
users.users.maisem = {
isNormalUser = true;
shell = pkgs.zsh;
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMm8WG2pzRbeTdNguEF9zmaj7bASf4YwXccAs5bVW14I"
];
};
}

9
hosts/kos-mos/motd Normal file
View File

@ -0,0 +1,9 @@
█ █
██ ██
███ ███
████████
██████
████
██
KOS-MOS: Kosmos Obey Strategical Multiple Operation Systems
All systems operational