diff --git a/configs/default.nix b/configs/default.nix index a1697ae..6de31c8 100644 --- a/configs/default.nix +++ b/configs/default.nix @@ -242,7 +242,6 @@ in { ./tmux.nix ./traadfri.nix ./unclutter.nix - ./version.nix ./vscode.nix ./watson.nix ./zsh.nix diff --git a/configs/packages/default.nix b/configs/packages/default.nix index 2eee3dd..1679f73 100644 --- a/configs/packages/default.nix +++ b/configs/packages/default.nix @@ -2,7 +2,7 @@ let hc = pkgs.callPackage {}; worldradio = pkgs.callPackage {}; - menstruation = pkgs.callPackage {}; + menstruation = pkgs.callPackage {}; nixpkgs-unstable = import { config.allowUnfree = true; }; diff --git a/configs/version.nix b/configs/version.nix deleted file mode 100644 index 23ea44c..0000000 --- a/configs/version.nix +++ /dev/null @@ -1,4 +0,0 @@ -{ lib, config, ... }: -{ - environment.etc."niveum/version".text = lib.sources.commitIdFromGitRepo ; -} diff --git a/flake.lock b/flake.lock index 3d6f267..ac97471 100644 --- a/flake.lock +++ b/flake.lock @@ -72,6 +72,38 @@ "type": "github" } }, + "menstruation-backend": { + "flake": false, + "locked": { + "lastModified": 1634573652, + "narHash": "sha256-FIj8oCOJO+Wqxr2o5MMqIShvzMJud4iUq3o8y4NIRvw=", + "owner": "kmein", + "repo": "menstruation.rs", + "rev": "dd405fe2acf32441e8ac56e488e689bb1c4bea82", + "type": "github" + }, + "original": { + "owner": "kmein", + "repo": "menstruation.rs", + "type": "github" + } + }, + "menstruation-telegram": { + "flake": false, + "locked": { + "lastModified": 1634815642, + "narHash": "sha256-q1OTMx5ayNu9ppHJBDUie/ow+BcA5DXnHEm11EY+C4E=", + "owner": "kmein", + "repo": "menstruation-telegram", + "rev": "a34555cf46f02157718b0565b5456348fff54181", + "type": "github" + }, + "original": { + "owner": "kmein", + "repo": "menstruation-telegram", + "type": "github" + } + }, "nix-writers": { "flake": false, "locked": { @@ -157,6 +189,8 @@ "flake-utils": "flake-utils", "home-manager": "home-manager", "krops": "krops", + "menstruation-backend": "menstruation-backend", + "menstruation-telegram": "menstruation-telegram", "nix-writers": "nix-writers", "nixpkgs": "nixpkgs", "nixpkgs-mozilla": "nixpkgs-mozilla", diff --git a/flake.nix b/flake.nix index 8abec99..388600d 100644 --- a/flake.nix +++ b/flake.nix @@ -29,6 +29,14 @@ url = "github:mozilla/nixpkgs-mozilla"; flake = false; }; + menstruation-telegram = { + url = "github:kmein/menstruation-telegram"; + flake = false; + }; + menstruation-backend = { + url = "github:kmein/menstruation.rs"; + flake = false; + }; }; outputs = @@ -36,6 +44,8 @@ , flake-utils , home-manager , krops + , menstruation-backend + , menstruation-telegram , nix-writers , nixpkgs , nixpkgs-mozilla @@ -57,6 +67,8 @@ nix-writers.git = { url = "https://cgit.krebsco.de/nix-writers"; ref = nix-writers.rev; }; retiolum.git = { url = "https://github.com/krebs/retiolum"; ref = retiolum.rev; }; nixpkgs-mozilla.git = { url = "https://github.com/mozilla/nixpkgs-mozilla"; ref = nixpkgs-mozilla.rev; }; + menstruation-telegram.git = { url = "https://github.com/kmein/menstruation-telegram"; ref = menstruation-telegram.rev; }; + menstruation-backend.git = { url = "https://github.com/kmein/menstruation.rs"; ref = menstruation-backend.rev; }; system-secrets.pass = { dir = toString ~/.password-store; @@ -86,33 +98,6 @@ program = toString (pkgs.writers.writeDash "deploy-all" (nixpkgs.lib.concatMapStringsSep "\n" (script: script.program) (builtins.attrValues deployScripts))); }; - niveum-status = { - type = "app"; - program = let - statusCommand = pkgs.writers.writeDash "niveum-status-one" '' - [ $# -eq 1 ] || { - echo "Please provide a niveum system hostname." >&2 - exit 1 - } - - hostname="$1" - version_file=/etc/niveum/version - - if commit_id="$(${pkgs.coreutils}/bin/timeout 2s ${pkgs.openssh}/bin/ssh "$hostname" cat $version_file 2>/dev/null)"; then - ${pkgs.git}/bin/git log -1 --oneline "$commit_id" - else - echo offline - fi - ''; - in toString (pkgs.writers.writeDash "niveum-status" '' - if [ $# -gt 0 ]; then - systems="$@" - else - systems="$(ls ${toString ./.}/systems)" - fi - ${pkgs.parallel}/bin/parallel --line-buffer --tagstring '{}' -q ${statusCommand} '{1}' ::: $systems - ''); - }; }; nixosConfigurations = {}; diff --git a/submodules/menstruation-backend b/submodules/menstruation-backend deleted file mode 160000 index dd405fe..0000000 --- a/submodules/menstruation-backend +++ /dev/null @@ -1 +0,0 @@ -Subproject commit dd405fe2acf32441e8ac56e488e689bb1c4bea82 diff --git a/submodules/menstruation-telegram b/submodules/menstruation-telegram deleted file mode 160000 index a34555c..0000000 --- a/submodules/menstruation-telegram +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a34555cf46f02157718b0565b5456348fff54181 diff --git a/submodules/nur-packages b/submodules/nur-packages deleted file mode 160000 index 8468cfb..0000000 --- a/submodules/nur-packages +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8468cfbc06669a047db140e43f69f72630f9091a diff --git a/systems/makanek/configuration.nix b/systems/makanek/configuration.nix index 8a2b82c..ce097c5 100644 --- a/systems/makanek/configuration.nix +++ b/systems/makanek/configuration.nix @@ -24,7 +24,6 @@ in - ]; diff --git a/systems/makanek/menstruation.nix b/systems/makanek/menstruation.nix index 8eb8435..f7c2826 100644 --- a/systems/makanek/menstruation.nix +++ b/systems/makanek/menstruation.nix @@ -1,7 +1,7 @@ { pkgs, lib, ... }: let - backend = pkgs.callPackage {}; - telegram = pkgs.callPackage {}; + backend = pkgs.callPackage {}; + telegram = pkgs.callPackage {}; backendPort = 8000; in { diff --git a/systems/zaatar/configuration.nix b/systems/zaatar/configuration.nix index 28aa2a0..1147c7e 100644 --- a/systems/zaatar/configuration.nix +++ b/systems/zaatar/configuration.nix @@ -19,7 +19,6 @@ in - ];