From a173bd41656d3aa81baf8f97ca182ebef03544e8 Mon Sep 17 00:00:00 2001 From: Timothy DeHerrera Date: Mon, 25 Jan 2021 09:20:40 -0700 Subject: [PATCH] profiles#ci-agent: init --- flake.lock | 86 +++++++++++++++++++++++++++++++++++ flake.nix | 18 +++++++- profiles/ci-agent/default.nix | 3 ++ profiles/list.nix | 1 + 4 files changed, 106 insertions(+), 2 deletions(-) create mode 100644 profiles/ci-agent/default.nix diff --git a/flake.lock b/flake.lock index 5c29be16..dfab41be 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,26 @@ { "nodes": { + "ci-agent": { + "inputs": { + "flake-compat": "flake-compat", + "nixos-20_09": "nixos-20_09", + "nixos-unstable": "nixos-unstable", + "pre-commit-hooks-nix": "pre-commit-hooks-nix" + }, + "locked": { + "lastModified": 1610978656, + "narHash": "sha256-9GKLu24KSurJEsvQlIB+mUmHWRn9y5XiYDXjCs7vWAw=", + "owner": "hercules-ci", + "repo": "hercules-ci-agent", + "rev": "42e702d5865b7b7eb6ee5b743bcda7562f95e82e", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "hercules-ci-agent", + "type": "github" + } + }, "devshell": { "locked": { "lastModified": 1607956014, @@ -15,6 +36,22 @@ "type": "github" } }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1603796912, + "narHash": "sha256-6ayqpH/4XiEXylNdWI3AghubqS6XuiPg3Y60jY8RTo4=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "19576c2aea7f074ff0da818b21a8b0950ff6ec86", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-utils": { "locked": { "lastModified": 1608663846, @@ -80,6 +117,22 @@ "type": "indirect" } }, + "nixos-20_09": { + "locked": { + "lastModified": 1610870190, + "narHash": "sha256-G0fY7YVFpMw7lLb9HgpZufpeAVmCCZkzZ+WDscy4ImY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "f5f66148b28b3d9b9b8381532052ad93a35d5d67", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-20.09", + "repo": "nixpkgs", + "type": "github" + } + }, "nixos-hardware": { "locked": { "lastModified": 1610430373, @@ -95,6 +148,22 @@ "type": "github" } }, + "nixos-unstable": { + "locked": { + "lastModified": 1610842533, + "narHash": "sha256-6hW8CML8RnNrRJMv7E56rXAhsCNgUM97HIVSqWxnO64=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "68398d2dd50efc2d878bf0f83bbc8bc323b6b0e0", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1607981906, @@ -122,8 +191,25 @@ "type": "indirect" } }, + "pre-commit-hooks-nix": { + "flake": false, + "locked": { + "lastModified": 1603721622, + "narHash": "sha256-tUgyf5eYK5+0A/dvLzbbm4W7icxbpORuFMXiFe5yz+I=", + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "rev": "efdbd6d28f7f44db3d9f8cf0e0b4cb9db0d259e1", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "type": "github" + } + }, "root": { "inputs": { + "ci-agent": "ci-agent", "devshell": "devshell", "flake-utils": "flake-utils", "home": "home", diff --git a/flake.nix b/flake.nix index f1cfb180..3fa9a681 100644 --- a/flake.nix +++ b/flake.nix @@ -11,9 +11,20 @@ flake-utils.url = "github:numtide/flake-utils/flatten-tree-system"; devshell.url = "github:numtide/devshell"; nixos-hardware.url = "github:nixos/nixos-hardware"; + ci-agent.url = "github:hercules-ci/hercules-ci-agent"; }; - outputs = inputs@{ self, home, nixos, master, flake-utils, nur, devshell, nixos-hardware }: + outputs = + inputs@{ self + , ci-agent + , home + , nixos + , master + , flake-utils + , nur + , devshell + , nixos-hardware + }: let inherit (builtins) attrValues; inherit (flake-utils.lib) eachDefaultSystem flattenTreeSystem; @@ -21,7 +32,10 @@ inherit (self.lib) overlays nixosModules genPackages pkgImport; externOverlays = [ nur.overlay devshell.overlay ]; - externModules = [ home.nixosModules.home-manager ]; + externModules = [ + home.nixosModules.home-manager + ci-agent.nixosModules.agent-profile + ]; outputs = let diff --git a/profiles/ci-agent/default.nix b/profiles/ci-agent/default.nix new file mode 100644 index 00000000..c5ae3630 --- /dev/null +++ b/profiles/ci-agent/default.nix @@ -0,0 +1,3 @@ +{ + services.hercules-ci-agent.enable = true; +} diff --git a/profiles/list.nix b/profiles/list.nix index 9203dbe7..2dfa3830 100644 --- a/profiles/list.nix +++ b/profiles/list.nix @@ -1,4 +1,5 @@ [ + ./ci-agent ./core ./db/postgres ./develop