diff --git a/bins/default.nix b/bins/default.nix index 3ba69c5..ee6cd69 100644 --- a/bins/default.nix +++ b/bins/default.nix @@ -1,6 +1,5 @@ { pkgs, lib, isUnstable, ... }: let - oathPkg = pkgs.oath-toolkit or pkgs.oathToolkit; ix = pkgs.writeScriptBin "ix" (import ./ix.nix { inherit (pkgs) perl; }); rage = pkgs.writeScriptBin "rage" (import ./rage.nix { inherit pkgs; }); sfetch = pkgs.writeScriptBin "sfetch" diff --git a/flake.nix b/flake.nix index 777df19..303dba7 100644 --- a/flake.nix +++ b/flake.nix @@ -87,6 +87,7 @@ ( . ./common.sh; start ) || true; ''; nativeBuildInputs = with pkgs; [ + deadnix git go jq @@ -175,11 +176,26 @@ packages = forAllSystems (system: let pkgs = nixpkgsFor.${system}; in { - gqrss = pkgs.callPackage ./pkgs/gqrss.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; }; + gqrss = pkgs.callPackage ./pkgs/gqrss.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" = { diff --git a/fmt b/fmt index c64ce2b..807b8df 100755 --- a/fmt +++ b/fmt @@ -1,7 +1,10 @@ #!/bin/sh +set -e + find . -name \*.nix -exec nix fmt {} \+ find . -name \*.sh -exec shfmt -w {} \+ +find . -name \*.nix -exec deadnix -f -l -L {} \+ shfmt -w deploy shfmt -w mkboot statix check . diff --git a/hosts/h/default.nix b/hosts/h/default.nix index 56da2a3..5b579ed 100644 --- a/hosts/h/default.nix +++ b/hosts/h/default.nix @@ -165,9 +165,7 @@ in { }; services = { - yarr = { - enable = true; - }; + yarr = { enable = true; }; gotosocial = { enable = true; # https://github.com/superseriousbusiness/gotosocial/blob/v0.5.0-rc1/example/config.yaml diff --git a/hosts/plq/default.nix b/hosts/plq/default.nix index d907ebb..a2ba044 100644 --- a/hosts/plq/default.nix +++ b/hosts/plq/default.nix @@ -1,12 +1,5 @@ { config, pkgs, emacs, isUnstable, ... }: 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 = "Contents/Library/LoginItems/SecretAgent.app/Contents/MacOS/SecretAgent"; in { diff --git a/modules/default.nix b/modules/default.nix index ae49cac..a82cc3c 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -1,5 +1,2 @@ -{ config, lib, pkgs, ... }: -with lib; { - imports = [ ./ssh-fido-agent.nix ]; -} +{ config, lib, pkgs, ... }: with lib; { imports = [ ./ssh-fido-agent.nix ]; } diff --git a/modules/gotosocial.nix b/modules/gotosocial.nix index 8717577..1e3246a 100644 --- a/modules/gotosocial.nix +++ b/modules/gotosocial.nix @@ -3,6 +3,8 @@ with pkgs; let cfg = config.services.gotosocial; gotosocial = callPackage ../pkgs/gotosocial.nix { }; + settingsFormat = pkgs.formats.json { }; + settingsType = settingsFormat.type; prettyJSON = conf: pkgs.runCommandLocal "gotosocial-config.json" { } '' echo '${ @@ -31,7 +33,7 @@ in { }; configuration = mkOption { - type = (pkgs.formats.json { }).type; + inherit settingsType; description = '' Specify the configuration for GoToSocial in Nix. ''; diff --git a/modules/yarr.nix b/modules/yarr.nix index 5a3f169..03d6a68 100644 --- a/modules/yarr.nix +++ b/modules/yarr.nix @@ -91,8 +91,9 @@ in { User = cfg.user; Group = cfg.group; - ExecStart = '' - ${cfg.package}/bin/yarr -addr ${cfg.address}:${toString cfg.port} -db ${cfg.dbPath} -auth-file ${cfg.authFilePath}''; + ExecStart = "${cfg.package}/bin/yarr -addr ${cfg.address}:${ + toString cfg.port + } -db ${cfg.dbPath} -auth-file ${cfg.authFilePath}"; }; }; }; diff --git a/services/default.nix b/services/default.nix index a2831f6..2a787ac 100644 --- a/services/default.nix +++ b/services/default.nix @@ -1,4 +1 @@ -{ config, lib, pkgs, ... }: -with lib; { - imports = [ ./config-manager.nix ]; -} +{ config, lib, pkgs, ... }: with lib; { imports = [ ./config-manager.nix ]; }