diff --git a/modules/default.nix b/modules/default.nix index 44e5e4e..c6e46b3 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -1,3 +1,10 @@ -{ pkgs, config, lib, ... }: { - imports = [ ./locale.nix ./networking.nix ./nix ./programs/firefox.nix ]; +{ ... }: +{ + imports = [ + ./locale.nix + ./networking.nix + ./nix + ./programs/firefox.nix + ./programs/sway.nix + ]; } diff --git a/modules/locale.nix b/modules/locale.nix index 0bc7950..7c4a359 100644 --- a/modules/locale.nix +++ b/modules/locale.nix @@ -1,6 +1,8 @@ -{ pkgs, config, lib, ... }: -let locale = "en_GB.UTF-8"; -in { +{ ... }: +let + locale = "en_GB.UTF-8"; +in +{ i18n.defaultLocale = locale; i18n.extraLocaleSettings = { diff --git a/modules/networking.nix b/modules/networking.nix index 716e2bf..fe43004 100644 --- a/modules/networking.nix +++ b/modules/networking.nix @@ -1,18 +1,23 @@ -{ pkgs, config, lib, ... }: { +{ ... }: +{ networking.firewall = { enable = true; # Open ports in the firewall. allowedTCPPorts = [ ]; allowedUDPPorts = [ 51820 ]; - allowedTCPPortRanges = [{ - from = 1714; - to = 1764; - }]; - allowedUDPPortRanges = [{ - from = 1714; - to = 1764; - }]; + allowedTCPPortRanges = [ + { + from = 1714; + to = 1764; + } + ]; + allowedUDPPortRanges = [ + { + from = 1714; + to = 1764; + } + ]; # if packets are still dropped, they will show up in dmesg logReversePathDrops = true; @@ -26,5 +31,4 @@ ip46tables -t mangle -D nixos-fw-rpfilter -p udp -m udp --dport 51820 -j RETURN || true ''; }; - } diff --git a/modules/nix/default.nix b/modules/nix/default.nix index 70d0c32..e8b8002 100644 --- a/modules/nix/default.nix +++ b/modules/nix/default.nix @@ -1,10 +1,14 @@ -{ pkgs, config, lib, ... }: { +{ ... }: +{ nix = { gc = { automatic = true; dates = "weekly"; options = "--delete-older-than 20d"; }; - settings.experimental-features = [ "nix-command" "flakes" ]; + settings.experimental-features = [ + "nix-command" + "flakes" + ]; }; } diff --git a/modules/programs/firefox.nix b/modules/programs/firefox.nix index f3e1dc5..0c1b2a5 100644 --- a/modules/programs/firefox.nix +++ b/modules/programs/firefox.nix @@ -1,5 +1,6 @@ # Reference https://discourse.nixos.org/t/declare-firefox-extensions-and-settings/36265 -{ pkgs, config, lib, ... }: { +{ ... }: +{ programs.firefox = { enable = true; preferencesStatus = "locked"; @@ -29,13 +30,11 @@ # Check about:support for extension/add-on ID strings. ExtensionSettings = { "uBlock0@raymondhill.net" = { - install_url = - "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi"; + install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi"; installation_mode = "normal_install"; }; "firefox-translations-addon@mozilla.org" = { - install_url = - "https://addons.mozilla.org/firefox/downloads/latest/firefox-translations/latest.xpi"; + install_url = "https://addons.mozilla.org/firefox/downloads/latest/firefox-translations/latest.xpi"; installation_mode = "normal_install"; }; }; @@ -66,9 +65,15 @@ SearchBar = "unified"; ShowHomeButton = false; Permissions = { - Location = { BlockNewRequests = true; }; - VirtualReality = { BlockNewRequests = true; }; - Notifications = { BlockNewRequests = true; }; + Location = { + BlockNewRequests = true; + }; + VirtualReality = { + BlockNewRequests = true; + }; + Notifications = { + BlockNewRequests = true; + }; }; FirefoxSuggest = { WebSuggestions = false; @@ -84,7 +89,6 @@ Fingerprinting = true; EmailTracking = true; }; - }; }; } diff --git a/modules/programs/sway.nix b/modules/programs/sway.nix new file mode 100644 index 0000000..6f0aafb --- /dev/null +++ b/modules/programs/sway.nix @@ -0,0 +1,17 @@ +{ pkgs, ... }: +{ + programs.sway = { + enable = true; + wrapperFeatures.gtk = true; + extraPackages = with pkgs; [ + waybar + grim + slurp + wl-clipboard + swaynotificationcenter + swaybg + swaylock + swayidle + ]; + }; +} diff --git a/modules/system/mime.nix b/modules/system/mime.nix new file mode 100644 index 0000000..e69de29