From ff65c8e951092d4d7caed1c4d02c9e141df7799b Mon Sep 17 00:00:00 2001 From: Rory& Date: Thu, 8 Aug 2024 03:50:02 +0200 Subject: Imports cleanup --- host/Rory-desktop/configuration.nix | 25 ++------ host/Rory-desktop/printing.nix | 7 +-- host/Rory-devenv/configuration.nix | 7 +-- host/Rory-devenv/software.nix | 9 +-- host/Rory-fosscord/configuration.nix | 8 +-- host/Rory-fosscord/software.nix | 8 +-- host/Rory-nginx/services/cgit.nix | 6 +- .../containers/pluralcontactbotpoc/root.nix | 4 +- host/Rory-nginx/services/jitsi.nix | 4 +- host/Rory-nginx/services/matrix/draupnir.nix | 1 + host/Rory-nginx/services/matrix/root.nix | 8 +-- host/Rory-nginx/services/nginx/nginx.nix | 7 +-- host/Rory-nginx/services/ollama.nix | 4 +- host/Rory-nginx/services/postgres.nix | 5 +- host/Rory-portable/configuration.nix | 67 +++------------------- host/Rory-portable/mariadb.nix | 14 ----- host/Rory-portable/nginx.nix | 42 -------------- host/Rory-portable/nginx/discord.localhost.nix | 36 ------------ host/Rory-portable/ollama.nix | 22 ------- host/Rory-portable/postgres.nix | 7 +-- host/Rory-portable/printing.nix | 7 +-- host/Rory-wsl/configuration.nix | 6 +- host/RoryNix/configuration.nix | 4 +- 23 files changed, 33 insertions(+), 275 deletions(-) delete mode 100644 host/Rory-portable/mariadb.nix delete mode 100644 host/Rory-portable/nginx.nix delete mode 100755 host/Rory-portable/nginx/discord.localhost.nix delete mode 100755 host/Rory-portable/ollama.nix (limited to 'host') diff --git a/host/Rory-desktop/configuration.nix b/host/Rory-desktop/configuration.nix index 9f6304d..8ef071c 100644 --- a/host/Rory-desktop/configuration.nix +++ b/host/Rory-desktop/configuration.nix @@ -143,12 +143,10 @@ args@{ # - Utilities inkscape-with-extensions - gimp # -with-plugins + gimp # - Languages - #dotnet-sdk_7 dotnet-sdk_8 - #(callPackage ../../modules/packages/dotnet-pack.nix { inherit pkgs; }) #games osu-lazer-bin @@ -159,8 +157,8 @@ args@{ # extra packages dmenu - cinnamon.nemo - gnome.file-roller + nemo + file-roller firefox-bin #ungoogled-chromium #needed for Rider in order to debug WASM @@ -184,16 +182,13 @@ args@{ virt-viewer # (dwarf-fortress-packages.dwarf-fortress-full.override { enableStoneSense = true; enableFPS = true; theme = dwarf-fortress-packages.themes.spacefox; }) + mangohud + prismlauncher ]; programs.steam.enable = true; programs.steam.gamescopeSession.enable = true; - #environment.gnome.excludePackages = [ - # pkgs.orca - # pkgs.gnome-tour - # pkgs.gnome-user-docs - #]; xdg = { portal = { @@ -230,15 +225,7 @@ args@{ enableDefaultPackages = lib.mkForce false; enableGhostscriptFonts = lib.mkForce false; }; - nix = { - settings = { - experimental-features = [ - "nix-command" - "flakes" - ]; - auto-optimise-store = true; - }; - }; + nixpkgs = { config = { allowUnfree = true; diff --git a/host/Rory-desktop/printing.nix b/host/Rory-desktop/printing.nix index 2480610..f25580f 100644 --- a/host/Rory-desktop/printing.nix +++ b/host/Rory-desktop/printing.nix @@ -1,9 +1,4 @@ -{ - config, - pkgs, - lib, - ... -}: +{ pkgs, ... }: { imports = [ ]; diff --git a/host/Rory-devenv/configuration.nix b/host/Rory-devenv/configuration.nix index f361ed1..85f38dd 100755 --- a/host/Rory-devenv/configuration.nix +++ b/host/Rory-devenv/configuration.nix @@ -1,9 +1,4 @@ -{ - config, - pkgs, - lib, - ... -}: +{ ... }: { imports = [ diff --git a/host/Rory-devenv/software.nix b/host/Rory-devenv/software.nix index afcc751..f1cb896 100755 --- a/host/Rory-devenv/software.nix +++ b/host/Rory-devenv/software.nix @@ -1,9 +1,4 @@ -{ - config, - pkgs, - lib, - ... -}: +{ pkgs, ... }: { imports = [ ../../modules/base-server.nix ]; @@ -69,7 +64,7 @@ kitty feh sshfs - cinnamon.nemo + nemo firefox-bin udisks gparted diff --git a/host/Rory-fosscord/configuration.nix b/host/Rory-fosscord/configuration.nix index ce93fc2..014f28a 100755 --- a/host/Rory-fosscord/configuration.nix +++ b/host/Rory-fosscord/configuration.nix @@ -1,10 +1,4 @@ -{ - config, - pkgs, - lib, - discord-client-proxy, - ... -}: +{ ... }: { imports = [ diff --git a/host/Rory-fosscord/software.nix b/host/Rory-fosscord/software.nix index f58d211..ee1bc19 100755 --- a/host/Rory-fosscord/software.nix +++ b/host/Rory-fosscord/software.nix @@ -1,10 +1,4 @@ -{ - config, - pkgs, - lib, - discord-client-proxy, - ... -}: +{ discord-client-proxy, ... }: { imports = [ diff --git a/host/Rory-nginx/services/cgit.nix b/host/Rory-nginx/services/cgit.nix index 5b80000..fb762d1 100644 --- a/host/Rory-nginx/services/cgit.nix +++ b/host/Rory-nginx/services/cgit.nix @@ -1,8 +1,4 @@ -{ - pkgs, - lib, - ... -}: +{ pkgs, lib, ... }: let base_cgit_config = { diff --git a/host/Rory-nginx/services/containers/pluralcontactbotpoc/root.nix b/host/Rory-nginx/services/containers/pluralcontactbotpoc/root.nix index 7e7c355..11d0be3 100755 --- a/host/Rory-nginx/services/containers/pluralcontactbotpoc/root.nix +++ b/host/Rory-nginx/services/containers/pluralcontactbotpoc/root.nix @@ -1,6 +1,4 @@ -{ - ... -}: +{ ... }: { imports = [ diff --git a/host/Rory-nginx/services/jitsi.nix b/host/Rory-nginx/services/jitsi.nix index ff7a229..9fe8d73 100755 --- a/host/Rory-nginx/services/jitsi.nix +++ b/host/Rory-nginx/services/jitsi.nix @@ -1,6 +1,4 @@ -{ - ... -}: +{ ... }: { services.jitsi-videobridge.openFirewall = true; diff --git a/host/Rory-nginx/services/matrix/draupnir.nix b/host/Rory-nginx/services/matrix/draupnir.nix index 9f48e6d..66d4648 100755 --- a/host/Rory-nginx/services/matrix/draupnir.nix +++ b/host/Rory-nginx/services/matrix/draupnir.nix @@ -21,6 +21,7 @@ autojoinOnlyIfManager = true; # Let's not open ourselves up to DoS attacks automaticallyRedactForReasons = [ "*" ]; # I always want autoredact fasterMembershipChecks = true; + roomStateBackingStore.enabled = true; backgroundDelayMS = 10; # delay isn't needed, I don't mind the performance hit pollReports = false; # this is a single person homeserver... let's save ourself the work diff --git a/host/Rory-nginx/services/matrix/root.nix b/host/Rory-nginx/services/matrix/root.nix index 968a14a..b13c38a 100755 --- a/host/Rory-nginx/services/matrix/root.nix +++ b/host/Rory-nginx/services/matrix/root.nix @@ -1,10 +1,4 @@ -{ - config, - pkgs, - lib, - botcore-v4, - ... -}: +{ ... }: { imports = [ diff --git a/host/Rory-nginx/services/nginx/nginx.nix b/host/Rory-nginx/services/nginx/nginx.nix index d210fb1..4e36577 100755 --- a/host/Rory-nginx/services/nginx/nginx.nix +++ b/host/Rory-nginx/services/nginx/nginx.nix @@ -1,9 +1,4 @@ -{ - config, - pkgs, - lib, - ... -}: +{ config, pkgs, ... }: let serveDir = config: { enableACME = if config ? ssl then config.ssl else true; diff --git a/host/Rory-nginx/services/ollama.nix b/host/Rory-nginx/services/ollama.nix index 954fe99..c9709da 100755 --- a/host/Rory-nginx/services/ollama.nix +++ b/host/Rory-nginx/services/ollama.nix @@ -1,6 +1,4 @@ -{ - ... -}: +{ ... }: { # systemd.tmpfiles.rules = [ "d /data/ollama 0750 ostgres postgres" ]; diff --git a/host/Rory-nginx/services/postgres.nix b/host/Rory-nginx/services/postgres.nix index fbe33b7..68b822b 100755 --- a/host/Rory-nginx/services/postgres.nix +++ b/host/Rory-nginx/services/postgres.nix @@ -1,7 +1,4 @@ -{ - pkgs, - ... -}: +{ pkgs, ... }: { systemd.tmpfiles.rules = [ "d /mnt/postgres/data 0750 postgres postgres" ]; diff --git a/host/Rory-portable/configuration.nix b/host/Rory-portable/configuration.nix index ebfe899..e278e17 100644 --- a/host/Rory-portable/configuration.nix +++ b/host/Rory-portable/configuration.nix @@ -1,5 +1,4 @@ { - config, pkgs, lib, nhekoSrc, @@ -9,19 +8,8 @@ { imports = [ - # base imports ../../modules/base-client.nix ../../modules/packages/vim.nix - # ../../modules/environments/home.nix - #../../modules/software-templates/profilers.nix - #./postgres.nix - #./nginx.nix - - # hardware-specific imports - #./optional/hardware-specific/amd.nix - - #./printing.nix - ./ollama.nix ]; boot = { @@ -80,7 +68,6 @@ services.power-profiles-daemon.enable = true; time.timeZone = "Europe/Brussels"; - i18n.defaultLocale = "en_US.UTF-8"; services = { libinput.touchpad.naturalScrolling = true; @@ -123,21 +110,6 @@ sound.enable = true; - users.users = { - Rory = { - isNormalUser = true; - extraGroups = [ "wheel" ]; - packages = with pkgs; [ - #gimp-with-plugins - - #xterm - #gnomeExtensions.vitals - #gnomeExtensions.runcat - ]; - initialPassword = "password"; - }; - }; - environment.systemPackages = with pkgs; [ libreoffice qt6.qtwayland @@ -165,8 +137,8 @@ # - Languages #dotnet-sdk_7 - #dotnet-sdk_8 - (callPackage ../../modules/packages/dotnet-pack.nix { inherit pkgs; }) + dotnet-sdk_8 + #(callPackage ../../modules/packages/dotnet-pack.nix { inherit pkgs; }) #games osu-lazer-bin @@ -176,8 +148,8 @@ # extra packages dmenu - cinnamon.nemo - gnome.file-roller + nemo + file-roller firefox-bin ungoogled-chromium # needed for Rider in order to debug WASM @@ -237,37 +209,14 @@ (nerdfonts.override { fonts = [ "JetBrainsMono" ]; }) noto-fonts-monochrome-emoji ]; - fontconfig.defaultFonts.monospace = with pkgs; [ "JetBrainsMonoNL Nerd Font,JetBrainsMonoNL NF:style=Regular" ]; - fontconfig.defaultFonts.sansSerif = with pkgs; [ "JetBrainsMonoNL Nerd Font,JetBrainsMonoNL NF:style=Regular" ]; - fontconfig.defaultFonts.serif = with pkgs; [ "JetBrainsMonoNL Nerd Font,JetBrainsMonoNL NF:style=Regular" ]; - fontconfig.defaultFonts.emoji = with pkgs; [ "freefont" ]; + fontconfig.defaultFonts.monospace = [ "JetBrainsMonoNL Nerd Font,JetBrainsMonoNL NF:style=Regular" ]; + fontconfig.defaultFonts.sansSerif = [ "JetBrainsMonoNL Nerd Font,JetBrainsMonoNL NF:style=Regular" ]; + fontconfig.defaultFonts.serif = [ "JetBrainsMonoNL Nerd Font,JetBrainsMonoNL NF:style=Regular" ]; + fontconfig.defaultFonts.emoji = [ "freefont" ]; enableDefaultPackages = lib.mkForce false; enableGhostscriptFonts = lib.mkForce false; }; - nix = { - settings = { - experimental-features = [ - "nix-command" - "flakes" - ]; - auto-optimise-store = true; - }; - }; - nixpkgs = { - config = { - allowUnfree = true; - permittedInsecurePackages = [ "electron-25.9.0" ]; - }; - }; - security = { - polkit.enable = true; - sudo.wheelNeedsPassword = false; - }; - - hardware = { - pulseaudio.enable = false; - }; programs.dconf.enable = true; environment.etc."resolv.conf".text = '' nameserver 8.8.8.8 diff --git a/host/Rory-portable/mariadb.nix b/host/Rory-portable/mariadb.nix deleted file mode 100644 index 758cb3d..0000000 --- a/host/Rory-portable/mariadb.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: - -{ - services.mysql = { - enable = true; - package = pkgs.mariadb; - }; - -} diff --git a/host/Rory-portable/nginx.nix b/host/Rory-portable/nginx.nix deleted file mode 100644 index 31ec0ea..0000000 --- a/host/Rory-portable/nginx.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: - -{ - services = { - nginx = { - enable = true; - #package = pkgs.nginxQuic; - recommendedProxySettings = true; - #recommendedTlsSettings = true; - recommendedZstdSettings = true; - recommendedGzipSettings = true; - recommendedBrotliSettings = true; - recommendedOptimisation = true; - #defaultMimeTypes = ../../../../modules/packages/nginx/mime.types; - appendConfig = '' - worker_processes 16; - ''; - eventsConfig = '' - #use kqueue; - worker_connections 512; - ''; - appendHttpConfig = '' - #sendfile on; - disable_symlinks off; - ''; - additionalModules = with pkgs.nginxModules; [ moreheaders ]; - virtualHosts = { - "discord.localhost" = import ./nginx/discord.localhost.nix { inherit pkgs; }; - - }; - }; - }; - systemd.services.nginx.serviceConfig = { - LimitNOFILE = 5000000; - }; - -} diff --git a/host/Rory-portable/nginx/discord.localhost.nix b/host/Rory-portable/nginx/discord.localhost.nix deleted file mode 100755 index b40e13c..0000000 --- a/host/Rory-portable/nginx/discord.localhost.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ pkgs, ... }: - -{ - root = "/www/discord"; - addSSL = true; - enableACME = false; - - # We don't care about certificates around here... - sslCertificate = "${pkgs.path}/nixos/tests/common/acme/server/acme.test.cert.pem"; - sslCertificateKey = "${pkgs.path}/nixos/tests/common/acme/server/acme.test.key.pem"; - - extraConfig = '' - autoindex on; - more_set_headers 'Access-Control-Allow-Origin: *'; - more_set_headers 'Access-Control-Allow-Methods: GET, POST, OPTIONS'; - more_set_headers 'Access-Control-Allow-Headers: DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range'; - more_set_headers 'Access-Control-Expose-Headers: Content-Length,Content-Range'; - more_set_headers 'Access-Control-Allow-Credentials: true'; - ''; - - locations = { - "/" = { - index = "index.html"; - extraConfig = '' - more_set_headers 'Access-Control-Allow-Origin: *'; - more_set_headers 'Access-Control-Allow-Methods: *'; - more_set_headers 'Access-Control-Allow-Headers: *'; - more_set_headers 'Access-Control-Expose-Headers: *'; - more_set_headers 'Access-Control-Max-Age' 1728000; - - # default to /index.html if file not found - try_files $uri $uri/ /index.html; - ''; - }; - }; -} diff --git a/host/Rory-portable/ollama.nix b/host/Rory-portable/ollama.nix deleted file mode 100755 index 0c72b85..0000000 --- a/host/Rory-portable/ollama.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: - -{ - services.ollama = { - enable = true; - home = "/data/ollama/home"; - models = "/data/ollama/home/models"; - environmentVariables = { - OLLAMA_LLM_LIBRARY = "cpu_avx2"; - }; - writablePaths = [ "/data/ollama/home" ]; - #listenAddress = "0.0.0.0:11434"; - host = "0.0.0.0"; - port = 11434; - sandbox = false; - }; -} diff --git a/host/Rory-portable/postgres.nix b/host/Rory-portable/postgres.nix index 60fd8d6..7223f6a 100755 --- a/host/Rory-portable/postgres.nix +++ b/host/Rory-portable/postgres.nix @@ -1,9 +1,4 @@ -{ - config, - pkgs, - lib, - ... -}: +{ pkgs, ... }: { #systemd.tmpfiles.rules = [ "d /mnt/postgres/data 0750 postgres postgres" ]; diff --git a/host/Rory-portable/printing.nix b/host/Rory-portable/printing.nix index 2480610..f25580f 100644 --- a/host/Rory-portable/printing.nix +++ b/host/Rory-portable/printing.nix @@ -1,9 +1,4 @@ -{ - config, - pkgs, - lib, - ... -}: +{ pkgs, ... }: { imports = [ ]; diff --git a/host/Rory-wsl/configuration.nix b/host/Rory-wsl/configuration.nix index 855114a..b155058 100644 --- a/host/Rory-wsl/configuration.nix +++ b/host/Rory-wsl/configuration.nix @@ -1,8 +1,6 @@ { lib, pkgs, - config, - modulesPath, nhekoSrc, mtxclientSrc, ... @@ -40,8 +38,8 @@ easyeffects kitty # youtube-music - cinnamon.nemo - gnome.file-roller + nemo + file-roller # - IDEs # jetbrains-toolbox diff --git a/host/RoryNix/configuration.nix b/host/RoryNix/configuration.nix index f5c63fd..90d6076 100644 --- a/host/RoryNix/configuration.nix +++ b/host/RoryNix/configuration.nix @@ -39,7 +39,6 @@ }; time.timeZone = "Europe/Brussels"; - i18n.defaultLocale = "en_US.UTF-8"; services = { xserver = { @@ -122,7 +121,7 @@ dig cloud-utils sshfs - cinnamon.nemo + nemo firefox-bin #epiphany @@ -154,7 +153,6 @@ "nix-command" "flakes" ]; - auto-optimise-store = true; }; }; nixpkgs = { -- cgit 1.4.1