No description
Find a file
2025-05-10 11:18:56 +02:00
modules/nixos Migrate mow0m to new Repo 2025-05-05 20:39:01 +02:00
systems/x86_64-linux/mow0m Added Ohybke Keys 2025-05-10 11:18:56 +02:00
.gitignore Initial commit 2025-05-04 23:36:22 +02:00
flake.lock Updated Systems 2025-05-06 01:18:13 +02:00
flake.nix Migrate mow0m to new Repo 2025-05-05 20:39:01 +02:00
LICENSE Initial commit 2025-05-04 23:36:22 +02:00
README.md Layout 2025-05-06 01:23:32 +02:00

Serverraum-mit-Matratze Infrastructure

license standard-readme compliant

This is the Infrastructure Code for the "Serverraum mit Matratze" shared apartment.

Table of Contents

Dependencies

To remotely Deploy Nix-Servers with Native Tools, you will need Access to the nixos-rebuild command.

You can either use a NixOS System.

Or you can Install the Nix Package Manager and open a Nix-Shell with the Command available:

nix-shell -p '(nixos{}).nixos-rebuild'

Updating Configuration

So, you updated the Configuration on your Computer, how can you apply the Updated Config to the Server?

You'll need SSH-Access to the Server, with a User which can run Nix-Commands, and can escalate Privileges using sudo.

  1. Don't forget to Configure your ssh Config! (See Hosts)
  2. Stage the Changes if you created or deleted Files git add . (They will be ignored if you miss this step!)
  3. Build and Switch the Config on the Target Server! (Example mow0m):
nixos-rebuild switch --flake .#mow0m --target-host master@mow0m --build-host master@mow0m --use-remote-sudo 

You want to keep the Build-Host the Same as the Target-Host, because the Target will only accept Binarys with a trusted Signature. It is way easier, to just run the Build on the Same Machine then.

Hosts

mow0m

Configuration

User master@mow0m
Cpu Intel(R) Core(TM) i5-6400 (4) @ 3.30 GHz
Ram 32GB
Build
nixos-rebuild switch --flake .#mow0m --target-host master@mow0m --build-host master@mow0m --use-remote-sudo
SSH Config
Host mow0m
        HostName mow0m.lan
        User master
        Port 9553
        IdentityFile ~/.ssh/master@mow0m
Host remoteunlock-mow0m
        HostName mow0m.lan
        User root
        Port 2550
        IdentityFile ~/.ssh/remoteunlock-mow0m

License

GPL v2