From 07c437c9ffb4012410d99e46220f48f0fbe9d59f Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Mon, 22 Feb 2021 12:17:40 +0100 Subject: [PATCH] Add this flake to the nix registry, add secrets to inputs --- flake.lock | 91 ++++++++++--------------------------------------- flake.nix | 7 ++-- lib/default.nix | 11 ++++++ 3 files changed, 34 insertions(+), 75 deletions(-) diff --git a/flake.lock b/flake.lock index 44910a7f..11360cec 100644 --- a/flake.lock +++ b/flake.lock @@ -1,77 +1,6 @@ { "nodes": { - "hydra": { - "inputs": { - "nix": "nix", - "nixpkgs": [ - "hydra", - "nix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1603366072, - "narHash": "sha256-9dK7Mx9BZHZTeJ/oolS7nMakVnCdXQlsA2ePWNPhQks=", - "owner": "NixOS", - "repo": "hydra", - "rev": "be709d450b98a384374228db51c14dc958a3a72a", - "type": "github" - }, - "original": { - "id": "hydra", - "type": "indirect" - } - }, - "lowdown-src": { - "flake": false, - "locked": { - "lastModified": 1598695561, - "narHash": "sha256-gyH/5j+h/nWw0W8AcR2WKvNBUsiQ7QuxqSJNXAwV+8E=", - "owner": "kristapsdz", - "repo": "lowdown", - "rev": "1705b4a26fbf065d9574dce47a94e8c7c79e052f", - "type": "github" - }, - "original": { - "owner": "kristapsdz", - "repo": "lowdown", - "type": "github" - } - }, - "nix": { - "inputs": { - "lowdown-src": "lowdown-src", - "nixpkgs": "nixpkgs" - }, - "locked": { - "lastModified": 1603189103, - "narHash": "sha256-KVS/Z6FzMBOl5XCyOLwfiVoX7G2LQRa9HMGNnJRPCoo=", - "owner": "NixOS", - "repo": "nix", - "rev": "e0ca98c2071b815578470e280df8fdb750c7e23b", - "type": "github" - }, - "original": { - "id": "nix", - "type": "indirect" - } - }, "nixpkgs": { - "locked": { - "lastModified": 1602702596, - "narHash": "sha256-fqJ4UgOb4ZUnCDIapDb4gCrtAah5Rnr2/At3IzMitig=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "ad0d20345219790533ebe06571f82ed6b034db31", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "ref": "nixos-20.09-small", - "type": "indirect" - } - }, - "nixpkgs_2": { "locked": { "lastModified": 1603722914, "narHash": "sha256-V3cst4osjvfsrR5Qpk8CYWRFQiGm1Rm4lanjMWooH2o=", @@ -89,8 +18,24 @@ }, "root": { "inputs": { - "hydra": "hydra", - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs", + "secrets": "secrets" + } + }, + "secrets": { + "flake": false, + "locked": { + "lastModified": 1607473285, + "narHash": "sha256-cnilic++Xa2RB8krfNe0/ndZ6jFo2FQWIq8YrZ1pWrE=", + "ref": "master", + "rev": "0efb7df81d358c033a72fcc0c65016ff86f54858", + "revCount": 76, + "type": "git", + "url": "ssh://git@gitea.c3d2.de:2222/c3d2-admins/secrets.git" + }, + "original": { + "type": "git", + "url": "ssh://git@gitea.c3d2.de:2222/c3d2-admins/secrets.git" } } }, diff --git a/flake.nix b/flake.nix index a669c59f..01216f01 100644 --- a/flake.nix +++ b/flake.nix @@ -3,10 +3,13 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/release-20.09"; - # secrets.url = "git+file:///etc/nixos/secrets"; + secrets = { + url = "git+ssh://git@gitea.c3d2.de:2222/c3d2-admins/secrets.git"; + flake = false; + }; }; - outputs = { self, nixpkgs, hydra }: { + outputs = { self, nixpkgs, secrets }: { nixosConfigurations = { diff --git a/lib/default.nix b/lib/default.nix index 6f70a797..e3214ddd 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -189,6 +189,17 @@ in { }; }); + nix.registry.c3d2 = { + from = { + id = "c3d2"; + type = "indirect"; + }; + to = { + type = "git"; + url = "ssh://git@gitea.c3d2.de:2222/C3D2/nix-config.git"; + }; + }; + programs.ssh.knownHosts = with builtins; let hostNames = hostRegistry.hqLocal;