diff --git a/_sources/generated.json b/_sources/generated.json new file mode 100644 index 0000000..0a93d00 --- /dev/null +++ b/_sources/generated.json @@ -0,0 +1,214 @@ +{ + "agenix": { + "cargoLocks": null, + "date": "2025-06-17", + "extract": null, + "name": "agenix", + "passthru": null, + "pinned": false, + "src": { + "deepClone": false, + "fetchSubmodules": false, + "leaveDotGit": false, + "name": null, + "owner": "ryantm", + "repo": "agenix", + "rev": "531beac616433bac6f9e2a19feb8e99a22a66baf", + "sha256": "sha256-9P1FziAwl5+3edkfFcr5HeGtQUtrSdk/MksX39GieoA=", + "sparseCheckout": [], + "type": "github" + }, + "version": "531beac616433bac6f9e2a19feb8e99a22a66baf" + }, + "blog": { + "cargoLocks": null, + "date": "2025-07-22", + "extract": null, + "name": "blog", + "passthru": null, + "pinned": false, + "src": { + "deepClone": false, + "fetchSubmodules": false, + "leaveDotGit": false, + "name": null, + "rev": "420c26e68b1aebe29a880be60ead8b00954c9ace", + "sha256": "sha256-MxamnEYU/CeMq98GNzliN+vwBYE9+Jq8FUD2cRH0x7U=", + "sparseCheckout": [], + "type": "git", + "url": "https://git.gaze.systems/90008/website.git" + }, + "version": "420c26e68b1aebe29a880be60ead8b00954c9ace" + }, + "gomod2nix": { + "cargoLocks": null, + "date": "2025-07-21", + "extract": null, + "name": "gomod2nix", + "passthru": null, + "pinned": false, + "src": { + "deepClone": false, + "fetchSubmodules": false, + "leaveDotGit": false, + "name": null, + "owner": "nix-community", + "repo": "gomod2nix", + "rev": "be828766411cad04c194c8f714d46aa2b2596362", + "sha256": "sha256-MaaWYgN/nia7xJcOYLBtPk+cFo7X2zEM1d9xIGPQrLU=", + "sparseCheckout": [], + "type": "github" + }, + "version": "be828766411cad04c194c8f714d46aa2b2596362" + }, + "home": { + "cargoLocks": null, + "date": "2025-07-22", + "extract": null, + "name": "home", + "passthru": null, + "pinned": false, + "src": { + "deepClone": false, + "fetchSubmodules": false, + "leaveDotGit": false, + "name": null, + "owner": "nix-community", + "repo": "home-manager", + "rev": "0cdfcdbb525b77b951c889b6131047bc374f48fe", + "sha256": "sha256-CLQfNtUqirNVSYoW/kYbvL4PeeNasmZonaPnjO3+1YQ=", + "sparseCheckout": [], + "type": "github" + }, + "version": "0cdfcdbb525b77b951c889b6131047bc374f48fe" + }, + "limbusart": { + "cargoLocks": null, + "date": "2025-07-22", + "extract": null, + "name": "limbusart", + "passthru": null, + "pinned": false, + "src": { + "deepClone": false, + "fetchSubmodules": false, + "leaveDotGit": false, + "name": null, + "rev": "7f29ab57b73eb8a4db7163fc7d19a71cf89c3d8b", + "sha256": "sha256-xATZz/sHYHkEXjwcmq1DSntclWxnDIKCpH314MaL63U=", + "sparseCheckout": [], + "type": "git", + "url": "https://git.gaze.systems/90008/limbusart.git" + }, + "version": "7f29ab57b73eb8a4db7163fc7d19a71cf89c3d8b" + }, + "lix-module": { + "cargoLocks": null, + "date": null, + "extract": null, + "name": "lix-module", + "passthru": null, + "pinned": false, + "src": { + "sha256": "sha256-SXUAlxpjPRkArRMHy5+Hdi+PiC+ND9yzzIjiaHmTvQU=", + "type": "tarball", + "url": "https://git.lix.systems/lix-project/nixos-module/archive/2.93.2-1.tar.gz" + }, + "version": "2.93.2-1" + }, + "ncr": { + "cargoLocks": null, + "date": "2025-07-18", + "extract": null, + "name": "ncr", + "passthru": null, + "pinned": false, + "src": { + "deepClone": false, + "fetchSubmodules": false, + "leaveDotGit": false, + "name": null, + "rev": "4660aa9cd9b24bef569696eee46dbe7e8df3e237", + "sha256": "sha256-miZ64o8p+ToR6VIpcco/wq0rdHGjHsfepJdMcSiJEDk=", + "sparseCheckout": [], + "type": "git", + "url": "https://tangled.sh/@poor.dog/nixos-cloud-resources" + }, + "version": "4660aa9cd9b24bef569696eee46dbe7e8df3e237" + }, + "nixos-wsl": { + "cargoLocks": null, + "date": "2025-07-16", + "extract": null, + "name": "nixos-wsl", + "passthru": null, + "pinned": false, + "src": { + "deepClone": false, + "fetchSubmodules": false, + "leaveDotGit": false, + "name": null, + "owner": "nix-community", + "repo": "NixOS-WSL", + "rev": "20001f9bf0aaf2b1c307e43a5eec8cf8f800fe14", + "sha256": "sha256-ZNIpqCG/CfhmV+TgIeyO/XbhDjSWpwWokHM44j0Mn0w=", + "sparseCheckout": [], + "type": "github" + }, + "version": "20001f9bf0aaf2b1c307e43a5eec8cf8f800fe14" + }, + "nsid-tracker": { + "cargoLocks": null, + "date": "2025-07-22", + "extract": null, + "name": "nsid-tracker", + "passthru": null, + "pinned": false, + "src": { + "deepClone": false, + "fetchSubmodules": false, + "leaveDotGit": false, + "name": null, + "rev": "9bab265d0ef9b2800614073f5ccdd89ea3eeedee", + "sha256": "sha256-8c+EbZC7ZWA+uYJlR6fez+gcQNck1xC2uOMo2nzwfjg=", + "sparseCheckout": [], + "type": "git", + "url": "https://tangled.sh/@poor.dog/nsid-tracker" + }, + "version": "9bab265d0ef9b2800614073f5ccdd89ea3eeedee" + }, + "tangled": { + "cargoLocks": null, + "date": "2025-07-22", + "extract": null, + "name": "tangled", + "passthru": null, + "pinned": false, + "src": { + "deepClone": false, + "fetchSubmodules": false, + "leaveDotGit": false, + "name": null, + "rev": "84c9175d8a3f00516d73e5e2a4bdb14b72dc3b2e", + "sha256": "sha256-hmEO0FRxOeAfApQYb5DVy0iuxjJBzyY9dZxO/0NuWEA=", + "sparseCheckout": [], + "type": "git", + "url": "https://tangled.sh/@poor.dog/core" + }, + "version": "84c9175d8a3f00516d73e5e2a4bdb14b72dc3b2e" + }, + "tangled-sqlite-lib": { + "cargoLocks": null, + "date": null, + "extract": null, + "name": "tangled-sqlite-lib", + "passthru": null, + "pinned": false, + "src": { + "sha256": "sha256-bJoMjirsBjm2Qk9KPiy3yV3+8b/POlYe76/FQbciHro=", + "type": "tarball", + "url": "https://sqlite.org/2024/sqlite-amalgamation-3450100.zip" + }, + "version": "3450100" + } +} \ No newline at end of file diff --git a/_sources/generated.nix b/_sources/generated.nix new file mode 100644 index 0000000..ca3cd17 --- /dev/null +++ b/_sources/generated.nix @@ -0,0 +1,138 @@ +# This file was generated by nvfetcher, please do not modify it manually. +{ fetchgit, fetchurl, fetchFromGitHub, dockerTools }: +{ + agenix = { + pname = "agenix"; + version = "531beac616433bac6f9e2a19feb8e99a22a66baf"; + src = fetchFromGitHub { + owner = "ryantm"; + repo = "agenix"; + rev = "531beac616433bac6f9e2a19feb8e99a22a66baf"; + fetchSubmodules = false; + sha256 = "sha256-9P1FziAwl5+3edkfFcr5HeGtQUtrSdk/MksX39GieoA="; + }; + date = "2025-06-17"; + }; + blog = { + pname = "blog"; + version = "420c26e68b1aebe29a880be60ead8b00954c9ace"; + src = fetchgit { + url = "https://git.gaze.systems/90008/website.git"; + rev = "420c26e68b1aebe29a880be60ead8b00954c9ace"; + fetchSubmodules = false; + deepClone = false; + leaveDotGit = false; + sparseCheckout = [ ]; + sha256 = "sha256-MxamnEYU/CeMq98GNzliN+vwBYE9+Jq8FUD2cRH0x7U="; + }; + date = "2025-07-22"; + }; + gomod2nix = { + pname = "gomod2nix"; + version = "be828766411cad04c194c8f714d46aa2b2596362"; + src = fetchFromGitHub { + owner = "nix-community"; + repo = "gomod2nix"; + rev = "be828766411cad04c194c8f714d46aa2b2596362"; + fetchSubmodules = false; + sha256 = "sha256-MaaWYgN/nia7xJcOYLBtPk+cFo7X2zEM1d9xIGPQrLU="; + }; + date = "2025-07-21"; + }; + home = { + pname = "home"; + version = "0cdfcdbb525b77b951c889b6131047bc374f48fe"; + src = fetchFromGitHub { + owner = "nix-community"; + repo = "home-manager"; + rev = "0cdfcdbb525b77b951c889b6131047bc374f48fe"; + fetchSubmodules = false; + sha256 = "sha256-CLQfNtUqirNVSYoW/kYbvL4PeeNasmZonaPnjO3+1YQ="; + }; + date = "2025-07-22"; + }; + limbusart = { + pname = "limbusart"; + version = "7f29ab57b73eb8a4db7163fc7d19a71cf89c3d8b"; + src = fetchgit { + url = "https://git.gaze.systems/90008/limbusart.git"; + rev = "7f29ab57b73eb8a4db7163fc7d19a71cf89c3d8b"; + fetchSubmodules = false; + deepClone = false; + leaveDotGit = false; + sparseCheckout = [ ]; + sha256 = "sha256-xATZz/sHYHkEXjwcmq1DSntclWxnDIKCpH314MaL63U="; + }; + date = "2025-07-22"; + }; + lix-module = { + pname = "lix-module"; + version = "2.93.2-1"; + src = fetchTarball { + url = "https://git.lix.systems/lix-project/nixos-module/archive/2.93.2-1.tar.gz"; + sha256 = "sha256-SXUAlxpjPRkArRMHy5+Hdi+PiC+ND9yzzIjiaHmTvQU="; + }; + }; + ncr = { + pname = "ncr"; + version = "4660aa9cd9b24bef569696eee46dbe7e8df3e237"; + src = fetchgit { + url = "https://tangled.sh/@poor.dog/nixos-cloud-resources"; + rev = "4660aa9cd9b24bef569696eee46dbe7e8df3e237"; + fetchSubmodules = false; + deepClone = false; + leaveDotGit = false; + sparseCheckout = [ ]; + sha256 = "sha256-miZ64o8p+ToR6VIpcco/wq0rdHGjHsfepJdMcSiJEDk="; + }; + date = "2025-07-18"; + }; + nixos-wsl = { + pname = "nixos-wsl"; + version = "20001f9bf0aaf2b1c307e43a5eec8cf8f800fe14"; + src = fetchFromGitHub { + owner = "nix-community"; + repo = "NixOS-WSL"; + rev = "20001f9bf0aaf2b1c307e43a5eec8cf8f800fe14"; + fetchSubmodules = false; + sha256 = "sha256-ZNIpqCG/CfhmV+TgIeyO/XbhDjSWpwWokHM44j0Mn0w="; + }; + date = "2025-07-16"; + }; + nsid-tracker = { + pname = "nsid-tracker"; + version = "9bab265d0ef9b2800614073f5ccdd89ea3eeedee"; + src = fetchgit { + url = "https://tangled.sh/@poor.dog/nsid-tracker"; + rev = "9bab265d0ef9b2800614073f5ccdd89ea3eeedee"; + fetchSubmodules = false; + deepClone = false; + leaveDotGit = false; + sparseCheckout = [ ]; + sha256 = "sha256-8c+EbZC7ZWA+uYJlR6fez+gcQNck1xC2uOMo2nzwfjg="; + }; + date = "2025-07-22"; + }; + tangled = { + pname = "tangled"; + version = "84c9175d8a3f00516d73e5e2a4bdb14b72dc3b2e"; + src = fetchgit { + url = "https://tangled.sh/@poor.dog/core"; + rev = "84c9175d8a3f00516d73e5e2a4bdb14b72dc3b2e"; + fetchSubmodules = false; + deepClone = false; + leaveDotGit = false; + sparseCheckout = [ ]; + sha256 = "sha256-hmEO0FRxOeAfApQYb5DVy0iuxjJBzyY9dZxO/0NuWEA="; + }; + date = "2025-07-22"; + }; + tangled-sqlite-lib = { + pname = "tangled-sqlite-lib"; + version = "3450100"; + src = fetchTarball { + url = "https://sqlite.org/2024/sqlite-amalgamation-3450100.zip"; + sha256 = "sha256-bJoMjirsBjm2Qk9KPiy3yV3+8b/POlYe76/FQbciHro="; + }; + }; +} diff --git a/flake.lock b/flake.lock index c488a2e..fa4c515 100644 --- a/flake.lock +++ b/flake.lock @@ -1,148 +1,5 @@ { "nodes": { - "agenix": { - "flake": false, - "locked": { - "lastModified": 1750173260, - "narHash": "sha256-9P1FziAwl5+3edkfFcr5HeGtQUtrSdk/MksX39GieoA=", - "owner": "ryantm", - "repo": "agenix", - "rev": "531beac616433bac6f9e2a19feb8e99a22a66baf", - "type": "github" - }, - "original": { - "owner": "ryantm", - "repo": "agenix", - "type": "github" - } - }, - "blog": { - "flake": false, - "locked": { - "lastModified": 1753200278, - "narHash": "sha256-MxamnEYU/CeMq98GNzliN+vwBYE9+Jq8FUD2cRH0x7U=", - "ref": "refs/heads/svelte", - "rev": "420c26e68b1aebe29a880be60ead8b00954c9ace", - "revCount": 516, - "type": "git", - "url": "https://git.gaze.systems/90008/website.git" - }, - "original": { - "type": "git", - "url": "https://git.gaze.systems/90008/website.git" - } - }, - "gomod2nix": { - "flake": false, - "locked": { - "lastModified": 1753096219, - "narHash": "sha256-MaaWYgN/nia7xJcOYLBtPk+cFo7X2zEM1d9xIGPQrLU=", - "owner": "nix-community", - "repo": "gomod2nix", - "rev": "be828766411cad04c194c8f714d46aa2b2596362", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "gomod2nix", - "type": "github" - } - }, - "home": { - "flake": false, - "locked": { - "lastModified": 1753181343, - "narHash": "sha256-CLQfNtUqirNVSYoW/kYbvL4PeeNasmZonaPnjO3+1YQ=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "0cdfcdbb525b77b951c889b6131047bc374f48fe", - "type": "github" - }, - "original": { - "owner": "nix-community", - "ref": "master", - "repo": "home-manager", - "type": "github" - } - }, - "limbusart": { - "flake": false, - "locked": { - "lastModified": 1753207355, - "narHash": "sha256-xATZz/sHYHkEXjwcmq1DSntclWxnDIKCpH314MaL63U=", - "ref": "refs/heads/master", - "rev": "7f29ab57b73eb8a4db7163fc7d19a71cf89c3d8b", - "revCount": 45, - "type": "git", - "url": "https://git.gaze.systems/90008/limbusart.git" - }, - "original": { - "type": "git", - "url": "https://git.gaze.systems/90008/limbusart.git" - } - }, - "lix-module": { - "flake": false, - "locked": { - "lastModified": 1751240025, - "narHash": "sha256-SXUAlxpjPRkArRMHy5+Hdi+PiC+ND9yzzIjiaHmTvQU=", - "rev": "8b1094356f4723d6e89d3f8a95b333ee16d9ab02", - "type": "tarball", - "url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/8b1094356f4723d6e89d3f8a95b333ee16d9ab02.tar.gz?rev=8b1094356f4723d6e89d3f8a95b333ee16d9ab02" - }, - "original": { - "type": "tarball", - "url": "https://git.lix.systems/lix-project/nixos-module/archive/2.93.2-1.tar.gz" - } - }, - "naked-shell": { - "flake": false, - "locked": { - "lastModified": 1681286841, - "narHash": "sha256-3XlJrwlR0nBiREnuogoa5i1b4+w/XPe0z8bbrJASw0g=", - "owner": "yusdacra", - "repo": "mk-naked-shell", - "rev": "7612f828dd6f22b7fb332cc69440e839d7ffe6bd", - "type": "github" - }, - "original": { - "owner": "yusdacra", - "repo": "mk-naked-shell", - "type": "github" - } - }, - "ncr": { - "flake": false, - "locked": { - "lastModified": 1752858743, - "narHash": "sha256-miZ64o8p+ToR6VIpcco/wq0rdHGjHsfepJdMcSiJEDk=", - "ref": "refs/heads/main", - "rev": "4660aa9cd9b24bef569696eee46dbe7e8df3e237", - "revCount": 19, - "type": "git", - "url": "https://tangled.sh/@poor.dog/nixos-cloud-resources" - }, - "original": { - "type": "git", - "url": "https://tangled.sh/@poor.dog/nixos-cloud-resources" - } - }, - "nixos-wsl": { - "flake": false, - "locked": { - "lastModified": 1752682362, - "narHash": "sha256-ZNIpqCG/CfhmV+TgIeyO/XbhDjSWpwWokHM44j0Mn0w=", - "owner": "nix-community", - "repo": "NixOS-WSL", - "rev": "20001f9bf0aaf2b1c307e43a5eec8cf8f800fe14", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "NixOS-WSL", - "type": "github" - } - }, "nixpkgs": { "flake": false, "locked": { @@ -160,83 +17,9 @@ "type": "github" } }, - "nixpkgs-flake": { - "locked": { - "lastModified": 1752950548, - "narHash": "sha256-NS6BLD0lxOrnCiEOcvQCDVPXafX1/ek1dfJHX1nUIzc=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "c87b95e25065c028d31a94f06a62927d18763fdf", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nsid-tracker": { - "flake": false, - "locked": { - "lastModified": 1753208692, - "narHash": "sha256-8c+EbZC7ZWA+uYJlR6fez+gcQNck1xC2uOMo2nzwfjg=", - "ref": "refs/heads/main", - "rev": "9bab265d0ef9b2800614073f5ccdd89ea3eeedee", - "revCount": 29, - "type": "git", - "url": "https://tangled.sh/@poor.dog/nsid-tracker" - }, - "original": { - "type": "git", - "url": "https://tangled.sh/@poor.dog/nsid-tracker" - } - }, "root": { "inputs": { - "agenix": "agenix", - "blog": "blog", - "gomod2nix": "gomod2nix", - "home": "home", - "limbusart": "limbusart", - "lix-module": "lix-module", - "naked-shell": "naked-shell", - "ncr": "ncr", - "nixos-wsl": "nixos-wsl", - "nixpkgs": "nixpkgs", - "nixpkgs-flake": "nixpkgs-flake", - "nsid-tracker": "nsid-tracker", - "tangled": "tangled", - "tangled-sqlite-lib": "tangled-sqlite-lib" - } - }, - "tangled": { - "flake": false, - "locked": { - "lastModified": 1753210331, - "narHash": "sha256-hmEO0FRxOeAfApQYb5DVy0iuxjJBzyY9dZxO/0NuWEA=", - "ref": "refs/heads/master", - "rev": "84c9175d8a3f00516d73e5e2a4bdb14b72dc3b2e", - "revCount": 980, - "type": "git", - "url": "https://tangled.sh/@poor.dog/core" - }, - "original": { - "type": "git", - "url": "https://tangled.sh/@poor.dog/core" - } - }, - "tangled-sqlite-lib": { - "flake": false, - "locked": { - "lastModified": 1706631843, - "narHash": "sha256-bJoMjirsBjm2Qk9KPiy3yV3+8b/POlYe76/FQbciHro=", - "type": "tarball", - "url": "https://sqlite.org/2024/sqlite-amalgamation-3450100.zip" - }, - "original": { - "type": "tarball", - "url": "https://sqlite.org/2024/sqlite-amalgamation-3450100.zip" + "nixpkgs": "nixpkgs" } } }, diff --git a/flake.nix b/flake.nix index ea464a9..6aaff34 100644 --- a/flake.nix +++ b/flake.nix @@ -1,93 +1,44 @@ { description = "config!!!"; - inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - nixpkgs.flake = false; - nixpkgs-flake.url = "github:nixos/nixpkgs/nixos-unstable"; - - lix-module = { - url = "https://git.lix.systems/lix-project/nixos-module/archive/2.93.2-1.tar.gz"; - flake = false; - }; - - nixos-wsl.url = "github:nix-community/NixOS-WSL"; - nixos-wsl.flake = false; - - home.url = "github:nix-community/home-manager/master"; - home.flake = false; - - blog.url = "git+https://git.gaze.systems/90008/website.git"; - blog.flake = false; - - agenix.url = "github:ryantm/agenix"; - agenix.flake = false; - - naked-shell.url = "github:yusdacra/mk-naked-shell"; - naked-shell.flake = false; - - ncr.url = "git+https://tangled.sh/@poor.dog/nixos-cloud-resources"; - ncr.flake = false; - - limbusart.url = "git+https://git.gaze.systems/90008/limbusart.git"; - limbusart.flake = false; - - nsid-tracker.url = "git+https://tangled.sh/@poor.dog/nsid-tracker"; - nsid-tracker.flake = false; - - tangled.url = "git+https://tangled.sh/@poor.dog/core"; - tangled.flake = false; - - tangled-sqlite-lib = { - url = "https://sqlite.org/2024/sqlite-amalgamation-3450100.zip"; - flake = false; - }; - - gomod2nix = { - url = "github:nix-community/gomod2nix"; - flake = false; - }; - }; + inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + inputs.nixpkgs.flake = false; outputs = - inputs: + flakeInputs: let - lib = import "${inputs.nixpkgs}/lib"; + lib = import "${flakeInputs.nixpkgs}/lib"; tlib = import ./lib lib; l = lib; makePkgsSet = system: import ./pkgs-set { - inherit system inputs lib tlib; + inherit system lib tlib flakeInputs; }; allPkgsSets = tlib.genSystems makePkgsSet; miscApps = l.mapAttrs ( - _: cmds: - l.mapAttrs (_: cmd: { + _: l.mapAttrs (_: cmd: { type = "app"; program = cmd; - }) cmds + }) ) ( l.mapAttrs - (_: set: ( - l.mapAttrs - (_: app: app.program) - (import "${inputs.ncr}/makeApps.nix" {inherit (set) pkgs; inherit (inputs) self;}) - ) // { - generate-firefox-addons = toString "${set.pkgs.generate-firefox-addons}/bin/generate-firefox-addons"; - dns = toString "${set.pkgs.dnsmngmt}/bin/dns"; + (_: set: { + deploy-ncr = l.getExe set.terra.deploy-ncr; + dns = l.getExe set.terra.dnsmngmt; }) allPkgsSets ); in { lib = tlib; - nixosConfigurations = import ./hosts { inherit lib tlib inputs allPkgsSets; }; - homeConfigurations = import ./users { inherit lib tlib inputs allPkgsSets; }; + nixosConfigurations = import ./hosts { inherit lib tlib allPkgsSets; }; + homeConfigurations = import ./users { inherit lib tlib allPkgsSets; }; + legacyPackages = l.mapAttrs (_: set: set.pkgs // {inherit (set) inputs;}) allPkgsSets; packages = l.mapAttrs (_: set: set.exported) allPkgsSets; apps = miscApps; @@ -98,6 +49,6 @@ # }) # allPkgs; - devShells = import ./shells { inherit lib inputs allPkgsSets; }; + devShells = import ./shells { inherit lib allPkgsSets; }; }; } diff --git a/hosts/default.nix b/hosts/default.nix index fe1cc56..b82db6d 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -1,30 +1,26 @@ { - inputs, lib, tlib, allPkgsSets, ... }: let - baseModules = [ - ../modules - ../locale - "${inputs.home}/nixos" - ]; - mkSystem = name: set: - import "${inputs.nixpkgs}/nixos/lib/eval-config.nix" { + import "${set.inputs.nixpkgs}/nixos/lib/eval-config.nix" { inherit lib; system = null; - modules = baseModules ++ [ + modules = [ + ../modules + ../locale + "${set.inputs.home}/nixos" { networking.hostName = name; } { nixpkgs.pkgs = set.pkgs; } (import (./. + "/${name}/default.nix")) ]; specialArgs = { - inherit (set) terra; - inherit inputs tlib; + inherit (set) terra inputs; + inherit tlib; }; }; diff --git a/nvfetcher.toml b/nvfetcher.toml new file mode 100644 index 0000000..9280323 --- /dev/null +++ b/nvfetcher.toml @@ -0,0 +1,45 @@ +# nvfetcher configuration for Nix flake inputs + +[lix-module] +src.manual = "2.93.2-1" +fetch.tarball = "https://git.lix.systems/lix-project/nixos-module/archive/2.93.2-1.tar.gz" + +[nixos-wsl] +src.git = "https://github.com/nix-community/NixOS-WSL" +fetch.github = "nix-community/NixOS-WSL" + +[home] +src.git = "https://github.com/nix-community/home-manager" +fetch.github = "nix-community/home-manager" + +[blog] +src.git = "https://git.gaze.systems/90008/website.git" +fetch.git = "https://git.gaze.systems/90008/website.git" + +[agenix] +src.git = "https://github.com/ryantm/agenix" +fetch.github = "ryantm/agenix" + +[ncr] +src.git = "https://tangled.sh/@poor.dog/nixos-cloud-resources" +fetch.git = "https://tangled.sh/@poor.dog/nixos-cloud-resources" + +[limbusart] +src.git = "https://git.gaze.systems/90008/limbusart.git" +fetch.git = "https://git.gaze.systems/90008/limbusart.git" + +[nsid-tracker] +src.git = "https://tangled.sh/@poor.dog/nsid-tracker" +fetch.git = "https://tangled.sh/@poor.dog/nsid-tracker" + +[tangled] +src.git = "https://tangled.sh/@poor.dog/core" +fetch.git = "https://tangled.sh/@poor.dog/core" + +[tangled-sqlite-lib] +src.manual = "3450100" +fetch.tarball = "https://sqlite.org/2024/sqlite-amalgamation-3450100.zip" + +[gomod2nix] +src.git = "https://github.com/nix-community/gomod2nix" +fetch.github = "nix-community/gomod2nix" diff --git a/pkgs-set/default.nix b/pkgs-set/default.nix index 089ded6..4768bdf 100644 --- a/pkgs-set/default.nix +++ b/pkgs-set/default.nix @@ -1,5 +1,5 @@ { - inputs, + flakeInputs, system, lib, tlib, @@ -7,29 +7,35 @@ }: let l = lib // builtins; - overlays = l.flatten ( - l.mapAttrsToList - ( - name: _: - if name != "disabled" - then - let - o = import "${./overlays}/${name}"; - in - if (l.functionArgs o) ? inputs - then o { inherit inputs; } - else o - else - [] - ) - (l.readDir ./overlays) - ); - pkgs = import inputs.nixpkgs { - inherit system overlays; + _pkgs = import flakeInputs.nixpkgs { + inherit system; config.allowUnfree = true; # config.allowBroken = true; # config.permittedInsecurePackages = ["electron-25.9.0"]; }; + _inputs = import ../_sources/generated.nix { + inherit (_pkgs) fetchgit fetchurl fetchFromGitHub dockerTools; + }; + inputs = (l.mapAttrs (_: inp: inp // {__toString = s: toString s.src;}) _inputs) // flakeInputs; + pkgs = _pkgs.appendOverlays ( + l.flatten ( + l.mapAttrsToList + ( + name: _: + if name != "disabled" + then + let + o = import "${./overlays}/${name}"; + in + if (l.functionArgs o) ? inputs + then o { inherit inputs; } + else o + else + [] + ) + (l.readDir ./overlays) + ) + ); terraPkgs = pkgs.lib.makeScope pkgs.newScope ( self: @@ -41,7 +47,7 @@ let ); pkgsToExport = pkgs.lib.getAttrs (import ./exported.nix) (pkgs // terraPkgs); in { - inherit pkgs; + inherit pkgs inputs; terra = terraPkgs; exported = pkgsToExport; } diff --git a/pkgs-set/pkgs/deploy-ncr.nix b/pkgs-set/pkgs/deploy-ncr.nix new file mode 100644 index 0000000..e6ff165 --- /dev/null +++ b/pkgs-set/pkgs/deploy-ncr.nix @@ -0,0 +1,31 @@ +{ + inputs, + path, + writers, + system, + ... +}: +writers.writeNuBin "deploy-resources" '' + use std/log + nix eval --json .#nixosConfigurations --apply builtins.attrNames | from json + | each {|system| + let cfgNames = nix eval --json $".#nixosConfigurations.($system).config" --apply builtins.attrNames | from json + if not ($cfgNames | any {|el| $el == "providers"}) { + return + } + let expr = ' + let + flake = builtins.getFlake "path:${inputs.self}?narHash=${inputs.self.narHash}"; + ncr = flake.legacyPackages.${system}.inputs.ncr; + in + (import (ncr + "/makeApps.nix") { + pkgs = flake.legacyPackages.${system}; + nixosSystem = flake.nixosConfigurations.; + }).run + ' | str replace "" $system + log info $"deploying resources for ($system)" + nix build --json --expr $expr | from json | get 0.outputs.out + | each {|out| try {nu $out}} + } + exit 0 +'' diff --git a/shells/default.nix b/shells/default.nix index 673d19e..77af2c5 100644 --- a/shells/default.nix +++ b/shells/default.nix @@ -1,7 +1,6 @@ { lib, allPkgsSets, - inputs, ... }: lib.mapAttrs @@ -9,8 +8,7 @@ lib.mapAttrs system: set: let inherit (set) pkgs; - mkNakedShell = pkgs.callPackage inputs.naked-shell { }; - agenix = pkgs.callPackage "${inputs.agenix}/pkgs/agenix.nix" {}; + agenix = pkgs.callPackage "${set.inputs.agenix}/pkgs/agenix.nix" {}; agenix-wrapped = pkgs.writeShellApplication { name = "agenix"; runtimeInputs = [ agenix ]; @@ -27,7 +25,7 @@ lib.mapAttrs dash = pkgs.writers.writeNuBin "dash" ./dash.nu; in { - default = mkNakedShell { + default = pkgs.mkShellNoCC { name = "prts"; packages = (with pkgs; [ @@ -38,6 +36,7 @@ lib.mapAttrs nh go gopls + nvfetcher # golangci-lint # golangci-lint-langserver ]) diff --git a/users/default.nix b/users/default.nix index 12b9840..e9c7947 100644 --- a/users/default.nix +++ b/users/default.nix @@ -1,5 +1,4 @@ { - inputs, lib, tlib, allPkgsSets, @@ -8,12 +7,12 @@ let mkHome = name: set: - import "${inputs.home}/modules" { + import "${set.inputs.home}/modules" { inherit (set) pkgs; configuration = import (./. + "/${name}/default.nix"); extraSpecialArgs = { - inherit (set) pkgs terra; - inherit tlib inputs; + inherit (set) pkgs terra inputs; + inherit tlib; }; };