format: format modules directory

This commit is contained in:
Nydragon 2024-05-16 04:13:42 +09:00
parent 8d68ec84f5
commit d1b0c7fab6
No known key found for this signature in database
GPG key ID: 14AA30A865EA1209
7 changed files with 64 additions and 26 deletions

View file

@ -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
];
} }

View file

@ -1,6 +1,8 @@
{ pkgs, config, lib, ... }: { ... }:
let locale = "en_GB.UTF-8"; let
in { locale = "en_GB.UTF-8";
in
{
i18n.defaultLocale = locale; i18n.defaultLocale = locale;
i18n.extraLocaleSettings = { i18n.extraLocaleSettings = {

View file

@ -1,18 +1,23 @@
{ pkgs, config, lib, ... }: { { ... }:
{
networking.firewall = { networking.firewall = {
enable = true; enable = true;
# Open ports in the firewall. # Open ports in the firewall.
allowedTCPPorts = [ ]; allowedTCPPorts = [ ];
allowedUDPPorts = [ 51820 ]; allowedUDPPorts = [ 51820 ];
allowedTCPPortRanges = [{ allowedTCPPortRanges = [
from = 1714; {
to = 1764; from = 1714;
}]; to = 1764;
allowedUDPPortRanges = [{ }
from = 1714; ];
to = 1764; allowedUDPPortRanges = [
}]; {
from = 1714;
to = 1764;
}
];
# if packets are still dropped, they will show up in dmesg # if packets are still dropped, they will show up in dmesg
logReversePathDrops = true; logReversePathDrops = true;
@ -26,5 +31,4 @@
ip46tables -t mangle -D nixos-fw-rpfilter -p udp -m udp --dport 51820 -j RETURN || true ip46tables -t mangle -D nixos-fw-rpfilter -p udp -m udp --dport 51820 -j RETURN || true
''; '';
}; };
} }

View file

@ -1,10 +1,14 @@
{ pkgs, config, lib, ... }: { { ... }:
{
nix = { nix = {
gc = { gc = {
automatic = true; automatic = true;
dates = "weekly"; dates = "weekly";
options = "--delete-older-than 20d"; options = "--delete-older-than 20d";
}; };
settings.experimental-features = [ "nix-command" "flakes" ]; settings.experimental-features = [
"nix-command"
"flakes"
];
}; };
} }

View file

@ -1,5 +1,6 @@
# Reference https://discourse.nixos.org/t/declare-firefox-extensions-and-settings/36265 # Reference https://discourse.nixos.org/t/declare-firefox-extensions-and-settings/36265
{ pkgs, config, lib, ... }: { { ... }:
{
programs.firefox = { programs.firefox = {
enable = true; enable = true;
preferencesStatus = "locked"; preferencesStatus = "locked";
@ -29,13 +30,11 @@
# Check about:support for extension/add-on ID strings. # Check about:support for extension/add-on ID strings.
ExtensionSettings = { ExtensionSettings = {
"uBlock0@raymondhill.net" = { "uBlock0@raymondhill.net" = {
install_url = install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
"https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
installation_mode = "normal_install"; installation_mode = "normal_install";
}; };
"firefox-translations-addon@mozilla.org" = { "firefox-translations-addon@mozilla.org" = {
install_url = install_url = "https://addons.mozilla.org/firefox/downloads/latest/firefox-translations/latest.xpi";
"https://addons.mozilla.org/firefox/downloads/latest/firefox-translations/latest.xpi";
installation_mode = "normal_install"; installation_mode = "normal_install";
}; };
}; };
@ -66,9 +65,15 @@
SearchBar = "unified"; SearchBar = "unified";
ShowHomeButton = false; ShowHomeButton = false;
Permissions = { Permissions = {
Location = { BlockNewRequests = true; }; Location = {
VirtualReality = { BlockNewRequests = true; }; BlockNewRequests = true;
Notifications = { BlockNewRequests = true; }; };
VirtualReality = {
BlockNewRequests = true;
};
Notifications = {
BlockNewRequests = true;
};
}; };
FirefoxSuggest = { FirefoxSuggest = {
WebSuggestions = false; WebSuggestions = false;
@ -84,7 +89,6 @@
Fingerprinting = true; Fingerprinting = true;
EmailTracking = true; EmailTracking = true;
}; };
}; };
}; };
} }

17
modules/programs/sway.nix Normal file
View file

@ -0,0 +1,17 @@
{ pkgs, ... }:
{
programs.sway = {
enable = true;
wrapperFeatures.gtk = true;
extraPackages = with pkgs; [
waybar
grim
slurp
wl-clipboard
swaynotificationcenter
swaybg
swaylock
swayidle
];
};
}

0
modules/system/mime.nix Normal file
View file