diff --git a/examples/devos/flake.lock b/examples/devos/flake.lock deleted file mode 100644 index 6ab6496c5..000000000 --- a/examples/devos/flake.lock +++ /dev/null @@ -1,470 +0,0 @@ -{ - "nodes": { - "agenix": { - "inputs": { - "nixpkgs": [ - "nixos" - ] - }, - "locked": { - "lastModified": 1665870395, - "narHash": "sha256-Tsbqb27LDNxOoPLh0gw2hIb6L/6Ow/6lIBvqcHzEKBI=", - "owner": "ryantm", - "repo": "agenix", - "rev": "a630400067c6d03c9b3e0455347dc8559db14288", - "type": "github" - }, - "original": { - "owner": "ryantm", - "repo": "agenix", - "type": "github" - } - }, - "darwin": { - "inputs": { - "nixpkgs": [ - "nixpkgs-darwin-stable" - ] - }, - "locked": { - "lastModified": 1672753581, - "narHash": "sha256-EIi2tqHoje5cE9WqH23ZghW28NOOWSUM7tcxKE1U9KI=", - "owner": "LnL7", - "repo": "nix-darwin", - "rev": "3db1d870b04b13411f56ab1a50cd32b001f56433", - "type": "github" - }, - "original": { - "owner": "LnL7", - "repo": "nix-darwin", - "type": "github" - } - }, - "darwin_2": { - "inputs": { - "nixpkgs": [ - "digga", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1651916036, - "narHash": "sha256-UuD9keUGm4IuVEV6wdSYbuRm7CwfXE63hVkzKDjVsh4=", - "owner": "LnL7", - "repo": "nix-darwin", - "rev": "2f2bdf658d2b79bada78dc914af99c53cad37cba", - "type": "github" - }, - "original": { - "owner": "LnL7", - "repo": "nix-darwin", - "type": "github" - } - }, - "deploy": { - "inputs": { - "flake-compat": "flake-compat", - "nixpkgs": [ - "nixos" - ], - "utils": "utils" - }, - "locked": { - "lastModified": 1672327199, - "narHash": "sha256-pFlngSHXKBhAmbaKZ4FYtu57LLunG+vWdL7a5vw1RvQ=", - "owner": "serokell", - "repo": "deploy-rs", - "rev": "a5619f5660a00f58c2b7c16d89058e92327ac9b8", - "type": "github" - }, - "original": { - "owner": "serokell", - "repo": "deploy-rs", - "type": "github" - } - }, - "devshell": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": [ - "digga", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1655976588, - "narHash": "sha256-VreHyH6ITkf/1EX/8h15UqhddJnUleb0HgbC3gMkAEQ=", - "owner": "numtide", - "repo": "devshell", - "rev": "899ca4629020592a13a46783587f6e674179d1db", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "devshell", - "type": "github" - } - }, - "digga": { - "inputs": { - "darwin": "darwin_2", - "deploy": [ - "deploy" - ], - "devshell": "devshell", - "flake-compat": "flake-compat_2", - "flake-utils-plus": "flake-utils-plus", - "home-manager": [ - "home" - ], - "nixlib": [ - "nixos" - ], - "nixpkgs": [ - "nixos" - ], - "nixpkgs-unstable": "nixpkgs-unstable" - }, - "locked": { - "lastModified": 1668250948, - "narHash": "sha256-qqyzJQHgb/Bgq3Zxwa0gmaDEpkuyVhvynnq6a0akMWw=", - "owner": "divnix", - "repo": "digga", - "rev": "54ede8e591d288c176a09d6fcf4b123896c0bf0f", - "type": "github" - }, - "original": { - "owner": "divnix", - "repo": "digga", - "type": "github" - } - }, - "flake-compat": { - "flake": false, - "locked": { - "lastModified": 1668681692, - "narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "009399224d5e398d03b22badca40a37ac85412a1", - "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": 1668681692, - "narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "009399224d5e398d03b22badca40a37ac85412a1", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_4": { - "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-utils": { - "locked": { - "lastModified": 1642700792, - "narHash": "sha256-XqHrk7hFb+zBvRg6Ghl+AZDq03ov6OshJLiSWOoX5es=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "846b2ae0fc4cc943637d3d1def4454213e203cba", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils-plus": { - "inputs": { - "flake-utils": "flake-utils_2" - }, - "locked": { - "lastModified": 1654029967, - "narHash": "sha256-my3GQ3mQIw/1f6GPV1IhUZrcYQSWh0YJAMPNBjhXJDw=", - "owner": "gytis-ivaskevicius", - "repo": "flake-utils-plus", - "rev": "6271cf3842ff9c8a9af9e3508c547f86bc77d199", - "type": "github" - }, - "original": { - "owner": "gytis-ivaskevicius", - "ref": "refs/pull/120/head", - "repo": "flake-utils-plus", - "type": "github" - } - }, - "flake-utils_2": { - "locked": { - "lastModified": 1644229661, - "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_3": { - "locked": { - "lastModified": 1667077288, - "narHash": "sha256-bdC8sFNDpT0HK74u9fUkpbf1MEzVYJ+ka7NXCdgBoaA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "6ee9ebb6b1ee695d2cacc4faa053a7b9baa76817", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "home": { - "inputs": { - "nixpkgs": [ - "nixos" - ], - "utils": "utils_2" - }, - "locked": { - "lastModified": 1672244468, - "narHash": "sha256-xaZb8AZqoXRCSqPusCk4ouf+fUNP8UJdafmMTF1Ltlw=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "89a8ba0b5b43b3350ff2e3ef37b66736b2ef8706", - "type": "github" - }, - "original": { - "owner": "nix-community", - "ref": "release-22.11", - "repo": "home-manager", - "type": "github" - } - }, - "latest": { - "locked": { - "lastModified": 1672791794, - "narHash": "sha256-mqGPpGmwap0Wfsf3o2b6qHJW1w2kk/I6cGCGIU+3t6o=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "9813adc7f7c0edd738c6bdd8431439688bb0cb3d", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixos": { - "locked": { - "lastModified": 1672844754, - "narHash": "sha256-o26WabuHABQsaHxxmIrR3AQRqDFUEdLckLXkVCpIjSU=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "e9ade2c8240e00a4784fac282a502efff2786bdc", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-22.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixos-hardware": { - "locked": { - "lastModified": 1672644464, - "narHash": "sha256-RYlvRMcQNT7FDoDkViijQBHg9g+blsB+U6AvL/gAsPI=", - "owner": "nixos", - "repo": "nixos-hardware", - "rev": "ca29e25c39b8e117d4d76a81f1e229824a9b3a26", - "type": "github" - }, - "original": { - "owner": "nixos", - "repo": "nixos-hardware", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1671525405, - "narHash": "sha256-MEgNxm/oRt5w4ycMENewfZQKOak0ixmjVPfXM96N1FA=", - "path": "/nix/store/d2flirhsd337gm8j8rxlqklslryx6g3q-source", - "rev": "cbe419ed4c8f98bd82d169c321d339ea30904f1f", - "type": "path" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, - "nixpkgs-darwin-stable": { - "locked": { - "lastModified": 1672907623, - "narHash": "sha256-hI1wQVjYDdnEX0DxFbxNqUgkg/L3BAUb6Ocy5DJS0Yw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "c013ff8cc1e5186fd459f95e757d572700190fec", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-22.11-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-unstable": { - "locked": { - "lastModified": 1667629849, - "narHash": "sha256-P+v+nDOFWicM4wziFK9S/ajF2lc0N2Rg9p6Y35uMoZI=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "3bacde6273b09a21a8ccfba15586fb165078fb62", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nur": { - "locked": { - "lastModified": 1672971053, - "narHash": "sha256-d2w/OvdsBkg7jf9n6diLASirdY0XstSqpUXPtWLfKrM=", - "owner": "nix-community", - "repo": "NUR", - "rev": "37aa8904d0a5687eb3eca8a72737e1e3e75113b3", - "type": "github" - }, - "original": { - "id": "nur", - "type": "indirect" - } - }, - "nvfetcher": { - "inputs": { - "flake-compat": "flake-compat_4", - "flake-utils": "flake-utils_3", - "nixpkgs": [ - "nixos" - ] - }, - "locked": { - "lastModified": 1667620329, - "narHash": "sha256-v1Zk7rtEbAGpevBGPZvZBKpwbmw4I+uVwxvd+pBlp3o=", - "owner": "berberman", - "repo": "nvfetcher", - "rev": "294826951113dcd3aa9abbcacfb1aa5b95a19116", - "type": "github" - }, - "original": { - "owner": "berberman", - "repo": "nvfetcher", - "type": "github" - } - }, - "root": { - "inputs": { - "agenix": "agenix", - "darwin": "darwin", - "deploy": "deploy", - "digga": "digga", - "flake-compat": "flake-compat_3", - "home": "home", - "latest": "latest", - "nixos": "nixos", - "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs", - "nixpkgs-darwin-stable": "nixpkgs-darwin-stable", - "nur": "nur", - "nvfetcher": "nvfetcher" - } - }, - "utils": { - "locked": { - "lastModified": 1667395993, - "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "utils_2": { - "locked": { - "lastModified": 1667395993, - "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/examples/devos/lib/default.nix b/examples/devos/lib/default.nix index c7ff93f39..ac167511b 100644 --- a/examples/devos/lib/default.nix +++ b/examples/devos/lib/default.nix @@ -1,9 +1,7 @@ {lib}: -lib.makeExtensible (self: -let - callLibs = file: import file { lib = self; }; -in -rec { +lib.makeExtensible (self: let + callLibs = file: import file {lib = self;}; +in rec { ## Define your own library functions here! #id = x: x; ## Or in files, containing functions that take {lib} diff --git a/examples/groupByConfig/flake.lock b/examples/groupByConfig/flake.lock deleted file mode 100644 index 925881572..000000000 --- a/examples/groupByConfig/flake.lock +++ /dev/null @@ -1,361 +0,0 @@ -{ - "nodes": { - "darwin": { - "inputs": { - "nixpkgs": [ - "nixpkgs-darwin-stable" - ] - }, - "locked": { - "lastModified": 1672753581, - "narHash": "sha256-EIi2tqHoje5cE9WqH23ZghW28NOOWSUM7tcxKE1U9KI=", - "owner": "LnL7", - "repo": "nix-darwin", - "rev": "3db1d870b04b13411f56ab1a50cd32b001f56433", - "type": "github" - }, - "original": { - "owner": "LnL7", - "repo": "nix-darwin", - "type": "github" - } - }, - "darwin_2": { - "inputs": { - "nixpkgs": [ - "digga", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1651916036, - "narHash": "sha256-UuD9keUGm4IuVEV6wdSYbuRm7CwfXE63hVkzKDjVsh4=", - "owner": "LnL7", - "repo": "nix-darwin", - "rev": "2f2bdf658d2b79bada78dc914af99c53cad37cba", - "type": "github" - }, - "original": { - "owner": "LnL7", - "repo": "nix-darwin", - "type": "github" - } - }, - "deploy": { - "inputs": { - "flake-compat": "flake-compat", - "nixpkgs": [ - "digga", - "nixpkgs" - ], - "utils": "utils" - }, - "locked": { - "lastModified": 1653594315, - "narHash": "sha256-kJ0ENmnQJ4qL2FeYKZba9kvv1KmIuB3NVpBwMeI7AJQ=", - "owner": "serokell", - "repo": "deploy-rs", - "rev": "184349d8149436748986d1bdba087e4149e9c160", - "type": "github" - }, - "original": { - "owner": "serokell", - "repo": "deploy-rs", - "type": "github" - } - }, - "devshell": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": [ - "digga", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1655976588, - "narHash": "sha256-VreHyH6ITkf/1EX/8h15UqhddJnUleb0HgbC3gMkAEQ=", - "owner": "numtide", - "repo": "devshell", - "rev": "899ca4629020592a13a46783587f6e674179d1db", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "devshell", - "type": "github" - } - }, - "digga": { - "inputs": { - "darwin": "darwin_2", - "deploy": "deploy", - "devshell": "devshell", - "flake-compat": "flake-compat_2", - "flake-utils-plus": "flake-utils-plus", - "home-manager": "home-manager", - "nixlib": "nixlib", - "nixpkgs": [ - "nixos" - ], - "nixpkgs-unstable": "nixpkgs-unstable" - }, - "locked": { - "lastModified": 1668250948, - "narHash": "sha256-qqyzJQHgb/Bgq3Zxwa0gmaDEpkuyVhvynnq6a0akMWw=", - "owner": "divnix", - "repo": "digga", - "rev": "54ede8e591d288c176a09d6fcf4b123896c0bf0f", - "type": "github" - }, - "original": { - "owner": "divnix", - "repo": "digga", - "type": "github" - } - }, - "flake-compat": { - "flake": false, - "locked": { - "lastModified": 1648199409, - "narHash": "sha256-JwPKdC2PoVBkG6E+eWw3j6BMR6sL3COpYWfif7RVb8Y=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "64a525ee38886ab9028e6f61790de0832aa3ef03", - "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-utils": { - "locked": { - "lastModified": 1642700792, - "narHash": "sha256-XqHrk7hFb+zBvRg6Ghl+AZDq03ov6OshJLiSWOoX5es=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "846b2ae0fc4cc943637d3d1def4454213e203cba", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils-plus": { - "inputs": { - "flake-utils": "flake-utils_2" - }, - "locked": { - "lastModified": 1654029967, - "narHash": "sha256-my3GQ3mQIw/1f6GPV1IhUZrcYQSWh0YJAMPNBjhXJDw=", - "owner": "gytis-ivaskevicius", - "repo": "flake-utils-plus", - "rev": "6271cf3842ff9c8a9af9e3508c547f86bc77d199", - "type": "github" - }, - "original": { - "owner": "gytis-ivaskevicius", - "ref": "refs/pull/120/head", - "repo": "flake-utils-plus", - "type": "github" - } - }, - "flake-utils_2": { - "locked": { - "lastModified": 1644229661, - "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "home": { - "inputs": { - "nixpkgs": [ - "nixos" - ], - "utils": "utils_2" - }, - "locked": { - "lastModified": 1672244468, - "narHash": "sha256-xaZb8AZqoXRCSqPusCk4ouf+fUNP8UJdafmMTF1Ltlw=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "89a8ba0b5b43b3350ff2e3ef37b66736b2ef8706", - "type": "github" - }, - "original": { - "owner": "nix-community", - "ref": "release-22.11", - "repo": "home-manager", - "type": "github" - } - }, - "home-manager": { - "inputs": { - "nixpkgs": [ - "digga", - "nixlib" - ] - }, - "locked": { - "lastModified": 1656169755, - "narHash": "sha256-Nlnm4jeQWEGjYrE6hxi/7HYHjBSZ/E0RtjCYifnNsWk=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "4a3d01fb53f52ac83194081272795aa4612c2381", - "type": "github" - }, - "original": { - "owner": "nix-community", - "ref": "release-22.05", - "repo": "home-manager", - "type": "github" - } - }, - "nixlib": { - "locked": { - "lastModified": 1656809537, - "narHash": "sha256-pwXBYG3ThN4ccJjvcdNdonQ8Wyv0y/iYdnuesiFUY1U=", - "owner": "nix-community", - "repo": "nixpkgs.lib", - "rev": "40e271f69106323734b55e2ba74f13bebde324c0", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixpkgs.lib", - "type": "github" - } - }, - "nixos": { - "locked": { - "lastModified": 1672844754, - "narHash": "sha256-o26WabuHABQsaHxxmIrR3AQRqDFUEdLckLXkVCpIjSU=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "e9ade2c8240e00a4784fac282a502efff2786bdc", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-22.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1671525405, - "narHash": "sha256-MEgNxm/oRt5w4ycMENewfZQKOak0ixmjVPfXM96N1FA=", - "path": "/nix/store/d2flirhsd337gm8j8rxlqklslryx6g3q-source", - "rev": "cbe419ed4c8f98bd82d169c321d339ea30904f1f", - "type": "path" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, - "nixpkgs-darwin-stable": { - "locked": { - "lastModified": 1672907623, - "narHash": "sha256-hI1wQVjYDdnEX0DxFbxNqUgkg/L3BAUb6Ocy5DJS0Yw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "c013ff8cc1e5186fd459f95e757d572700190fec", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-22.11-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-unstable": { - "locked": { - "lastModified": 1667629849, - "narHash": "sha256-P+v+nDOFWicM4wziFK9S/ajF2lc0N2Rg9p6Y35uMoZI=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "3bacde6273b09a21a8ccfba15586fb165078fb62", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "darwin": "darwin", - "digga": "digga", - "home": "home", - "nixos": "nixos", - "nixpkgs": "nixpkgs", - "nixpkgs-darwin-stable": "nixpkgs-darwin-stable" - } - }, - "utils": { - "locked": { - "lastModified": 1648297722, - "narHash": "sha256-W+qlPsiZd8F3XkzXOzAoR+mpFqzm3ekQkJNa+PIh1BQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "0f8662f1319ad6abf89b3380dd2722369fc51ade", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "utils_2": { - "locked": { - "lastModified": 1667395993, - "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/examples/hmOnly/flake.lock b/examples/hmOnly/flake.lock deleted file mode 100644 index 9acc05742..000000000 --- a/examples/hmOnly/flake.lock +++ /dev/null @@ -1,289 +0,0 @@ -{ - "nodes": { - "darwin": { - "inputs": { - "nixpkgs": [ - "digga", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1651916036, - "narHash": "sha256-UuD9keUGm4IuVEV6wdSYbuRm7CwfXE63hVkzKDjVsh4=", - "owner": "LnL7", - "repo": "nix-darwin", - "rev": "2f2bdf658d2b79bada78dc914af99c53cad37cba", - "type": "github" - }, - "original": { - "owner": "LnL7", - "repo": "nix-darwin", - "type": "github" - } - }, - "deploy": { - "inputs": { - "flake-compat": "flake-compat", - "nixpkgs": [ - "digga", - "nixpkgs" - ], - "utils": "utils" - }, - "locked": { - "lastModified": 1653594315, - "narHash": "sha256-kJ0ENmnQJ4qL2FeYKZba9kvv1KmIuB3NVpBwMeI7AJQ=", - "owner": "serokell", - "repo": "deploy-rs", - "rev": "184349d8149436748986d1bdba087e4149e9c160", - "type": "github" - }, - "original": { - "owner": "serokell", - "repo": "deploy-rs", - "type": "github" - } - }, - "devshell": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": [ - "digga", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1655976588, - "narHash": "sha256-VreHyH6ITkf/1EX/8h15UqhddJnUleb0HgbC3gMkAEQ=", - "owner": "numtide", - "repo": "devshell", - "rev": "899ca4629020592a13a46783587f6e674179d1db", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "devshell", - "type": "github" - } - }, - "digga": { - "inputs": { - "darwin": "darwin", - "deploy": "deploy", - "devshell": "devshell", - "flake-compat": "flake-compat_2", - "flake-utils-plus": "flake-utils-plus", - "home-manager": [ - "home" - ], - "nixlib": "nixlib", - "nixpkgs": [ - "nixos" - ], - "nixpkgs-unstable": "nixpkgs-unstable" - }, - "locked": { - "lastModified": 1668250948, - "narHash": "sha256-qqyzJQHgb/Bgq3Zxwa0gmaDEpkuyVhvynnq6a0akMWw=", - "owner": "divnix", - "repo": "digga", - "rev": "54ede8e591d288c176a09d6fcf4b123896c0bf0f", - "type": "github" - }, - "original": { - "owner": "divnix", - "repo": "digga", - "type": "github" - } - }, - "flake-compat": { - "flake": false, - "locked": { - "lastModified": 1648199409, - "narHash": "sha256-JwPKdC2PoVBkG6E+eWw3j6BMR6sL3COpYWfif7RVb8Y=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "64a525ee38886ab9028e6f61790de0832aa3ef03", - "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-utils": { - "locked": { - "lastModified": 1642700792, - "narHash": "sha256-XqHrk7hFb+zBvRg6Ghl+AZDq03ov6OshJLiSWOoX5es=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "846b2ae0fc4cc943637d3d1def4454213e203cba", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils-plus": { - "inputs": { - "flake-utils": "flake-utils_2" - }, - "locked": { - "lastModified": 1654029967, - "narHash": "sha256-my3GQ3mQIw/1f6GPV1IhUZrcYQSWh0YJAMPNBjhXJDw=", - "owner": "gytis-ivaskevicius", - "repo": "flake-utils-plus", - "rev": "6271cf3842ff9c8a9af9e3508c547f86bc77d199", - "type": "github" - }, - "original": { - "owner": "gytis-ivaskevicius", - "ref": "refs/pull/120/head", - "repo": "flake-utils-plus", - "type": "github" - } - }, - "flake-utils_2": { - "locked": { - "lastModified": 1644229661, - "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "home": { - "inputs": { - "nixpkgs": [ - "nixos" - ], - "utils": "utils_2" - }, - "locked": { - "lastModified": 1672244468, - "narHash": "sha256-xaZb8AZqoXRCSqPusCk4ouf+fUNP8UJdafmMTF1Ltlw=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "89a8ba0b5b43b3350ff2e3ef37b66736b2ef8706", - "type": "github" - }, - "original": { - "owner": "nix-community", - "ref": "release-22.11", - "repo": "home-manager", - "type": "github" - } - }, - "nixlib": { - "locked": { - "lastModified": 1656809537, - "narHash": "sha256-pwXBYG3ThN4ccJjvcdNdonQ8Wyv0y/iYdnuesiFUY1U=", - "owner": "nix-community", - "repo": "nixpkgs.lib", - "rev": "40e271f69106323734b55e2ba74f13bebde324c0", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixpkgs.lib", - "type": "github" - } - }, - "nixos": { - "locked": { - "lastModified": 1672844754, - "narHash": "sha256-o26WabuHABQsaHxxmIrR3AQRqDFUEdLckLXkVCpIjSU=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "e9ade2c8240e00a4784fac282a502efff2786bdc", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-22.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-unstable": { - "locked": { - "lastModified": 1667629849, - "narHash": "sha256-P+v+nDOFWicM4wziFK9S/ajF2lc0N2Rg9p6Y35uMoZI=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "3bacde6273b09a21a8ccfba15586fb165078fb62", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "digga": "digga", - "home": "home", - "nixos": "nixos" - } - }, - "utils": { - "locked": { - "lastModified": 1648297722, - "narHash": "sha256-W+qlPsiZd8F3XkzXOzAoR+mpFqzm3ekQkJNa+PIh1BQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "0f8662f1319ad6abf89b3380dd2722369fc51ade", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "utils_2": { - "locked": { - "lastModified": 1667395993, - "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/examples/minimal/.editorconfig b/examples/minimal/.editorconfig new file mode 100644 index 000000000..96e5188b3 --- /dev/null +++ b/examples/minimal/.editorconfig @@ -0,0 +1,32 @@ +# Editor configuration, see http://editorconfig.org +root = true + +[*] +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +charset = utf-8 +indent_style = space +indent_size = 2 + +# Ignore diffs/patches +[*.{diff,patch}] +end_of_line = unset +insert_final_newline = unset +trim_trailing_whitespace = unset +indent_size = unset + +[{.*,secrets}/**] +end_of_line = unset +insert_final_newline = unset +trim_trailing_whitespace = unset +charset = unset +indent_style = unset +indent_size = unset + +[*.py] +indent_size = 4 + +[*.md] +max_line_length = off +trim_trailing_whitespace = false diff --git a/examples/minimal/.envrc b/examples/minimal/.envrc new file mode 100644 index 000000000..19bef9ecd --- /dev/null +++ b/examples/minimal/.envrc @@ -0,0 +1,2 @@ +watch_file flake.nix flake.lock +use flake diff --git a/examples/minimal/.gitignore b/examples/minimal/.gitignore new file mode 100644 index 000000000..e8f2789fe --- /dev/null +++ b/examples/minimal/.gitignore @@ -0,0 +1,5 @@ +result +.direnv +doc/index.html + +pkgs/_sources/.shake* diff --git a/examples/minimal/COPYING b/examples/minimal/COPYING new file mode 100644 index 000000000..c9b44cb8a --- /dev/null +++ b/examples/minimal/COPYING @@ -0,0 +1,18 @@ +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/examples/minimal/README.md b/examples/minimal/README.md new file mode 100644 index 000000000..2c6aabfe4 --- /dev/null +++ b/examples/minimal/README.md @@ -0,0 +1,10 @@ +# Nix Configuration + +[![Nix](https://img.shields.io/badge/built_with-nix-blueviolet?style=for-the-badge&logo=nixos)](https://nixos.org) +[![Digga](https://img.shields.io/badge/divnix-digga-blueviolet?style=for-the-badge&logo=nixos)](https://github.com/divnix/digga) + +This repository is home to the nix code that builds my systems. + +## Why Nix? + +Nix allows for easy to manage, collaborative, reproducible deployments. This means that once something is setup and configured once, it works forever. If someone else shares their configuration, anyone can make use of it. diff --git a/examples/minimal/flake.nix b/examples/minimal/flake.nix new file mode 100644 index 000000000..78b32df48 --- /dev/null +++ b/examples/minimal/flake.nix @@ -0,0 +1,109 @@ +{ + description = "A minimal Digga NixOS configuration."; + + nixConfig = { + extra-experimental-features = "nix-command flakes"; + extra-substituters = [ + "https://nrdxp.cachix.org" + "https://nix-community.cachix.org" + ]; + extra-trusted-public-keys = [ + "nrdxp.cachix.org-1:Fc5PSqY2Jm1TrWfm88l6cvGWwz3s93c6IOifQWnhNW4=" + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + ]; + }; + + inputs = { + blank.url = "github:divnix/blank"; + + nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11"; + nixos-hardware.url = "github:nixos/nixos-hardware"; + + home-manager.url = "github:nix-community/home-manager/release-22.11"; + home-manager.inputs.nixpkgs.follows = "nixpkgs"; + + digga.url = "github:divnix/digga"; + digga.inputs.nixpkgs.follows = "nixpkgs"; + digga.inputs.nixlib.follows = "nixpkgs"; + digga.inputs.home-manager.follows = "home-manager"; + digga.inputs.darwin.follows = "blank"; + digga.inputs.deploy.follows = "blank"; + digga.inputs.flake-compat.follows = "blank"; + }; + + outputs = { + self, + nixpkgs, + nixos-hardware, + home-manager, + digga, + ... + } @ inputs: + digga.lib.mkFlake + { + inherit self inputs; + + channels = { + nixpkgs = {}; + }; + + nixos = { + imports = [(digga.lib.importHosts ./hosts)]; + importables = rec { + profiles = + digga.lib.rakeLeaves ./profiles + // { + users = digga.lib.rakeLeaves ./users; + }; + suites = with profiles; rec { + base = [cachix users.nixos users.root]; + }; + }; + hostDefaults = { + system = "x86_64-linux"; + channelName = "nixpkgs"; + imports = [(digga.lib.importExportableModules ./modules)]; + modules = [ + {lib.our = self.lib;} + digga.nixosModules.nixConfig + home-manager.nixosModules.home-manager + ]; + }; + hosts = { + NixOS = {}; + }; + }; + + home = { + imports = [(digga.lib.importExportableModules ./home/modules)]; + modules = []; + importables = rec { + profiles = digga.lib.rakeLeaves ./home/profiles; + suites = with profiles; rec { + base = [direnv git]; + }; + }; + users = { + nixos = {suites, ...}: { + imports = suites.base; + + home.stateVersion = "22.11"; + }; + }; + }; + + devshell.exportedModules = [ + ( + {pkgs, ...}: { + commands = [ + { + package = pkgs.nixUnstable; + } + ]; + } + ) + ]; + + homeConfigurations = digga.lib.mkHomeConfigurations self.nixosConfigurations; + }; +} diff --git a/examples/minimal/home/modules/.flake-keep b/examples/minimal/home/modules/.flake-keep new file mode 100644 index 000000000..e69de29bb diff --git a/examples/minimal/home/profiles/direnv/default.nix b/examples/minimal/home/profiles/direnv/default.nix new file mode 100644 index 000000000..2b51c9d23 --- /dev/null +++ b/examples/minimal/home/profiles/direnv/default.nix @@ -0,0 +1,6 @@ +{ + programs.direnv = { + enable = true; + nix-direnv.enable = true; + }; +} diff --git a/examples/minimal/home/profiles/git/default.nix b/examples/minimal/home/profiles/git/default.nix new file mode 100644 index 000000000..dd6a15c3b --- /dev/null +++ b/examples/minimal/home/profiles/git/default.nix @@ -0,0 +1,3 @@ +{ + programs.git.enable = true; +} diff --git a/examples/minimal/hosts/NixOS.nix b/examples/minimal/hosts/NixOS.nix new file mode 100644 index 000000000..7c1fc35be --- /dev/null +++ b/examples/minimal/hosts/NixOS.nix @@ -0,0 +1,11 @@ +{suites, ...}: { + ### root password is empty by default ### + imports = suites.base; + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + networking.networkmanager.enable = true; + + fileSystems."/" = {device = "/dev/disk/by-label/nixos";}; +} diff --git a/examples/minimal/modules/hm-system-defaults.nix b/examples/minimal/modules/hm-system-defaults.nix new file mode 100644 index 000000000..86a9e9cd5 --- /dev/null +++ b/examples/minimal/modules/hm-system-defaults.nix @@ -0,0 +1,18 @@ +{ + config, + pkgs, + ... +}: { + home-manager.sharedModules = [ + { + home.sessionVariables = { + # environment.sessionVariables is not currently available in nix-darwin + NIX_PATH = + config.environment.sessionVariables.NIX_PATH + or config.environment.variables.NIX_PATH; + }; + xdg.configFile."nix/registry.json".text = + config.environment.etc."nix/registry.json".text; + } + ]; +} diff --git a/examples/minimal/modules/nixPath.nix b/examples/minimal/modules/nixPath.nix new file mode 100644 index 000000000..aee038bae --- /dev/null +++ b/examples/minimal/modules/nixPath.nix @@ -0,0 +1,10 @@ +{ + channel, + inputs, + ... +}: { + nix.nixPath = [ + "nixpkgs=${channel.input}" + "home-manager=${inputs.home-manager}" + ]; +} diff --git a/examples/minimal/profiles/cachix/default.nix b/examples/minimal/profiles/cachix/default.nix new file mode 100644 index 000000000..9b810da7d --- /dev/null +++ b/examples/minimal/profiles/cachix/default.nix @@ -0,0 +1,13 @@ +{ + pkgs, + lib, + ... +}: let + folder = ./.; + toImport = name: value: folder + ("/" + name); + filterCaches = key: value: value == "regular" && lib.hasSuffix ".nix" key && key != "default.nix"; + imports = lib.mapAttrsToList toImport (lib.filterAttrs filterCaches (builtins.readDir folder)); +in { + inherit imports; + nix.settings.substituters = ["https://cache.nixos.org/"]; +} diff --git a/examples/minimal/profiles/cachix/nix-community.nix b/examples/minimal/profiles/cachix/nix-community.nix new file mode 100644 index 000000000..8734670e6 --- /dev/null +++ b/examples/minimal/profiles/cachix/nix-community.nix @@ -0,0 +1,10 @@ +{ + nix.settings = { + trusted-substituters = [ + "https://nix-community.cachix.org" + ]; + trusted-public-keys = [ + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + ]; + }; +} diff --git a/examples/minimal/users/nixos.nix b/examples/minimal/users/nixos.nix new file mode 100644 index 000000000..2b138334b --- /dev/null +++ b/examples/minimal/users/nixos.nix @@ -0,0 +1,10 @@ +{hmUsers, ...}: { + home-manager.users = {inherit (hmUsers) nixos;}; + + users.users.nixos = { + password = "nixos"; + description = "default"; + isNormalUser = true; + extraGroups = ["wheel"]; + }; +} diff --git a/examples/minimal/users/root.nix b/examples/minimal/users/root.nix new file mode 100644 index 000000000..c9f1ef71b --- /dev/null +++ b/examples/minimal/users/root.nix @@ -0,0 +1,5 @@ +{...}: +# recommend using `hashedPassword` +{ + users.users.root.password = ""; +} diff --git a/flake.lock b/flake.lock index 9a5c3d3a2..93788bf9b 100644 --- a/flake.lock +++ b/flake.lock @@ -151,6 +151,7 @@ "nixpkgs": [ "nixlib" ], +<<<<<<< Updated upstream "utils": [ "flake-utils" ] @@ -161,6 +162,16 @@ "owner": "nix-community", "repo": "home-manager", "rev": "89a8ba0b5b43b3350ff2e3ef37b66736b2ef8706", +======= + "utils": "utils_2" + }, + "locked": { + "lastModified": 1676257154, + "narHash": "sha256-eW3jymNLpdxS5fkp9NWKyNtgL0Gqtgg1vCTofKXDF1g=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "2cb27c79117a2a75ff3416c3199a2dc57af6a527", +>>>>>>> Stashed changes "type": "github" }, "original": { @@ -187,16 +198,24 @@ }, "nixpkgs": { "locked": { +<<<<<<< Updated upstream "lastModified": 1672580127, "narHash": "sha256-3lW3xZslREhJogoOkjeZtlBtvFMyxHku7I/9IVehhT8=", "owner": "nixos", "repo": "nixpkgs", "rev": "0874168639713f547c05947c76124f78441ea46c", +======= + "lastModified": 1676817468, + "narHash": "sha256-ovuJ1jQOC2/EEibufBkXmSN/O9mLx80Wh7aDmHmHAhA=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "0cf4274b5d06325bd16dbf879a30981bc283e58a", +>>>>>>> Stashed changes "type": "github" }, "original": { "owner": "nixos", - "ref": "nixos-22.05", + "ref": "nixos-22.11", "repo": "nixpkgs", "type": "github" } @@ -245,6 +264,21 @@ "repo": "flake-utils", "type": "github" } + }, + "utils_2": { + "locked": { + "lastModified": 1676283394, + "narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 20979920f..cb9bbdae2 100644 --- a/flake.nix +++ b/flake.nix @@ -1,5 +1,5 @@ { - description = "DevOS environment configuriguration library."; + description = "Digga configuration library."; nixConfig.extra-experimental-features = "nix-command flakes"; nixConfig.extra-substituters = "https://nrdxp.cachix.org https://nix-community.cachix.org"; @@ -7,7 +7,7 @@ inputs = { # Track channels with commits tested and built by hydra - nixpkgs.url = "github:nixos/nixpkgs/nixos-22.05"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; nixlib.url = "github:nix-community/nixpkgs.lib"; @@ -140,10 +140,15 @@ nixosModules = import ./modules/nixos-modules.nix; darwinModules = import ./modules/darwin-modules.nix; - defaultTemplate = self.templates.devos; + templates.default = self.templates.devos; templates.devos.path = ./examples/devos; templates.devos.description = '' - an awesome template for NixOS users, with consideration for common tools like home-manager, devshell, and more. + An awesome template for NixOS users, with consideration for common tools like home-manager, devshell, and more. + ''; + + templates.minimal.path = ./examples/minimal; + templates.minimal.description = '' + A stripped-down template for NixOS + home-manager. ''; # digga-local use