From f786202e0da6bb272db1c72c009e55a66aa8b38f Mon Sep 17 00:00:00 2001 From: thiloho <123883702+thiloho@users.noreply.github.com> Date: Fri, 4 Aug 2023 20:44:41 +0200 Subject: [PATCH] Update server configuration --- nixos-configurations/pc/default.nix | 6 +---- nixos-configurations/server/default.nix | 34 ++++++++++++++++--------- nixos-configurations/shared-desktop.nix | 20 ++++++--------- nixos-configurations/shared.nix | 6 +++++ nixos-configurations/wsl/default.nix | 6 ----- 5 files changed, 37 insertions(+), 35 deletions(-) diff --git a/nixos-configurations/pc/default.nix b/nixos-configurations/pc/default.nix index 06376f3..b20f9a0 100644 --- a/nixos-configurations/pc/default.nix +++ b/nixos-configurations/pc/default.nix @@ -10,11 +10,7 @@ networking.hostName = "pc"; home-manager.users.thiloho = { pkgs, lib, ... }: { - # programs.git = { - # signing = { - # key = "A6C6D25B9687377B"; - # }; - # }; + programs.git.signing.key = "1617CEF3B3EE7083"; home.stateVersion = "23.05"; }; system.stateVersion = "23.05"; diff --git a/nixos-configurations/server/default.nix b/nixos-configurations/server/default.nix index 1a3b6d2..f5063ed 100644 --- a/nixos-configurations/server/default.nix +++ b/nixos-configurations/server/default.nix @@ -8,10 +8,6 @@ nix.settings.trusted-users = [ "thiloho" ]; - security.sudo.extraConfig = '' - %wheel ALL=(ALL) NOPASSWD: ALL, SETENV: ALL - ''; - networking = { hostName = "server"; firewall = { @@ -20,6 +16,10 @@ }; services = { + openssh = { + enable = true; + settings.PasswordAuthentication = false; + }; minecraft-server = { enable = true; eula = true; @@ -35,10 +35,6 @@ white-list = true; }; }; - openssh = { - enable = true; - settings.PasswordAuthentication = false; - }; nginx = { enable = true; virtualHosts = { @@ -54,15 +50,29 @@ }; }; }; + nextcloud = { + enable = true; + hostName = "cloud.thilohohlt.com"; + database.createLocally = true; + config = { + dbtype = "pgsql"; + adminpassFile = "/root/nextcloud-database-password.txt"; + }; + }; }; - security.acme = { - acceptTerms = true; - defaults.email = "thilo.hohlt@tutanota.com"; + security = { + acme = { + acceptTerms = true; + defaults.email = "thilo.hohlt@tutanota.com"; + }; + sudo.extraConfig = '' + %wheel ALL=(ALL) NOPASSWD: ALL, SETENV: ALL + ''; }; users.users.thiloho.openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH22p7+RCaEYZjxWzZ3SE9byCkqfT9SPq7Ht47XmCM9s thiloho@ThilosPC" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP8j7z4RBSjoBcB5btwGodYu5J/Yprng8oBhy47iXWq+ thiloho@pc" ]; home-manager.users.thiloho = { pkgs, lib, ... }: { diff --git a/nixos-configurations/shared-desktop.nix b/nixos-configurations/shared-desktop.nix index 8b29d32..17bb687 100644 --- a/nixos-configurations/shared-desktop.nix +++ b/nixos-configurations/shared-desktop.nix @@ -53,12 +53,6 @@ favorite-apps = [ "org.gnome.Console.desktop" "org.gnome.Nautilus.desktop" - "code.desktop" - "firefox.desktop" - "chromium-browser.desktop" - "psensor.desktop" - "steam.desktop" - "org.prismlauncher.PrismLauncher.desktop" ]; }; "org/gnome/desktop/background" = { @@ -93,14 +87,9 @@ listboots = "nix profile history --profile /nix/var/nix/profiles/system"; }; }; - firefox.enable = true; chromium = { enable = true; - extensions = [ - { id = "mmbiohbmijkiimgcgijfomelgpmdiigb"; } # Hotkeys - { id = "dhdgffkkebhmkfjojejmpbldmpobfkfo"; } # Tampermonkey - { id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; } # uBlock Origin - ]; + package = pkgs.google-chrome; }; vscode = { enable = true; @@ -113,6 +102,10 @@ "editor.tabSize" = 2; }; }; + obs-studio = { + enable = true; + # plugins = with pkgs; []; + }; }; home = { packages = with pkgs; [ @@ -123,6 +116,9 @@ ventoy-full psensor quickemu + discord + element-desktop + spotify ]; }; }; diff --git a/nixos-configurations/shared.nix b/nixos-configurations/shared.nix index 90778fc..1233c1b 100644 --- a/nixos-configurations/shared.nix +++ b/nixos-configurations/shared.nix @@ -24,6 +24,12 @@ extraGroups = [ "wheel" "networkmanager" "docker" ]; }; + programs.gnupg.agent = { + enable = true; + enableSSHSupport = true; + pinentryFlavor = "gnome3"; + }; + home-manager.users.thiloho = { ... }: { programs = { git = { diff --git a/nixos-configurations/wsl/default.nix b/nixos-configurations/wsl/default.nix index 7d09dfc..cb04335 100644 --- a/nixos-configurations/wsl/default.nix +++ b/nixos-configurations/wsl/default.nix @@ -19,12 +19,6 @@ networking.hostName = "ThilosPC"; users.users.thiloho.isNormalUser = true; - - programs.gnupg.agent = { - enable = true; - enableSSHSupport = true; - pinentryFlavor = "gnome3"; - }; home-manager.users.thiloho = { pkgs, lib, config, ... }: { programs = {