From 4556170d55e467095427df64969545294aa25404 Mon Sep 17 00:00:00 2001 From: dusk Date: Fri, 25 Jul 2025 21:38:06 +0300 Subject: [PATCH] style(treewide): go my formatter --- flake.nix | 32 ++++++---- hosts/tkaronto/default.nix | 25 ++++---- hosts/wolumonde/default.nix | 3 +- hosts/wolumonde/modules/atproto.nix | 27 ++++----- hosts/wolumonde/modules/blog.nix | 2 +- hosts/wolumonde/modules/headplane.nix | 16 +++-- .../modules/headscale.nix/default.nix | 13 +++- hosts/wolumonde/modules/limbusart.nix | 2 +- hosts/wolumonde/modules/nginx.nix | 4 +- hosts/wolumonde/modules/nsid-tracker.nix | 8 +-- hosts/wolumonde/modules/pds.nix | 59 +++++++++---------- .../wolumonde/modules/perses.nix/default.nix | 23 +++++--- hosts/wolumonde/modules/ssh.nix | 2 +- hosts/wolumonde/modules/tailscale.nix | 3 +- hosts/wolumonde/modules/tangled.nix | 14 +++-- hosts/wolumonde/modules/unbound.nix | 10 ++-- hosts/wsl/default.nix | 3 +- pkgs-set/default.nix | 53 +++++++++-------- pkgs-set/overlays/_lix.nix | 13 ++-- pkgs-set/pkgs/buildGoApplication.nix | 2 +- pkgs-set/pkgs/headplane.nix | 2 +- pkgs-set/pkgs/nsid-tracker-server.nix | 2 +- pkgs-set/pkgs/tangled-knot.nix | 22 +++---- pkgs-set/pkgs/tangled-modules.nix | 2 +- pkgs-set/pkgs/tangled-spindle.nix | 7 ++- pkgs-set/pkgs/tangled-sqlite-lib.nix | 2 +- shells/default.nix | 8 +-- users/dusk@devel.mobi/default.nix | 4 +- users/dusk@devel.mobi/nsid-tracker.nix | 2 +- users/modules/netbird/default.nix | 16 ++++- users/modules/nushell/default.nix | 3 +- users/modules/tailscale/default.nix | 21 +++++-- users/root/default.nix | 4 +- 33 files changed, 237 insertions(+), 172 deletions(-) diff --git a/flake.nix b/flake.nix index 6aaff34..f7be246 100644 --- a/flake.nix +++ b/flake.nix @@ -11,26 +11,34 @@ tlib = import ./lib lib; l = lib; - makePkgsSet = system: import ./pkgs-set { - inherit system lib tlib flakeInputs; - }; + makePkgsSet = + system: + import ./pkgs-set { + inherit + system + lib + tlib + flakeInputs + ; + }; allPkgsSets = tlib.genSystems makePkgsSet; miscApps = l.mapAttrs ( - _: l.mapAttrs (_: cmd: { - type = "app"; - program = cmd; - }) + _: + l.mapAttrs ( + _: cmd: { + type = "app"; + program = cmd; + } + ) ) ( - l.mapAttrs - (_: set: { + l.mapAttrs (_: set: { deploy-ncr = l.getExe set.terra.deploy-ncr; dns = l.getExe set.terra.dnsmngmt; - }) - allPkgsSets + }) allPkgsSets ); in { @@ -38,7 +46,7 @@ nixosConfigurations = import ./hosts { inherit lib tlib allPkgsSets; }; homeConfigurations = import ./users { inherit lib tlib allPkgsSets; }; - legacyPackages = l.mapAttrs (_: set: set.pkgs // {inherit (set) inputs;}) allPkgsSets; + legacyPackages = l.mapAttrs (_: set: set.pkgs // { inherit (set) inputs; }) allPkgsSets; packages = l.mapAttrs (_: set: set.exported) allPkgsSets; apps = miscApps; diff --git a/hosts/tkaronto/default.nix b/hosts/tkaronto/default.nix index ab921d7..c8157cc 100644 --- a/hosts/tkaronto/default.nix +++ b/hosts/tkaronto/default.nix @@ -145,19 +145,18 @@ 4995 ]; # musikcube - networking.firewall.allowedTCPPorts = - [ - 7905 - 7906 - ] - ++ [ - 6695 - 6696 - 6697 - 6698 - 6699 - ] - ++ [ 50300 ]; + networking.firewall.allowedTCPPorts = [ + 7905 + 7906 + ] + ++ [ + 6695 + 6696 + 6697 + 6698 + 6699 + ] + ++ [ 50300 ]; # for tailscale networking.firewall.checkReversePath = "loose"; diff --git a/hosts/wolumonde/default.nix b/hosts/wolumonde/default.nix index e7c15f7..eead0c8 100644 --- a/hosts/wolumonde/default.nix +++ b/hosts/wolumonde/default.nix @@ -10,7 +10,8 @@ "${inputs.agenix}/modules/age.nix" "${inputs.ncr}/firewall" "${inputs.ncr}/firewall/hetzner" - ] ++ (tlib.importFolder (toString ./modules)); + ] + ++ (tlib.importFolder (toString ./modules)); environment.systemPackages = with pkgs; [ magic-wormhole-rs diff --git a/hosts/wolumonde/modules/atproto.nix b/hosts/wolumonde/modules/atproto.nix index 8a23ee1..0971b20 100644 --- a/hosts/wolumonde/modules/atproto.nix +++ b/hosts/wolumonde/modules/atproto.nix @@ -30,19 +30,18 @@ let }; in { - services.nginx.virtualHosts = - { - # "gaze.systems" = mkWellKnownCfg { - # "atproto-did" = pkgs.writeText "server" "did:plc:dfl62fgb7wtjj3fcbb72naae"; - # }; - "poor.dog" = mkWellKnownCfg { - "atproto-did" = pkgs.writeText "server" "did:plc:dfl62fgb7wtjj3fcbb72naae"; - }; - # "9.0.0.0.8.e.f.1.5.0.7.4.0.1.0.0.2.ip6.arpa" = mkWellKnownCfg { - # "atproto-did" = pkgs.writeText "server" "did:plc:dfl62fgb7wtjj3fcbb72naae"; - # }; - } - // (mkDidWebCfg "dawn.gaze.systems") - // (mkDidWebCfg "guestbook.gaze.systems"); + services.nginx.virtualHosts = { + # "gaze.systems" = mkWellKnownCfg { + # "atproto-did" = pkgs.writeText "server" "did:plc:dfl62fgb7wtjj3fcbb72naae"; + # }; + "poor.dog" = mkWellKnownCfg { + "atproto-did" = pkgs.writeText "server" "did:plc:dfl62fgb7wtjj3fcbb72naae"; + }; + # "9.0.0.0.8.e.f.1.5.0.7.4.0.1.0.0.2.ip6.arpa" = mkWellKnownCfg { + # "atproto-did" = pkgs.writeText "server" "did:plc:dfl62fgb7wtjj3fcbb72naae"; + # }; + } + // (mkDidWebCfg "dawn.gaze.systems") + // (mkDidWebCfg "guestbook.gaze.systems"); # // (mkDidWebCfg "9.0.0.0.8.e.f.1.5.0.7.4.0.1.0.0.2.ip6.arpa"); } diff --git a/hosts/wolumonde/modules/blog.nix b/hosts/wolumonde/modules/blog.nix index dec85bf..64243db 100644 --- a/hosts/wolumonde/modules/blog.nix +++ b/hosts/wolumonde/modules/blog.nix @@ -6,7 +6,7 @@ }: let PUBLIC_BASE_URL = "https://gaze.systems"; - modules = (pkgs.callPackage "${inputs.blog}/nix/modules.nix" {}).overrideAttrs (_: { + modules = (pkgs.callPackage "${inputs.blog}/nix/modules.nix" { }).overrideAttrs (_: { outputHash = "sha256-CO0bFv5WbNBSgucHCb+I9kIZEkh6QqWngRra0luMtSI="; }); pkg = pkgs.callPackage "${inputs.blog}/nix" { diff --git a/hosts/wolumonde/modules/headplane.nix b/hosts/wolumonde/modules/headplane.nix index 91cf157..4d124b9 100644 --- a/hosts/wolumonde/modules/headplane.nix +++ b/hosts/wolumonde/modules/headplane.nix @@ -1,6 +1,13 @@ -{lib, config, pkgs, terra, inputs, ...}: +{ + lib, + config, + pkgs, + terra, + inputs, + ... +}: let - format = pkgs.formats.yaml {}; + format = pkgs.formats.yaml { }; # A workaround generate a valid Headscale config accepted by Headplane when `config_strict == true`. settings = lib.recursiveUpdate config.services.headscale.settings { @@ -14,8 +21,9 @@ let headscaleConfig = format.generate "headscale.yml" settings; cfg = config.services.headplane.settings; -in { - imports = ["${inputs.headplane}/nix/module.nix"]; +in +{ + imports = [ "${inputs.headplane}/nix/module.nix" ]; services.headplane = { enable = true; diff --git a/hosts/wolumonde/modules/headscale.nix/default.nix b/hosts/wolumonde/modules/headscale.nix/default.nix index d80985e..7448fff 100644 --- a/hosts/wolumonde/modules/headscale.nix/default.nix +++ b/hosts/wolumonde/modules/headscale.nix/default.nix @@ -1,7 +1,9 @@ -{config, ...}: let +{ config, ... }: +let rootDomain = "gaze.systems"; domain = "vpn.${rootDomain}"; -in { +in +{ age.secrets.headscaleOidcSecret = { file = ../../../../secrets/headscaleOidcSecret.age; mode = "600"; @@ -21,7 +23,12 @@ in { }; dns = { base_domain = "lan.${rootDomain}"; - nameservers.global = ["1.1.1.1" "1.0.0.1" "9.9.9.9" "149.112.112.112"]; + nameservers.global = [ + "1.1.1.1" + "1.0.0.1" + "9.9.9.9" + "149.112.112.112" + ]; }; oidc = { issuer = config.services.pocket-id.settings.APP_URL; diff --git a/hosts/wolumonde/modules/limbusart.nix b/hosts/wolumonde/modules/limbusart.nix index c317f62..2570d78 100644 --- a/hosts/wolumonde/modules/limbusart.nix +++ b/hosts/wolumonde/modules/limbusart.nix @@ -5,7 +5,7 @@ ... }: let - pkg = pkgs.callPackage "${inputs.limbusart}/package.nix" {}; + pkg = pkgs.callPackage "${inputs.limbusart}/package.nix" { }; in { systemd.services.limbusart = { diff --git a/hosts/wolumonde/modules/nginx.nix b/hosts/wolumonde/modules/nginx.nix index 6e236b8..e82d5f7 100644 --- a/hosts/wolumonde/modules/nginx.nix +++ b/hosts/wolumonde/modules/nginx.nix @@ -16,8 +16,8 @@ statusPage = true; }; - networking.firewall.public."http".allowedTCPPorts = [80]; - networking.firewall.public."https".allowedTCPPorts = [443]; + networking.firewall.public."http".allowedTCPPorts = [ 80 ]; + networking.firewall.public."https".allowedTCPPorts = [ 443 ]; # output json logs so we can consume them more easily services.nginx.appendHttpConfig = '' diff --git a/hosts/wolumonde/modules/nsid-tracker.nix b/hosts/wolumonde/modules/nsid-tracker.nix index eb93a12..3f5e4ef 100644 --- a/hosts/wolumonde/modules/nsid-tracker.nix +++ b/hosts/wolumonde/modules/nsid-tracker.nix @@ -6,10 +6,10 @@ }: let client-modules = - (pkgs.callPackage "${inputs.nsid-tracker}/nix/client-modules.nix" {}) - .overrideAttrs (_: { - outputHash = "sha256-TzTafbNTng/mMyf0yR9Rc6XS9/zzipwmK9SUWm2XxeY="; - }); + (pkgs.callPackage "${inputs.nsid-tracker}/nix/client-modules.nix" { }).overrideAttrs + (_: { + outputHash = "sha256-TzTafbNTng/mMyf0yR9Rc6XS9/zzipwmK9SUWm2XxeY="; + }); client = pkgs.callPackage "${inputs.nsid-tracker}/nix/client.nix" { PUBLIC_API_URL = "gaze.systems/nsid-tracker/api"; inherit client-modules; diff --git a/hosts/wolumonde/modules/pds.nix b/hosts/wolumonde/modules/pds.nix index 02a7f42..991222b 100644 --- a/hosts/wolumonde/modules/pds.nix +++ b/hosts/wolumonde/modules/pds.nix @@ -6,36 +6,35 @@ in services.nginx.virtualHosts.${config.services.pds.settings.PDS_HOSTNAME} = { useACMEHost = "gaze.systems"; forceSSL = true; - locations = - { - # we need to proxy /xrpc for pds to work - # silly but i want root domain >:3 - "/xrpc" = { - proxyPass = pdsLocalhost; - proxyWebsockets = true; - # pass ws headers so we can actually proxy the ws - extraConfig = '' - proxy_set_header id $request_id; - client_max_body_size 100M; - ''; - # higher prio just to make sure - priority = 100; - }; - } - # others - // (lib.genAttrs - [ - "/@atproto" - "/oauth" - "=/.well-known/oauth-protected-resource" - "=/.well-known/oauth-authorization-server" - ] - (_: { - proxyPass = pdsLocalhost; - # higher prio just to make sure - priority = 100; - }) - ); + locations = { + # we need to proxy /xrpc for pds to work + # silly but i want root domain >:3 + "/xrpc" = { + proxyPass = pdsLocalhost; + proxyWebsockets = true; + # pass ws headers so we can actually proxy the ws + extraConfig = '' + proxy_set_header id $request_id; + client_max_body_size 100M; + ''; + # higher prio just to make sure + priority = 100; + }; + } + # others + // (lib.genAttrs + [ + "/@atproto" + "/oauth" + "=/.well-known/oauth-protected-resource" + "=/.well-known/oauth-authorization-server" + ] + (_: { + proxyPass = pdsLocalhost; + # higher prio just to make sure + priority = 100; + }) + ); }; # setup pds stuff services.pds = { diff --git a/hosts/wolumonde/modules/perses.nix/default.nix b/hosts/wolumonde/modules/perses.nix/default.nix index af2b13d..f742823 100644 --- a/hosts/wolumonde/modules/perses.nix/default.nix +++ b/hosts/wolumonde/modules/perses.nix/default.nix @@ -1,4 +1,9 @@ -{ pkgs, terra, config, ... }: +{ + pkgs, + terra, + config, + ... +}: let domain = "dash.gaze.systems"; port = 7412; @@ -15,13 +20,15 @@ let security = { enable_auth = true; authentication = { - providers.oidc = [{ - slug_id = "pocketid"; - name = "Pocket ID"; - client_id = "aa583db6-e03c-4490-853a-7f2b3e089fbe"; - issuer = config.services.pocket-id.settings.APP_URL; - scopes = ["openid profile email"]; - }]; + providers.oidc = [ + { + slug_id = "pocketid"; + name = "Pocket ID"; + client_id = "aa583db6-e03c-4490-853a-7f2b3e089fbe"; + issuer = config.services.pocket-id.settings.APP_URL; + scopes = [ "openid profile email" ]; + } + ]; disable_sign_up = true; }; cookie = { diff --git a/hosts/wolumonde/modules/ssh.nix b/hosts/wolumonde/modules/ssh.nix index 0ff2e6f..28516de 100644 --- a/hosts/wolumonde/modules/ssh.nix +++ b/hosts/wolumonde/modules/ssh.nix @@ -8,5 +8,5 @@ users.users.root.openssh.authorizedKeys.keys = [ (builtins.readFile "${inputs.self}/secrets/yusdacra.key.pub") ]; - networking.firewall.public."ssh".allowedTCPPorts = [22]; + networking.firewall.public."ssh".allowedTCPPorts = [ 22 ]; } diff --git a/hosts/wolumonde/modules/tailscale.nix b/hosts/wolumonde/modules/tailscale.nix index b9fa057..e6dcc88 100644 --- a/hosts/wolumonde/modules/tailscale.nix +++ b/hosts/wolumonde/modules/tailscale.nix @@ -1,4 +1,5 @@ -{config, ...}: { +{ config, ... }: +{ age.secrets.tailscaleAuthKey.file = ../../../secrets/tailscaleAuthKey.age; services.tailscale = { diff --git a/hosts/wolumonde/modules/tangled.nix b/hosts/wolumonde/modules/tangled.nix index 882273f..1e29dd4 100644 --- a/hosts/wolumonde/modules/tangled.nix +++ b/hosts/wolumonde/modules/tangled.nix @@ -1,4 +1,10 @@ -{ lib, config, inputs, terra, ... }: +{ + lib, + config, + inputs, + terra, + ... +}: let knotCfg = config.services.tangled-knot; spindleCfg = config.services.tangled-spindle; @@ -46,10 +52,10 @@ in group = "spindle"; isSystemUser = true; }; - users.groups.spindle = {}; - users.groups.podman.members = ["spindle"]; + users.groups.spindle = { }; + users.groups.podman.members = [ "spindle" ]; systemd.services.spindle = { - after = lib.mkForce ["network.target"]; + after = lib.mkForce [ "network.target" ]; serviceConfig = { User = "spindle"; Group = "spindle"; diff --git a/hosts/wolumonde/modules/unbound.nix b/hosts/wolumonde/modules/unbound.nix index 8a0a906..fb8cb14 100644 --- a/hosts/wolumonde/modules/unbound.nix +++ b/hosts/wolumonde/modules/unbound.nix @@ -1,6 +1,8 @@ -{config, lib, ...}: let +{ config, lib, ... }: +let cfg = config.services.unbound.settings; -in { +in +{ services.unbound = { enable = true; enableRootTrustAnchor = false; @@ -47,7 +49,7 @@ in { }; }; networking.firewall = { - allowedTCPPorts = [cfg.server.port]; - allowedUDPPorts = [cfg.server.port]; + allowedTCPPorts = [ cfg.server.port ]; + allowedUDPPorts = [ cfg.server.port ]; }; } diff --git a/hosts/wsl/default.nix b/hosts/wsl/default.nix index 78fb462..96a08f6 100644 --- a/hosts/wsl/default.nix +++ b/hosts/wsl/default.nix @@ -12,7 +12,8 @@ ../../users/firewatch "${inputs.nixos-wsl}/modules" "${inputs.agenix}/modules/age.nix" - ] ++ (tlib.importFolder (toString ./modules)); + ] + ++ (tlib.importFolder (toString ./modules)); wsl.enable = true; wsl.defaultUser = "firewatch"; diff --git a/pkgs-set/default.nix b/pkgs-set/default.nix index 4768bdf..039dfc1 100644 --- a/pkgs-set/default.nix +++ b/pkgs-set/default.nix @@ -14,39 +14,40 @@ let # config.permittedInsecurePackages = ["electron-25.9.0"]; }; _inputs = import ../_sources/generated.nix { - inherit (_pkgs) fetchgit fetchurl fetchFromGitHub dockerTools; + inherit (_pkgs) + fetchgit + fetchurl + fetchFromGitHub + dockerTools + ; }; - inputs = (l.mapAttrs (_: inp: inp // {__toString = s: toString s.src;}) _inputs) // flakeInputs; + inputs = (l.mapAttrs (_: inp: inp // { __toString = s: toString s.src; }) _inputs) // flakeInputs; pkgs = _pkgs.appendOverlays ( l.flatten ( - l.mapAttrsToList - ( + l.mapAttrsToList ( name: _: - if name != "disabled" - then - let - o = import "${./overlays}/${name}"; - in - if (l.functionArgs o) ? inputs - then o { inherit inputs; } - else o - else - [] - ) - (l.readDir ./overlays) + if name != "disabled" then + let + o = import "${./overlays}/${name}"; + in + if (l.functionArgs o) ? inputs then o { inherit inputs; } else o + else + [ ] + ) (l.readDir ./overlays) + ) + ); + terraPkgs = pkgs.lib.makeScope pkgs.newScope ( + self: + l.genAttrs (l.map (l.removeSuffix ".nix") (l.attrNames (l.readDir ./pkgs))) ( + name: + self.callPackage "${./pkgs}/${name}.nix" { + inherit inputs tlib; + } ) ); - terraPkgs = - pkgs.lib.makeScope pkgs.newScope ( - self: - l.genAttrs - (l.map (l.removeSuffix ".nix") (l.attrNames (l.readDir ./pkgs))) - (name: self.callPackage "${./pkgs}/${name}.nix" { - inherit inputs tlib; - }) - ); pkgsToExport = pkgs.lib.getAttrs (import ./exported.nix) (pkgs // terraPkgs); -in { +in +{ inherit pkgs inputs; terra = terraPkgs; exported = pkgsToExport; diff --git a/pkgs-set/overlays/_lix.nix b/pkgs-set/overlays/_lix.nix index 064d6bf..0da5e2e 100644 --- a/pkgs-set/overlays/_lix.nix +++ b/pkgs-set/overlays/_lix.nix @@ -1,5 +1,8 @@ -{inputs}: final: prev: -(import "${inputs.lix-module}/overlay.nix" {lix = null;}) -final (prev // { - lix = final.lixPackageSets.latest.lix; -}) +{ inputs }: +final: prev: +(import "${inputs.lix-module}/overlay.nix" { lix = null; }) final ( + prev + // { + lix = final.lixPackageSets.latest.lix; + } +) diff --git a/pkgs-set/pkgs/buildGoApplication.nix b/pkgs-set/pkgs/buildGoApplication.nix index d14ebdd..73018ba 100644 --- a/pkgs-set/pkgs/buildGoApplication.nix +++ b/pkgs-set/pkgs/buildGoApplication.nix @@ -1,4 +1,4 @@ -{callPackage, inputs, ...}: +{ callPackage, inputs, ... }: (callPackage "${inputs.gomod2nix}/builder" { gomod2nix = null; }).buildGoApplication diff --git a/pkgs-set/pkgs/headplane.nix b/pkgs-set/pkgs/headplane.nix index 4f99b8e..a05202b 100644 --- a/pkgs-set/pkgs/headplane.nix +++ b/pkgs-set/pkgs/headplane.nix @@ -1 +1 @@ -{callPackage, inputs, ...}: callPackage "${inputs.headplane}/nix/package.nix" {} +{ callPackage, inputs, ... }: callPackage "${inputs.headplane}/nix/package.nix" { } diff --git a/pkgs-set/pkgs/nsid-tracker-server.nix b/pkgs-set/pkgs/nsid-tracker-server.nix index 7c326ed..a487f2c 100644 --- a/pkgs-set/pkgs/nsid-tracker-server.nix +++ b/pkgs-set/pkgs/nsid-tracker-server.nix @@ -1 +1 @@ -{callPackage, inputs, ...}: callPackage "${inputs.nsid-tracker}/nix/server.nix" {} +{ callPackage, inputs, ... }: callPackage "${inputs.nsid-tracker}/nix/server.nix" { } diff --git a/pkgs-set/pkgs/tangled-knot.nix b/pkgs-set/pkgs/tangled-knot.nix index b56050a..8447998 100644 --- a/pkgs-set/pkgs/tangled-knot.nix +++ b/pkgs-set/pkgs/tangled-knot.nix @@ -6,14 +6,16 @@ ... }: let - unwrapped = (callPackage "${inputs.tangled}/nix/pkgs/knot-unwrapped.nix" { - modules = tangled-modules; - sqlite-lib = tangled-sqlite-lib; - gitignoreSource = null; - }).overrideAttrs (_: { - src = inputs.tangled; - }); + unwrapped = + (callPackage "${inputs.tangled}/nix/pkgs/knot-unwrapped.nix" { + modules = tangled-modules; + sqlite-lib = tangled-sqlite-lib; + gitignoreSource = null; + }).overrideAttrs + (_: { + src = inputs.tangled; + }); in - callPackage "${inputs.tangled}/nix/pkgs/knot.nix" { - knot-unwrapped = unwrapped; - } +callPackage "${inputs.tangled}/nix/pkgs/knot.nix" { + knot-unwrapped = unwrapped; +} diff --git a/pkgs-set/pkgs/tangled-modules.nix b/pkgs-set/pkgs/tangled-modules.nix index 945c189..99aa387 100644 --- a/pkgs-set/pkgs/tangled-modules.nix +++ b/pkgs-set/pkgs/tangled-modules.nix @@ -1 +1 @@ -{inputs, ...}: "${inputs.tangled}/nix/gomod2nix.toml" +{ inputs, ... }: "${inputs.tangled}/nix/gomod2nix.toml" diff --git a/pkgs-set/pkgs/tangled-spindle.nix b/pkgs-set/pkgs/tangled-spindle.nix index 5803d2d..ba6e5f0 100644 --- a/pkgs-set/pkgs/tangled-spindle.nix +++ b/pkgs-set/pkgs/tangled-spindle.nix @@ -9,6 +9,7 @@ modules = tangled-modules; sqlite-lib = tangled-sqlite-lib; gitignoreSource = null; -}).overrideAttrs (_: { - src = inputs.tangled; -}) +}).overrideAttrs + (_: { + src = inputs.tangled; + }) diff --git a/pkgs-set/pkgs/tangled-sqlite-lib.nix b/pkgs-set/pkgs/tangled-sqlite-lib.nix index f05fa80..f5960da 100644 --- a/pkgs-set/pkgs/tangled-sqlite-lib.nix +++ b/pkgs-set/pkgs/tangled-sqlite-lib.nix @@ -1,4 +1,4 @@ -{callPackage, inputs, ...}: +{ callPackage, inputs, ... }: callPackage "${inputs.tangled}/nix/pkgs/sqlite-lib.nix" { sqlite-lib-src = inputs.tangled-sqlite-lib; } diff --git a/shells/default.nix b/shells/default.nix index 77af2c5..3af343c 100644 --- a/shells/default.nix +++ b/shells/default.nix @@ -3,12 +3,11 @@ allPkgsSets, ... }: -lib.mapAttrs -( +lib.mapAttrs ( system: set: let inherit (set) pkgs; - agenix = pkgs.callPackage "${set.inputs.agenix}/pkgs/agenix.nix" {}; + agenix = pkgs.callPackage "${set.inputs.agenix}/pkgs/agenix.nix" { }; agenix-wrapped = pkgs.writeShellApplication { name = "agenix"; runtimeInputs = [ agenix ]; @@ -53,5 +52,4 @@ lib.mapAttrs ''; }; } -) -allPkgsSets +) allPkgsSets diff --git a/users/dusk@devel.mobi/default.nix b/users/dusk@devel.mobi/default.nix index 8e37f67..ab5300c 100644 --- a/users/dusk@devel.mobi/default.nix +++ b/users/dusk@devel.mobi/default.nix @@ -44,7 +44,7 @@ in PATH = "${pkgs.coreutils-full}/bin:$PATH"; }; - age.identityPaths = ["${config.home.homeDirectory}/.ssh/id_ed25519"]; + age.identityPaths = [ "${config.home.homeDirectory}/.ssh/id_ed25519" ]; home = { homeDirectory = "/home/dusk"; username = "dusk"; @@ -65,7 +65,7 @@ in enable = true; controlServer = "https://vpn.gaze.systems"; authKeyFile = config.age.secrets.tailscaleAuthKey.path; - extraUpFlags = ["--hostname=dusk-devel-mobi"]; + extraUpFlags = [ "--hostname=dusk-devel-mobi" ]; }; programs = { diff --git a/users/dusk@devel.mobi/nsid-tracker.nix b/users/dusk@devel.mobi/nsid-tracker.nix index e6fa0e9..3f1d972 100644 --- a/users/dusk@devel.mobi/nsid-tracker.nix +++ b/users/dusk@devel.mobi/nsid-tracker.nix @@ -14,7 +14,7 @@ in }; Service = { - ExecStartPre="${pkgs.coreutils-full}/bin/mkdir -p %D/nsid-tracker"; + ExecStartPre = "${pkgs.coreutils-full}/bin/mkdir -p %D/nsid-tracker"; ExecStart = "${pkgs.dash}/bin/dash -c 'cd %D/nsid-tracker && ${server}/bin/server'"; Restart = "on-failure"; RestartSec = 5; diff --git a/users/modules/netbird/default.nix b/users/modules/netbird/default.nix index dcac724..ccf6fbb 100644 --- a/users/modules/netbird/default.nix +++ b/users/modules/netbird/default.nix @@ -1,4 +1,10 @@ -{lib, config, pkgs, ...}: let +{ + lib, + config, + pkgs, + ... +}: +let l = lib; t = l.types; cfg = config.services.netbird; @@ -16,7 +22,8 @@ wrappedProxychains = pkgs.writers.writeBashBin "netbird-proxychains" '' ${pkgs.proxychains-ng}/bin/proxychains4 -f "${proxychainsCfg}" $@ ''; -in { +in +{ options = { services.netbird = { enable = l.mkEnableOption "netbird client"; @@ -37,7 +44,10 @@ in { }; }; config = l.mkIf cfg.enable { - home.packages = [ wrapped wrappedProxychains ]; + home.packages = [ + wrapped + wrappedProxychains + ]; services.netbird.proxyScript = wrappedProxychains; systemd.user.services.netbird = { Unit = { diff --git a/users/modules/nushell/default.nix b/users/modules/nushell/default.nix index 1f49075..4b6d66f 100644 --- a/users/modules/nushell/default.nix +++ b/users/modules/nushell/default.nix @@ -1,4 +1,5 @@ -{pkgs, lib, ...}: { +{ pkgs, lib, ... }: +{ programs.carapace.enable = true; programs.carapace.enableNushellIntegration = true; programs.nushell = { diff --git a/users/modules/tailscale/default.nix b/users/modules/tailscale/default.nix index 689dde0..77fb744 100644 --- a/users/modules/tailscale/default.nix +++ b/users/modules/tailscale/default.nix @@ -1,4 +1,10 @@ -{lib, config, pkgs, ...}: let +{ + lib, + config, + pkgs, + ... +}: +let l = lib; t = l.types; cfg = config.services.tailscale; @@ -15,7 +21,8 @@ wrapped = pkgs.writers.writeBashBin "tailscale" '' ${pkgs.tailscale}/bin/tailscale --socket $XDG_RUNTIME_DIR/tailscaled.sock $@ ''; -in { +in +{ options = { services.tailscale = { enable = l.mkEnableOption "tailscale client"; @@ -31,7 +38,7 @@ in { }; extraUpFlags = l.mkOption { type = t.listOf t.str; - default = []; + default = [ ]; description = "Extra flags to pass to tailscale up"; }; proxyScript = l.mkOption { @@ -42,7 +49,10 @@ in { }; }; config = l.mkIf cfg.enable { - home.packages = [ wrapped wrappedProxychains ]; + home.packages = [ + wrapped + wrappedProxychains + ]; services.tailscale.proxyScript = wrappedProxychains; systemd.user.services.tailscaled = { Unit = { @@ -54,7 +64,8 @@ in { ExecStart = "${pkgs.tailscale}/bin/tailscaled --tun=userspace-networking --socks5-server=localhost:1055 --outbound-http-proxy-listen=localhost:1055 --socket %t/tailscaled.sock"; Restart = "on-failure"; RestartSec = "5s"; - } // l.optionalAttrs (cfg.authKeyFile != null) { + } + // l.optionalAttrs (cfg.authKeyFile != null) { ExecStartPost = "${wrapped}/bin/tailscale up --reset --login-server=${cfg.controlServer} --auth-key=file:${cfg.authKeyFile} ${l.concatStringsSep " " cfg.extraUpFlags}"; }; diff --git a/users/root/default.nix b/users/root/default.nix index a9f482f..02e6318 100644 --- a/users/root/default.nix +++ b/users/root/default.nix @@ -1,9 +1,9 @@ { pkgs, ... }: { users.users.root.initialHashedPassword = "$6$XLWo1sPpgp63Zm$XHBbULH9q1gb/.yalPPU/I7EgTcW80bM.moCjIe/qGyOwE47VcXNVbTHloBZdIWQq0MfIG0IxInAu59.oJyos/"; - environment.systemPackages = [pkgs.nushell]; + environment.systemPackages = [ pkgs.nushell ]; users.users.root.shell = pkgs.nushell; home-manager.users.root = { - imports = [../modules/nushell]; + imports = [ ../modules/nushell ]; }; } -- 2.51.2