From 8c454565d8ac0955ac03fe11a9cea38dcd75a483 Mon Sep 17 00:00:00 2001 From: Lillian-Violet Date: Mon, 23 Dec 2024 01:32:34 +0100 Subject: [PATCH] generify more and disable onlyoffice --- nixos/hosts/EDI/configuration.nix | 9 ------- nixos/hosts/GLaDOS/configuration.nix | 8 ------ nixos/hosts/queen/configuration.nix | 8 ------ nixos/hosts/shodan/configuration.nix | 7 ----- nixos/hosts/wheatley/configuration.nix | 9 ------- .../package-configs/nextcloud/default.nix | 27 ++++++++++--------- nixos/shared/default.nix | 18 ++++++++++--- 7 files changed, 29 insertions(+), 57 deletions(-) diff --git a/nixos/hosts/EDI/configuration.nix b/nixos/hosts/EDI/configuration.nix index 9069e21..040871c 100644 --- a/nixos/hosts/EDI/configuration.nix +++ b/nixos/hosts/EDI/configuration.nix @@ -2,7 +2,6 @@ # Use this to configure your system environment (it replaces /etc/nixos/configuration.nix) { inputs, - outputs, lib, pkgs, config, @@ -28,14 +27,6 @@ ./hardware-configuration.nix ]; - home-manager = { - extraSpecialArgs = {inherit inputs outputs;}; - users = { - # Import your home-manager configuration - lillian = import ../../../home-manager/hosts/EDI; - }; - }; - environment.systemPackages = with pkgs; [ ]; networking = { diff --git a/nixos/hosts/GLaDOS/configuration.nix b/nixos/hosts/GLaDOS/configuration.nix index d0efd2a..80505d9 100644 --- a/nixos/hosts/GLaDOS/configuration.nix +++ b/nixos/hosts/GLaDOS/configuration.nix @@ -2,7 +2,6 @@ # Use this to configure your system environment (it replaces /etc/nixos/configuration.nix) { inputs, - outputs, pkgs, config, ... @@ -75,13 +74,6 @@ users.users.lillian.extraGroups = ["gamemode"]; - home-manager = { - extraSpecialArgs = {inherit inputs outputs;}; - users = { - # Import your home-manager configuration - lillian = import ../../../home-manager/hosts/GLaDOS; - }; - }; networking = { # virtualisation.waydroid.enable = false; hostName = "GLaDOS"; diff --git a/nixos/hosts/queen/configuration.nix b/nixos/hosts/queen/configuration.nix index a85f6c2..a269124 100644 --- a/nixos/hosts/queen/configuration.nix +++ b/nixos/hosts/queen/configuration.nix @@ -1,6 +1,5 @@ { inputs, - outputs, lib, pkgs, ... @@ -175,13 +174,6 @@ # Enable completion of system packages by zsh environment.pathsToLink = ["/share/zsh"]; - home-manager = { - extraSpecialArgs = {inherit inputs outputs;}; - users = { - # Import your home-manager configuration - lillian = import ../../../home-manager/hosts/queen; - }; - }; boot = { tmp.cleanOnBoot = true; loader.grub = { diff --git a/nixos/hosts/shodan/configuration.nix b/nixos/hosts/shodan/configuration.nix index 9542546..41bef6f 100644 --- a/nixos/hosts/shodan/configuration.nix +++ b/nixos/hosts/shodan/configuration.nix @@ -251,13 +251,6 @@ # Enable completion of system packages by zsh environment.pathsToLink = ["/share/zsh"]; - home-manager = { - extraSpecialArgs = {inherit inputs outputs;}; - users = { - # Import your home-manager configuration - lillian = import ../../../home-manager/hosts/shodan; - }; - }; security = { rtkit.enable = true; tpm2 = { diff --git a/nixos/hosts/wheatley/configuration.nix b/nixos/hosts/wheatley/configuration.nix index 87114f1..d552f68 100644 --- a/nixos/hosts/wheatley/configuration.nix +++ b/nixos/hosts/wheatley/configuration.nix @@ -1,8 +1,6 @@ { lib, pkgs, - inputs, - outputs, config, modulesPath, ... @@ -154,13 +152,6 @@ sdImage.compressImage = false; - home-manager = { - extraSpecialArgs = {inherit inputs outputs;}; - users = { - # Import your home-manager configuration - lillian = import ../../../home-manager/hosts/wheatley; - }; - }; networking = { hostName = "wheatley"; diff --git a/nixos/server/package-configs/nextcloud/default.nix b/nixos/server/package-configs/nextcloud/default.nix index a3ed25a..4f588b9 100644 --- a/nixos/server/package-configs/nextcloud/default.nix +++ b/nixos/server/package-configs/nextcloud/default.nix @@ -7,13 +7,14 @@ sops.secrets."nextcloudadmin".owner = config.users.users.nextcloud.name; sops.secrets."nextclouddb".mode = "0440"; sops.secrets."nextclouddb".owner = config.users.users.nextcloud.name; - sops.secrets."local.json".mode = "0440"; - sops.secrets."local.json".owner = config.users.users.onlyoffice.name; + # sops.secrets."local.json".mode = "0440"; + # sops.secrets."local.json".owner = config.users.users.onlyoffice.name; users.users = { - nextcloud.extraGroups = [config.users.groups.keys.name config.users.users.onlyoffice.name]; + # nextcloud.extraGroups = [config.users.groups.keys.name config.users.users.onlyoffice.name]; + nextcloud.extraGroups = [config.users.groups.keys.name]; #aria2.extraGroups = ["nextcloud"]; - onlyoffice.extraGroups = [config.users.users.nextcloud.name]; + # onlyoffice.extraGroups = [config.users.users.nextcloud.name]; }; # Enable Nginx @@ -90,15 +91,15 @@ }; }; - services.onlyoffice = { - port = 16783; - enable = true; - hostname = "onlyoffice.gladtherescake.eu"; - #postgresHost = "/run/postgesql"; - #postgresUser = "onlyoffice"; - #postgresName = "onlyoffice"; - #jwtSecretFile = config.sops.secrets."local.json".path; - }; + # services.onlyoffice = { + # port = 16783; + # enable = true; + # hostname = "onlyoffice.gladtherescake.eu"; + # #postgresHost = "/run/postgesql"; + # #postgresUser = "onlyoffice"; + # #postgresName = "onlyoffice"; + # #jwtSecretFile = config.sops.secrets."local.json".path; + # }; services.rabbitmq = { enable = true; diff --git a/nixos/shared/default.nix b/nixos/shared/default.nix index cb7062d..a794662 100644 --- a/nixos/shared/default.nix +++ b/nixos/shared/default.nix @@ -1,5 +1,6 @@ { inputs, + outputs, lib, config, pkgs, @@ -8,6 +9,7 @@ imports = [ ./locale ./packages + inputs.home-manager.nixosModules.home-manager ]; sops = { age.keyFile = ../../../../../../var/secrets/keys.txt; @@ -72,8 +74,6 @@ # console.catppuccin.enable = true; - home-manager.backupFileExtension = "backup"; - programs.zsh = { enable = true; }; @@ -136,6 +136,19 @@ # Enable completion of system packages by zsh environment.pathsToLink = ["/share/zsh"]; + + home-manager = { + backupFileExtension = "backup"; + extraSpecialArgs = { + inputs = inputs; + outputs = outputs; + }; + users = { + # Import your home-manager configuration + lillian = import ../../home-manager/hosts/${config.networking.hostName}; + }; + }; + users = { users.lillian = { isNormalUser = true; @@ -147,7 +160,6 @@ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH30G2PJOnI6jnAtxOQV0SpLFUva0adarLZLvaoZvjGE lillian@GLaDOS" ]; }; - mutableUsers = false; users.root = {