From 09b862349f41886485fd3ab3c6a5940587876dd0 Mon Sep 17 00:00:00 2001 From: jacekpoz Date: Tue, 16 Jul 2024 00:26:09 +0200 Subject: [PATCH] major cleanup --- hosts/chmura/default.nix | 2 +- hosts/chmura/profile.nix | 2 +- hosts/chmura/programs.nix | 1 - hosts/chmura/services/default.nix | 2 +- hosts/chmura/services/freshrss.nix | 2 +- hosts/chmura/services/grafana.nix | 2 +- hosts/chmura/services/i2pd.nix | 2 +- hosts/chmura/services/ntfy-sh.nix | 2 +- hosts/chmura/services/restic.nix | 2 +- hosts/chmura/services/stalwart.nix | 2 +- hosts/chmura/services/sudo-parental-control.nix | 11 +++++++---- hosts/chmura/services/transmission.nix | 2 +- hosts/chmura/system.nix | 2 +- hosts/chmura/trollface.pl/default.nix | 2 +- hosts/del/default.nix | 2 +- hosts/del/git.nix | 2 +- hosts/del/profile.nix | 2 +- hosts/del/quickshell/default.nix | 2 +- hosts/del/ssh.nix | 2 +- hosts/del/system.nix | 2 +- hosts/niks/default.nix | 2 +- hosts/niks/git.nix | 2 +- hosts/niks/profile.nix | 2 +- hosts/niks/quickshell/default.nix | 2 +- hosts/niks/restic.nix | 2 +- hosts/niks/ssh.nix | 2 +- hosts/niks/system.nix | 2 +- modules/cli/default.nix | 2 +- modules/default.nix | 3 +-- modules/gui/default.nix | 2 +- modules/gui/foot.nix | 1 + modules/gui/gtklock.nix | 1 - modules/gui/hypr/default.nix | 2 +- modules/gui/swaylock.nix | 1 - modules/other/default.nix | 2 +- modules/other/xdg.nix | 1 - modules/services/default.nix | 2 +- modules/tui/default.nix | 2 +- options/boot/systemd-boot.nix | 2 +- options/common/binary-caches.nix | 2 +- options/common/cpu/amd.nix | 2 +- options/common/cpu/intel.nix | 2 +- options/common/disable-nano.nix | 2 +- options/common/disk.nix | 2 +- options/common/libvirt.nix | 1 - options/common/oomd.nix | 2 +- options/common/timezone.nix | 2 +- options/desktop/asusd.nix | 2 +- options/desktop/bluetooth.nix | 2 +- options/desktop/dev/malloc-perturb.nix | 2 +- options/desktop/opentabletdriver.nix | 2 +- options/desktop/random-mac.nix | 2 +- options/desktop/waydroid.nix | 2 +- options/desktop/wayland.nix | 2 +- 54 files changed, 55 insertions(+), 57 deletions(-) diff --git a/hosts/chmura/default.nix b/hosts/chmura/default.nix index 89c0034..74a0c8c 100644 --- a/hosts/chmura/default.nix +++ b/hosts/chmura/default.nix @@ -1,4 +1,4 @@ -_: { +{ imports = [ ./services ./trollface.pl diff --git a/hosts/chmura/profile.nix b/hosts/chmura/profile.nix index 1bdbf60..1c55bae 100644 --- a/hosts/chmura/profile.nix +++ b/hosts/chmura/profile.nix @@ -1,4 +1,4 @@ -_: { +{ imports = [ ../../options/boot/systemd-boot.nix ../../options/common/binary-caches.nix diff --git a/hosts/chmura/programs.nix b/hosts/chmura/programs.nix index a949697..f1f1c4a 100644 --- a/hosts/chmura/programs.nix +++ b/hosts/chmura/programs.nix @@ -45,4 +45,3 @@ in { ]; }; } - diff --git a/hosts/chmura/services/default.nix b/hosts/chmura/services/default.nix index d31651e..26e1558 100644 --- a/hosts/chmura/services/default.nix +++ b/hosts/chmura/services/default.nix @@ -1,4 +1,4 @@ -_: { +{ imports = [ ./anki-sync-server.nix ./conduit.nix diff --git a/hosts/chmura/services/freshrss.nix b/hosts/chmura/services/freshrss.nix index 020033c..69ef61b 100644 --- a/hosts/chmura/services/freshrss.nix +++ b/hosts/chmura/services/freshrss.nix @@ -1,4 +1,4 @@ -_: { +{ services.freshrss = { enable = true; baseUrl = "http://f.jacekpoz.pl"; diff --git a/hosts/chmura/services/grafana.nix b/hosts/chmura/services/grafana.nix index 71bdd79..7580e43 100644 --- a/hosts/chmura/services/grafana.nix +++ b/hosts/chmura/services/grafana.nix @@ -1,4 +1,4 @@ -_: { +{ services.grafana = { enable = true; settings.server = { diff --git a/hosts/chmura/services/i2pd.nix b/hosts/chmura/services/i2pd.nix index 6a3dea3..ff3050b 100644 --- a/hosts/chmura/services/i2pd.nix +++ b/hosts/chmura/services/i2pd.nix @@ -1,4 +1,4 @@ -_: { +{ services.i2pd = { enable = true; ifname = "enp6s0"; diff --git a/hosts/chmura/services/ntfy-sh.nix b/hosts/chmura/services/ntfy-sh.nix index f21c669..9b7e052 100644 --- a/hosts/chmura/services/ntfy-sh.nix +++ b/hosts/chmura/services/ntfy-sh.nix @@ -1,4 +1,4 @@ -_: { +{ services.ntfy-sh = { enable = true; settings = { diff --git a/hosts/chmura/services/restic.nix b/hosts/chmura/services/restic.nix index f5dfea0..d6c7b9f 100644 --- a/hosts/chmura/services/restic.nix +++ b/hosts/chmura/services/restic.nix @@ -1,4 +1,4 @@ -_: { +{ services.restic = { server = { enable = true; diff --git a/hosts/chmura/services/stalwart.nix b/hosts/chmura/services/stalwart.nix index 771395f..4d3a750 100644 --- a/hosts/chmura/services/stalwart.nix +++ b/hosts/chmura/services/stalwart.nix @@ -1,4 +1,4 @@ -_: { +{ users.users.stalwart = { isSystemUser = true; group = "stalwart"; diff --git a/hosts/chmura/services/sudo-parental-control.nix b/hosts/chmura/services/sudo-parental-control.nix index 89e1af9..c50c64a 100644 --- a/hosts/chmura/services/sudo-parental-control.nix +++ b/hosts/chmura/services/sudo-parental-control.nix @@ -1,5 +1,8 @@ -_: { - services.caddy.virtualHosts."sudo-parental-control.jacekpoz.pl".extraConfig = '' - reverse_proxy localhost:8000 - ''; +{ + services.caddy = { + enable = true; + virtualHosts."sudo-parental-control.jacekpoz.pl".extraConfig = '' + reverse_proxy localhost:8000 + ''; + }; } diff --git a/hosts/chmura/services/transmission.nix b/hosts/chmura/services/transmission.nix index ffd6a72..c9b101e 100644 --- a/hosts/chmura/services/transmission.nix +++ b/hosts/chmura/services/transmission.nix @@ -1,4 +1,4 @@ -_: { +{ services.transmission = { enable = true; home = "/media/Torrent"; diff --git a/hosts/chmura/system.nix b/hosts/chmura/system.nix index 4099a52..3fb8d28 100644 --- a/hosts/chmura/system.nix +++ b/hosts/chmura/system.nix @@ -1,4 +1,4 @@ -_: { +{ myOptions.other.system = { hostname = "chmura"; username = "chmura"; diff --git a/hosts/chmura/trollface.pl/default.nix b/hosts/chmura/trollface.pl/default.nix index cbe96c2..7bfbc64 100644 --- a/hosts/chmura/trollface.pl/default.nix +++ b/hosts/chmura/trollface.pl/default.nix @@ -1,4 +1,4 @@ -_ : { +{ services.caddy = { enable = true; virtualHosts."trollface.pl".extraConfig = '' diff --git a/hosts/del/default.nix b/hosts/del/default.nix index 20bb82a..bbcca3b 100644 --- a/hosts/del/default.nix +++ b/hosts/del/default.nix @@ -1,4 +1,4 @@ -_: { +{ imports = [ ./quickshell ./configuration.nix diff --git a/hosts/del/git.nix b/hosts/del/git.nix index a008573..309782b 100644 --- a/hosts/del/git.nix +++ b/hosts/del/git.nix @@ -1,4 +1,4 @@ -_: { +{ myOptions.programs.git = { enable = true; userName = "jacekpoz"; diff --git a/hosts/del/profile.nix b/hosts/del/profile.nix index 48fc0ed..197df47 100644 --- a/hosts/del/profile.nix +++ b/hosts/del/profile.nix @@ -1,4 +1,4 @@ -_: { +{ imports = [ ../../options/boot/systemd-boot.nix ../../options/common/binary-caches.nix diff --git a/hosts/del/quickshell/default.nix b/hosts/del/quickshell/default.nix index 1e1c598..8216627 100644 --- a/hosts/del/quickshell/default.nix +++ b/hosts/del/quickshell/default.nix @@ -1,4 +1,4 @@ -_: { +{ myOptions.programs.quickshell = { enable = true; enabledConfigs = [ diff --git a/hosts/del/ssh.nix b/hosts/del/ssh.nix index d617fc1..813d037 100644 --- a/hosts/del/ssh.nix +++ b/hosts/del/ssh.nix @@ -1,4 +1,4 @@ -_: { +{ myOptions.services.ssh = { daemon.enable = false; agent = { diff --git a/hosts/del/system.nix b/hosts/del/system.nix index d0813ca..a928bc7 100644 --- a/hosts/del/system.nix +++ b/hosts/del/system.nix @@ -1,4 +1,4 @@ -_: { +{ myOptions.other = { system = { hostname = "niks"; diff --git a/hosts/niks/default.nix b/hosts/niks/default.nix index a79c062..5d10392 100644 --- a/hosts/niks/default.nix +++ b/hosts/niks/default.nix @@ -1,4 +1,4 @@ -_: { +{ imports = [ ./quickshell ./configuration.nix diff --git a/hosts/niks/git.nix b/hosts/niks/git.nix index a008573..309782b 100644 --- a/hosts/niks/git.nix +++ b/hosts/niks/git.nix @@ -1,4 +1,4 @@ -_: { +{ myOptions.programs.git = { enable = true; userName = "jacekpoz"; diff --git a/hosts/niks/profile.nix b/hosts/niks/profile.nix index 678ba9c..98ba06a 100644 --- a/hosts/niks/profile.nix +++ b/hosts/niks/profile.nix @@ -1,4 +1,4 @@ -_: { +{ imports = [ ../../options/boot/systemd-boot.nix ../../options/common/binary-caches.nix diff --git a/hosts/niks/quickshell/default.nix b/hosts/niks/quickshell/default.nix index a570dd3..b934ff5 100644 --- a/hosts/niks/quickshell/default.nix +++ b/hosts/niks/quickshell/default.nix @@ -1,4 +1,4 @@ -_: { +{ myOptions.programs.quickshell = { enable = true; enabledConfigs = [ diff --git a/hosts/niks/restic.nix b/hosts/niks/restic.nix index 609bdef..805c0d9 100644 --- a/hosts/niks/restic.nix +++ b/hosts/niks/restic.nix @@ -1,4 +1,4 @@ -_: { +{ services.restic.backups = { chmuraBackup = { extraOptions = [ diff --git a/hosts/niks/ssh.nix b/hosts/niks/ssh.nix index d617fc1..813d037 100644 --- a/hosts/niks/ssh.nix +++ b/hosts/niks/ssh.nix @@ -1,4 +1,4 @@ -_: { +{ myOptions.services.ssh = { daemon.enable = false; agent = { diff --git a/hosts/niks/system.nix b/hosts/niks/system.nix index e388b92..d80377e 100644 --- a/hosts/niks/system.nix +++ b/hosts/niks/system.nix @@ -1,4 +1,4 @@ -_: { +{ myOptions.other = { system = { hostname = "niks"; diff --git a/modules/cli/default.nix b/modules/cli/default.nix index 66e7be8..eec5692 100644 --- a/modules/cli/default.nix +++ b/modules/cli/default.nix @@ -1,4 +1,4 @@ -_: { +{ imports = [ ./agenix.nix ./git.nix diff --git a/modules/default.nix b/modules/default.nix index 6083b43..fee4a87 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -1,4 +1,4 @@ -_: { +{ imports = [ ./cli ./gui @@ -7,4 +7,3 @@ _: { ./tui ]; } - diff --git a/modules/gui/default.nix b/modules/gui/default.nix index 7a80c9c..ed9b7cf 100644 --- a/modules/gui/default.nix +++ b/modules/gui/default.nix @@ -1,4 +1,4 @@ -_: { +{ imports = [ ./hypr ./quickshell diff --git a/modules/gui/foot.nix b/modules/gui/foot.nix index a5604b5..888fd56 100644 --- a/modules/gui/foot.nix +++ b/modules/gui/foot.nix @@ -22,6 +22,7 @@ in { environment.sessionVariables = { TERM = "foot"; }; + home-manager.users.${username} = { programs.foot = { enable = true; diff --git a/modules/gui/gtklock.nix b/modules/gui/gtklock.nix index 9e028b0..2f6d0b2 100644 --- a/modules/gui/gtklock.nix +++ b/modules/gui/gtklock.nix @@ -12,7 +12,6 @@ in { options.myOptions.programs.gtklock.enable = mkEnableOption "gtklock"; config = mkIf cfg.enable { - # https://github.com/NixOS/nixpkgs/issues/158025 security.pam.services.gtklock.text = "auth include login"; diff --git a/modules/gui/hypr/default.nix b/modules/gui/hypr/default.nix index 2cf865e..e041a34 100644 --- a/modules/gui/hypr/default.nix +++ b/modules/gui/hypr/default.nix @@ -1,4 +1,4 @@ -_: { +{ imports = [ ./idle.nix ./land.nix diff --git a/modules/gui/swaylock.nix b/modules/gui/swaylock.nix index 5159d95..077caec 100644 --- a/modules/gui/swaylock.nix +++ b/modules/gui/swaylock.nix @@ -13,7 +13,6 @@ in { options.myOptions.programs.swaylock.enable = mkEnableOption "swaylock"; config = mkIf cfg.enable { - # https://github.com/NixOS/nixpkgs/issues/158025 security.pam.services.swaylock.text = "auth include login"; diff --git a/modules/other/default.nix b/modules/other/default.nix index 7b77e8b..62620ee 100644 --- a/modules/other/default.nix +++ b/modules/other/default.nix @@ -1,4 +1,4 @@ -_: { +{ imports = [ ./hardware.nix ./home-manager.nix diff --git a/modules/other/xdg.nix b/modules/other/xdg.nix index 29b6d37..d64fc02 100644 --- a/modules/other/xdg.nix +++ b/modules/other/xdg.nix @@ -5,7 +5,6 @@ inherit (config.myOptions.other.system) username; hmCfg = config.home-manager.users.${username}; in { - environment.sessionVariables = { ANDROID_HOME = "${hmCfg.xdg.dataHome}/android"; CARGO_HOME = "${hmCfg.xdg.dataHome}/cargo"; diff --git a/modules/services/default.nix b/modules/services/default.nix index 68adb96..e452094 100644 --- a/modules/services/default.nix +++ b/modules/services/default.nix @@ -1,4 +1,4 @@ -_: { +{ imports = [ ./dunst.nix ./greetd.nix diff --git a/modules/tui/default.nix b/modules/tui/default.nix index a42abe1..6a68d4a 100644 --- a/modules/tui/default.nix +++ b/modules/tui/default.nix @@ -1,4 +1,4 @@ -_: { +{ imports = [ ./btop.nix ./helix.nix diff --git a/options/boot/systemd-boot.nix b/options/boot/systemd-boot.nix index 06d3e9f..142f75b 100644 --- a/options/boot/systemd-boot.nix +++ b/options/boot/systemd-boot.nix @@ -1,4 +1,4 @@ -_: { +{ boot.loader = { systemd-boot = { enable = true; diff --git a/options/common/binary-caches.nix b/options/common/binary-caches.nix index 1860289..2e70412 100644 --- a/options/common/binary-caches.nix +++ b/options/common/binary-caches.nix @@ -1,4 +1,4 @@ -_: { +{ nix.settings = { substituters = [ "https://nix-community.cachix.org" diff --git a/options/common/cpu/amd.nix b/options/common/cpu/amd.nix index fd8f2a1..ff0826e 100644 --- a/options/common/cpu/amd.nix +++ b/options/common/cpu/amd.nix @@ -1,4 +1,4 @@ -_: { +{ hardware.cpu.amd.updateMicrocode = true; boot.initrd.kernelModules = [ "amdgpu" ]; diff --git a/options/common/cpu/intel.nix b/options/common/cpu/intel.nix index a515750..3bb5d5c 100644 --- a/options/common/cpu/intel.nix +++ b/options/common/cpu/intel.nix @@ -1,3 +1,3 @@ -_: { +{ services.thermald.enable = true; } diff --git a/options/common/disable-nano.nix b/options/common/disable-nano.nix index 8879f34..652d94d 100644 --- a/options/common/disable-nano.nix +++ b/options/common/disable-nano.nix @@ -1,4 +1,4 @@ -_: { +{ # neovim supremacy programs.nano.enable = false; } diff --git a/options/common/disk.nix b/options/common/disk.nix index 074fb69..303dfeb 100644 --- a/options/common/disk.nix +++ b/options/common/disk.nix @@ -1,4 +1,4 @@ -_: { +{ services = { btrfs.autoScrub = { enable = true; diff --git a/options/common/libvirt.nix b/options/common/libvirt.nix index 1ca4b8c..2137bdc 100644 --- a/options/common/libvirt.nix +++ b/options/common/libvirt.nix @@ -19,5 +19,4 @@ users.users.${config.myOptions.other.system.username} = { extraGroups = [ "libvirtd" ]; }; - } diff --git a/options/common/oomd.nix b/options/common/oomd.nix index 64b06d9..bfe6d4a 100644 --- a/options/common/oomd.nix +++ b/options/common/oomd.nix @@ -1,4 +1,4 @@ -_: { +{ systemd.oomd = { enable = true; enableSystemSlice = true; diff --git a/options/common/timezone.nix b/options/common/timezone.nix index ebdf39c..2ba1221 100644 --- a/options/common/timezone.nix +++ b/options/common/timezone.nix @@ -1,3 +1,3 @@ -_: { +{ time.timeZone = "Europe/Warsaw"; } diff --git a/options/desktop/asusd.nix b/options/desktop/asusd.nix index cfaf316..e8b9954 100644 --- a/options/desktop/asusd.nix +++ b/options/desktop/asusd.nix @@ -1,4 +1,4 @@ -_: { +{ services.asusd = { enable = true; enableUserService = true; diff --git a/options/desktop/bluetooth.nix b/options/desktop/bluetooth.nix index 4a59511..ebae0ce 100644 --- a/options/desktop/bluetooth.nix +++ b/options/desktop/bluetooth.nix @@ -1,4 +1,4 @@ -_: { +{ hardware.bluetooth = { enable = true; input.General.ClassicBondedOnly = true; diff --git a/options/desktop/dev/malloc-perturb.nix b/options/desktop/dev/malloc-perturb.nix index f8e4ffb..bbc6d71 100644 --- a/options/desktop/dev/malloc-perturb.nix +++ b/options/desktop/dev/malloc-perturb.nix @@ -1,4 +1,4 @@ -_: { +{ environment.sessionVariables = { MALLOC_PERTURB_ = "$(($(head -200 /dev/urandom | cksum | cut -f1 -d ' ') % 255 + 1))"; }; diff --git a/options/desktop/opentabletdriver.nix b/options/desktop/opentabletdriver.nix index a5dd053..9e21093 100644 --- a/options/desktop/opentabletdriver.nix +++ b/options/desktop/opentabletdriver.nix @@ -1,4 +1,4 @@ -_: { +{ hardware.opentabletdriver = { enable = true; daemon.enable = true; diff --git a/options/desktop/random-mac.nix b/options/desktop/random-mac.nix index 23e77a4..1bcfbb9 100644 --- a/options/desktop/random-mac.nix +++ b/options/desktop/random-mac.nix @@ -1,3 +1,3 @@ -_: { +{ networking.networkmanager.wifi.macAddress = "random"; } diff --git a/options/desktop/waydroid.nix b/options/desktop/waydroid.nix index b340a0e..abc9169 100644 --- a/options/desktop/waydroid.nix +++ b/options/desktop/waydroid.nix @@ -1,3 +1,3 @@ -_: { +{ virtualisation.waydroid.enable = true; } diff --git a/options/desktop/wayland.nix b/options/desktop/wayland.nix index 8eab24a..e6b0449 100644 --- a/options/desktop/wayland.nix +++ b/options/desktop/wayland.nix @@ -1,4 +1,4 @@ -_: { +{ environment.sessionVariables = { NIXOS_OZONE_WL = "1"; };