Update the config, start writing documentation.
This commit is contained in:
parent
34abb21e0b
commit
7f122aab05
3 changed files with 161 additions and 0 deletions
108
documentation_titlepage.md
Normal file
108
documentation_titlepage.md
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
# Welcome to the Polyteknisk Radiogruppe's Server Documentation
|
||||
|
||||
The following the documentation showcases how the server is built up and how one should manage this in both long and short terms.
|
||||
Also, thusly, this document should be actively maintained in the functional changes no matter how small or large, as in
|
||||
if a flag is changed in the compiliation of the system build, password key changes, new added standard package, then it must
|
||||
be documented here.
|
||||
|
||||
## Documentation File Structure
|
||||
|
||||
As this document is in alpha release, the following package has been made with the standard Rust project template in the case
|
||||
of having to create custom binaries for the system of the sysadmin or any related responsibilites/positions. Thusly,
|
||||
the following document focus should be in the `nix-system-configs` folder, which
|
||||
is the main folder for the system configuration files and scripts.
|
||||
|
||||
>[note!] For the documentation maintainer, be sure to update this tree with the `lsd` package with running the `lsd --tree` of the project directory. Please do take care to not have some secrets exposed here in your own home system if so be it.
|
||||
```bash
|
||||
.
|
||||
├── Cargo.lock
|
||||
├── Cargo.toml
|
||||
├── LICENSE
|
||||
├── maintence_cheatsheet.md
|
||||
├── nix-system-configs
|
||||
│ ├── build
|
||||
│ │ └── configuration.nix
|
||||
│ ├── database-deprecated
|
||||
│ │ └── configuration.nix
|
||||
│ ├── dns
|
||||
│ │ ├── configuration-knot.nix
|
||||
│ │ ├── configuration-pihole-green.nix
|
||||
│ │ ├── configuration-pihole-inside-system.nix
|
||||
│ │ └── configuration-pihole-orange.nix
|
||||
│ ├── example-composed.nix
|
||||
│ ├── forgejo-deprecated
|
||||
│ │ ├── forgejo-localconfig.nix
|
||||
│ │ ├── pull.zsh
|
||||
│ │ └── push.zsh
|
||||
│ ├── gateway
|
||||
│ │ └── gateway.nix
|
||||
│ ├── modules
|
||||
│ │ ├── bootloader
|
||||
│ │ │ ├── seabios-assigned-iso-at-birth.nix
|
||||
│ │ │ └── seabios-assigned-proxmox-at-birth.nix
|
||||
│ │ ├── desktop-manager
|
||||
│ │ │ ├── gnome.nix
|
||||
│ │ │ └── sway_greetd_homemanager.nix
|
||||
│ │ ├── lix-default.nix
|
||||
│ │ ├── local
|
||||
│ │ │ ├── hostname_username.nix
|
||||
│ │ │ └── networking_local.nix
|
||||
│ │ ├── scripts
|
||||
│ │ │ ├── compose_two_nix.zsh
|
||||
│ │ │ ├── pull.zsh
|
||||
│ │ │ └── push.zsh
|
||||
│ │ ├── secrets-config
|
||||
│ │ │ ├── sops-composesongsheet.nix
|
||||
│ │ │ └── sops-database.nix
|
||||
│ │ ├── songsheet
|
||||
│ │ │ └── wavelog
|
||||
│ │ │ ├── docker-compose.nix
|
||||
│ │ │ ├── docker-compose.yml
|
||||
│ │ │ └── notes.md
|
||||
│ │ ├── system
|
||||
│ │ │ ├── compose-songsheet.nix
|
||||
│ │ │ ├── database.nix
|
||||
│ │ │ ├── forgejo.nix
|
||||
│ │ │ ├── teamspeak.nix
|
||||
│ │ │ └── traefik.nix
|
||||
│ │ ├── system_scripts
|
||||
│ │ │ ├── backup_strategem
|
||||
│ │ │ │ └── manual_database_restore.zsh
|
||||
│ │ │ └── gcloud_backup.nix
|
||||
│ │ └── toolsets
|
||||
│ │ └── remote_building.nix
|
||||
│ ├── old-server-notes.md
|
||||
│ ├── prg-blank-setup
|
||||
│ │ ├── blank-proxmox-partition.nix
|
||||
│ │ └── example.nix
|
||||
│ ├── secrets
|
||||
│ │ ├── database
|
||||
│ │ │ ├── gcloud_bucket.json
|
||||
│ │ │ └── secrets.yaml
|
||||
│ │ ├── songsheet
|
||||
│ │ │ ├── example.yaml
|
||||
│ │ │ └── secrets.yaml
|
||||
│ │ └── traefik
|
||||
│ │ └── test.yaml
|
||||
│ └── traefik-deprecated
|
||||
│ ├── pull.zsh
|
||||
│ ├── push.zsh
|
||||
│ └── traefik-config.nix
|
||||
├── README.md
|
||||
└── src
|
||||
└── main.rs
|
||||
```
|
||||
|
||||
As you can see it, the main system is separated up the the following `modules`, where all Nix configurations are thusly reused and
|
||||
updated across different systems. As mentioned before, `system` is the start of the core configuration of the following linux systems running in Proxmox.
|
||||
Looking at the `blank_system_USE_THIS_AS_COPY.nix`, you can see that the system is variables are declared dynamically in Nix-like variable declaration where
|
||||
we create the local new options class and make this callable in the other functions in the imports. Speaking of imports, `imports = [ ... ] ` block shows
|
||||
which modules which are then attached the core system, usually the bootloader is a must feature to the attached as the following system will not boot properly without it but different systems, depending how they were installed, need different configurations.
|
||||
Then usually the networking module is also attached to have capabilities to use networking i.e. internet access, hostname, which DNS to use etc. `lix-default.nix` module imported is the
|
||||
the assumed standard which tools each NixOS machine in the PRG network has, which is important for ensuring consistent existence of the tools used and maintanence within the machine outside of this documentation and machine buildings, as in enabling file transfers, package manager, SSH, password management, locales, timezones, upgrade system schedules.
|
||||
Next piece that should be added is the desktop/window management which could help simplifing the interaction of the VMs in the Proxmox or other external systems that are depednent of this repository.
|
||||
|
||||
As you can see that each aformentioned module in specific tasks are in their folders `local` for networking and users, `desktop-manager` for interaction, `bootloader` for... well.. bootloaders etc. Feel free to add more different modules for each system need or change.
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.local = {
|
||||
hostname = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "nixos-default";
|
||||
description = "System hostname";
|
||||
};
|
||||
username = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "user";
|
||||
description = "Primary user username";
|
||||
};
|
||||
userDescription = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "NixOS User";
|
||||
description = "Primary user description";
|
||||
};
|
||||
address = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "10.1.1.100";
|
||||
description = "Static IP address";
|
||||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
./modules/desktop-manager/sway_greetd_homemanager.nix
|
||||
./modules/local/hostname_username.nix
|
||||
./modules/local/networking_local.nix
|
||||
./modules/bootloader/seabios-assigned-iso-at-birth.nix
|
||||
./modules/lix-default.nix
|
||||
# Optionally to enable remote building: ./modules/toolsets/remote_building.nix
|
||||
#./modules/songsheet/wavelog/docker-compose.nix
|
||||
#./modules/secrets-config/sops-the-blank-system.nix
|
||||
];
|
||||
|
||||
config = {
|
||||
local.hostname = "nixos-songsheet";
|
||||
local.username = "songsheetprg";
|
||||
local.userDescription = "NixOS PRG Portainer-Like Songsheet Service";
|
||||
local.address = "10.1.1.249";
|
||||
|
||||
system.stateVersion = "25.11";
|
||||
};
|
||||
}
|
||||
|
|
@ -68,6 +68,8 @@
|
|||
address = "0.0.0.0";
|
||||
database_backend = "rocksdb";
|
||||
server_name = "lgbtq.prg-radio.org";
|
||||
allow_federation = true;
|
||||
allow_check_for_updates = true;
|
||||
|
||||
# See https://docs.conduit.rs/turn.html, and https://github.com/element-hq/synapse/blob/develop/docs/turn-howto.md for more details
|
||||
# turn_uris = [
|
||||
|
|
@ -82,11 +84,13 @@
|
|||
80
|
||||
443
|
||||
12244
|
||||
8448
|
||||
];
|
||||
networking.firewall.allowedUDPPorts = [
|
||||
80
|
||||
443
|
||||
12244
|
||||
8448
|
||||
];
|
||||
|
||||
system.stateVersion = "25.11";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue