diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..d44853d --- /dev/null +++ b/default.nix @@ -0,0 +1,75 @@ +let + inputs = import ./deps; + nixpkgs = import inputs.nixpkgs { }; + lib = nixpkgs.lib.extend (import ./lib inputs); + machines_plats = lib.mapAttrsToList (_name: value: value.arch) (lib.filterAttrs (_n: v: builtins.hasAttr "arch" v) lib.luj.machines); + mkMachine = import ./lib/mkmachine.nix inputs lib; + + nixpkgs_plats = builtins.listToAttrs (builtins.map + (plat: { + name = plat; + value = import nixpkgs { system = plat; }; + }) + machines_plats); +in +rec { + + nixosModules = builtins.listToAttrs (map + (x: { + name = x; + value = import (./modules + "/${x}"); + }) + (builtins.attrNames (builtins.readDir ./modules))); + + nixosConfigurations = builtins.mapAttrs + (name: value: (mkMachine { + host-config = value; + modules = nixosModules; + nixpkgs = lib.luj.machines.${name}.nixpkgs_version; + system = lib.luj.machines.${name}.arch; + home-manager = lib.luj.machines.${name}.hm_version; + })) + (lib.importConfig ./machines); + + + colmena = + let + deployableConfigurations = lib.filterAttrs (_: v: builtins.hasAttr "ipv4" lib.luj.machines.${v.config.networking.hostName}) nixosConfigurations; + in + { + meta = { + nixpkgs = import inputs.nixpkgs { system = "x86_64-linux"; }; + nodeNixpkgs = builtins.mapAttrs (_: v: v.pkgs) deployableConfigurations; + nodeSpecialArgs = builtins.mapAttrs (_: v: v._module.specialArgs) deployableConfigurations; + specialArgs.lib = lib; + }; + } // builtins.mapAttrs + (_: v: { + imports = v._module.args.modules; + }) + deployableConfigurations; + + + packages = builtins.listToAttrs + (builtins.map + (plat: { + name = plat; + value = + lib.filterAttrs (_name: value: (!lib.hasAttrByPath [ "meta" "platforms" ] value) || builtins.elem plat value.meta.platforms) + (builtins.listToAttrs (builtins.map + (e: { + name = e; + value = nixpkgs_plats.${plat}.callPackage (./packages + "/${e}") { }; + }) + (builtins.attrNames (builtins.readDir ./packages)))); + }) + machines_plats); + + inherit (lib.luj) machines; + + checks = { + inherit packages; + machines = lib.mapAttrs (_: v: v.config.system.build.toplevel) nixosConfigurations; + }; +} + diff --git a/deps/default.nix b/deps/default.nix new file mode 100644 index 0000000..4a7c372 --- /dev/null +++ b/deps/default.nix @@ -0,0 +1,47 @@ +# Generated by npins. Do not modify; will be overwritten regularly +let + data = builtins.fromJSON (builtins.readFile ./sources.json); + version = data.version; + + mkSource = spec: + assert spec ? type; let + path = + if spec.type == "Git" then mkGitSource spec + else if spec.type == "GitRelease" then mkGitSource spec + else if spec.type == "PyPi" then mkPyPiSource spec + else if spec.type == "Channel" then mkChannelSource spec + else builtins.throw "Unknown source type ${spec.type}"; + in + spec // { outPath = path; }; + + mkGitSource = { repository, revision, url ? null, hash, ... }: + assert repository ? type; + # At the moment, either it is a plain git repository (which has an url), or it is a GitHub/GitLab repository + # In the latter case, there we will always be an url to the tarball + if url != null then + (builtins.fetchTarball { + inherit url; + sha256 = hash; # FIXME: check nix version & use SRI hashes + }) + else assert repository.type == "Git"; builtins.fetchGit { + url = repository.url; + rev = revision; + # hash = hash; + }; + + mkPyPiSource = { url, hash, ... }: + builtins.fetchurl { + inherit url; + sha256 = hash; + }; + + mkChannelSource = { url, hash, ... }: + builtins.fetchTarball { + inherit url; + sha256 = hash; + }; +in +if version == 3 then + builtins.mapAttrs (_: mkSource) data.pins +else + throw "Unsupported format version ${toString version} in sources.json. Try running `npins upgrade`" diff --git a/deps/sources.json b/deps/sources.json new file mode 100644 index 0000000..9725835 --- /dev/null +++ b/deps/sources.json @@ -0,0 +1,149 @@ +{ + "pins": { + "attic": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "zhaofengli", + "repo": "attic" + }, + "branch": "main", + "revision": "4dbdbee45728d8ce5788db6461aaaa89d98081f0", + "url": "https://github.com/zhaofengli/attic/archive/4dbdbee45728d8ce5788db6461aaaa89d98081f0.tar.gz", + "hash": "1iri77pbf0gvas93zra29qy1c3l61n97z84xblqxmmhsxvljzvnh" + }, + "buildbot-nix": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "JulienMalka", + "repo": "buildbot-nix" + }, + "branch": "main", + "revision": "88d60799a4cc8bfdd85f65468a1b225af402c66a", + "url": "https://github.com/JulienMalka/buildbot-nix/archive/88d60799a4cc8bfdd85f65468a1b225af402c66a.tar.gz", + "hash": "1qdccfclg2avk3z72cql3n8lcci0nal9n92s8ravrfv3jbni62dm" + }, + "colmena": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "zhaofengli", + "repo": "colmena" + }, + "branch": "main", + "revision": "cd65ef7a25cdc75052fbd04b120aeb066c3881db", + "url": "https://github.com/zhaofengli/colmena/archive/cd65ef7a25cdc75052fbd04b120aeb066c3881db.tar.gz", + "hash": "0n1j499702iclz4hdb4ywvmn8rl4d1mbdf43dwm7lvpjq5pjjqc1" + }, + "home-manager": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "nix-community", + "repo": "home-manager" + }, + "branch": "release-23.11", + "revision": "f33900124c23c4eca5831b9b5eb32ea5894375ce", + "url": "https://github.com/nix-community/home-manager/archive/f33900124c23c4eca5831b9b5eb32ea5894375ce.tar.gz", + "hash": "0g51f2hz13dk953i501fmc6935difhz60741nypaqwz127hy5ldk" + }, + "home-manager-unstable": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "nix-community", + "repo": "home-manager" + }, + "branch": "master", + "revision": "30f2ec39519f4f5a8a96af808c439e730c15aeab", + "url": "https://github.com/nix-community/home-manager/archive/30f2ec39519f4f5a8a96af808c439e730c15aeab.tar.gz", + "hash": "11jy0k35j1f27agqzvs3yq37chdvw1xvnymgv2ds3fymasg5m5j2" + }, + "homepage": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "JulienMalka", + "repo": "homepage" + }, + "branch": "main", + "revision": "29e779d8600b1c1e6235570a3614a54f8ec8126e", + "url": "https://github.com/JulienMalka/homepage/archive/29e779d8600b1c1e6235570a3614a54f8ec8126e.tar.gz", + "hash": "0prma1rg6glf3xy1dkd6gbzb26z1sxkgzd8wr623pbqvf44hgv32" + }, + "lanzaboote": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "nix-community", + "repo": "lanzaboote" + }, + "branch": "master", + "revision": "df7ac26bd24fac8baa94d60a02c3e0f0d4d16368", + "url": "https://github.com/nix-community/lanzaboote/archive/df7ac26bd24fac8baa94d60a02c3e0f0d4d16368.tar.gz", + "hash": "0s1bvc2px5z6qab1i78kjdgzh6w3y1by9sc87q7bcyirqv6xh3gw" + }, + "nix-index-database": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "mic92", + "repo": "nix-index-database" + }, + "branch": "main", + "revision": "2844b5f3ad3b478468151bd101370b9d8ef8a3a7", + "url": "https://github.com/mic92/nix-index-database/archive/2844b5f3ad3b478468151bd101370b9d8ef8a3a7.tar.gz", + "hash": "1kg8h513n2wk83bqh06pv73cvipfj171x5qqqzgv8kr5zimavx14" + }, + "nixos-mailserver": { + "type": "Git", + "repository": { + "type": "GitLab", + "repo_path": "simple-nixos-mailserver/nixos-mailserver", + "server": "https://gitlab.com/" + }, + "branch": "nixos-23.11", + "revision": "e47f3719f1db3e0961a4358d4cb234a0acaa7baf", + "url": "https://gitlab.com/api/v4/projects/simple-nixos-mailserver%2Fnixos-mailserver/repository/archive.tar.gz?sha=e47f3719f1db3e0961a4358d4cb234a0acaa7baf", + "hash": "122vm4n3gkvlkqmlskiq749bhwfd0r71v6vcmg1bbyg4998brvx8" + }, + "nixpkgs": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "nixos", + "repo": "nixpkgs" + }, + "branch": "nixos-23.11", + "revision": "219951b495fc2eac67b1456824cc1ec1fd2ee659", + "url": "https://github.com/nixos/nixpkgs/archive/219951b495fc2eac67b1456824cc1ec1fd2ee659.tar.gz", + "hash": "065jy7qivlbdqmbvd7r9h97b23f21axmc4r7sqmq2h0j82rmymxv" + }, + "sops-nix": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "mic92", + "repo": "sops-nix" + }, + "branch": "master", + "revision": "99b1e37f9fc0960d064a7862eb7adfb92e64fa10", + "url": "https://github.com/mic92/sops-nix/archive/99b1e37f9fc0960d064a7862eb7adfb92e64fa10.tar.gz", + "hash": "0s3lrd3fqy6djd9j6bjafqafb16x5a11f6xif6w209fhz40a05qz" + }, + "unstable": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "nixos", + "repo": "nixpkgs" + }, + "branch": "nixos-unstable", + "revision": "d8fe5e6c92d0d190646fb9f1056741a229980089", + "url": "https://github.com/nixos/nixpkgs/archive/d8fe5e6c92d0d190646fb9f1056741a229980089.tar.gz", + "hash": "0jd6x1qaggxklah856zx86dxwy4j17swv4df52njcn3ln410bic8" + } + }, + "version": 3 +} \ No newline at end of file diff --git a/flake.lock b/flake.lock deleted file mode 100644 index b05ed32..0000000 --- a/flake.lock +++ /dev/null @@ -1,1143 +0,0 @@ -{ - "nodes": { - "attic": { - "inputs": { - "crane": "crane", - "flake-compat": "flake-compat", - "flake-utils": [ - "flake-utils" - ], - "nixpkgs": [ - "unstable" - ], - "nixpkgs-stable": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1711742460, - "narHash": "sha256-0O4v6e4a1toxXZ2gf5INhg4WPE5C5T+SVvsBt+45Mcc=", - "owner": "zhaofengli", - "repo": "attic", - "rev": "4dbdbee45728d8ce5788db6461aaaa89d98081f0", - "type": "github" - }, - "original": { - "owner": "zhaofengli", - "repo": "attic", - "type": "github" - } - }, - "blobs": { - "flake": false, - "locked": { - "lastModified": 1604995301, - "narHash": "sha256-wcLzgLec6SGJA8fx1OEN1yV/Py5b+U5iyYpksUY/yLw=", - "owner": "simple-nixos-mailserver", - "repo": "blobs", - "rev": "2cccdf1ca48316f2cfd1c9a0017e8de5a7156265", - "type": "gitlab" - }, - "original": { - "owner": "simple-nixos-mailserver", - "repo": "blobs", - "type": "gitlab" - } - }, - "buildbot-nix": { - "inputs": { - "flake-parts": "flake-parts", - "nixpkgs": "nixpkgs", - "treefmt-nix": "treefmt-nix" - }, - "locked": { - "lastModified": 1701015033, - "narHash": "sha256-tQkT7ZJju7xVRlokm6iyIDJGkR0UM3H+mFuJR5ljrOE=", - "owner": "JulienMalka", - "repo": "buildbot-nix", - "rev": "88d60799a4cc8bfdd85f65468a1b225af402c66a", - "type": "github" - }, - "original": { - "owner": "JulienMalka", - "repo": "buildbot-nix", - "type": "github" - } - }, - "colmena": { - "inputs": { - "flake-compat": "flake-compat_2", - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs_2", - "stable": "stable" - }, - "locked": { - "lastModified": 1711386353, - "narHash": "sha256-gWEpb8Hybnoqb4O4tmpohGZk6+aerAbJpywKcFIiMlg=", - "owner": "zhaofengli", - "repo": "colmena", - "rev": "cd65ef7a25cdc75052fbd04b120aeb066c3881db", - "type": "github" - }, - "original": { - "owner": "zhaofengli", - "repo": "colmena", - "type": "github" - } - }, - "crane": { - "inputs": { - "nixpkgs": [ - "attic", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1702918879, - "narHash": "sha256-tWJqzajIvYcaRWxn+cLUB9L9Pv4dQ3Bfit/YjU5ze3g=", - "owner": "ipetkov", - "repo": "crane", - "rev": "7195c00c272fdd92fc74e7d5a0a2844b9fadb2fb", - "type": "github" - }, - "original": { - "owner": "ipetkov", - "repo": "crane", - "type": "github" - } - }, - "crane_2": { - "inputs": { - "nixpkgs": [ - "lanzaboote", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1711299236, - "narHash": "sha256-6/JsyozOMKN8LUGqWMopKTSiK8N79T8Q+hcxu2KkTXg=", - "owner": "ipetkov", - "repo": "crane", - "rev": "880573f80d09e18a11713f402b9e6172a085449f", - "type": "github" - }, - "original": { - "owner": "ipetkov", - "repo": "crane", - "type": "github" - } - }, - "devshell": { - "inputs": { - "flake-utils": "flake-utils_5", - "nixpkgs": [ - "nix-hash-collection", - "queued-build-hook", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1705332421, - "narHash": "sha256-USpGLPme1IuqG78JNqSaRabilwkCyHmVWY0M9vYyqEA=", - "owner": "numtide", - "repo": "devshell", - "rev": "83cb93d6d063ad290beee669f4badf9914cc16ec", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "devshell", - "type": "github" - } - }, - "flake-compat": { - "flake": false, - "locked": { - "lastModified": 1673956053, - "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_2": { - "flake": false, - "locked": { - "lastModified": 1650374568, - "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "b4a34015c698c7793d592d66adbab377907a2be8", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_3": { - "flake": false, - "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_4": { - "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_5": { - "flake": false, - "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-parts": { - "inputs": { - "nixpkgs-lib": [ - "buildbot-nix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1698882062, - "narHash": "sha256-HkhafUayIqxXyHH1X8d9RDl1M2CkFgZLjKD3MzabiEo=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "8c9fa2545007b49a5db5f650ae91f227672c3877", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_2": { - "inputs": { - "nixpkgs-lib": [ - "lanzaboote", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1709336216, - "narHash": "sha256-Dt/wOWeW6Sqm11Yh+2+t0dfEWxoMxGBvv3JpIocFl9E=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "f7b3c975cf067e56e7cda6cb098ebe3fb4d74ca2", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-utils": { - "locked": { - "lastModified": 1659877975, - "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_2": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_3": { - "inputs": { - "systems": "systems_2" - }, - "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_4": { - "inputs": { - "systems": "systems_3" - }, - "locked": { - "lastModified": 1705309234, - "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_5": { - "inputs": { - "systems": "systems_4" - }, - "locked": { - "lastModified": 1701680307, - "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_6": { - "inputs": { - "systems": "systems_5" - }, - "locked": { - "lastModified": 1705309234, - "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_7": { - "inputs": { - "systems": "systems_6" - }, - "locked": { - "lastModified": 1701680307, - "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "gitignore": { - "inputs": { - "nixpkgs": [ - "lanzaboote", - "pre-commit-hooks-nix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1709087332, - "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", - "type": "github" - } - }, - "gitignore_2": { - "inputs": { - "nixpkgs": [ - "nix-hash-collection", - "queued-build-hook", - "pre-commit-hooks", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1703887061, - "narHash": "sha256-gGPa9qWNc6eCXT/+Z5/zMkyYOuRZqeFZBDbopNZQkuY=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "43e1aa1308018f37118e34d3a9cb4f5e75dc11d5", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", - "type": "github" - } - }, - "home-manager": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1710888565, - "narHash": "sha256-s9Hi4RHhc6yut4EcYD50sZWRDKsugBJHSbON8KFwoTw=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "f33900124c23c4eca5831b9b5eb32ea5894375ce", - "type": "github" - }, - "original": { - "owner": "nix-community", - "ref": "release-23.11", - "repo": "home-manager", - "type": "github" - } - }, - "home-manager-unstable": { - "inputs": { - "nixpkgs": "nixpkgs_3" - }, - "locked": { - "lastModified": 1711625603, - "narHash": "sha256-W+9dfqA9bqUIBV5u7jaIARAzMe3kTq/Hp2SpSVXKRQw=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "c0ef0dab55611c676ad7539bf4e41b3ec6fa87d2", - "type": "github" - }, - "original": { - "owner": "nix-community", - "ref": "master", - "repo": "home-manager", - "type": "github" - } - }, - "homepage": { - "flake": false, - "locked": { - "lastModified": 1639518131, - "narHash": "sha256-YuwHCXEbrzuEyRy1/2bX4Rux/nqmzRZ8H44+83JQNV8=", - "owner": "JulienMalka", - "repo": "homepage", - "rev": "29e779d8600b1c1e6235570a3614a54f8ec8126e", - "type": "github" - }, - "original": { - "owner": "JulienMalka", - "repo": "homepage", - "type": "github" - } - }, - "lanzaboote": { - "inputs": { - "crane": "crane_2", - "flake-compat": "flake-compat_3", - "flake-parts": "flake-parts_2", - "flake-utils": "flake-utils_3", - "nixpkgs": "nixpkgs_4", - "pre-commit-hooks-nix": "pre-commit-hooks-nix", - "rust-overlay": "rust-overlay" - }, - "locked": { - "lastModified": 1711442573, - "narHash": "sha256-/A3YzcY5erYOPojp5Ffwgxv4X5MTnRiWwuaXfgXbK2g=", - "owner": "nix-community", - "repo": "lanzaboote", - "rev": "df7ac26bd24fac8baa94d60a02c3e0f0d4d16368", - "type": "github" - }, - "original": { - "owner": "nix-community", - "ref": "master", - "repo": "lanzaboote", - "type": "github" - } - }, - "nix-hash-collection": { - "inputs": { - "flake-compat": "flake-compat_4", - "flake-utils": "flake-utils_4", - "nixpkgs": "nixpkgs_5", - "queued-build-hook": "queued-build-hook" - }, - "locked": { - "lastModified": 1711057687, - "narHash": "sha256-0bEKlNx3R+LlrjFguhEfsLt3gX/epRB29Z5B/2kYi3M=", - "owner": "JulienMalka", - "repo": "nix-hash-collection", - "rev": "12ccb127dd530dc6d80d03cd99c4279daf013bc4", - "type": "github" - }, - "original": { - "owner": "JulienMalka", - "repo": "nix-hash-collection", - "type": "github" - } - }, - "nix-index-database": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1711249705, - "narHash": "sha256-h/NQECj6mIzF4XR6AQoSpkCnwqAM+ol4+qOdYi2ykmQ=", - "owner": "Mic92", - "repo": "nix-index-database", - "rev": "34519f3bb678a5abbddf7b200ac5347263ee781b", - "type": "github" - }, - "original": { - "owner": "Mic92", - "repo": "nix-index-database", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1700641131, - "narHash": "sha256-M3bsoVMQM2PcuBWb6n1KDNeMX87svcSj/4qlBcVqs3k=", - "owner": "Nixos", - "repo": "nixpkgs", - "rev": "da41de71f62bf7fb989a04e39629b8adbf8aa8b5", - "type": "github" - }, - "original": { - "owner": "Nixos", - "ref": "nixos-unstable-small", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-stable": { - "locked": { - "lastModified": 1710695816, - "narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "614b4613980a522ba49f0d194531beddbb7220d3", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-23.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-stable_2": { - "locked": { - "lastModified": 1704874635, - "narHash": "sha256-YWuCrtsty5vVZvu+7BchAxmcYzTMfolSPP5io8+WYCg=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "3dc440faeee9e889fe2d1b4d25ad0f430d449356", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-23.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1696019113, - "narHash": "sha256-X3+DKYWJm93DRSdC5M6K5hLqzSya9BjibtBsuARoPco=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "f5892ddac112a1e9b3612c39af1b72987ee5783a", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { - "locked": { - "lastModified": 1710806803, - "narHash": "sha256-qrxvLS888pNJFwJdK+hf1wpRCSQcqA6W5+Ox202NDa0=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "b06025f1533a1e07b6db3e75151caa155d1c7eb3", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_4": { - "locked": { - "lastModified": 1711297276, - "narHash": "sha256-KtHBr73Z729krfueBV6pUsEyq/4vILGP77DPmrKOTrI=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "3d41d1087707826b3a90685ab69147f8dc8145d5", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable-small", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_5": { - "locked": { - "lastModified": 1708793639, - "narHash": "sha256-9wfI2UtdXZkBmy0ZET83ZOaea+ioSVB49m9ox46OYUw=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "8e9536d9642e07a7706d3343ad367406b1a9d7dd", - "type": "github" - }, - "original": { - "owner": "nixos", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_6": { - "locked": { - "lastModified": 1708815994, - "narHash": "sha256-hL7N/ut2Xu0NaDxDMsw2HagAjgDskToGiyZOWriiLYM=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "9a9dae8f6319600fa9aebde37f340975cab4b8c0", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "ref": "nixpkgs-unstable", - "type": "indirect" - } - }, - "nixpkgs_7": { - "locked": { - "lastModified": 1704842529, - "narHash": "sha256-OTeQA+F8d/Evad33JMfuXC89VMetQbsU4qcaePchGr4=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "eabe8d3eface69f5bb16c18f8662a702f50c20d5", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_8": { - "locked": { - "lastModified": 1711668574, - "narHash": "sha256-u1dfs0ASQIEr1icTVrsKwg2xToIpn7ZXxW3RHfHxshg=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "219951b495fc2eac67b1456824cc1ec1fd2ee659", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-23.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_9": { - "locked": { - "lastModified": 1708161998, - "narHash": "sha256-6KnemmUorCvlcAvGziFosAVkrlWZGIc6UNT9GUYr0jQ=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "84d981bae8b5e783b3b548de505b22880559515f", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "ref": "nixos-23.11", - "type": "indirect" - } - }, - "nur": { - "locked": { - "lastModified": 1711795095, - "narHash": "sha256-KIxEtUCi2Rh/B+jtvPFTr71csUuxI5Mrp4iCS876Vbw=", - "owner": "nix-community", - "repo": "NUR", - "rev": "2fef7e9567e8996929e2bfcae3c5f053555ce86f", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "NUR", - "type": "github" - } - }, - "pre-commit-hooks": { - "inputs": { - "flake-compat": "flake-compat_5", - "flake-utils": "flake-utils_7", - "gitignore": "gitignore_2", - "nixpkgs": "nixpkgs_7", - "nixpkgs-stable": "nixpkgs-stable_2" - }, - "locked": { - "lastModified": 1708018599, - "narHash": "sha256-M+Ng6+SePmA8g06CmUZWi1AjG2tFBX9WCXElBHEKnyM=", - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "rev": "5df5a70ad7575f6601d91f0efec95dd9bc619431", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "type": "github" - } - }, - "pre-commit-hooks-nix": { - "inputs": { - "flake-compat": [ - "lanzaboote", - "flake-compat" - ], - "flake-utils": [ - "lanzaboote", - "flake-utils" - ], - "gitignore": "gitignore", - "nixpkgs": [ - "lanzaboote", - "nixpkgs" - ], - "nixpkgs-stable": "nixpkgs-stable" - }, - "locked": { - "lastModified": 1710923068, - "narHash": "sha256-6hOpUiuxuwpXXc/xfJsBUJeqqgGI+JMJuLo45aG3cKc=", - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "rev": "e611897ddfdde3ed3eaac4758635d7177ff78673", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "type": "github" - } - }, - "queued-build-hook": { - "inputs": { - "devshell": "devshell", - "flake-utils": "flake-utils_6", - "nixpkgs": "nixpkgs_6", - "pre-commit-hooks": "pre-commit-hooks", - "treefmt-nix": "treefmt-nix_2" - }, - "locked": { - "lastModified": 1708941860, - "narHash": "sha256-U2U3hyXNI33gtkC1EK17AFa1dnAnbQGySCT51JBZXvI=", - "owner": "JulienMalka", - "repo": "queued-build-hook", - "rev": "fce00ce379e69a4fb15bfbcb94bb4d99b7b95632", - "type": "github" - }, - "original": { - "owner": "JulienMalka", - "ref": "postbuildscript", - "repo": "queued-build-hook", - "type": "github" - } - }, - "root": { - "inputs": { - "attic": "attic", - "buildbot-nix": "buildbot-nix", - "colmena": "colmena", - "flake-utils": "flake-utils_2", - "home-manager": "home-manager", - "home-manager-unstable": "home-manager-unstable", - "homepage": "homepage", - "lanzaboote": "lanzaboote", - "nix-hash-collection": "nix-hash-collection", - "nix-index-database": "nix-index-database", - "nixpkgs": "nixpkgs_8", - "nur": "nur", - "simple-nixos-mailserver": "simple-nixos-mailserver", - "sops-nix": "sops-nix", - "unstable": "unstable", - "zotero-nix": "zotero-nix" - } - }, - "rust-overlay": { - "inputs": { - "flake-utils": [ - "lanzaboote", - "flake-utils" - ], - "nixpkgs": [ - "lanzaboote", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1711246447, - "narHash": "sha256-g9TOluObcOEKewFo2fR4cn51Y/jSKhRRo4QZckHLop0=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "dcc802a6ec4e9cc6a1c8c393327f0c42666f22e4", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, - "simple-nixos-mailserver": { - "inputs": { - "blobs": "blobs", - "nixpkgs": [ - "unstable" - ], - "nixpkgs-22_11": [ - "nixpkgs" - ], - "utils": [ - "flake-utils" - ] - }, - "locked": { - "lastModified": 1671659164, - "narHash": "sha256-DbpT+v1POwFOInbrDL+vMbYV3mVbTkMxmJ5j50QnOcA=", - "owner": "simple-nixos-mailserver", - "repo": "nixos-mailserver", - "rev": "bc667fb6afc45f6cc2d118ab77658faf2227cffd", - "type": "gitlab" - }, - "original": { - "owner": "simple-nixos-mailserver", - "ref": "nixos-22.11", - "repo": "nixos-mailserver", - "type": "gitlab" - } - }, - "sops-nix": { - "inputs": { - "nixpkgs": [ - "unstable" - ], - "nixpkgs-stable": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1711249319, - "narHash": "sha256-N+Pp3/8H+rd7cO71VNV/ovV/Kwt+XNeUHNhsmyTabdM=", - "owner": "Mic92", - "repo": "sops-nix", - "rev": "405987a66cce9a4a82f321f11b205982a7127c88", - "type": "github" - }, - "original": { - "owner": "Mic92", - "repo": "sops-nix", - "type": "github" - } - }, - "stable": { - "locked": { - "lastModified": 1696039360, - "narHash": "sha256-g7nIUV4uq1TOVeVIDEZLb005suTWCUjSY0zYOlSBsyE=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "32dcb45f66c0487e92db8303a798ebc548cadedc", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-23.05", - "repo": "nixpkgs", - "type": "github" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_2": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_3": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_4": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_5": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_6": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_7": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "treefmt-nix": { - "inputs": { - "nixpkgs": [ - "buildbot-nix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1699786194, - "narHash": "sha256-3h3EH1FXQkIeAuzaWB+nK0XK54uSD46pp+dMD3gAcB4=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "e82f32aa7f06bbbd56d7b12186d555223dc399d1", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" - } - }, - "treefmt-nix_2": { - "inputs": { - "nixpkgs": [ - "nix-hash-collection", - "queued-build-hook", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1708897213, - "narHash": "sha256-QECZB+Hgz/2F/8lWvHNk05N6NU/rD9bWzuNn6Cv8oUk=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "e497a9ddecff769c2a7cbab51e1ed7a8501e7a3a", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" - } - }, - "unstable": { - "locked": { - "lastModified": 1711708974, - "narHash": "sha256-qdBcRm0F3gY6jKSvCJOz+jYXvCOlY2+tuSI5BuBTmzs=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "82a35d388606993109cbac25045443c8ba8dc2d6", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable-small", - "repo": "nixpkgs", - "type": "github" - } - }, - "utils": { - "inputs": { - "systems": "systems_7" - }, - "locked": { - "lastModified": 1705309234, - "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", - "type": "github" - }, - "original": { - "id": "flake-utils", - "type": "indirect" - } - }, - "zotero-nix": { - "inputs": { - "nixpkgs": "nixpkgs_9", - "utils": "utils" - }, - "locked": { - "lastModified": 1710169714, - "narHash": "sha256-MYHgjDdpXNFqQfP3gCIYls0mdx7/XHA5Wu8qERzn65g=", - "owner": "camillemndn", - "repo": "zotero-nix", - "rev": "5dd398b6113dc13cfec9df468fb191bf59338c88", - "type": "github" - }, - "original": { - "owner": "camillemndn", - "repo": "zotero-nix", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/flake.nix b/flake.nix deleted file mode 100644 index 398d5d9..0000000 --- a/flake.nix +++ /dev/null @@ -1,134 +0,0 @@ -{ - description = "A flake for my personnal configurations"; - - inputs = { - - nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; - - home-manager = { - url = "github:nix-community/home-manager/release-23.11"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - home-manager-unstable = { - url = "github:nix-community/home-manager/master"; - }; - - homepage = { - url = "github:JulienMalka/homepage"; - flake = false; - }; - - unstable.url = "github:NixOS/nixpkgs/nixos-unstable-small"; - - flake-utils.url = "github:numtide/flake-utils"; - - colmena.url = "github:zhaofengli/colmena"; - - sops-nix = { - url = "github:Mic92/sops-nix"; - inputs.nixpkgs.follows = "unstable"; - inputs.nixpkgs-stable.follows = "nixpkgs"; - }; - - simple-nixos-mailserver = { - url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-22.11"; - inputs.nixpkgs.follows = "unstable"; - inputs.nixpkgs-22_11.follows = "nixpkgs"; - inputs.utils.follows = "flake-utils"; - }; - - attic = { - url = "github:zhaofengli/attic"; - inputs.nixpkgs.follows = "unstable"; - inputs.nixpkgs-stable.follows = "nixpkgs"; - inputs.flake-utils.follows = "flake-utils"; - }; - - nix-index-database = { - url = "github:Mic92/nix-index-database"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - lanzaboote = { - url = "github:nix-community/lanzaboote/master"; - }; - - buildbot-nix.url = "github:JulienMalka/buildbot-nix"; - - }; - - outputs = { self, nixpkgs, ... }@inputs: - let - lib = nixpkgs.lib.extend (import ./lib inputs); - machines_plats = lib.mapAttrsToList (_name: value: value.arch) (lib.filterAttrs (_n: v: builtins.hasAttr "arch" v) lib.luj.machines); - mkMachine = import ./lib/mkmachine.nix inputs lib; - - nixpkgs_plats = builtins.listToAttrs (builtins.map - (plat: { - name = plat; - value = import nixpkgs { system = plat; }; - }) - machines_plats); - in - rec { - - nixosModules = builtins.listToAttrs (map - (x: { - name = x; - value = import (./modules + "/${x}"); - }) - (builtins.attrNames (builtins.readDir ./modules))); - - nixosConfigurations = builtins.mapAttrs - (name: value: (mkMachine { - host-config = value; - modules = self.nixosModules; - nixpkgs = lib.luj.machines.${name}.nixpkgs_version; - system = lib.luj.machines.${name}.arch; - home-manager = lib.luj.machines.${name}.hm_version; - })) - (lib.importConfig ./machines); - - - colmena = - let - deployableConfigurations = lib.filterAttrs (_: v: builtins.hasAttr "ipv4" lib.luj.machines.${v.config.networking.hostName}) nixosConfigurations; - in - { - meta = { - nixpkgs = import inputs.nixpkgs { system = "x86_64-linux"; }; - nodeNixpkgs = builtins.mapAttrs (_: v: v.pkgs) deployableConfigurations; - nodeSpecialArgs = builtins.mapAttrs (_: v: v._module.specialArgs) deployableConfigurations; - specialArgs.lib = lib; - }; - } // builtins.mapAttrs - (_: v: { - imports = v._module.args.modules; - }) - deployableConfigurations; - - - packages = builtins.listToAttrs - (builtins.map - (plat: { - name = plat; - value = - lib.filterAttrs (_name: value: (!lib.hasAttrByPath [ "meta" "platforms" ] value) || builtins.elem plat value.meta.platforms) - (builtins.listToAttrs (builtins.map - (e: { - name = e; - value = nixpkgs_plats.${plat}.callPackage (./packages + "/${e}") { }; - }) - (builtins.attrNames (builtins.readDir ./packages)))); - }) - machines_plats); - - inherit (lib.luj) machines; - - checks = { - inherit packages; - machines = lib.mapAttrs (_: v: v.config.system.build.toplevel) self.nixosConfigurations; - }; - }; -} diff --git a/hive.nix b/hive.nix new file mode 100644 index 0000000..aad91c8 --- /dev/null +++ b/hive.nix @@ -0,0 +1 @@ +let outputs = import ./.; in outputs.colmena diff --git a/lib/mkmachine.nix b/lib/mkmachine.nix index fa0fb06..2dfd916 100644 --- a/lib/mkmachine.nix +++ b/lib/mkmachine.nix @@ -3,14 +3,16 @@ inputs: lib: let overlay-unstable = arch: _final: _prev: { - unstable = inputs.unstable.legacyPackages."${arch}"; + unstable = import inputs.unstable { }; }; in { host-config, modules, nixpkgs ? inputs.nixpkgs, system ? "x86_64-linux", home-manager ? inputs.home-manager }: -nixpkgs.lib.nixosSystem { +let pkgs = import nixpkgs { }; +in +import "${nixpkgs}/nixos/lib/eval-config.nix" { inherit system; - lib = nixpkgs.lib.extend (import ./default.nix inputs); + lib = pkgs.lib.extend (import ./default.nix inputs); specialArgs = { inherit inputs; @@ -18,14 +20,13 @@ nixpkgs.lib.nixosSystem { modules = builtins.attrValues modules ++ [ ../machines/base.nix host-config - inputs.sops-nix.nixosModules.sops - home-manager.nixosModules.home-manager - inputs.simple-nixos-mailserver.nixosModule - inputs.attic.nixosModules.atticd - inputs.lanzaboote.nixosModules.lanzaboote - inputs.nix-index-database.nixosModules.nix-index - inputs.buildbot-nix.nixosModules.buildbot-master - inputs.buildbot-nix.nixosModules.buildbot-worker + (import "${inputs.sops-nix}/modules/sops") + (import "${inputs.home-manager}/nixos") + (import "${inputs.nixos-mailserver}") + (import "${inputs.attic}/nixos/atticd.nix") + (import "${inputs.lanzaboote}/nix/modules/lanzaboote.nix") + (import "${inputs.buildbot-nix}/nix/master.nix") + (import "${inputs.buildbot-nix}/nix/worker.nix") { home-manager.useGlobalPkgs = true; nixpkgs.overlays = [ @@ -36,7 +37,8 @@ nixpkgs.lib.nixosSystem { mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ]; }); # Packages comming from other repositories - attic = inputs.attic.packages.${system}.default; + + attic = import inputs.attic; inherit (inputs.colmena.packages.${system}) colmena; inherit (prev.unstable) bcachefs-tools; # My own packages @@ -46,6 +48,11 @@ nixpkgs.lib.nixosSystem { ]; } ]; - extraModules = [ inputs.colmena.nixosModules.deploymentOptions ]; + extraModules = + let + colmenaModules = import + "${inputs.colmena}/src/nix/hive/options.nix"; + in + [ colmenaModules.deploymentOptions ]; } diff --git a/machines/base.nix b/machines/base.nix index 61c5bbb..bcdb5d8 100644 --- a/machines/base.nix +++ b/machines/base.nix @@ -35,8 +35,6 @@ environment.variables.EDITOR = "nvim"; - programs.command-not-found.enable = false; - programs.nix-index-database.comma.enable = true; networking.networkmanager.dns = "systemd-resolved"; services.resolved.enable = true;