Compare commits

...

66 commits

Author SHA1 Message Date
Benjamin Bädorf 5f1b91a81b
More changes
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-25 21:33:34 +01:00
Benjamin Bädorf f291e88d86
Initial proposal for momo infrastructure setup
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-25 04:24:27 +01:00
b12f b1d2bfef98 Merge pull request 'Update flake inputs in infra branch' (#169) from update/flora-6-flake-inputs into infra
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #169
Reviewed-by: b12f <hello@benjaminbaedorf.eu>
2023-02-24 21:38:11 +01:00
teutat3s 6582d3142d
Bump flake.lock
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2023-02-24 21:01:50 +01:00
b12f 1772e20e2e Merge pull request 'mailman: fix directory permissions' (#164) from fix/infra-mailman-dir-permissions into infra
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #164
Reviewed-by: b12f <hello@benjaminbaedorf.eu>
2023-02-01 13:42:56 +01:00
teutat3s 93b5eab0ea
mailman: fix directory permissions
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2023-02-01 13:38:10 +01:00
teutat3s f05a1191b9 Merge pull request 'flora-6: move docker data-root to /data' (#163) from fix/infra-move-docker-root into infra
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #163
2023-02-01 13:30:00 +01:00
teutat3s c1dcea11fa
flora-6: move docker data-root to /data
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2023-02-01 13:28:49 +01:00
teutat3s 34c59a3010 Merge pull request 'feature/mailman' (#160) from feature/mailman into infra
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #160
Reviewed-by: teutat3s <teutates@mailbox.org>
2023-02-01 13:23:03 +01:00
teutat3s 3c422fee62
mailmain: fix postfix main.cf path
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2023-02-01 13:17:04 +01:00
teutat3s b6ebd71c61
keycloak: use version 20.0.3 from nixos-22.11
It's the same version as on nixos-unstable
2023-02-01 13:15:30 +01:00
teutat3s 8fb6ba33b2
ci: check build of flora-6 in infra branch 2023-02-01 12:27:05 +01:00
teutat3s f00a009115
Merge branch 'main' into feature/mailman 2023-02-01 12:26:18 +01:00
teutat3s 9f0dcb8ed8
Use nix version from 22.11, prevent nvfetcher from
All checks were successful
continuous-integration/drone/pr Build is passing
rebuilding so much: it has nix as a dependency and won't find its hash
in the binary cache if we override our nix version with the one from
nixos-unstable. 22.11 has 2.11.1 which should be recent enough for us.
2023-02-01 11:15:58 +01:00
teutat3s f49bc2b4b2
Bump flake.lock, fix agenix overlay
agenix now uses overlays.default to export its overlay
2023-02-01 11:14:50 +01:00
teutat3s 2a756869e3
Merge branch 'main' into feature/mailman
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
2023-02-01 10:10:28 +01:00
Benjamin Bädorf a8279af631
Merge branch 'feature/mailman' of git.pub.solar:pub-solar/os into feature/mailman
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
2023-01-31 22:44:12 +01:00
Benjamin Bädorf 61afca41e5
Add postfix to flora-6 2023-01-31 22:43:59 +01:00
teutat3s db7f5c5254
secrets: rekey for b12f-bbcom
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
2023-01-31 21:35:29 +01:00
Benjamin Bädorf 5ade1c028f
Build works
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-31 21:32:16 +01:00
Benjamin Bädorf 8f0cde4c3d
Remove broken semicolon 2023-01-31 21:30:43 +01:00
Benjamin Bädorf 6c736b8684
Remove broken semicolon 2023-01-31 21:29:02 +01:00
Benjamin Bädorf 26318bcafc
feat/mailman: Add flora-6 config for mailman 2023-01-31 21:25:45 +01:00
Benjamin Bädorf a7d684e1f8
Add b12fs keys to infra secrets
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-29 20:00:40 +01:00
teutat3s 997561f817
caddy: add to hakkonaut group
All checks were successful
continuous-integration/drone/push Build is passing
Add public SSH key to hakkonaut user
2023-01-29 17:39:34 +01:00
teutat3s 0e3b602809
drone: fix path for ISO upload on flora-6 2023-01-29 17:38:00 +01:00
teutat3s 440b38f896
Merge branch 'infra' of git.pub.solar:pub-solar/os into infra
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-29 00:03:42 +01:00
teutat3s 8051531d77
base-user: userVariables -> variables 2023-01-29 00:00:56 +01:00
teutat3s 54ea93ced4
drone: fix docker runner env vars 2023-01-29 00:00:21 +01:00
teutat3s 9732e4edf1
Apply treefmt 2023-01-28 23:51:33 +01:00
teutat3s 7a7ff7b1df
flora-6: init drone docker runner 2023-01-28 23:50:31 +01:00
teutat3s 90b182e499
Merge branch 'main' into infra 2023-01-28 23:27:21 +01:00
b12f 72c84bb1e6 Merge pull request 'users/barkeeper: Add @axeman's ssh key' (#157) from add-akshay into infra
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #157
2023-01-28 23:16:37 +01:00
Akshay Mankar 7454d5fc5f
users/barkeeper: Add @axeman's ssh key
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
2023-01-28 23:14:39 +01:00
teutat3s f375843f43
flora-6: init drone ci 2023-01-28 21:26:13 +01:00
teutat3s 291edb6b52
flora-6: update gitea config
change to new responsible MX
disable signing commits etc.
2023-01-28 15:15:46 +01:00
teutat3s cda684ae32
barkeeper: update password 2023-01-28 15:15:34 +01:00
teutat3s 6a6abc79c2
flora-6: ensure to disable NetworkManager 2023-01-28 15:15:17 +01:00
teutat3s de8dcbe9a2
networking: don't wait for network-online
It failed upon deployment with deploy-rs and caused it to rollback
2023-01-28 15:13:47 +01:00
teutat3s e9819fdec7
Bump flake.lock 2023-01-28 15:13:13 +01:00
teutat3s 645b10f2b9
flora-6: update Caddyfile, add missing pub.solar
config for www and mastodon well-known redirect
2023-01-21 23:22:50 +01:00
teutat3s f2c5739c97
Update flake.lock, remove fork flake input
gitea gpg PR got merged into nixos-unstable in
https://github.com/NixOS/nixpkgs/pull/203183
2023-01-21 23:21:16 +01:00
Benjamin Bädorf b1710c4013
flora6: fix caddy file_server directive name typo 2023-01-07 21:31:51 +01:00
Benjamin Bädorf f12f42827f
flora-6: Serve pub.solar website
Originally authored by @axeman
2023-01-07 21:26:14 +01:00
Benjamin Bädorf 8453b8c584
Add extra hensoko key 2023-01-07 21:23:49 +01:00
teutat3s 9ca8387d12
flora-6: redirect gitea login to keycloak 2022-11-29 00:55:18 +01:00
teutat3s 492b8695a3
Merge remote-tracking branch 'origin/nixos-22-11-racoon' into infra-22.11 2022-11-28 21:53:32 +01:00
teutat3s 9fb726b2d7
flora-6: add obs-portal to caddy
auth: redirect / to pub.solar ID management page
2022-11-28 15:32:21 +01:00
Benjamin Bädorf 161acca3a7
Update keycloak theme 2022-11-28 15:31:29 +01:00
Benjamin Bädorf 86cb6522ed
Update keycloak theme 2022-11-28 15:17:51 +01:00
Benjamin Bädorf 2b03c98cf2
Refactor flora-6 services a bit 2022-11-27 23:31:08 +01:00
teutat3s 756845c187
Bump flake.lock 2022-11-27 22:01:36 +01:00
teutat3s 7655260456
Pull in upstream commits from https://github.com/divnix/digga/pull/490
Improved flake-compat

Get the rev from the flake.lock file. Shouldn't be an issue for
first time users as the guide instructs users to generate a lock
file. `builtins.file` was used in accordance with nix.dev
reccommendations.

https://nix.dev/anti-patterns/language#reproducibility-referencing-top-level-directory-with

Rm tempfix
2022-11-27 22:01:21 +01:00
Hendrik Sokolowski b3f4727354
Update drone-config 2022-11-27 22:01:21 +01:00
teutat3s c345cb8af4
zsh: fetch plugins using nvfetcher 2022-11-27 22:01:21 +01:00
teutat3s 8fb95ce9dc
neovim: use nvfetcher for custom plugins 2022-11-27 22:01:21 +01:00
Hendrik Sokolowski cb829d0972
Make resume_offset optional 2022-11-27 22:01:21 +01:00
teutat3s ca22046f75
drone: use our custom drone-scp image 2022-11-27 22:01:20 +01:00
teutat3s 24c699698f
Bump flake.lock 2022-11-27 22:01:18 +01:00
teutat3s 1f2ba895a0
Clean some sessionVariables from global scope
Especially some XDG_* env vars polluted other users environment when set

globally
2022-11-27 21:57:34 +01:00
teutat3s a795bf4429
Rename flora6 -> flora-6 2022-11-27 21:56:40 +01:00
Benjamin Bädorf 1f2d56e0c9
Rename flora6 to flora-6
This aligns with the coming changes in hostnames in the terraform
infrastructure.
2022-11-26 02:40:51 +01:00
teutat3s 90bca8d0ba
Merge branch 'main' into infra 2022-10-05 14:45:12 +02:00
teutat3s 97d88096e8
core: disable SSH passwordAuthentication by default 2022-10-05 12:03:46 +02:00
teutat3s f0c12e38ee
Change user.publicKeys to a SSH keys string list 2022-10-05 12:03:42 +02:00
teutat3s 0e6df4e33b
flora6: init host 2022-10-05 12:02:28 +02:00
31 changed files with 1754 additions and 43 deletions

View file

@ -15,7 +15,7 @@ steps:
commands:
- 'echo DEBUG: Using NIX_FLAGS: $NIX_FLAGS'
- nix $$NIX_FLAGS develop --command nix flake show
- nix $$NIX_FLAGS build ".#nixosConfigurations.PubSolarOS.config.system.build.toplevel"
- nix $$NIX_FLAGS build ".#nixosConfigurations.flora-6.config.system.build.toplevel"
---
kind: pipeline
@ -42,7 +42,7 @@ steps:
from_secret: private_ssh_key
MANTA_USER: pub_solar
MANTA_URL: https://eu-central.manta.greenbaum.cloud
MANTA_KEY_ID: "5d:5f:3d:22:8d:37:1f:e6:d6:ab:06:18:d9:a2:04:67"
MANTA_KEY_ID: "59:9f:5a:6f:c4:e2:3b:32:7f:13:1f:de:b7:59:80:85"
commands:
- export TARGET_DIR="ci/$${DRONE_REPO}/$${DRONE_BUILD_NUMBER}"
- echo env var TARGET_DIR is set to $$TARGET_DIR
@ -148,6 +148,6 @@ volumes:
---
kind: signature
hmac: 0c0994f0878cdb49172772f78c9a772f5c75830b49c1c22bd15db385fe857e17
hmac: 59c35601e641341216eaba764756a96dfe9137f7c6255aa889b12c73af77f244
...

View file

@ -10,11 +10,11 @@
]
},
"locked": {
"lastModified": 1675176355,
"narHash": "sha256-Qjxh5cmN56siY97mzmBLI1+cdjXSPqmfPVsKxBvHmwI=",
"lastModified": 1677247280,
"narHash": "sha256-sa+8MtoAOSLsWP9vf0qiJUyMovIEYgDzHE8TkoK04Hk=",
"owner": "ryantm",
"repo": "agenix",
"rev": "b7ffcfe77f817d9ee992640ba1f270718d197f28",
"rev": "833f87c8ff574a29aea3e091045cbaed3cf86bc1",
"type": "github"
},
"original": {
@ -89,6 +89,31 @@
"type": "github"
}
},
"devshell_2": {
"inputs": {
"flake-utils": [
"keycloak-theme-pub-solar",
"flake-utils"
],
"nixpkgs": [
"keycloak-theme-pub-solar",
"nixpkgs"
]
},
"locked": {
"lastModified": 1667210711,
"narHash": "sha256-IoErjXZAkzYWHEpQqwu/DeRNJGFdR7X2OGbkhMqMrpw=",
"owner": "numtide",
"repo": "devshell",
"rev": "96a9dd12b8a447840cc246e17a47b81a4268bba7",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "devshell",
"type": "github"
}
},
"digga": {
"inputs": {
"darwin": [
@ -197,6 +222,36 @@
"type": "github"
}
},
"flake-utils_3": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_4": {
"locked": {
"lastModified": 1653893745,
"narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"home": {
"inputs": {
"nixpkgs": [
@ -205,11 +260,11 @@
"utils": "utils_2"
},
"locked": {
"lastModified": 1674440933,
"narHash": "sha256-CASRcD/rK3fn5vUCti3jzry7zi0GsqRsBohNq9wPgLs=",
"lastModified": 1676257154,
"narHash": "sha256-eW3jymNLpdxS5fkp9NWKyNtgL0Gqtgg1vCTofKXDF1g=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "65c47ced082e3353113614f77b1bc18822dc731f",
"rev": "2cb27c79117a2a75ff3416c3199a2dc57af6a527",
"type": "github"
},
"original": {
@ -219,13 +274,36 @@
"type": "github"
}
},
"keycloak-theme-pub-solar": {
"inputs": {
"devshell": "devshell_2",
"flake-utils": "flake-utils_3",
"nixpkgs": [
"nixos"
]
},
"locked": {
"lastModified": 1669645736,
"narHash": "sha256-u1yK1fyh1UEX3BITfk6ROenWbP3aznZRplwCE+FVtHE=",
"ref": "main",
"rev": "b488fe24a27bf76e0b777202bf13a68660121305",
"revCount": 17,
"type": "git",
"url": "https://git.pub.solar/pub-solar/keycloak-theme"
},
"original": {
"ref": "main",
"type": "git",
"url": "https://git.pub.solar/pub-solar/keycloak-theme"
}
},
"latest": {
"locked": {
"lastModified": 1675115703,
"narHash": "sha256-4zetAPSyY0D77x+Ww9QBe8RHn1akvIvHJ/kgg8kGDbk=",
"lastModified": 1677063315,
"narHash": "sha256-qiB4ajTeAOVnVSAwCNEEkoybrAlA+cpeiBxLobHndE8=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "2caf4ef5005ecc68141ecb4aac271079f7371c44",
"rev": "988cc958c57ce4350ec248d2d53087777f9e1949",
"type": "github"
},
"original": {
@ -237,11 +315,11 @@
},
"nixos": {
"locked": {
"lastModified": 1675154384,
"narHash": "sha256-gUXzyTS3WsO3g2Rz0qOYR2a26whkyL2UfTr1oPH9mm8=",
"lastModified": 1677179781,
"narHash": "sha256-+peLp16ruWLuTFHo0ZUbLlS1/meS/+RsWQQ9bUAzOh8=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "0218941ea68b4c625533bead7bbb94ccce52dceb",
"rev": "50c23cd4ff6c8344e0b4d438b027b3afabfe58dd",
"type": "github"
},
"original": {
@ -253,11 +331,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1674550793,
"narHash": "sha256-ljJlIFQZwtBbzWqWTmmw2O5BFmQf1A/DspwMOQtGXHk=",
"lastModified": 1677232326,
"narHash": "sha256-rAk2/80kLvA3yIMmSV86T1B4kNvwCFMSQ1FxXndaUB0=",
"owner": "nixos",
"repo": "nixos-hardware",
"rev": "b7ac0a56029e4f9e6743b9993037a5aaafd57103",
"rev": "2d44015779cced4eec9df5b8dab238b9f6312cb2",
"type": "github"
},
"original": {
@ -302,10 +380,36 @@
"digga": "digga",
"flake-compat": "flake-compat",
"home": "home",
"keycloak-theme-pub-solar": "keycloak-theme-pub-solar",
"latest": "latest",
"nixos": "nixos",
"nixos-hardware": "nixos-hardware",
"nur": "nur"
"nur": "nur",
"triton-vmtools": "triton-vmtools"
}
},
"triton-vmtools": {
"inputs": {
"flake-utils": "flake-utils_4",
"nixpkgs": [
"nixos"
]
},
"locked": {
"dir": "vmtools",
"lastModified": 1669648111,
"narHash": "sha256-EKh7iM4fCyZ7L6+HmGn3QkZ1HuG9zMEkziOH3K13SbY=",
"ref": "main",
"rev": "d78c4afe040440437949ce581ae0dcdc5893553c",
"revCount": 28,
"type": "git",
"url": "https://git.b12f.io/pub-solar/infra?dir=vmtools"
},
"original": {
"dir": "vmtools",
"ref": "main",
"type": "git",
"url": "https://git.b12f.io/pub-solar/infra?dir=vmtools"
}
},
"utils": {

View file

@ -36,6 +36,12 @@
agenix.inputs.darwin.follows = "darwin";
nixos-hardware.url = "github:nixos/nixos-hardware";
triton-vmtools.url = "git+https://git.b12f.io/pub-solar/infra?ref=main&dir=vmtools";
triton-vmtools.inputs.nixpkgs.follows = "nixos";
keycloak-theme-pub-solar.url = "git+https://git.pub.solar/pub-solar/keycloak-theme?ref=main";
keycloak-theme-pub-solar.inputs.nixpkgs.follows = "nixos";
};
outputs = {
@ -47,6 +53,8 @@
nur,
agenix,
deploy,
triton-vmtools,
keycloak-theme-pub-solar,
...
} @ inputs:
digga.lib.mkFlake
@ -146,6 +154,11 @@
pub-solar = {suites, ...}: {
imports = suites.base;
home.stateVersion = "21.03";
};
barkeeper = {suites, ...}: {
imports = suites.base;
home.stateVersion = "21.03";
};
}; # digga.lib.importers.rakeLeaves ./users/hm;
@ -155,6 +168,11 @@
homeConfigurations = digga.lib.mkHomeConfigurations self.nixosConfigurations;
deploy.nodes = digga.lib.mkDeployNodes self.nixosConfigurations {};
deploy.nodes = digga.lib.mkDeployNodes self.nixosConfigurations {
flora-6 = {
sshUser = "barkeeper";
hostname = "flora-6.pub.solar";
};
};
};
}

161
hosts/0001/0001.nix Normal file
View file

@ -0,0 +1,161 @@
{
config,
latestModulesPath,
lib,
inputs,
pkgs,
profiles,
self,
...
}: let
psCfg = config.pub-solar;
in {
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
./triton-vmtools.nix
./caddy.nix
./keycloak.nix
./nextcloud.nix
./gitea.nix
./mailman.nix
profiles.base-user
profiles.users.root # make sure to configure ssh keys
profiles.users.barkeeper
"${latestModulesPath}/services/misc/gitea.nix"
];
disabledModules = [
"services/misc/gitea.nix"
];
config = {
age.secrets.mailing-password = {
file = "${self}/secrets/gitea-database-password.age";
mode = "700";
owner = "root";
};
# # #
# # # pub.solar options
# # #
pub-solar.core = {
disk-encryption-active = false;
iso-options.enable = true;
lite = true;
};
pub-solar.infra-node = {
mailing = {
type = "smtp";
user = "admin@momo.koeln";
host = "mx2.greenbaum.cloud:465";
from = ''"pub.solar git server" <gitea@pub.solar>'';
passwordFile = config.age.secrets.mailing-password.path;
};
};
# Allow sudo without a password for the barkeeper user
security.sudo.extraRules = [
{
users = ["${psCfg.user.name}"];
commands = [
{
command = "ALL";
options = ["NOPASSWD"];
}
];
}
];
# Machine user for CI pipelines
users.users.www-user = {
description = "user";
home = "/var/nix/iso-cache";
useDefaultShell = true;
uid = 10001;
group = "www-user";
isSystemUser = true;
openssh.authorizedKeys.keys = [];
};
users.groups.www-user = {};
# # #
# # # Triton host specific options
# # # DO NOT ALTER below this line, changes might render system unbootable
# # #
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# Force getting the hostname from cloud-init
networking.hostName = lib.mkDefault "";
# Set your time zone.
time.timeZone = "Europe/Berlin";
# Select internationalisation properties.
console = {
font = "Lat2-Terminus16";
keyMap = "us";
};
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
git
vim
wget
];
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
# List services that you want to enable:
services.cloud-init.enable = true;
services.cloud-init.ext4.enable = true;
services.cloud-init.network.enable = true;
# use the default NixOS cloud-init config, but add some SmartOS customization to it
environment.etc."cloud/cloud.cfg.d/90_smartos.cfg".text = ''
datasource_list: [ SmartOS ]
# Do not create the centos/ubuntu/debian user
users: [ ]
# mount second disk with label ephemeral0, gets formated by cloud-init
# this will fail to get added to /etc/fstab as it's read-only, but should
# mount at boot anyway
mounts:
- [ vdb, /data, auto, "defaults,nofail" ]
'';
# Enable the OpenSSH daemon.
services.openssh = {
enable = true;
passwordAuthentication = false;
permitRootLogin = "no";
};
# We manage the firewall with nix, too
# altough triton can also manage firewall rules via the triton fwrule subcommand
networking.firewall.enable = true;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "22.05"; # Did you read the comment?
};
}

