switch from alejandra -> nixpkgs-fmt #12
@ -1,16 +1,15 @@
|
||||
{
|
||||
self,
|
||||
inputs,
|
||||
...
|
||||
{ self
|
||||
, inputs
|
||||
, ...
|
||||
|
||||
}: {
|
||||
imports = [
|
||||
inputs.treefmt-nix.flakeModule
|
||||
];
|
||||
perSystem = {pkgs, ...}: {
|
||||
perSystem = { pkgs, ... }: {
|
||||
DavHau
commented
Is that really more readable or just more to type? Is that really more readable or just more to type?
|
||||
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;
|
||||
};
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{self, ...}: {
|
||||
{ self, ... }: {
|
||||
flake.packages.x86_64-linux = {
|
||||
inherit
|
||||
(self.nixosConfigurations.installer.config.formats)
|
||||
|
@ -1,4 +1,4 @@
|
||||
{self, ...}: {
|
||||
{ self, ... }: {
|
||||
pre-commit.settings.hooks.alejandra.enable = true;
|
||||
pre-commit.settings.hooks.shellcheck.enable = true;
|
||||
}
|
||||
|
13
flake.nix
13
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
|
||||
, ...
|
||||
}: {
|
||||
DavHau
commented
Is this indentation preferable? Is this indentation preferable?
Mic92
commented
fixed in #14 fixed in https://git.clan.lol/clan/clan-core/pulls/14
|
||||
systems = lib.systems.flakeExposed;
|
||||
imports = [
|
||||
./flake-parts/packages.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" ''
|
||||
|
@ -1,8 +1,7 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}: {
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /var/shared 0777 root root - -"
|
||||
|
@ -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)
|
||||
];
|
||||
}
|
||||
|
@ -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; [ ];
|
||||
};
|
||||
}
|
||||
|
@ -1,11 +1,11 @@
|
||||
{
|
||||
pkgs ? import <nixpkgs> {},
|
||||
|
||||
lib ? pkgs.lib,
|
||||
python3 ? pkgs.python3,
|
||||
ruff ? pkgs.ruff,
|
||||
runCommand ? pkgs.runCommand,
|
||||
}: let
|
||||
{ pkgs ? import <nixpkgs> { }
|
||||
, 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
|
||||
|
@ -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;
|
||||
};
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
{
|
||||
pkgs ? import <nixpkgs> {},
|
||||
system ? builtins.currentSystem,
|
||||
}: let
|
||||
{ pkgs ? import <nixpkgs> { }
|
||||
, system ? builtins.currentSystem
|
||||
,
|
||||
}:
|
||||
let
|
||||
DavHau
commented
and this? and this?
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user
Not sure if that is better? The lines are not conform and start with different characters. You cannot simply re-order the lines without breaking stuff for example.