Compare commits
3 commits
f43754e807
...
85fa80c04f
Author | SHA1 | Date | |
---|---|---|---|
85fa80c04f | |||
00f0048f22 | |||
bfe50307d2 |
4 changed files with 98 additions and 22 deletions
|
@ -45,6 +45,7 @@
|
||||||
valhalla = {
|
valhalla = {
|
||||||
DerGeret = import ./profiles/machines/manuel/DerGeret/Arch/config.nix;
|
DerGeret = import ./profiles/machines/manuel/DerGeret/Arch/config.nix;
|
||||||
ManuSurface = import ./profiles/machines/manuel/ManuSurface/Arch/config.nix;
|
ManuSurface = import ./profiles/machines/manuel/ManuSurface/Arch/config.nix;
|
||||||
|
server = import ./profiles/machines/manuel/server.nix;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
73
profiles/machines/manuel/server.nix
Normal file
73
profiles/machines/manuel/server.nix
Normal file
|
@ -0,0 +1,73 @@
|
||||||
|
{ lib, config, ... }:
|
||||||
|
let fs = import ../../../lib/modules/partition/fs.nix;
|
||||||
|
in {
|
||||||
|
imports = [ ./defaults.nix ];
|
||||||
|
|
||||||
|
config = {
|
||||||
|
valhalla = {
|
||||||
|
partition = {
|
||||||
|
os = {
|
||||||
|
partitions = {
|
||||||
|
Boot = {
|
||||||
|
index = 1;
|
||||||
|
type = "uefi";
|
||||||
|
size = "+1G";
|
||||||
|
format = fs.fat32;
|
||||||
|
mountPoint = config.valhalla.boot.efiMountPoint;
|
||||||
|
};
|
||||||
|
|
||||||
|
Swap = {
|
||||||
|
index = 2;
|
||||||
|
type = "swap";
|
||||||
|
};
|
||||||
|
|
||||||
|
OS = {
|
||||||
|
index = 3;
|
||||||
|
label = lib.mkDefault config.valhalla.boot.label;
|
||||||
|
type = "linux";
|
||||||
|
format = fs.ext4;
|
||||||
|
mountPoint = "/";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
hostname = "nuth.ch";
|
||||||
|
timeZone = "Europe/Zurich";
|
||||||
|
keyMap = "de_CH-latin1";
|
||||||
|
keyboardLayout = "ch";
|
||||||
|
|
||||||
|
i18n = {
|
||||||
|
localeSettings = let defaultLocale = "en_US.UTF-8";
|
||||||
|
in {
|
||||||
|
LANG = "de_CH.UTF-8";
|
||||||
|
LANGUAGE = defaultLocale;
|
||||||
|
LC_MESSAGE = defaultLocale;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
software = {
|
||||||
|
essential = true;
|
||||||
|
server = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.docker.enable = true;
|
||||||
|
|
||||||
|
linux.programs = {
|
||||||
|
docker = {
|
||||||
|
services = {
|
||||||
|
drone.enable = true;
|
||||||
|
forgejo.enable = true;
|
||||||
|
jellyfin.enable = true;
|
||||||
|
minecraft.enable = true;
|
||||||
|
nextcloud.enable = true;
|
||||||
|
teamspeak.enable = true;
|
||||||
|
trackmania.enable = true;
|
||||||
|
vaultwarden.enable = true;
|
||||||
|
woodpecker.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -14,6 +14,7 @@ function backupAction -V dir
|
||||||
|
|
||||||
set -l deployScript (getDeploymentScript)
|
set -l deployScript (getDeploymentScript)
|
||||||
|
|
||||||
|
if [ -z "$VALHALLA_BACKUP_DIR" ]
|
||||||
if fish "$dir/../../../lib/modules/partition/confirm.fish" "Do you wish to store the backup on an SSH server?" n
|
if fish "$dir/../../../lib/modules/partition/confirm.fish" "Do you wish to store the backup on an SSH server?" n
|
||||||
read -xP "Please specify the host name of the SSH server: " VALHALLA_BACKUP_SERVER
|
read -xP "Please specify the host name of the SSH server: " VALHALLA_BACKUP_SERVER
|
||||||
read -xP "Please specify the port of the SSH server (default 22): " VALHALLA_BACKUP_SERVER_PORT
|
read -xP "Please specify the port of the SSH server (default 22): " VALHALLA_BACKUP_SERVER_PORT
|
||||||
|
@ -38,6 +39,7 @@ function backupAction -V dir
|
||||||
end
|
end
|
||||||
|
|
||||||
read -xP "Please specify the path to the directory to save the backup to: " VALHALLA_BACKUP_DIR
|
read -xP "Please specify the path to the directory to save the backup to: " VALHALLA_BACKUP_DIR
|
||||||
|
end
|
||||||
|
|
||||||
runHook backupSoftware || begin
|
runHook backupSoftware || begin
|
||||||
echo "Backing up software..."
|
echo "Backing up software..."
|
||||||
|
|
|
@ -173,6 +173,6 @@ begin
|
||||||
end
|
end
|
||||||
|
|
||||||
function getBackupArgs
|
function getBackupArgs
|
||||||
printf "%s\n" --hidden --no-ignore . --exclude "docker-compose"{,.base}".yml" (getServiceRoot $argv)
|
printf "%s\n" --base-directory (getServiceRoot $argv) --hidden --no-ignore "^(docker-compose\.secrets\.yml|data)\$"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue