fmt: fix fmt \o/

also add deadnix checks
This commit is contained in:
Aaron Bieber 2022-10-12 20:34:56 -06:00
parent e8ea0e7f7b
commit 5f9bde625b
No known key found for this signature in database
9 changed files with 33 additions and 27 deletions

View File

@ -1,6 +1,5 @@
{ pkgs, lib, isUnstable, ... }: { pkgs, lib, isUnstable, ... }:
let let
oathPkg = pkgs.oath-toolkit or pkgs.oathToolkit;
ix = pkgs.writeScriptBin "ix" (import ./ix.nix { inherit (pkgs) perl; }); ix = pkgs.writeScriptBin "ix" (import ./ix.nix { inherit (pkgs) perl; });
rage = pkgs.writeScriptBin "rage" (import ./rage.nix { inherit pkgs; }); rage = pkgs.writeScriptBin "rage" (import ./rage.nix { inherit pkgs; });
sfetch = pkgs.writeScriptBin "sfetch" sfetch = pkgs.writeScriptBin "sfetch"

View File

@ -87,6 +87,7 @@
( . ./common.sh; start ) || true; ( . ./common.sh; start ) || true;
''; '';
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [
deadnix
git git
go go
jq jq
@ -175,11 +176,26 @@
packages = forAllSystems (system: packages = forAllSystems (system:
let pkgs = nixpkgsFor.${system}; let pkgs = nixpkgsFor.${system};
in { in {
gqrss = pkgs.callPackage ./pkgs/gqrss.nix { inherit pkgs; isUnstable = true; }; gqrss = pkgs.callPackage ./pkgs/gqrss.nix {
icbirc = pkgs.callPackage ./pkgs/icbirc.nix { inherit pkgs; isUnstable = true; }; inherit pkgs;
mcchunkie = pkgs.callPackage ./pkgs/mcchunkie.nix { inherit pkgs; isUnstable = true; }; isUnstable = true;
yarr = pkgs.callPackage ./pkgs/yarr.nix { inherit pkgs; isUnstable = true; }; };
zutty = pkgs.callPackage ./pkgs/zutty.nix { inherit pkgs; isUnstable = true; }; icbirc = pkgs.callPackage ./pkgs/icbirc.nix {
inherit pkgs;
isUnstable = true;
};
mcchunkie = pkgs.callPackage ./pkgs/mcchunkie.nix {
inherit pkgs;
isUnstable = true;
};
yarr = pkgs.callPackage ./pkgs/yarr.nix {
inherit pkgs;
isUnstable = true;
};
zutty = pkgs.callPackage ./pkgs/zutty.nix {
inherit pkgs;
isUnstable = true;
};
}); });
templates."ada" = { templates."ada" = {

3
fmt
View File

@ -1,7 +1,10 @@
#!/bin/sh #!/bin/sh
set -e
find . -name \*.nix -exec nix fmt {} \+ find . -name \*.nix -exec nix fmt {} \+
find . -name \*.sh -exec shfmt -w {} \+ find . -name \*.sh -exec shfmt -w {} \+
find . -name \*.nix -exec deadnix -f -l -L {} \+
shfmt -w deploy shfmt -w deploy
shfmt -w mkboot shfmt -w mkboot
statix check . statix check .

View File

@ -165,9 +165,7 @@ in {
}; };
services = { services = {
yarr = { yarr = { enable = true; };
enable = true;
};
gotosocial = { gotosocial = {
enable = true; enable = true;
# https://github.com/superseriousbusiness/gotosocial/blob/v0.5.0-rc1/example/config.yaml # https://github.com/superseriousbusiness/gotosocial/blob/v0.5.0-rc1/example/config.yaml

View File

@ -1,12 +1,5 @@
{ config, pkgs, emacs, isUnstable, ... }: { config, pkgs, emacs, isUnstable, ... }:
let let
pubKeys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFbj3DNho0T/SLcuKPzxT2/r8QNdEQ/ms6tRiX6YraJk root@tal.tapenet.org"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIPMaAm4rDxyU975Z54YiNw3itC2fGc3SaE2VaS1fai8 root@box"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIITjFpmWZVWixv2i9902R+g5B8umVhaqmjYEKs2nF3Lu qbit@tal.tapenet.org"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILnaC1v+VoVNnK04D32H+euiCyWPXU8nX6w+4UoFfjA3 qbit@plq"
];
userBase = { openssh.authorizedKeys.keys = pubKeys; };
secretAgent = secretAgent =
"Contents/Library/LoginItems/SecretAgent.app/Contents/MacOS/SecretAgent"; "Contents/Library/LoginItems/SecretAgent.app/Contents/MacOS/SecretAgent";
in { in {

View File

@ -1,5 +1,2 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }: with lib; { imports = [ ./ssh-fido-agent.nix ]; }
with lib; {
imports = [ ./ssh-fido-agent.nix ];
}

View File

@ -3,6 +3,8 @@ with pkgs;
let let
cfg = config.services.gotosocial; cfg = config.services.gotosocial;
gotosocial = callPackage ../pkgs/gotosocial.nix { }; gotosocial = callPackage ../pkgs/gotosocial.nix { };
settingsFormat = pkgs.formats.json { };
settingsType = settingsFormat.type;
prettyJSON = conf: prettyJSON = conf:
pkgs.runCommandLocal "gotosocial-config.json" { } '' pkgs.runCommandLocal "gotosocial-config.json" { } ''
echo '${ echo '${
@ -31,7 +33,7 @@ in {
}; };
configuration = mkOption { configuration = mkOption {
type = (pkgs.formats.json { }).type; inherit settingsType;
description = '' description = ''
Specify the configuration for GoToSocial in Nix. Specify the configuration for GoToSocial in Nix.
''; '';

View File

@ -91,8 +91,9 @@ in {
User = cfg.user; User = cfg.user;
Group = cfg.group; Group = cfg.group;
ExecStart = '' ExecStart = "${cfg.package}/bin/yarr -addr ${cfg.address}:${
${cfg.package}/bin/yarr -addr ${cfg.address}:${toString cfg.port} -db ${cfg.dbPath} -auth-file ${cfg.authFilePath}''; toString cfg.port
} -db ${cfg.dbPath} -auth-file ${cfg.authFilePath}";
}; };
}; };
}; };

View File

@ -1,4 +1 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }: with lib; { imports = [ ./config-manager.nix ]; }
with lib; {
imports = [ ./config-manager.nix ];
}