55
hosts/0001/caddy.nix Normal file
View file

@ -0,0 +1,55 @@
{
config,
lib,
pkgs,
self,
...
}: {
services.caddy = {
enable = lib.mkForce true;
group = "www-user";
email = "admins@pub.solar";
globalConfig = lib.mkForce "";
virtualHosts = {
"momo.koeln" = {
logFormat = lib.mkForce ''
output discard
'';
extraConfig = ''
# website
handle {
root * /srv/www/momo.koeln
try_files {path}.html {path}
file_server
}
# minimal error handling, respond with status code and text
handle_errors {
respond "{http.error.status_code} {http.error.status_text}"
}
'';
};
"www.momo.koeln" = {
logFormat = lib.mkForce ''
output discard
'';
extraConfig = ''
redir https://momo.koeln{uri}
'';
};
"list.momo.koeln" = {
logFormat = lib.mkForce ''
output discard
'';
extraConfig = ''
handle_path /static/* {
root * /var/lib/mailman/web
file_server
}
reverse_proxy :8000
'';
};
};
};
networking.firewall.allowedTCPPorts = [80 443];
}

5
hosts/0001/default.nix Normal file
View file

@ -0,0 +1,5 @@
{...}: {
imports = [
./0001.nix
];
}

120
hosts/0001/gitea.nix Normal file
View file

@ -0,0 +1,120 @@
{
config,
lib,
pkgs,
self,
...
}: let
hostAddress = "10.10.42.1";
serviceAddress = "10.10.42.3";
hostname = "git.momo.koeln";
dbUserName = "gitea";
hostStateDir = "/mnt/internal/gitea";
containerStateDir = "/var/lib/gitea";
in {
age.secrets.gitea-database-password = {
file = "${self}/secrets/gitea-database-password.age";
mode = "600";
owner = "gitea";
};
age.secrets.gitea-mailer-password = {
file = "${self}/secrets/gitea-mailer-password.age";
mode = "600";
owner = "gitea";
};
services.caddy.virtualHosts.${hostname} = {
logFormat = lib.mkForce ''
output discard
'';
extraConfig = ''
redir /user/login /user/oauth2/${config.containers.keycloak.config.services.keycloak.settings.hostname} temporary
reverse_proxy ${serviceAddress}:8080
'';
};
containers."gitea" = {
privateNetwork = true;
hostAddress = hostAddress;
localAddress = serviceAddress;
bindMounts."${containerStateDir}" = {
hostPath = hostStateDir;
isReadOnly = false;
};
bindMounts."${config.age.secrets.gitea-database-password.path}" = {
hostPath = config.age.secrets.gitea-database-password.path;
isReadOnly = true;
};
bindMounts."${config.age.secrets.gitea-mailer-password.path}" = {
hostPath = config.age.secrets.gitea-mailer-password.path;
isReadOnly = true;
};
config = {
config,
pkgs,
...
}: {
# gitea
services.gitea = {
enable = true;
appName = "pub.solar git server";
database = {
type = "postgres";
passwordFile = config.age.secrets.gitea-database-password.path;
};
domain = domain;
httpAddress = "0.0.0.0";
httpPort = 3000;
lfs.enable = true;
mailerPasswordFile = config.pub-solar.infra-node.mailing.passwordFile;
rootUrl = "https://git.pub.solar";
settings = {
mailer = mkIf config.pub-solar.infra-node.mailing.enabled {
ENABLED = true;
MAILER_TYPE = config.pub-solar.infra-node.mailing.type;
HOST = config.pub-solar.infra-node.mailing.host;
FROM = config.pub-solar.infra-node.mailing.from;
USER = config.pub-solar.infra-node.mailing.user;
};
# currently broken, gpg core dumps
#"repository.signing" = {
# SIGNING_KEY = "default";
# MERGES = "always";
#};
openid = {
ENABLE_OPENID_SIGNIN = true;
ENABLE_OPENID_SIGNUP = true;
};
# uncomment after initial deployment, first user is admin user
# required to setup SSO (oauth openid-connect, keycloak auth provider)
service.ALLOW_ONLY_EXTERNAL_REGISTRATION = true;
session.COOKIE_SECURE = lib.mkForce true;
};
};
# Required for gitea server side gpg signatures
# configured / setup manually in
# /var/lib/gitea/data/home/.gitconfig and
# /var/lib/gitea/data/home/.gnupg/
programs.gnupg.agent = {
enable = true;
pinentryFlavor = "curses";
};
# Required to make gpg work without a graphical environment?
# otherwise generating a new gpg key fails with this error:
# gpg: agent_genkey failed: No pinentry
# see: https://github.com/NixOS/nixpkgs/issues/97861#issuecomment-827951675
environment.variables = {
GPG_TTY = "$(tty)";
};
};
};
}

View file

@ -0,0 +1,44 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [];
boot.initrd.availableKernelModules = ["ahci" "virtio_pci" "xhci_pci" "sr_mod" "virtio_blk"];
boot.initrd.kernelModules = [];
boot.kernelModules = [];
boot.extraModulePackages = [];
fileSystems."/" = {
device = "/dev/disk/by-label/nixos";
autoResize = true;
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-label/boot";
fsType = "vfat";
};
fileSystems."/data" = {
device = "/dev/disk/by-label/ephemeral0";
fsType = "ext4";
options = [
"defaults"
"nofail"
];
};
swapDevices = [];
networking.useDHCP = lib.mkDefault false;
networking.networkmanager.enable = lib.mkForce false;
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

73
hosts/0001/keycloak.nix Normal file
View file

@ -0,0 +1,73 @@
{
config,
lib,
inputs,
pkgs,
self,
...
}: let
hostAddress = "10.10.42.1";
serviceAddress = "10.10.42.1";
hostname = "auth.momo.koeln";
dbUserName = "keycloak";
hostStateDir = "/mnt/internal/keycloak";
containerStateDir = "/var/lib/keycloak";
in {
age.secrets.keycloak-database-password = {
file = "${self}/secrets/keycloak-database-password.age";
mode = "700";
#owner = "keycloak";
};
services.caddy.virtualHosts.${hostname} = {
logFormat = lib.mkForce ''
output discard
'';
extraConfig = ''
redir / /realms/momo.koeln/account temporary
reverse_proxy ${serviceAddress}:8080
'';
};
containers."keycloak" = {
privateNetwork = true;
hostAddress = hostAddress;
localAddress = serviceAddress;
bindMounts."${containerStateDir}" = {
hostPath = hostStateDir;
isReadOnly = false;
};
bindMounts."${config.age.secrets.keycloak-database-password.path}" = {
hostPath = config.age.secrets.keycloak-database-password.path;
isReadOnly = true;
};
config = {
config,
pkgs,
...
}: {
# keycloak
services.keycloak = {
enable = true;
database.passwordFile = config.age.secrets.keycloak-database-password.path;
settings = {
hostname = domain;
http-host = "0.0.0.0";
http-port = 8080;
proxy = "edge";
};
# themes = {
# "momo.koeln" = inputs.keycloak-theme-pub-solar.legacyPackages.${pkgs.system}.keycloak-theme-pub-solar;
# };
};
};
};
}

143
hosts/0001/mailman.nix Normal file
View file

@ -0,0 +1,143 @@
{
config,
lib,
pkgs,
self,
...
}: let
postfixConfig = pkgs.writeTextFile {
name = "main.cf";
text = builtins.readFile ./postfix/main.cf;
};
in {
system.activationScripts.mkMailmanNet = let
docker = config.virtualisation.oci-containers.backend;
dockerBin = "${pkgs.${docker}}/bin/${docker}";
in ''
${dockerBin} network inspect mailman-net >/dev/null 2>&1 || ${dockerBin} network create mailman-net --subnet 172.20.1.0/24
'';
users.users.mailman = {
description = "Mailman Service";
home = "/var/lib/mailman";
useDefaultShell = true;
uid = 993;
# Group hakkonaut so caddy can serve the static files from mailman-web directly
group = "hakkonaut";
isSystemUser = true;
};
systemd.tmpfiles.rules = [
"d '/var/lib/mailman' 0750 mailman hakkonaut - -"
];
age.secrets.mailman-core-secrets = {
file = "${self}/secrets/mailman-core-secrets.age";
mode = "600";
owner = "mailman";
};
age.secrets.mailman-web-secrets = {
file = "${self}/secrets/mailman-web-secrets.age";
mode = "600";
owner = "mailman";
};
age.secrets.mailman-db-secrets = {
file = "${self}/secrets/mailman-db-secrets.age";
mode = "600";
owner = "mailman";
};
virtualisation = {
docker = {
enable = true;
};
oci-containers = {
backend = "docker";
containers."mailman-core" = {
image = "maxking/mailman-core:0.4";
autoStart = true;
user = "993";
volumes = [
"/var/lib/mailman/core:/opt/mailman/"
];
extraOptions = [
"--network=mailman-net"
];
environment = {
DATABASE_TYPE = "postgres";
DATABASE_CLASS = "mailman.database.postgresql.PostgreSQLDatabase";
MTA = "postfix";
};
environmentFiles = [
config.age.secrets.mailman-core-secrets.path
];
ports = [
"127.0.0.1:8001:8001" # API
"127.0.0.1:8024:8024" # LMTP - incoming emails
];
};
containers."mailman-web" = {
image = "maxking/mailman-web:0.4";
autoStart = true;
user = "993";
volumes = [
"/var/lib/mailman/web:/opt/mailman-web-data"
];
extraOptions = [
"--network=mailman-net"
];
environment = {
DATABASE_TYPE = "postgres";
SERVE_FROM_DOMAIN = "list.pub.solar";
MAILMAN_ADMIN_USER = "admin";
MAILMAN_ADMIN_EMAIL = "admins@pub.solar";
};
environmentFiles = [
config.age.secrets.mailman-web-secrets.path
];
ports = [
"127.0.0.1:8000:8000" # HTTP
# "127.0.0.1:8080:8080" # uwsgi
];
};
containers."mailman-db" = {
image = "postgres:14-alpine";
autoStart = true;
user = "993";
extraOptions = [
"--network=mailman-net"
];
volumes = [
"/var/lib/mailman/database:/var/lib/postgresql/data"
];
environmentFiles = [
config.age.secrets.mailman-db-secrets.path
];
};
containers."mailman-postfix" = {
image = "mailu/postfix:1.9.46";
autoStart = true;
user = "993";
extraOptions = [
"--network=mailman-net"
];
volumes = [
"/var/lib/mailman/postfix/overrides:/overrides:ro"
"/var/lib/mailman/postfix/mailqueue:/var/spool/postfix"
"/var/lib/mailman/postfix/data:/var/lib/postfix"
"/var/lib/mailman/core:/var/lib/mailman/core"
"${postfixConfig}:/etc/postfix/main.cf"
];
environmentFiles = [
config.age.secrets.mailman-db-secrets.path
];
};
};
};
}

88
hosts/0001/nextcloud.nix Normal file
View file

@ -0,0 +1,88 @@
{
config,
lib,
inputs,
pkgs,
self,
...
}: let
hostAddress = "10.10.42.1";
serviceAddress = "10.10.42.2";
hostname = "cloud.momo.koeln";
dbUserName = "nextcloud";
hostStateDir = "/mnt/internal/nextcloud";
containerStateDir = "/var/lib/nextcloud";
in {
age.secrets.nextcloud-db-password = {
file = "${self}/secrets/nextcloud-db-password.age";
mode = "700";
owner = "nextcloud";
};
age.secrets.nextcloud-admin-password = {
file = "${self}/secrets/nextcloud-admin-password";
mode = "700";
owner = "nextcloud";
};
services.caddy.virtualHosts.${hostname} = {
logFormat = lib.mkForce ''
output discard
'';
extraConfig = ''
reverse_proxy ${serviceAddress}:80
'';
};
containers."nextcloud" = {
privateNetwork = true;
hostAddress = hostAddress;
localAddress = serviceAddress;
bindMounts."${containerStateDir}" = {
hostPath = hostStateDir;
isReadOnly = false;
};
config = {
config,
pkgs,
...
}: {
networking.firewall.allowedTCPPorts = [80];
# nextcloud
services.nextcloud = {
enable = true;
hostName = hostname;
home = containerStateDir;
config = {
dbuser = dbUserName;
dbtype = "pgsql";
dbport = 5432;
dbpassFile = config.age.secrets.nextcloud-db-password.path;
adminUser = "admin";
adminpassFile = config.age.secrets.nextcloud-admin-password.path;
};
};
services.postgresql = {
enable = true;
ensureUsers = [
{
name = dbUserName;
ensurePermissions = {
"DATABASE nextcloud" = "ALL PRIVILEGES";
};
}
];
ensureDatabases = ["nextcloud"];
};
};
};
}

692
hosts/0001/postfix/main.cf Normal file
View file

@ -0,0 +1,692 @@
# Global Postfix configuration file. This file lists only a subset
# of all parameters. For the syntax, and for a complete parameter
# list, see the postconf(5) manual page (command: "man 5 postconf").
#
# For common configuration examples, see BASIC_CONFIGURATION_README
# and STANDARD_CONFIGURATION_README. To find these documents, use
# the command "postconf html_directory readme_directory", or go to
# http://www.postfix.org/BASIC_CONFIGURATION_README.html etc.
#
# For best results, change no more than 2-3 parameters at a time,
# and test if Postfix still works after every change.
# COMPATIBILITY
#
# The compatibility_level determines what default settings Postfix
# will use for main.cf and master.cf settings. These defaults will
# change over time.
#
# To avoid breaking things, Postfix will use backwards-compatible
# default settings and log where it uses those old backwards-compatible
# default settings, until the system administrator has determined
# if any backwards-compatible default settings need to be made
# permanent in main.cf or master.cf.
#
# When this review is complete, update the compatibility_level setting
# below as recommended in the RELEASE_NOTES file.
#
# The level below is what should be used with new (not upgrade) installs.
#
compatibility_level = 3.6
# SOFT BOUNCE
#
# The soft_bounce parameter provides a limited safety net for
# testing. When soft_bounce is enabled, mail will remain queued that
# would otherwise bounce. This parameter disables locally-generated
# bounces, and prevents the SMTP server from rejecting mail permanently
# (by changing 5xx replies into 4xx replies). However, soft_bounce
# is no cure for address rewriting mistakes or mail routing mistakes.
#
#soft_bounce = no
# LOCAL PATHNAME INFORMATION
#
# The queue_directory specifies the location of the Postfix queue.
# This is also the root directory of Postfix daemons that run chrooted.
# See the files in examples/chroot-setup for setting up Postfix chroot
# environments on different UNIX systems.
#
queue_directory = /var/spool/postfix
# The command_directory parameter specifies the location of all
# postXXX commands.
#
command_directory = /usr/sbin
# The daemon_directory parameter specifies the location of all Postfix
# daemon programs (i.e. programs listed in the master.cf file). This
# directory must be owned by root.
#
daemon_directory = /usr/libexec/postfix
# The data_directory parameter specifies the location of Postfix-writable
# data files (caches, random numbers). This directory must be owned
# by the mail_owner account (see below).
#
data_directory = /var/lib/postfix
# QUEUE AND PROCESS OWNERSHIP
#
# The mail_owner parameter specifies the owner of the Postfix queue
# and of most Postfix daemon processes. Specify the name of a user
# account THAT DOES NOT SHARE ITS USER OR GROUP ID WITH OTHER ACCOUNTS
# AND THAT OWNS NO OTHER FILES OR PROCESSES ON THE SYSTEM. In
# particular, don't specify nobody or daemon. PLEASE USE A DEDICATED
# USER.
#
mail_owner = postfix
# The default_privs parameter specifies the default rights used by
# the local delivery agent for delivery to external file or command.
# These rights are used in the absence of a recipient user context.
# DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER.
#
#default_privs = nobody
# INTERNET HOST AND DOMAIN NAMES
#
# The myhostname parameter specifies the internet hostname of this
# mail system. The default is to use the fully-qualified domain name
# from gethostname(). $myhostname is used as a default value for many
# other configuration parameters.
#
myhostname = list.pub.solar
#myhostname = virtual.domain.tld
# The mydomain parameter specifies the local internet domain name.
# The default is to use $myhostname minus the first component.
# $mydomain is used as a default value for many other configuration
# parameters.
#
#mydomain = domain.tld
# SENDING MAIL
#
# The myorigin parameter specifies the domain that locally-posted
# mail appears to come from. The default is to append $myhostname,
# which is fine for small sites. If you run a domain with multiple
# machines, you should (1) change this to $mydomain and (2) set up
# a domain-wide alias database that aliases each user to
# user@that.users.mailhost.
#
# For the sake of consistency between sender and recipient addresses,
# myorigin also specifies the default domain name that is appended
# to recipient addresses that have no @domain part.
#
#myorigin = $myhostname
#myorigin = $mydomain
# RECEIVING MAIL
# The inet_interfaces parameter specifies the network interface
# addresses that this mail system receives mail on. By default,
# the software claims all active interfaces on the machine. The
# parameter also controls delivery of mail to user@[ip.address].
#
# See also the proxy_interfaces parameter, for network addresses that
# are forwarded to us via a proxy or network address translator.
#
# Note: you need to stop/start Postfix when this parameter changes.
#
#inet_interfaces = all
#inet_interfaces = $myhostname
#inet_interfaces = $myhostname, localhost
# The proxy_interfaces parameter specifies the network interface
# addresses that this mail system receives mail on by way of a
# proxy or network address translation unit. This setting extends
# the address list specified with the inet_interfaces parameter.
#
# You must specify your proxy/NAT addresses when your system is a
# backup MX host for other domains, otherwise mail delivery loops
# will happen when the primary MX host is down.
#
#proxy_interfaces =
#proxy_interfaces = 1.2.3.4
# The mydestination parameter specifies the list of domains that this
# machine considers itself the final destination for.
#
# These domains are routed to the delivery agent specified with the
# local_transport parameter setting. By default, that is the UNIX
# compatible delivery agent that lookups all recipients in /etc/passwd
# and /etc/aliases or their equivalent.
#
# The default is $myhostname + localhost.$mydomain + localhost. On
# a mail domain gateway, you should also include $mydomain.
#
# Do not specify the names of virtual domains - those domains are
# specified elsewhere (see VIRTUAL_README).
#
# Do not specify the names of domains that this machine is backup MX
# host for. Specify those names via the relay_domains settings for
# the SMTP server, or use permit_mx_backup if you are lazy (see
# STANDARD_CONFIGURATION_README).
#
# The local machine is always the final destination for mail addressed
# to user@[the.net.work.address] of an interface that the mail system
# receives mail on (see the inet_interfaces parameter).
#
# Specify a list of host or domain names, /file/name or type:table
# patterns, separated by commas and/or whitespace. A /file/name
# pattern is replaced by its contents; a type:table is matched when
# a name matches a lookup key (the right-hand side is ignored).
# Continue long lines by starting the next line with whitespace.
#
# See also below, section "REJECTING MAIL FOR UNKNOWN LOCAL USERS".
#
#mydestination = $myhostname, localhost.$mydomain, localhost
#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain,
# mail.$mydomain, www.$mydomain, ftp.$mydomain
# REJECTING MAIL FOR UNKNOWN LOCAL USERS
#
# The local_recipient_maps parameter specifies optional lookup tables
# with all names or addresses of users that are local with respect
# to $mydestination, $inet_interfaces or $proxy_interfaces.
#
# If this parameter is defined, then the SMTP server will reject
# mail for unknown local users. This parameter is defined by default.
#
# To turn off local recipient checking in the SMTP server, specify
# local_recipient_maps = (i.e. empty).
#
# The default setting assumes that you use the default Postfix local
# delivery agent for local delivery. You need to update the
# local_recipient_maps setting if:
#
# - You define $mydestination domain recipients in files other than
# /etc/passwd, /etc/aliases, or the $virtual_alias_maps files.
# For example, you define $mydestination domain recipients in
# the $virtual_mailbox_maps files.
#
# - You redefine the local delivery agent in master.cf.
#
# - You redefine the "local_transport" setting in main.cf.
#
# - You use the "luser_relay", "mailbox_transport", or "fallback_transport"
# feature of the Postfix local delivery agent (see local(8)).
#
# Details are described in the LOCAL_RECIPIENT_README file.
#
# Beware: if the Postfix SMTP server runs chrooted, you probably have
# to access the passwd file via the proxymap service, in order to
# overcome chroot restrictions. The alternative, having a copy of
# the system passwd file in the chroot jail is just not practical.
#
# The right-hand side of the lookup tables is conveniently ignored.
# In the left-hand side, specify a bare username, an @domain.tld
# wild-card, or specify a user@domain.tld address.
#
#local_recipient_maps = unix:passwd.byname $alias_maps
#local_recipient_maps = proxy:unix:passwd.byname $alias_maps
#local_recipient_maps =
# The unknown_local_recipient_reject_code specifies the SMTP server
# response code when a recipient domain matches $mydestination or
# ${proxy,inet}_interfaces, while $local_recipient_maps is non-empty
# and the recipient address or address local-part is not found.
#
# The default setting is 550 (reject mail) but it is safer to start
# with 450 (try again later) until you are certain that your
# local_recipient_maps settings are OK.
#
# unknown_local_recipient_reject_code = 550
# TRUST AND RELAY CONTROL
# The mynetworks parameter specifies the list of "trusted" SMTP
# clients that have more privileges than "strangers".
#
# In particular, "trusted" SMTP clients are allowed to relay mail
# through Postfix. See the smtpd_recipient_restrictions parameter
# in postconf(5).
#
# You can specify the list of "trusted" network addresses by hand
# or you can let Postfix do it for you (which is the default).
#
# By default (mynetworks_style = subnet), Postfix "trusts" SMTP
# clients in the same IP subnetworks as the local machine.
# On Linux, this works correctly only with interfaces specified
# with the "ifconfig" command.
#
# Specify "mynetworks_style = class" when Postfix should "trust" SMTP
# clients in the same IP class A/B/C networks as the local machine.
# Don't do this with a dialup site - it would cause Postfix to "trust"
# your entire provider's network. Instead, specify an explicit
# mynetworks list by hand, as described below.
#
# Specify "mynetworks_style = host" when Postfix should "trust"
# only the local machine.
#
#mynetworks_style = class
#mynetworks_style = subnet
#mynetworks_style = host
# Alternatively, you can specify the mynetworks list by hand, in
# which case Postfix ignores the mynetworks_style setting.
#
# Specify an explicit list of network/netmask patterns, where the
# mask specifies the number of bits in the network part of a host
# address.
#
# You can also specify the absolute pathname of a pattern file instead
# of listing the patterns here. Specify type:table for table-based lookups
# (the value on the table right-hand side is not used).
#
mynetworks = mailman-core,mailman-web
#mynetworks = $config_directory/mynetworks
#mynetworks = hash:/etc/postfix/network_table
# The relay_domains parameter restricts what destinations this system will
# relay mail to. See the smtpd_recipient_restrictions description in
# postconf(5) for detailed information.
#
# By default, Postfix relays mail
# - from "trusted" clients (IP address matches $mynetworks) to any destination,
# - from "untrusted" clients to destinations that match $relay_domains or
# subdomains thereof, except addresses with sender-specified routing.
# The default relay_domains value is $mydestination.
#
# In addition to the above, the Postfix SMTP server by default accepts mail
# that Postfix is final destination for:
# - destinations that match $inet_interfaces or $proxy_interfaces,
# - destinations that match $mydestination
# - destinations that match $virtual_alias_domains,
# - destinations that match $virtual_mailbox_domains.
# These destinations do not need to be listed in $relay_domains.
#
# Specify a list of hosts or domains, /file/name patterns or type:name
# lookup tables, separated by commas and/or whitespace. Continue
# long lines by starting the next line with whitespace. A file name
# is replaced by its contents; a type:name table is matched when a
# (parent) domain appears as lookup key.
#
# NOTE: Postfix will not automatically forward mail for domains that
# list this system as their primary or backup MX host. See the
# permit_mx_backup restriction description in postconf(5).
#
#relay_domains = $mydestination
# INTERNET OR INTRANET
# The relayhost parameter specifies the default host to send mail to
# when no entry is matched in the optional transport(5) table. When
# no relayhost is given, mail is routed directly to the destination.
#
# On an intranet, specify the organizational domain name. If your
# internal DNS uses no MX records, specify the name of the intranet
# gateway host instead.
#
# In the case of SMTP, specify a domain, host, host:port, [host]:port,
# [address] or [address]:port; the form [host] turns off MX lookups.
#
# If you're connected via UUCP, see also the default_transport parameter.
#
#relayhost = $mydomain
#relayhost = [gateway.my.domain]
#relayhost = [mailserver.isp.tld]
#relayhost = uucphost
#relayhost = [an.ip.add.ress]
# REJECTING UNKNOWN RELAY USERS
#
# The relay_recipient_maps parameter specifies optional lookup tables
# with all addresses in the domains that match $relay_domains.
#
# If this parameter is defined, then the SMTP server will reject
# mail for unknown relay users. This feature is off by default.
#
# The right-hand side of the lookup tables is conveniently ignored.
# In the left-hand side, specify an @domain.tld wild-card, or specify
# a user@domain.tld address.
#
#relay_recipient_maps = hash:/etc/postfix/relay_recipients
# INPUT RATE CONTROL
#
# The in_flow_delay configuration parameter implements mail input
# flow control. This feature is turned on by default, although it
# still needs further development (it's disabled on SCO UNIX due
# to an SCO bug).
#
# A Postfix process will pause for $in_flow_delay seconds before
# accepting a new message, when the message arrival rate exceeds the
# message delivery rate. With the default 100 SMTP server process
# limit, this limits the mail inflow to 100 messages a second more
# than the number of messages delivered per second.
#
# Specify 0 to disable the feature. Valid delays are 0..10.
#
#in_flow_delay = 1s
# ADDRESS REWRITING
#
# The ADDRESS_REWRITING_README document gives information about
# address masquerading or other forms of address rewriting including
# username->Firstname.Lastname mapping.
# ADDRESS REDIRECTION (VIRTUAL DOMAIN)
#
# The VIRTUAL_README document gives information about the many forms
# of domain hosting that Postfix supports.
# "USER HAS MOVED" BOUNCE MESSAGES
#
# See the discussion in the ADDRESS_REWRITING_README document.
# TRANSPORT MAP
#
# See the discussion in the ADDRESS_REWRITING_README document.
# ALIAS DATABASE
#
# The alias_maps parameter specifies the list of alias databases used
# by the local delivery agent. The default list is system dependent.
#
# On systems with NIS, the default is to search the local alias
# database, then the NIS alias database. See aliases(5) for syntax
# details.
#
# If you change the alias database, run "postalias /etc/aliases" (or
# wherever your system stores the mail alias file), or simply run
# "newaliases" to build the necessary DBM or DB file.
#
# It will take a minute or so before changes become visible. Use
# "postfix reload" to eliminate the delay.
#
#alias_maps = dbm:/etc/aliases
#alias_maps = hash:/etc/aliases
#alias_maps = hash:/etc/aliases, nis:mail.aliases
#alias_maps = netinfo:/aliases
# The alias_database parameter specifies the alias database(s) that
# are built with "newaliases" or "sendmail -bi". This is a separate
# configuration parameter, because alias_maps (see above) may specify
# tables that are not necessarily all under control by Postfix.
#
#alias_database = dbm:/etc/aliases
#alias_database = dbm:/etc/mail/aliases
#alias_database = hash:/etc/aliases
#alias_database = hash:/etc/aliases, hash:/opt/majordomo/aliases
# ADDRESS EXTENSIONS (e.g., user+foo)
#
# The recipient_delimiter parameter specifies the separator between
# user names and address extensions (user+foo). See canonical(5),
# local(8), relocated(5) and virtual(5) for the effects this has on
# aliases, canonical, virtual, relocated and .forward file lookups.
# Basically, the software tries user+foo and .forward+foo before
# trying user and .forward.
#
#recipient_delimiter = +
# DELIVERY TO MAILBOX
#
# The home_mailbox parameter specifies the optional pathname of a
# mailbox file relative to a user's home directory. The default
# mailbox file is /var/spool/mail/user or /var/mail/user. Specify
# "Maildir/" for qmail-style delivery (the / is required).
#
#home_mailbox = Mailbox
#home_mailbox = Maildir/
# The mail_spool_directory parameter specifies the directory where
# UNIX-style mailboxes are kept. The default setting depends on the
# system type.
#
#mail_spool_directory = /var/mail
#mail_spool_directory = /var/spool/mail
# The mailbox_command parameter specifies the optional external
# command to use instead of mailbox delivery. The command is run as
# the recipient with proper HOME, SHELL and LOGNAME environment settings.
# Exception: delivery for root is done as $default_user.
#
# Other environment variables of interest: USER (recipient username),
# EXTENSION (address extension), DOMAIN (domain part of address),
# and LOCAL (the address localpart).
#
# Unlike other Postfix configuration parameters, the mailbox_command
# parameter is not subjected to $parameter substitutions. This is to
# make it easier to specify shell syntax (see example below).
#
# Avoid shell meta characters because they will force Postfix to run
# an expensive shell process. Procmail alone is expensive enough.
#
# IF YOU USE THIS TO DELIVER MAIL SYSTEM-WIDE, YOU MUST SET UP AN
# ALIAS THAT FORWARDS MAIL FOR ROOT TO A REAL USER.
#
#mailbox_command = /some/where/procmail
#mailbox_command = /some/where/procmail -a "$EXTENSION"
# The mailbox_transport specifies the optional transport in master.cf
# to use after processing aliases and .forward files. This parameter
# has precedence over the mailbox_command, fallback_transport and
# luser_relay parameters.
#
# Specify a string of the form transport:nexthop, where transport is
# the name of a mail delivery transport defined in master.cf. The
# :nexthop part is optional. For more details see the sample transport
# configuration file.
#
# NOTE: if you use this feature for accounts not in the UNIX password
# file, then you must update the "local_recipient_maps" setting in
# the main.cf file, otherwise the SMTP server will reject mail for
# non-UNIX accounts with "User unknown in local recipient table".
#
# Cyrus IMAP over LMTP. Specify ``lmtpunix cmd="lmtpd"
# listen="/var/imap/socket/lmtp" prefork=0'' in cyrus.conf.
#mailbox_transport = lmtp:unix:/var/imap/socket/lmtp
#
# Cyrus IMAP via command line. Uncomment the "cyrus...pipe" and
# subsequent line in master.cf.
#mailbox_transport = cyrus
# The fallback_transport specifies the optional transport in master.cf
# to use for recipients that are not found in the UNIX passwd database.
# This parameter has precedence over the luser_relay parameter.
#
# Specify a string of the form transport:nexthop, where transport is
# the name of a mail delivery transport defined in master.cf. The
# :nexthop part is optional. For more details see the sample transport
# configuration file.
#
# NOTE: if you use this feature for accounts not in the UNIX password
# file, then you must update the "local_recipient_maps" setting in
# the main.cf file, otherwise the SMTP server will reject mail for
# non-UNIX accounts with "User unknown in local recipient table".
#
#fallback_transport = lmtp:unix:/file/name
#fallback_transport = cyrus
#fallback_transport =
# The luser_relay parameter specifies an optional destination address
# for unknown recipients. By default, mail for unknown@$mydestination,
# unknown@[$inet_interfaces] or unknown@[$proxy_interfaces] is returned
# as undeliverable.
#
# The following expansions are done on luser_relay: $user (recipient
# username), $shell (recipient shell), $home (recipient home directory),
# $recipient (full recipient address), $extension (recipient address
# extension), $domain (recipient domain), $local (entire recipient
# localpart), $recipient_delimiter. Specify ${name?value} or
# ${name:value} to expand value only when $name does (does not) exist.
#
# luser_relay works only for the default Postfix local delivery agent.
#
# NOTE: if you use this feature for accounts not in the UNIX password
# file, then you must specify "local_recipient_maps =" (i.e. empty) in
# the main.cf file, otherwise the SMTP server will reject mail for
# non-UNIX accounts with "User unknown in local recipient table".
#
#luser_relay = $user@other.host
#luser_relay = $local@other.host
#luser_relay = admin+$local
# JUNK MAIL CONTROLS
#
# The controls listed here are only a very small subset. The file
# SMTPD_ACCESS_README provides an overview.
# The header_checks parameter specifies an optional table with patterns
# that each logical message header is matched against, including
# headers that span multiple physical lines.
#
# By default, these patterns also apply to MIME headers and to the
# headers of attached messages. With older Postfix versions, MIME and
# attached message headers were treated as body text.
#
# For details, see "man header_checks".
#
#header_checks = regexp:/etc/postfix/header_checks
# FAST ETRN SERVICE
#
# Postfix maintains per-destination logfiles with information about
# deferred mail, so that mail can be flushed quickly with the SMTP
# "ETRN domain.tld" command, or by executing "sendmail -qRdomain.tld".
# See the ETRN_README document for a detailed description.
#
# The fast_flush_domains parameter controls what destinations are
# eligible for this service. By default, they are all domains that
# this server is willing to relay mail to.
#
#fast_flush_domains = $relay_domains
# SHOW SOFTWARE VERSION OR NOT
#
# The smtpd_banner parameter specifies the text that follows the 220
# code in the SMTP server's greeting banner. Some people like to see
# the mail version advertised. By default, Postfix shows no version.
#
# You MUST specify $myhostname at the start of the text. That is an
# RFC requirement. Postfix itself does not care.
#
#smtpd_banner = $myhostname ESMTP $mail_name
#smtpd_banner = $myhostname ESMTP $mail_name ($mail_version)
# PARALLEL DELIVERY TO THE SAME DESTINATION
#
# How many parallel deliveries to the same user or domain? With local
# delivery, it does not make sense to do massively parallel delivery
# to the same user, because mailbox updates must happen sequentially,
# and expensive pipelines in .forward files can cause disasters when
# too many are run at the same time. With SMTP deliveries, 10
# simultaneous connections to the same domain could be sufficient to
# raise eyebrows.
#
# Each message delivery transport has its XXX_destination_concurrency_limit
# parameter. The default is $default_destination_concurrency_limit for
# most delivery transports. For the local delivery agent the default is 2.
#local_destination_concurrency_limit = 2
#default_destination_concurrency_limit = 20
# DEBUGGING CONTROL
#
# The debug_peer_level parameter specifies the increment in verbose
# logging level when an SMTP client or server host name or address
# matches a pattern in the debug_peer_list parameter.
#
debug_peer_level = 2
# The debug_peer_list parameter specifies an optional list of domain
# or network patterns, /file/name patterns or type:name tables. When
# an SMTP client or server host name or address matches a pattern,
# increase the verbose logging level by the amount specified in the
# debug_peer_level parameter.
#
#debug_peer_list = 127.0.0.1
#debug_peer_list = some.domain
# The debugger_command specifies the external command that is executed
# when a Postfix daemon program is run with the -D option.
#
# Use "command .. & sleep 5" so that the debugger can attach before
# the process marches on. If you use an X-based debugger, be sure to
# set up your XAUTHORITY environment variable before starting Postfix.
#
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
ddd $daemon_directory/$process_name $process_id & sleep 5
# If you can't use X, use this to capture the call stack when a
# daemon crashes. The result is in a file in the configuration
# directory, and is named after the process name and the process ID.
#
# debugger_command =
# PATH=/bin:/usr/bin:/usr/local/bin; export PATH; (echo cont;
# echo where) | gdb $daemon_directory/$process_name $process_id 2>&1
# >$config_directory/$process_name.$process_id.log & sleep 5
#
# Another possibility is to run gdb under a detached screen session.
# To attach to the screen session, su root and run "screen -r
# <id_string>" where <id_string> uniquely matches one of the detached
# sessions (from "screen -list").
#
# debugger_command =
# PATH=/bin:/usr/bin:/sbin:/usr/sbin; export PATH; screen
# -dmS $process_name gdb $daemon_directory/$process_name
# $process_id & sleep 1
# INSTALL-TIME CONFIGURATION INFORMATION
#
# The following parameters are used when installing a new Postfix version.
#
# sendmail_path: The full pathname of the Postfix sendmail command.
# This is the Sendmail-compatible mail posting interface.
#
sendmail_path = /usr/sbin/sendmail
# newaliases_path: The full pathname of the Postfix newaliases command.
# This is the Sendmail-compatible command to build alias databases.
#
newaliases_path = /usr/bin/newaliases
# mailq_path: The full pathname of the Postfix mailq command. This
# is the Sendmail-compatible mail queue listing command.
#
mailq_path = /usr/bin/mailq
# setgid_group: The group for mail submission and queue management
# commands. This must be a group name with a numerical group ID that
# is not shared with other accounts, not even with the Postfix account.
#
setgid_group = postdrop
# html_directory: The location of the Postfix HTML documentation.
#
html_directory = no
# manpage_directory: The location of the Postfix on-line manual pages.
#
manpage_directory = /usr/share/man
# sample_directory: The location of the Postfix sample configuration files.
# This parameter is obsolete as of Postfix 2.1.
#
sample_directory = /etc/postfix
# readme_directory: The location of the Postfix README files.
#
readme_directory = /usr/share/doc/postfix/readme
inet_protocols = ipv4
meta_directory = /etc/postfix
shlib_directory = /usr/lib/postfix
# Config below taken and adapted from
# https://github.com/maxking/docker-mailman#postfix
recipient_delimiter = +
unknown_local_recipient_reject_code = 550
owner_request_special = no
transport_maps =
regexp:/var/lib/mailman/core/var/data/postfix_lmtp
local_recipient_maps =
regexp:/var/lib/mailman/core/var/data/postfix_lmtp
relay_domains =
regexp:/var/lib/mailman/core/var/data/postfix_domains

View file

@ -0,0 +1,9 @@
{
pkgs,
inputs,
...
}: {
environment.systemPackages = with pkgs; [
inputs.triton-vmtools.packages.${pkgs.system}.default
];
}

View file

@ -1,7 +1,11 @@
{ lib, config, pkgs, self, ... }:
with lib;
let
{
lib,
config,
pkgs,
self,
...
}:
with lib; let
bootstrap = pkgs.writeScript "bootstrap.sh" ''
#!/usr/bin/env bash
@ -40,8 +44,7 @@ let
'';
psCfg = config.pub-solar;
cfg = config.pub-solar.docker-ci-runner;
in
{
in {
options.pub-solar.docker-ci-runner = {
enable = lib.mkEnableOption "Enables a docker container running a drone exec runner as unprivileged user.";
@ -88,7 +91,7 @@ in
image = "debian";
autoStart = true;
entrypoint = "bash";
cmd = [ "/bootstrap.sh" ];
cmd = ["/bootstrap.sh"];
volumes = [
"${cfg.runnerVarsFile}:/run/vars"
@ -98,7 +101,7 @@ in
environment = cfg.runnerEnvironment;
extraOptions = lib.mkIf cfg.enableKvm [ "--device=/dev/kvm" ];
extraOptions = lib.mkIf cfg.enableKvm ["--device=/dev/kvm"];
};
};
};

View file

@ -0,0 +1,42 @@
{
lib,
config,
pkgs,
...
}:
with lib; let
cfg = config.pub-solar;
in {
options.pub-solar = {
infra-node = {
mailing = {
enabled = mkEnableOption "Whether to enable mailing for services on the host";
type = mkOption {
description = "Mail server type";
type = types.nullOr types.str;
default = "smtp";
};
host = mkOption {
description = "Mailing server host";
type = types.nullOr types.str;
default = null;
};
from = mkOption {
description = "Mailing server from";
type = types.nullOr types.str;
default = null;
};
user = mkOption {
description = "Mailing server user";
type = types.listOf types.str;
default = [];
};
passwordFile = mkOption {
description = "Mailing server passwordFile";
type = types.nullOr types.str;
default = null;
};
};
};
};
}

View file

@ -32,6 +32,11 @@ in {
];
environment.systemPackages = with pkgs; [
ack
bat
exa
fd
neovim
screen
];

View file

@ -17,6 +17,8 @@ channels: final: prev: {
tdesktop
arduino
arduino-cli
keycloak
gitea
;
haskellPackages =

View file

@ -1,4 +1,5 @@
self: with self; let
self:
with self; let
looking-glass-client = self.looking-glass-client.overrideAttrs (old: {
meta.platforms = ["x86_64-linux" "aarch64-linux"];
});

View file

@ -1,4 +1,5 @@
self: with self; let
self:
with self; let
websocket-client = python39.pkgs.buildPythonPackage rec {
pname = "websocket-client";
version = "1.2.1";

View file

@ -1,4 +1,5 @@
self: with self; let
self:
with self; let
uhk-agent-bin = stdenv.mkDerivation rec {
pname = "uhk-agent-bin";
version = "1.5.14";

View file

@ -7,6 +7,13 @@
psCfg = config.pub-solar;
wlroots = psCfg.graphical.wayland;
xdg = config.home-manager.users."${psCfg.user.name}".xdg;
globalVariables = {
EDITOR = "/run/current-system/sw/bin/nvim";
VISUAL = "/run/current-system/sw/bin/nvim";
# Make sure virsh runs without root
LIBVIRT_DEFAULT_URI = "qemu:///system";
};
variables = {
XDG_CONFIG_HOME = xdg.configHome;
XDG_CACHE_HOME = xdg.cacheHome;
@ -25,11 +32,8 @@
then "pixman"
else "gles2";
EDITOR = "/etc/profiles/per-user/${psCfg.user.name}/bin/nvim";
VISUAL = "/etc/profiles/per-user/${psCfg.user.name}/bin/nvim";
# fix "xdg-open fork-bomb" your preferred browser from here
BROWSER = "${pkgs.firefox-wayland}/bin/firefox";
BROWSER = "firefox";
# node
NODE_REPL_HISTORY = "${xdg.dataHome}/node_repl_history";
@ -41,9 +45,6 @@
NPM_CONFIG_CACHE = "${xdg.configHome}/npm";
# TODO: used to be XDG_RUNTIME_DIR NPM_CONFIG_TMP = "/tmp/npm";
# Make sure virsh runs without root
LIBVIRT_DEFAULT_URI = "qemu:///system";
# wine
WINEPREFIX = "${xdg.dataHome}/wineprefixes/default";
@ -100,5 +101,5 @@ in {
systemd.user.sessionVariables = variablesWithMeta;
};
environment.variables = variablesWithMeta;
environment.variables = globalVariables;
}

View file

@ -0,0 +1,21 @@
age-encryption.org/v1
-> ssh-ed25519 Y0ZZaw aeKyGeq9/rWQneJZIkrovdlgAdRTqYuUeqPIhT5dEwk
pkwICt3TV2RSMo93GMqVNZ6kYorTE48yyVuSdbLlLDc
-> ssh-ed25519 BVsyTA nNb8z1VNBdzeojDeQ0aRO9W12LVN/Zc5mQmN+jOxInc
VeoBXWSz2ZbXcFTNc+XtWFtWUomC+PaG8pUrRoF1CCU
-> ssh-rsa kFDS0A
h7Wk2206zM8zX9RE1DSSmaEiMI/v3A3p7h+uQB5uLz9nK+l7z92H9nHMExErdA9u
CjS2/uG8pjHtktNk5/nOyx64myrr3Y/HvJlHKhshiQF26CKiANO1LZa+Vy+P/LyM
8uI1T+bvqSJLPVr0CJ4gJ32YL9CPp0BJCpR27RHtXhdni9n08biBaib8c6loaD8K
fZr7TPH40F1mrn9+3paR9vKedJuPwEj2dKiHKcqC2zHr4GW28HwL03xNfCtdWw7x
Zxjyxk1cagVfPHeG9ObliJOohWZSQB/B4byVaRs6EyhYI0noqg/hl60VcizMmu/+
PvXxOq2llAnOF0A5gA5b5LtFQD1xRPNLwe6F+rt076Fgt2qn3q3BQGKOahRv0vy6
d3fEGiZvSgiMFlB6JRHIz2PDbpYHHIAUDEPP3M7a5mdwgKyYyFjsboc5MbRSK609
oM1QmZg+14fdddisGjuzz96p2SYwcbQu7i4Haf/4i142FYUHYYLtreMTGsW3oCYq
Qa/SQ2Ip07BFBhGve73W8XXzNyYUW+GLsZOcX/NrxSjAYoVFKMzMVv8DGrt6SXap
yu6aR6065HJgKEWdssWce/g4xkVpYv7frXnYLdDseMFz7ZfMOc7ieAKYpS5Sb9r3
LMifMXPRAXkam5JMbVr6aF2k3FkTzeDKrhlH6aKgh5Q
-> ;cm1-grease
TvutGCeP
--- +a2HtxLwZbsg0VlFHB2tIo/ULFcjS6VZ+4EhyvnDVq8
ñuDz¤lìTN<54>?{ÕêpAjKSzöUŽn.C ©pQ¶ýˆÜüø¹YÿÅo¦‰âu.?¢Æk9';“|Ú€>«Qçlhd )ÄÔSË€7æ5?È›Ÿ+«ÕÛp"<22>.(ˆ<44>ÅP½@¯0+;W<20>Ö'Ã

BIN
secrets/drone-secrets.age Normal file

Binary file not shown.

View file

@ -0,0 +1,21 @@
age-encryption.org/v1
-> ssh-ed25519 Y0ZZaw uzrzBJArGlkBnqZLu6KHIOprfw2g8fg0hnvC7GwNhxw
6VsKzFS5E11R9TJVSj23yZLjssFW3RNRXi65MaaYb4E
-> ssh-ed25519 BVsyTA 9QJTZgKGm4x9s4egO2vjxupre2kjOcf+o+bGen8e5nM
TQIW/4zvD5bxQRGmCujglMKI94wtCc3lGxEYVX6HfNY
-> ssh-rsa kFDS0A
L71mZDfLzaWsrwMxS2FHv4HaDv3AEPEZZFOxNroCVNT+4s/ZcYClqiKGrDWzSMvj
TPN+OPDamzzNjG67t2qkOspjb9aL5906Awnw4mfDjcX03+hoGA1z74bx8weeXf5U
6/5IxsPlVAjFOEd0Nu0GUW72pvQoVA4oAHrAw01YKcUGTJsF8XfpcNDt70df6IQT
JU+t6kw3uzUkdgotTatt7lngWIW8NUlMkpCYLEkTV6Xq5kiZBditaO9JgW7+dJw2
/4fDBo0eWE5IxSN/9aqbDZp4yMuRPbmdw4E0kV5kWixsR5l+8T4oQr8AfaOGBc5C
vnirQQvQ55DazihYb/04NO4EJn2/ZL2Y/7Pej7BiqVSItp8uc2U99pmigzI4nMIr
jL3ywv1QwP00R+iDlU1hlGkGjq2Ll0jbxvB8XD6GCKRSIo4pXvZDqFCnzGYz4TKE
mIxDfyS+HGlQTmuZFcrpqGUSY8SXK65w/7Wc1bHqCYRXBVpw24BTktQtPdaQRW4X
FxyPB8jXpw/HHQ1ITaheKCi2wrkWaivApHnbgBCqx4VuQgudQAViB2VQZOrcwOIR
tX23fuE4AhUkIUM8p80CoROZC+fxPGkx5qigzfLDgSdp6SBMB47RlSrmHI42v5oh
7Z8rbaXlby87zpqO7EzFO/ixpdBrTPyiCuV8oASMqWQ
-> {J_21-grease
aUQ
--- 2n/6hKYw0JRzr3HvMe2SFDdINMATOomDbAXfibwaCKA
œ =ÅRƇ__ª<<3C>ŒïѨ©¿jBøWü`<60>Nÿ3vѽ½tUpk:#tgý<0E>¡éîÜó̸˥5Ëʹ¤,§À•±xËå¤ùº7œ6ßVŠ[\hPYÙ ¹óÀèrû«

Binary file not shown.

View file

@ -0,0 +1,21 @@
age-encryption.org/v1
-> ssh-ed25519 Y0ZZaw 6Ab765r1KhdPSNomPyArPOa9EpOK1gJH1O/2ImGovDE
AbIsUHJvTypKJbOE3LuLFXYkIzfTXxRmiLFy91HzaUE
-> ssh-ed25519 BVsyTA tCs+TlkHQMbqgeN28U2aLo3luZNHRemLKbsqX8gOSWU
PU1JXT1JjKeSZ5cybTuq+WOipWWmqhHGLtEVHi1/8pg
-> ssh-rsa kFDS0A
TQbtZUL6l+DJxir6AVNUWMNPXrzJ6Ns3xb2C9s+lXsvlTlm834H8nt/JxJBCeRoH
ymH0PcXKHCk54iPypW5KqFRIwoDYBTi3t3fSqjyLQk4eFNBjByGy+IVAaF6dcS5y
+pYwpZxgshv8u6iSEiRgLvqp0bIs/g/tPHowZ6ezlpyKOzh3+KRYK7e82dJFznwb
Q9V+PdWZJLqobbo4bmz7nT3qNlS75tpcVk2FAwsNB1pk3Q4ucbQb33eslSny93s9
DjGCQFOMCkSZwKk98jV8aV01Liu4+tgMty5Sb6+Ei/tt+4TvjlX3t6hl9kvCVQNn
gXjc1y2FxfuwN7hTnFYM6QAwB4ETUPwsyqoOAzfFWzpQNpit+ZOtRMw42gcSkhA7
RcyHeYGtQCeK+MKU9YaWZrDZjFjwpA7oxVkBGk6Xd6drVfw0tMurXpruuIzswo2Q
iwdSGNsyAmMAKIoAWrjyxuXodgAwii8JgLr93IfkEuOQ/izQQ5sJCFP4Q4pB/Svk
8yG62fflaJ6epTn2uEBD9EDqlNCGpDwNwdBnASdpcSCeooCqcqDIHpk0VJly+HiQ
VyxpD+3ZfaguUkiVC44oxAkQocitj8ypNmuGqphG+1ReN4ew8xi74f0WWq4lxkY4
DieriNG+NG4JS7SgUTz5ZStYbOuIJJ/n82TcejWkJGM
-> dqJ?-grease .CNJ%TkE
D6Hq2UnwetlWfmLWLcijubdNB2uJNjRRIw
--- +wyqgdU3ahUepcqy53z01275bJE6CadK4+yXH0bSvuI
ò¡ˆœÃ¿ÆV-j^/u˜»¼y{ŽÊ”Ášj¾Éø 7@¡øâhõ´©$†p«·íÜQ˜Ý'k œ£äz<>š#ö:¦<>àˆ·,¿4v}1š<C5A1>Ðr¥ÁüjeV

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,23 @@
age-encryption.org/v1
-> ssh-ed25519 Y0ZZaw ow3ZJJeaGDamcg9i41timzWkN4yMR/7GcEWfzCcbj3U
DnxakA3u8/S4Z6e7gHdn0HOPxj79wylERS1sCCyf8lg
-> ssh-ed25519 BVsyTA 8+2zeUwhNjVcF8asfDQN3TWQrcYu3Emcu7/v6E1dEk4
eeAkJNuF4oj2590vnW3Ve/mEG3mTN4opZKEDYjNMdXo
-> ssh-rsa kFDS0A
XLIvXYoewWG/pfqIKGdY+d1IexC4bGg6jKljuMrj9MN5lIvGbZlClETJwxyrKViW
ZZ19Mo16CBnsrnl0E6K+NRj+gpOAkdbWcPsx3JoHQyPCDlZnNlNJ4iIuXYE6SEM0
vuwWxQPA9OvgWB8Ck/WoRbhemtJzzkf11dGS0LHs4dITyo8is0YEZTj6IXgg4MDO
NtIsgkKo30PaLUQvjX/fhrUSrCZCxure15BFRh3TbgKbBmznSJkKXzEPqy95YG0H
XU0FDxnJlMLNfYJXyBjoJOzL/b2TU85HaNYKSbX9m2XT2vPn5taJDHiro+iFjqBs
UMWavJ7FbtdKS+iKUdA4DqlIQBopQM/SLH5SFVuQx1g/k6XgqL9gP/G0hjrzyvBO
tUA/Pc58P5OR52xYN+6Nvsooe9yFNzHklxZerCnNJfZhzNkVuCKuiM9EKfjq2F6V
sRGdZRIwu7cDP9zsa3AldsFiO6POIbl26nTE7SS4X0VLK+eBX1rXU8wl/XQqQFh0
N2rueaJ5Bs+cWd7MnzMWuzxCGwDuJomgr7i4JRYfwfVi7g2VyETX1TdbOXPl5JSP
/qN850rfhO/TbB2Rlc3ZZU+lDFLJmWnyh5nyqzv6bsGRMAhMYlvJ35pd7pitH6Wt
q9UU4+jX8cJ6g/rcwAYt/h0mOrwpyO1dpc2tbBufYVI
-> Iy*"-grease Jq*A C .]mQ9fl
0Nkdf7PXtL4atPLw9zvf2aAyDCdpya93eXHsLRa8M92OQ/g
--- CoJAKrsHzBMDUswYw62nAucSWUYmyB4S6sFh1tSz38E
Át…sw3f!žw*¹K4»zˆD {ÆÄ€lžò¨äÙnY¼y´Ù <09>TÊêâ 0ñ"xG
:G÷ª¢ê¼¶`ä~ÕÊ-£ç…~ZÏÁ&¤ÑŸµ 9ëÏÞÁ±æÙ$ìÜ<1C>g·\ûCsó> n÷Ä>©­ýDÊkí[¥¡»µ·Ü“t<ä5Ï¢±lQW-lâú´XˆÕ3má@ÅÅ3ÌZMõÍ<E28093>x}l5ᬯôœ¹QEœSÿ„l5
ÏÕšÿY1‰=þ0 ÅvD˜?ðÄKŸ6´%K ÀâáúÌœ¤b¸¢'š‡¾@§<ÝËÙø½²Ü¿$W,ZÇä,knªIç%PGóðÞ…zKp)ÛØq$^ð>ˆ¥£F0W+‰

View file

@ -1,8 +1,26 @@
let
# set ssh public keys here for your system and user
system = "";
user = "";
allKeys = [system user];
b12f-bbcom = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCmXpOU6vzQiVSSYCoxHYv7wDxC63Qg3dxlAMR6AOzwIABCU5PFFNcO0NWYms/YR7MOViorl+19LCLRABar9JgHU1n+uqxKV6eGph3OPeMp5sN8LAh7C9N+TZj8iJzBxQ3ch+Z/LdmLRwYNJ7KSUI+gwGK6xRS3+z1022Y4P0G0sx7IeCBl4lealQEIIF10ZOfjUdBcLQar7XTc5AxyGKnHCerXHRtccCoadLQujk0AvPXbv3Ma4JwX9X++AnCWRWakqS5UInu2tGuZ/6Hrjd2a9AKWjTaBVDcbYqCvY4XVuMj2/A2bCceFBaoi41apybSk26FSFTU4qiEUNQ6lxeOwG4+1NCXyHe2bGI4VyoxinDYa8vLLzXIRfTRA0qoGfCweXNeWPf0jMqASkUKaSOH5Ot7O5ps34r0j9pWzavDid8QeKJPyhxKuF1a5G4iBEZ0O9vuti60dPSjJPci9oTxbune2/jb7Sa0yO06DtLFJ2ncr5f70s/BDxKk4XIwQLy+KsvzlQEGdY8yA6xv28bOGxL3sQ0HE2pDTsvIbAisVOKzdJeolStL9MM5W8Hg0r/KkGj2bg0TfoRp1xHV9hjKkvJrsQ6okaPvNFeZq0HXzPhWMOVQ+/46z80uaQ1ByRLr3FTwuWJ7F/73ndfxiq6bDE4z2Ji0vOjeWJm6HCxTdGw==";
teutat3s-dumpyourvms = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHcU6KPy4b1MQXd6EJhcYwbJu7E+0IrBZF/IP6T7gbMf teutat3s@dumpyourvms";
flora-6 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGP1InpTBN4AlF/4V8HHumAMLJzeO8DpzjUv9Co/+J09 root@pub-solar-infra-vm-1";
allKeys = [
flora-6
teutat3s-dumpyourvms
b12f-bbcom
];
deployKeys = [
flora-6
teutat3s-dumpyourvms
b12f-bbcom
];
in {
"secret.age".publicKeys = allKeys;
"gitea-database-password.age".publicKeys = deployKeys;
"gitea-mailer-password.age".publicKeys = deployKeys;
"keycloak-database-password.age".publicKeys = deployKeys;
"drone-secrets.age".publicKeys = deployKeys;
"drone-db-secrets.age".publicKeys = deployKeys;
"mailman-core-secrets.age".publicKeys = deployKeys;
"mailman-web-secrets.age".publicKeys = deployKeys;
"mailman-db-secrets.age".publicKeys = deployKeys;
}

View file

@ -0,0 +1,39 @@
{
config,
hmUsers,
pkgs,
lib,
...
}: let
psCfg = config.pub-solar;
in {
config = {
home-manager.users = {inherit (hmUsers) momo;};
pub-solar = {
# These are your personal settings
# The only required settings are `name` and `password`,
# The rest is used for programs like git
user = {
name = "momo";
description = "momo.koeln infra user";
password = "$6$MCJ28kLwfNl9SNDq$Oh9eT6Sn6z4xGrQsLlIBI7cvJzX3P5As59OSZ.hoeBWc79Un2YdwH/hRIC.4ZDOuwQp0lHI82dNn/xeTaCn631";
fullName = "momo infra user";
email = "admins@momo.koeln";
gpgKeyId = "";
publicKeys = [
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHx4A8rLYmFgTOp1fDGbbONN8SOT0l5wWrUSYFUcVzMPTyfdT23ZVIdVD5yZCySgi/7PSh5mVmyLIZVIXlNrZJg= @b12f Yubi Main"
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEST9eyAY3nzGYNnqDYfWHu+89LZsOjyKHMqCFvtP7vrgB7F7JbbECjdjAXEOfPDSCVwtMMpq8JJXeRMjpsD0rw= @b12f Yubi Backup"
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFro/k4Mgqyh8yV/7Zwjc0dv60ZM7bROBU9JNd99P/4co6fxPt1pJiU/pEz2Dax/HODxgcO+jFZfvPEuLMCeAl0= YubiKey #10593996 PIV Slot 9a @teutat3s"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII/58A18EtxnLYHu63c/+AyTSkJQSso/VVdHUFGp1CTk cardno:FFFE34353135 @hensoko"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAqkqMYgncrnczcW/0PY+Z+FmNXXpgw6D9JWTTwiainy hensoko@hensoko-tp-work"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEbaQdxp7Flz6ttELe63rn+Nt9g43qJOLih6VCMP4gPb @hensoko"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMNeQYLFauAbzDyIbKC86NUh9yZfiyBm/BtIdkcpZnSU axeman@tuxnix"
];
};
};
};
}