diff --git a/flake-parts/formatting.nix b/flake-parts/formatting.nix index db4a2bc5..a1b21597 100644 --- a/flake-parts/formatting.nix +++ b/flake-parts/formatting.nix @@ -1,16 +1,15 @@ -{ - self, - inputs, - ... +{ self +, inputs +, ... }: { imports = [ inputs.treefmt-nix.flakeModule ]; - perSystem = {pkgs, ...}: { + perSystem = { pkgs, ... }: { treefmt.projectRootFile = "flake.nix"; treefmt.flakeCheck = true; treefmt.flakeFormatter = true; - treefmt.programs.alejandra.enable = true; + treefmt.programs.nixpkgs-fmt.enable = true; treefmt.programs.shellcheck.enable = true; }; } diff --git a/flake-parts/packages.nix b/flake-parts/packages.nix index 50f81e49..f8ce8a7a 100644 --- a/flake-parts/packages.nix +++ b/flake-parts/packages.nix @@ -1,4 +1,4 @@ -{self, ...}: { +{ self, ... }: { flake.packages.x86_64-linux = { inherit (self.nixosConfigurations.installer.config.formats) diff --git a/flake-parts/pre-commit.nix b/flake-parts/pre-commit.nix index 5bd8756e..d44afc88 100644 --- a/flake-parts/pre-commit.nix +++ b/flake-parts/pre-commit.nix @@ -1,4 +1,4 @@ -{self, ...}: { +{ self, ... }: { pre-commit.settings.hooks.alejandra.enable = true; pre-commit.settings.hooks.shellcheck.enable = true; } diff --git a/flake.nix b/flake.nix index 79ac0cb3..77741213 100644 --- a/flake.nix +++ b/flake.nix @@ -11,13 +11,12 @@ treefmt-nix.inputs.nixpkgs.follows = "nixpkgs"; }; - outputs = inputs @ {flake-parts, ...}: - flake-parts.lib.mkFlake {inherit inputs;} ({ - lib, - config, - self, - ... - }: { + outputs = inputs @ { flake-parts, ... }: + flake-parts.lib.mkFlake { inherit inputs; } ({ lib + , config + , self + , ... + }: { systems = lib.systems.flakeExposed; imports = [ ./flake-parts/packages.nix diff --git a/hidden-announce.nix b/hidden-announce.nix index a73086a4..bcb8e6c8 100644 --- a/hidden-announce.nix +++ b/hidden-announce.nix @@ -1,8 +1,7 @@ -{ - config, - lib, - pkgs, - ... +{ config +, lib +, pkgs +, ... }: { options.hidden-announce = { enable = lib.mkEnableOption "hidden-announce"; @@ -32,9 +31,9 @@ }; systemd.services.hidden-ssh-announce = { description = "irc announce hidden ssh"; - after = ["tor.service" "network-online.target"]; - wants = ["tor.service"]; - wantedBy = ["multi-user.target"]; + after = [ "tor.service" "network-online.target" ]; + wants = [ "tor.service" ]; + wantedBy = [ "multi-user.target" ]; serviceConfig = { # ${pkgs.tor}/bin/torify ExecStart = pkgs.writers.writeDash "announce-hidden-service" '' diff --git a/installer.nix b/installer.nix index 8a0924fb..8da5d50f 100644 --- a/installer.nix +++ b/installer.nix @@ -1,8 +1,7 @@ -{ - config, - lib, - pkgs, - ... +{ config +, lib +, pkgs +, ... }: { systemd.tmpfiles.rules = [ "d /var/shared 0777 root root - -" diff --git a/pkgs/clan-cli/default.nix b/pkgs/clan-cli/default.nix index dc2da835..72214801 100644 --- a/pkgs/clan-cli/default.nix +++ b/pkgs/clan-cli/default.nix @@ -4,7 +4,7 @@ symlinkJoin { name = "clan"; paths = [ - (writers.writePython3Bin "clan" {} ./clan.py) + (writers.writePython3Bin "clan" { } ./clan.py) (writers.writePython3Bin "clan-admin" { flakeIgnore = [ "E501" ]; } ./clan-admin.py) ]; } diff --git a/pkgs/go-ssb/default.nix b/pkgs/go-ssb/default.nix index 171c259e..a650cbea 100644 --- a/pkgs/go-ssb/default.nix +++ b/pkgs/go-ssb/default.nix @@ -1,7 +1,7 @@ -{ - lib, - buildGoModule, - fetchFromGitHub, +{ lib +, buildGoModule +, fetchFromGitHub +, }: buildGoModule rec { pname = "go-ssb"; @@ -17,7 +17,7 @@ buildGoModule rec { vendorHash = "sha256-ZytuWFre7Cz6Qt01tLQoPEuNzDIyoC938OkdIrU8nZo="; - ldflags = ["-s" "-w"]; + ldflags = [ "-s" "-w" ]; # take very long doCheck = false; @@ -26,6 +26,6 @@ buildGoModule rec { description = "Go implementation of ssb (work in progress)"; homepage = "https://github.com/ssbc/go-ssb"; license = licenses.mit; - maintainers = with maintainers; []; + maintainers = with maintainers; [ ]; }; } diff --git a/templates/python-project/default.nix b/templates/python-project/default.nix index acbef7dd..30dae1b7 100644 --- a/templates/python-project/default.nix +++ b/templates/python-project/default.nix @@ -1,11 +1,11 @@ -{ - pkgs ? import {}, - - lib ? pkgs.lib, - python3 ? pkgs.python3, - ruff ? pkgs.ruff, - runCommand ? pkgs.runCommand, -}: let +{ pkgs ? import { } +, lib ? pkgs.lib +, python3 ? pkgs.python3 +, ruff ? pkgs.ruff +, runCommand ? pkgs.runCommand +, +}: +let pyproject = builtins.fromTOML (builtins.readFile ./pyproject.toml); name = pyproject.project.name; @@ -37,14 +37,14 @@ ]; propagatedBuildInputs = dependencies - ++ []; - passthru.tests = {inherit check;}; + ++ [ ]; + passthru.tests = { inherit check; }; passthru.devDependencies = devDependencies; }; checkPython = python3.withPackages (ps: devDependencies ++ dependencies); - check = runCommand "${name}-check" {} '' + check = runCommand "${name}-check" { } '' cp -r ${src} ./src chmod +w -R ./src cd src @@ -59,4 +59,4 @@ ''; in - package +package diff --git a/templates/python-project/flake-module.nix b/templates/python-project/flake-module.nix index 1e85e607..74218c6d 100644 --- a/templates/python-project/flake-module.nix +++ b/templates/python-project/flake-module.nix @@ -1,10 +1,12 @@ { - perSystem = {pkgs, ...}: let - pyproject = builtins.fromTOML (builtins.readFile ./pyproject.toml); - name = pyproject.project.name; - package = pkgs.callPackage ./default.nix {}; - in { - # packages.${name} = package; - checks.python-template = package.tests.check; - }; + perSystem = { pkgs, ... }: + let + pyproject = builtins.fromTOML (builtins.readFile ./pyproject.toml); + name = pyproject.project.name; + package = pkgs.callPackage ./default.nix { }; + in + { + # packages.${name} = package; + checks.python-template = package.tests.check; + }; } diff --git a/templates/python-project/shell.nix b/templates/python-project/shell.nix index 318ab24a..2b7b0748 100644 --- a/templates/python-project/shell.nix +++ b/templates/python-project/shell.nix @@ -1,7 +1,8 @@ -{ - pkgs ? import {}, - system ? builtins.currentSystem, -}: let +{ pkgs ? import { } +, system ? builtins.currentSystem +, +}: +let lib = pkgs.lib; python3 = pkgs.python3; package = import ./default.nix { @@ -9,11 +10,11 @@ }; pythonWithDeps = python3.withPackages ( ps: - package.propagatedBuildInputs - ++ package.devDependencies - ++ [ - ps.pip - ] + package.propagatedBuildInputs + ++ package.devDependencies + ++ [ + ps.pip + ] ); checkScript = pkgs.writeScriptBin "check" '' nix build -f . tests.check -L "$@" @@ -43,4 +44,4 @@ ''; }; in - devShell +devShell