Skip to content

Commit

Permalink
treewide: apply nix fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
linyinfeng committed Dec 7, 2024
1 parent 84cd63f commit fa34d29
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 47 deletions.
5 changes: 2 additions & 3 deletions home-manager/profiles/niri/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@ lib.mkMerge [
dwt = true; # disable touchpad while typing
dwtp = true; # disable touchpad while the trackpoint is in use
};
mouse =
{
};
mouse = {
};
warp-mouse-to-focus = true;
focus-follows-mouse = {
enable = true;
Expand Down
10 changes: 4 additions & 6 deletions nixos/modules/networking/fw-proxy/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -641,12 +641,10 @@ with lib;
jump filter
${
lib.concatMapStringsSep "\n" (
level:
"meta l4proto { tcp, udp } socket cgroupv2 level ${toString level} @cgroups meta mark set ${toString cfg.tproxy.fwmark}"
) (lib.range 1 cfg.tproxy.maxCgroupLevel)
}
${lib.concatMapStringsSep "\n" (
level:
"meta l4proto { tcp, udp } socket cgroupv2 level ${toString level} @cgroups meta mark set ${toString cfg.tproxy.fwmark}"
) (lib.range 1 cfg.tproxy.maxCgroupLevel)}
}
chain filter {
Expand Down
46 changes: 20 additions & 26 deletions nixos/modules/networking/mesh/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -330,26 +330,22 @@ in
}
filter filter_mesh_kernel_v4 {
if source = RTS_STATIC then reject;
${
lib.concatMapStringsSep "\n " (
cidr:
"if net ~ [ ${cidr.prefix}+ ] then krt_prefsrc = ${
cfg.thisHost.cidrs.${cidr.name}.preferredAddress
};"
) (lib.attrValues cfg.cidrsV4)
}
${lib.concatMapStringsSep "\n " (
cidr:
"if net ~ [ ${cidr.prefix}+ ] then krt_prefsrc = ${
cfg.thisHost.cidrs.${cidr.name}.preferredAddress
};"
) (lib.attrValues cfg.cidrsV4)}
accept;
}
filter filter_mesh_kernel_v6 {
if source = RTS_STATIC then reject;
${
lib.concatMapStringsSep "\n " (
cidr:
"if net ~ [ ${cidr.prefix}+ ] then krt_prefsrc = ${
cfg.thisHost.cidrs.${cidr.name}.preferredAddress
};"
) (lib.attrValues cfg.cidrsV6)
}
${lib.concatMapStringsSep "\n " (
cidr:
"if net ~ [ ${cidr.prefix}+ ] then krt_prefsrc = ${
cfg.thisHost.cidrs.${cidr.name}.preferredAddress
};"
) (lib.attrValues cfg.cidrsV6)}
accept;
}
protocol kernel kernel_mesh_v4 {
Expand Down Expand Up @@ -384,16 +380,14 @@ in
type tunnel;
${cfg.bird.babelInterfaceConfig}
};
${
lib.concatStringsSep "\n" (
lib.mapAttrsToList (pattern: ifCfg: ''
interface "${pattern}" {
type ${ifCfg.type};
${ifCfg.extraConfig}
};
'') cfg.extraInterfaces
)
}
${lib.concatStringsSep "\n" (
lib.mapAttrsToList (pattern: ifCfg: ''
interface "${pattern}" {
type ${ifCfg.type};
${ifCfg.extraConfig}
};
'') cfg.extraInterfaces
)}
}
'';
networking.firewall.allowedUDPPorts = [ config.ports.babel ];
Expand Down
4 changes: 1 addition & 3 deletions nixos/profiles/boot/kernel/intel.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ in
let
source = pkgs.nur.repos.linyinfeng.sources."linux-intel-${cfg.type}";
intelVersion = source.version;
version =
lib.elemAt (lib.strings.match "${cfg.type}-v([0-9\\.]+)-linux-([0-9]+T[0-9]+Z)" intelVersion)
0;
version = lib.elemAt (lib.strings.match "${cfg.type}-v([0-9\\.]+)-linux-([0-9]+T[0-9]+Z)" intelVersion) 0;
major = lib.versions.major version;
minor = lib.versions.minor version;
linux_intel_fn =
Expand Down
11 changes: 6 additions & 5 deletions nixos/profiles/graphical/gnome/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,13 @@ lib.mkIf config.services.xserver.desktopManager.gnome.enable {
inherit (ownerOptions) user group;
};
};
"${config.users.users.gnome-remote-desktop.home}/.local/share/gnome-remote-desktop/credentials.ini" = {
"L+" = {
argument = config.sops.templates."gnome-remote-desktop-credentials".path;
inherit (ownerOptions) user group;
"${config.users.users.gnome-remote-desktop.home}/.local/share/gnome-remote-desktop/credentials.ini" =
{
"L+" = {
argument = config.sops.templates."gnome-remote-desktop-credentials".path;
inherit (ownerOptions) user group;
};
};
};
"${config.users.users.gnome-remote-desktop.home}/.local/share/gnome-remote-desktop/grd.conf" = {
"L+" = {
argument = toString (
Expand Down
9 changes: 6 additions & 3 deletions nixos/profiles/services/prebuilt-zip/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@ in
};
security.acme.certs."prebuilt-zip" = {
domain = "prebuilt.zip";
extraDomainNames = [
"*.prebuilt.zip"
] ++ lib.lists.map (n: "*.${toString n}.prebuilt.zip") (lib.range 0 9) ++ explicitRickRolls;
extraDomainNames =
[
"*.prebuilt.zip"
]
++ lib.lists.map (n: "*.${toString n}.prebuilt.zip") (lib.range 0 9)
++ explicitRickRolls;
};
}
3 changes: 2 additions & 1 deletion nixos/profiles/services/transmission/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ in
services.nginx.virtualHosts."transmission.*" = {
forceSSL = true;
inherit (config.security.acme.tfCerts."li7g_com".nginxSettings) sslCertificate sslCertificateKey;
locations."/transmission".proxyPass = "http://localhost:${toString config.services.transmission.settings.rpc-port}";
locations."/transmission".proxyPass =
"http://localhost:${toString config.services.transmission.settings.rpc-port}";
locations."/files/" = {
alias = "/var/lib/transmission/Downloads/";
extraConfig = ''
Expand Down

0 comments on commit fa34d29

Please sign in to comment.