Skip to content

Commit

Permalink
fix: minor fixes
Browse files Browse the repository at this point in the history
sync: nftables force disabled
default wallpaper
remove non-existent darwin import
  • Loading branch information
Swarsel committed Jan 7, 2025
1 parent 0f8051c commit bd3e181
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 40 deletions.
31 changes: 6 additions & 25 deletions SwarselSystems.org
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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";
Expand Down Expand Up @@ -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";
};
}

Expand Down Expand Up @@ -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";
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 = {
Expand Down
3 changes: 2 additions & 1 deletion hosts/nixos/sync/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ let
in
{
imports = [

inputs.sops-nix.nixosModules.sops

"${profilesPath}/nixos/server"
./hardware-configuration.nix

Expand Down Expand Up @@ -48,6 +48,7 @@ in
zramSwap.enable = false;

networking = {
nftables.enable = lib.mkForce false;
firewall.allowedTCPPorts = [ 8384 22000 ];
firewall.allowedUDPPorts = [ 21027 22000 ];
hostName = "sync";
Expand Down
4 changes: 2 additions & 2 deletions modules/nixos/wallpaper.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{ lib, ... }:
{ self, lib, ... }:

{
options.swarselsystems.wallpaper = lib.mkOption {
type = lib.types.path;
default = "";
default = "${self}/wallpaper/lenovowp.png";
};
}
8 changes: 1 addition & 7 deletions profiles/darwin/nixos/default.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
{ self, ... }:
let
profilesPath = "${self}/profiles";
in
_:
{
imports = [
"${profilesPath}/nixos/home-manager.nix"
];

nix.settings.experimental-features = "nix-command flakes";
nixpkgs = {
Expand Down
2 changes: 1 addition & 1 deletion profiles/nixos/common/impermanence.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
4 changes: 0 additions & 4 deletions profiles/nixos/common/safeeyes.nix

This file was deleted.

0 comments on commit bd3e181

Please sign in to comment.