From 21e7e64d73bb63b89ecbedf5a495662258e27f4a Mon Sep 17 00:00:00 2001 From: buffet Date: Wed, 5 Jun 2024 11:21:21 +0200 Subject: [PATCH 1/2] refactor: get rid of unused arguments --- hosts/alice/gdm.nix | 2 +- hosts/alice/gpg.nix | 2 +- hosts/alice/pipewire.nix | 2 +- hosts/alice/syncthing.nix | 2 +- hosts/alice/tlp.nix | 2 +- hosts/ami/disk-config.nix | 2 +- hosts/ami/murmur.nix | 2 +- hosts/ami/upgrade.nix | 2 +- users/buffet/fzf.nix | 2 +- users/buffet/git.nix | 2 +- users/buffet/gpg.nix | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/hosts/alice/gdm.nix b/hosts/alice/gdm.nix index 7d2022e..e501787 100644 --- a/hosts/alice/gdm.nix +++ b/hosts/alice/gdm.nix @@ -1,4 +1,4 @@ -_: { +{ services.xserver = { enable = true; displayManager.gdm = { diff --git a/hosts/alice/gpg.nix b/hosts/alice/gpg.nix index 06d14b7..a2569ce 100644 --- a/hosts/alice/gpg.nix +++ b/hosts/alice/gpg.nix @@ -1,4 +1,4 @@ -_: { +{ programs.gnupg.agent = { enable = true; enableSSHSupport = true; diff --git a/hosts/alice/pipewire.nix b/hosts/alice/pipewire.nix index b8055b7..cc21ad4 100644 --- a/hosts/alice/pipewire.nix +++ b/hosts/alice/pipewire.nix @@ -1,4 +1,4 @@ -_: { +{ security.rtkit.enable = true; services.pipewire = { diff --git a/hosts/alice/syncthing.nix b/hosts/alice/syncthing.nix index cb4b920..f338282 100644 --- a/hosts/alice/syncthing.nix +++ b/hosts/alice/syncthing.nix @@ -1,4 +1,4 @@ -_: { +{ services.syncthing = { enable = true; user = "buffet"; diff --git a/hosts/alice/tlp.nix b/hosts/alice/tlp.nix index 60cd6c2..28f7479 100644 --- a/hosts/alice/tlp.nix +++ b/hosts/alice/tlp.nix @@ -1,4 +1,4 @@ -_: { +{ services = { tlp = { enable = true; diff --git a/hosts/ami/disk-config.nix b/hosts/ami/disk-config.nix index e24d074..e439b62 100644 --- a/hosts/ami/disk-config.nix +++ b/hosts/ami/disk-config.nix @@ -1,4 +1,4 @@ -_: { +{ disko.devices = { disk.main = { device = "/dev/sda"; diff --git a/hosts/ami/murmur.nix b/hosts/ami/murmur.nix index 3ab3ad0..7a38762 100644 --- a/hosts/ami/murmur.nix +++ b/hosts/ami/murmur.nix @@ -1,4 +1,4 @@ -_: { +{ services.murmur = { enable = true; openFirewall = true; diff --git a/hosts/ami/upgrade.nix b/hosts/ami/upgrade.nix index d87212e..0a0efaf 100644 --- a/hosts/ami/upgrade.nix +++ b/hosts/ami/upgrade.nix @@ -1,4 +1,4 @@ -_: { +{ system.autoUpgrade = { enable = true; flake = "https://buffets.kitchen/kitchen/rice/archive/main.tar.gz#ami"; diff --git a/users/buffet/fzf.nix b/users/buffet/fzf.nix index d9634f3..b02814a 100644 --- a/users/buffet/fzf.nix +++ b/users/buffet/fzf.nix @@ -1,4 +1,4 @@ -_: { +{ home-manager.users.buffet = { programs.fzf = { enable = true; diff --git a/users/buffet/git.nix b/users/buffet/git.nix index 91d91c3..653ac14 100644 --- a/users/buffet/git.nix +++ b/users/buffet/git.nix @@ -1,4 +1,4 @@ -_: { +{ home-manager.users.buffet = { programs.git = { enable = true; diff --git a/users/buffet/gpg.nix b/users/buffet/gpg.nix index cfe20e4..0b0f914 100644 --- a/users/buffet/gpg.nix +++ b/users/buffet/gpg.nix @@ -1,4 +1,4 @@ -_: { +{ home-manager.users.buffet = { programs.gpg.enable = true; }; -- 2.46.0 From 3a81cc0d849a5b738a0e4b33dde635ad68abf2c4 Mon Sep 17 00:00:00 2001 From: buffet Date: Wed, 5 Jun 2024 11:31:12 +0200 Subject: [PATCH 2/2] refactor: move repeated nginx snippets into one file --- hosts/ami/404.nix | 7 ------- hosts/ami/bitwarden.nix | 7 ------- hosts/ami/default.nix | 3 ++- hosts/ami/forgejo.nix | 7 ------- hosts/ami/nginx.nix | 10 ++++++++++ hosts/ami/website.nix | 7 ------- 6 files changed, 12 insertions(+), 29 deletions(-) create mode 100644 hosts/ami/nginx.nix diff --git a/hosts/ami/404.nix b/hosts/ami/404.nix index 552426a..c9ab726 100644 --- a/hosts/ami/404.nix +++ b/hosts/ami/404.nix @@ -1,12 +1,5 @@ {website, ...}: { services.nginx = { - enable = true; - - recommendedGzipSettings = true; - recommendedOptimisation = true; - recommendedProxySettings = true; - recommendedTlsSettings = true; - virtualHosts."404.buffet.sh" = { default = true; useACMEHost = "buffet.sh"; diff --git a/hosts/ami/bitwarden.nix b/hosts/ami/bitwarden.nix index ef33f98..72663da 100644 --- a/hosts/ami/bitwarden.nix +++ b/hosts/ami/bitwarden.nix @@ -15,13 +15,6 @@ in { }; nginx = { - enable = true; - - recommendedGzipSettings = true; - recommendedOptimisation = true; - recommendedProxySettings = true; - recommendedTlsSettings = true; - virtualHosts."bitwarden.buffet.sh" = { useACMEHost = "buffet.sh"; forceSSL = true; diff --git a/hosts/ami/default.nix b/hosts/ami/default.nix index a03b0a3..74b2d78 100644 --- a/hosts/ami/default.nix +++ b/hosts/ami/default.nix @@ -15,8 +15,9 @@ ./borg.nix ./disk-config.nix ./forgejo.nix - ./murmur.nix ./msmtp.nix + ./murmur.nix + ./nginx.nix ./upgrade.nix ./website.nix diff --git a/hosts/ami/forgejo.nix b/hosts/ami/forgejo.nix index eeba937..b474ad8 100644 --- a/hosts/ami/forgejo.nix +++ b/hosts/ami/forgejo.nix @@ -73,13 +73,6 @@ in { }; nginx = { - enable = true; - - recommendedGzipSettings = true; - recommendedOptimisation = true; - recommendedProxySettings = true; - recommendedTlsSettings = true; - virtualHosts."buffets.kitchen" = { useACMEHost = "buffet.sh"; forceSSL = true; diff --git a/hosts/ami/nginx.nix b/hosts/ami/nginx.nix new file mode 100644 index 0000000..6dfbb66 --- /dev/null +++ b/hosts/ami/nginx.nix @@ -0,0 +1,10 @@ +{ + services.nginx = { + enable = true; + + recommendedGzipSettings = true; + recommendedOptimisation = true; + recommendedProxySettings = true; + recommendedTlsSettings = true; + }; +} diff --git a/hosts/ami/website.nix b/hosts/ami/website.nix index b5bb3fb..46dbd15 100644 --- a/hosts/ami/website.nix +++ b/hosts/ami/website.nix @@ -2,13 +2,6 @@ networking.firewall.allowedTCPPorts = [80 443]; services.nginx = { - enable = true; - - recommendedGzipSettings = true; - recommendedOptimisation = true; - recommendedProxySettings = true; - recommendedTlsSettings = true; - virtualHosts."buffet.sh" = { useACMEHost = "buffet.sh"; forceSSL = true; -- 2.46.0