diff options
| author | triethyl <triethylammonium@pm.me> | 2025-09-03 09:06:57 -0400 |
|---|---|---|
| committer | triethyl <triethylammonium@pm.me> | 2025-09-03 09:06:57 -0400 |
| commit | ca30ba28b038c7ad283fc17ca4e9cc91eda2e911 (patch) | |
| tree | bf3e5d958bfcca2211cc65c5d310bcdd17b98e2f /nixos | |
| parent | abede06081d3cd5abd75f65e835d6d4830f1224d (diff) | |
prodesk-server: created server config
Diffstat (limited to 'nixos')
| -rw-r--r-- | nixos/modules/homelab/cloud/syncthing.nix | 13 | ||||
| -rw-r--r-- | nixos/systems/prodesk-server/system.nix | 58 |
2 files changed, 65 insertions, 6 deletions
diff --git a/nixos/modules/homelab/cloud/syncthing.nix b/nixos/modules/homelab/cloud/syncthing.nix index 00328f7..bd8852c 100644 --- a/nixos/modules/homelab/cloud/syncthing.nix +++ b/nixos/modules/homelab/cloud/syncthing.nix @@ -18,24 +18,25 @@ in { overrideFolders = true; settings = { devices = { - "ideapad-laptop" = { - id = "62SPMAK-NOHX3QT-MVSOS7U-UON6YPH-HXXNFXO-PRSAJ2X-GYXFWJO-6LARPQL"; + "thinkpad-laptop" = { + id = "3Q4DMGC-SMMRYXG-UNQMGLK-74ST7NF-KVBAFXB-6D2LM2D-UEHBLVW-J2C2CAB"; }; "nzxt-desktop" = { id = "2TPKPXD-LO7OL7V-GP5HOUM-2P5SUEQ-XST4UYJ-S2Z56PP-IM66IIT-GLUNLAX"; }; - "samsung-tablet" = { - id = "ZKL25GJ-TKM2E6Y-VQSBAW5-TVG7RWM-RRAUEVA-ZOJZNCM-F3ARZUU-TPK7CA6"; - }; + # "samsung-tablet" = { + # id = "ZKL25GJ-TKM2E6Y-VQSBAW5-TVG7RWM-RRAUEVA-ZOJZNCM-F3ARZUU-TPK7CA6"; + # }; }; folders = { "Main" = { path = "/home/${cfg.user}/Sync"; - devices = [ "ideapad-laptop" "nzxt-desktop" "samsung-tablet" ]; + devices = [ "thinkpad-laptop" "nzxt-desktop" ]; }; }; }; }; environment.systemPackages = [ pkgs.syncthing ]; + # Use this command to get id: syncthing cli show system | from json | get myID }; } diff --git a/nixos/systems/prodesk-server/system.nix b/nixos/systems/prodesk-server/system.nix index e69de29..37bbd48 100644 --- a/nixos/systems/prodesk-server/system.nix +++ b/nixos/systems/prodesk-server/system.nix @@ -0,0 +1,58 @@ +{config, ...}: { + imports = [./hardware.nix]; + + # Configure general settings. + general-settings = { + hostname = "prodesk-server"; + locale = "en_US.UTF-8"; + timezone = "America/New_York"; + stateVersion = "23.11"; + }; + + age.secrets.server-user-password.file = ../../../secrets/user-passwords/prodesk-server/server.age; + + # Configure admin user. + users.users."server" = { + hashedPasswordFile = config.age.secrets.server-user-password.path; + isNormalUser = true; + description = "Server"; + extraGroups = [ + "networkmanager" + "wheel" + "audio" + "video" + ]; + }; + + # Enable features. + features = { + cli = { + shells.nushell.enable = true; + utils = { + nh = { + enable = true; + flake = "/home/server/Sync/setup"; + }; + }; + }; + services = { + core.systemd-boot.enable = true; + extra = { + udisks2.enable = true; + }; + }; + }; + + # Configure homelab modules. + homelab = { + core = { + ssh.enable = true; + }; + cloud = { + syncthing = { + enable = true; + user = "server"; + }; + }; + }; +} |
