From bd3e18169f17dd527e7d581810518c34c4a03585 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20Schwarz=C3=A4ugl?= Date: Tue, 7 Jan 2025 17:55:34 +0100 Subject: [PATCH] fix: minor fixes sync: nftables force disabled default wallpaper remove non-existent darwin import --- SwarselSystems.org | 31 +++++--------------------- hosts/nixos/sync/default.nix | 3 ++- modules/nixos/wallpaper.nix | 4 ++-- profiles/darwin/nixos/default.nix | 8 +------ profiles/nixos/common/impermanence.nix | 2 +- profiles/nixos/common/safeeyes.nix | 4 ---- 6 files changed, 12 insertions(+), 40 deletions(-) delete mode 100644 profiles/nixos/common/safeeyes.nix diff --git a/SwarselSystems.org b/SwarselSystems.org index bfe4e15..b887b77 100644 --- a/SwarselSystems.org +++ b/SwarselSystems.org @@ -1443,8 +1443,8 @@ This machine mainly acts as an external sync helper. It manages the following th in { imports = [ - inputs.sops-nix.nixosModules.sops + "${profilesPath}/nixos/server" ./hardware-configuration.nix @@ -1487,6 +1487,7 @@ This machine mainly acts as an external sync helper. It manages the following th zramSwap.enable = false; networking = { + nftables.enable = lib.mkForce false; firewall.allowedTCPPorts = [ 8384 22000 ]; firewall.allowedUDPPorts = [ 21027 22000 ]; hostName = "sync"; @@ -3729,12 +3730,12 @@ lib.swarselsystems.mkModules moduleNames "nixos" This lets me set the wallpaper that I want to use. Duplicated with home-manager options because mixing system and user level configuration is not a good idea. #+begin_src nix :tangle modules/nixos/wallpaper.nix - { lib, ... }: + { self, lib, ... }: { options.swarselsystems.wallpaper = lib.mkOption { type = lib.types.path; - default = ""; + default = "${self}/wallpaper/lenovowp.png"; }; } @@ -5799,7 +5800,7 @@ Normally, doing that also resets the lecture that happens on the first use of =s # So if it doesn't run, the btrfs system effectively acts like a normal system # Taken from https://github.com/NotAShelf/nyx/blob/2a8273ed3f11a4b4ca027a68405d9eb35eba567b/modules/core/common/system/impermanence/default.nix - boot.initrd.systemd.enable = true; + boot.initrd.systemd.enable = lib.mkIf config.swarselsystems.isImpermanence true; boot.initrd.systemd.services.rollback = lib.mkIf config.swarselsystems.isImpermanence { description = "Rollback BTRFS root subvolume to a pristine state"; @@ -5976,20 +5977,6 @@ This allows me to use screen sharing on Wayland. The implementation is a bit cru } #+end_src -**** safeeyes -:PROPERTIES: -:CUSTOM_ID: h:d33c93f5-0ac8-44e5-8756-02dc0e6975e4 -:END: - -A friend of mine used this service and I used to make fun of him. But I have to admit this is actually a nice program. It forces you to look away from the screen from time to time, reducing eye strain. - -#+begin_src nix :tangle profiles/nixos/common/safeeyes.nix - _: - { - services.safeeyes.enable = true; - } -#+end_src - **** Podmam (distrobox) :PROPERTIES: :CUSTOM_ID: h:1bef3914-a258-4585-b232-e0fbe9e7a9b5 @@ -7845,14 +7832,8 @@ It serves both a Greader API at https://signpost.swarsel.win/api/greader.php, as This section sets up all the imports that are used in the home-manager section. #+begin_src nix :tangle profiles/darwin/nixos/default.nix - { self, ... }: - let - profilesPath = "${self}/profiles"; - in + _: { - imports = [ - "${profilesPath}/nixos/home-manager.nix" - ]; nix.settings.experimental-features = "nix-command flakes"; nixpkgs = { diff --git a/hosts/nixos/sync/default.nix b/hosts/nixos/sync/default.nix index 2cc03a2..976181e 100644 --- a/hosts/nixos/sync/default.nix +++ b/hosts/nixos/sync/default.nix @@ -4,8 +4,8 @@ let in { imports = [ - inputs.sops-nix.nixosModules.sops + "${profilesPath}/nixos/server" ./hardware-configuration.nix @@ -48,6 +48,7 @@ in zramSwap.enable = false; networking = { + nftables.enable = lib.mkForce false; firewall.allowedTCPPorts = [ 8384 22000 ]; firewall.allowedUDPPorts = [ 21027 22000 ]; hostName = "sync"; diff --git a/modules/nixos/wallpaper.nix b/modules/nixos/wallpaper.nix index 2f44756..719b48f 100644 --- a/modules/nixos/wallpaper.nix +++ b/modules/nixos/wallpaper.nix @@ -1,8 +1,8 @@ -{ lib, ... }: +{ self, lib, ... }: { options.swarselsystems.wallpaper = lib.mkOption { type = lib.types.path; - default = ""; + default = "${self}/wallpaper/lenovowp.png"; }; } diff --git a/profiles/darwin/nixos/default.nix b/profiles/darwin/nixos/default.nix index 67256c9..ebd2e20 100644 --- a/profiles/darwin/nixos/default.nix +++ b/profiles/darwin/nixos/default.nix @@ -1,11 +1,5 @@ -{ self, ... }: -let - profilesPath = "${self}/profiles"; -in +_: { - imports = [ - "${profilesPath}/nixos/home-manager.nix" - ]; nix.settings.experimental-features = "nix-command flakes"; nixpkgs = { diff --git a/profiles/nixos/common/impermanence.nix b/profiles/nixos/common/impermanence.nix index d4b595a..7e3b631 100644 --- a/profiles/nixos/common/impermanence.nix +++ b/profiles/nixos/common/impermanence.nix @@ -13,7 +13,7 @@ in # So if it doesn't run, the btrfs system effectively acts like a normal system # Taken from https://github.com/NotAShelf/nyx/blob/2a8273ed3f11a4b4ca027a68405d9eb35eba567b/modules/core/common/system/impermanence/default.nix - boot.initrd.systemd.enable = true; + boot.initrd.systemd.enable = lib.mkIf config.swarselsystems.isImpermanence true; boot.initrd.systemd.services.rollback = lib.mkIf config.swarselsystems.isImpermanence { description = "Rollback BTRFS root subvolume to a pristine state"; diff --git a/profiles/nixos/common/safeeyes.nix b/profiles/nixos/common/safeeyes.nix deleted file mode 100644 index 5c5959d..0000000 --- a/profiles/nixos/common/safeeyes.nix +++ /dev/null @@ -1,4 +0,0 @@ -_: -{ - services.safeeyes.enable = true; -}