diff --git a/flake.lock b/flake.lock index 6c1e3d5..2b388e1 100644 --- a/flake.lock +++ b/flake.lock @@ -37,24 +37,20 @@ "type": "github" } }, - "crane": { - "inputs": { - "nixpkgs": [ - "flox-flake", - "nixpkgs" - ] - }, + "config": { "locked": { - "lastModified": 1703439018, - "narHash": "sha256-VT+06ft/x3eMZ1MJxWzQP3zXFGcrxGo5VR2rB7t88hs=", - "owner": "ipetkov", - "repo": "crane", - "rev": "afdcd41180e3dfe4dac46b5ee396e3b12ccc967a", + "dir": "templates/config", + "lastModified": 1715288913, + "narHash": "sha256-NQhxnFCAUj4x5t878Gpzb6xlRpr1V7bm5AEoqCVaJbk=", + "owner": "stackbuilders", + "repo": "nixpkgs-terraform", + "rev": "4f09d5af5c1782414ff27caab6f3abd84e516ded", "type": "github" }, "original": { - "owner": "ipetkov", - "repo": "crane", + "dir": "templates/config", + "owner": "stackbuilders", + "repo": "nixpkgs-terraform", "type": "github" } }, @@ -78,19 +74,21 @@ "type": "github" } }, - "flake-compat": { - "flake": false, + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, "locked": { - "lastModified": 1673956053, - "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "lastModified": 1706830856, + "narHash": "sha256-a0NYyp+h9hlb7ddVz4LUn1vT/PLwqfrWYcHMvFB1xYg=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "b253292d9c0a5ead9bc98c4e9a26c6312e27d69f", "type": "github" }, "original": { - "owner": "edolstra", - "repo": "flake-compat", + "owner": "hercules-ci", + "repo": "flake-parts", "type": "github" } }, @@ -98,24 +96,6 @@ "inputs": { "systems": "systems" }, - "locked": { - "lastModified": 1685518550, - "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_2": { - "inputs": { - "systems": "systems_2" - }, "locked": { "lastModified": 1687709756, "narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=", @@ -130,47 +110,6 @@ "type": "github" } }, - "flox-flake": { - "inputs": { - "crane": "crane", - "flox-latest": "flox-latest", - "nixpkgs": "nixpkgs", - "nixpkgs-bear": "nixpkgs-bear", - "pre-commit-hooks": "pre-commit-hooks", - "sqlite3pp": "sqlite3pp" - }, - "locked": { - "lastModified": 1712860128, - "narHash": "sha256-xqg2hbPv5WS+JnGv+9LVFLo5dRUyBt8BvmYEDuSTXr0=", - "owner": "flox", - "repo": "flox", - "rev": "c470fb87a0d9765603194259c227158a8957f95e", - "type": "github" - }, - "original": { - "owner": "flox", - "repo": "flox", - "type": "github" - } - }, - "flox-latest": { - "flake": false, - "locked": { - "lastModified": 1712673935, - "narHash": "sha256-PdGM5BOpebs6sdM3qCPh/W5R/0o6RSgSrAG5qEvL7ms=", - "ref": "refs/tags/v1.0.3", - "rev": "c50d78782713d19d6c790af271c8819b89b1a253", - "revCount": 1173, - "type": "git", - "url": "ssh://git@github.com/flox/flox" - }, - "original": { - "ref": "refs/tags/v1.0.3", - "rev": "c50d78782713d19d6c790af271c8819b89b1a253", - "type": "git", - "url": "ssh://git@github.com/flox/flox" - } - }, "genebean-omp-themes": { "flake": false, "locked": { @@ -187,28 +126,6 @@ "type": "github" } }, - "gitignore": { - "inputs": { - "nixpkgs": [ - "flox-flake", - "pre-commit-hooks", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1660459072, - "narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "a20de23b925fd8264fd7fad6454652e142fd7f73", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", - "type": "github" - } - }, "home-manager": { "inputs": { "nixpkgs": [ @@ -252,7 +169,7 @@ }, "nix-darwin_2": { "inputs": { - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs" }, "locked": { "lastModified": 1688307440, @@ -286,9 +203,9 @@ "nix-homebrew": { "inputs": { "brew-src": "brew-src", - "flake-utils": "flake-utils_2", + "flake-utils": "flake-utils", "nix-darwin": "nix-darwin_2", - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_2" }, "locked": { "lastModified": 1712182779, @@ -306,53 +223,36 @@ }, "nixpkgs": { "locked": { - "lastModified": 1704300003, - "narHash": "sha256-FRC/OlLVvKkrdm+RtrODQPufD0vVZYA0hpH9RPaHmp4=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "ab5fd150146dcfe41fda501134e6503932cc8dfd", - "type": "github" + "lastModified": 1687274257, + "narHash": "sha256-TutzPriQcZ8FghDhEolnHcYU2oHIG5XWF+/SUBNnAOE=", + "path": "/nix/store/22qgs3skscd9bmrxv9xv4q5d4wwm5ppx-source", + "rev": "2c9ecd1f0400076a4d6b2193ad468ff0a7e7fdc5", + "type": "path" }, "original": { - "owner": "NixOS", - "ref": "release-23.11", - "repo": "nixpkgs", - "type": "github" + "id": "nixpkgs", + "type": "indirect" } }, - "nixpkgs-bear": { + "nixpkgs-lib": { "locked": { - "lastModified": 1705957679, - "narHash": "sha256-Q8LJaVZGJ9wo33wBafvZSzapYsjOaNjP/pOnSiKVGHY=", + "dir": "lib", + "lastModified": 1706550542, + "narHash": "sha256-UcsnCG6wx++23yeER4Hg18CXWbgNpqNXcHIo5/1Y+hc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9a333eaa80901efe01df07eade2c16d183761fa3", + "rev": "97b17f32362e475016f942bbdfda4a4a72a8a652", "type": "github" }, "original": { + "dir": "lib", "owner": "NixOS", - "ref": "release-23.05", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } }, "nixpkgs-stable": { - "locked": { - "lastModified": 1685801374, - "narHash": "sha256-otaSUoFEMM+LjBI1XL/xGB5ao6IwnZOXc47qhIgJe8U=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "c37ca420157f4abc31e26f436c1145f8951ff373", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-23.05", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-stable_2": { "locked": { "lastModified": 1712437997, "narHash": "sha256-g0whLLwRvgO2FsyhY8fNk+TWenS3jg5UdlWL4uqgFeo=", @@ -368,6 +268,32 @@ "type": "github" } }, + "nixpkgs-terraform": { + "inputs": { + "config": "config", + "flake-parts": "flake-parts", + "nixpkgs": [ + "nixpkgs" + ], + "nixpkgs-unstable": [ + "nixpkgs-unstable" + ], + "systems": "systems_2" + }, + "locked": { + "lastModified": 1715707461, + "narHash": "sha256-I/zNUXjd+3UmKG8qFRFrpXpWUTlIeqN8Tp5/e3aQccs=", + "owner": "stackbuilders", + "repo": "nixpkgs-terraform", + "rev": "8d7d08686e54bd75d86642b3abe1d6c7ef41a0e9", + "type": "github" + }, + "original": { + "owner": "stackbuilders", + "repo": "nixpkgs-terraform", + "type": "github" + } + }, "nixpkgs-unstable": { "locked": { "lastModified": 1712849433, @@ -385,19 +311,6 @@ } }, "nixpkgs_2": { - "locked": { - "lastModified": 1687274257, - "narHash": "sha256-TutzPriQcZ8FghDhEolnHcYU2oHIG5XWF+/SUBNnAOE=", - "path": "/nix/store/22qgs3skscd9bmrxv9xv4q5d4wwm5ppx-source", - "rev": "2c9ecd1f0400076a4d6b2193ad468ff0a7e7fdc5", - "type": "path" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, - "nixpkgs_3": { "locked": { "lastModified": 1688049487, "narHash": "sha256-100g4iaKC9MalDjUW9iN6Jl/OocTDtXdeAj7pEGIRh4=", @@ -413,7 +326,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_3": { "locked": { "lastModified": 1712867921, "narHash": "sha256-edTFV4KldkCMdViC/rmpJa7oLIU8SE/S35lh/ukC7bg=", @@ -429,42 +342,17 @@ "type": "github" } }, - "pre-commit-hooks": { - "inputs": { - "flake-compat": "flake-compat", - "flake-utils": "flake-utils", - "gitignore": "gitignore", - "nixpkgs": [ - "flox-flake", - "nixpkgs" - ], - "nixpkgs-stable": "nixpkgs-stable" - }, - "locked": { - "lastModified": 1703939133, - "narHash": "sha256-Gxe+mfOT6bL7wLC/tuT2F+V+Sb44jNr8YsJ3cyIl4Mo=", - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "rev": "9d3d7e18c6bc4473d7520200d4ddab12f8402d38", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "type": "github" - } - }, "root": { "inputs": { "compose2nix": "compose2nix", "disko": "disko", - "flox-flake": "flox-flake", "genebean-omp-themes": "genebean-omp-themes", "home-manager": "home-manager", "nix-darwin": "nix-darwin", "nix-flatpak": "nix-flatpak", "nix-homebrew": "nix-homebrew", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_3", + "nixpkgs-terraform": "nixpkgs-terraform", "nixpkgs-unstable": "nixpkgs-unstable", "sops-nix": "sops-nix" } @@ -474,7 +362,7 @@ "nixpkgs": [ "nixpkgs" ], - "nixpkgs-stable": "nixpkgs-stable_2" + "nixpkgs-stable": "nixpkgs-stable" }, "locked": { "lastModified": 1712617241, @@ -490,27 +378,6 @@ "type": "github" } }, - "sqlite3pp": { - "inputs": { - "nixpkgs": [ - "flox-flake", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1691154329, - "narHash": "sha256-nMtwh/G1/Zt70rl540jn+nFVJuju0NdXJwk2Y3pNB+k=", - "owner": "aakropotkin", - "repo": "sqlite3pp", - "rev": "775e48a6c7a63a51585cd628f6c9816ba634a246", - "type": "github" - }, - "original": { - "owner": "aakropotkin", - "repo": "sqlite3pp", - "type": "github" - } - }, "systems": { "locked": { "lastModified": 1681028828, diff --git a/flake.nix b/flake.nix index e88f35d..503b5e6 100644 --- a/flake.nix +++ b/flake.nix @@ -36,10 +36,10 @@ inputs.nixpkgs.follows ="nixpkgs"; }; - flox-flake = { - url = "github:flox/flox"; - # Setting the line below seems to break things... :( - # inputs.nixpkgs.follows ="nixpkgs"; + nixpkgs-terraform = { + url = "github:stackbuilders/nixpkgs-terraform"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.nixpkgs-unstable.follows = "nixpkgs-unstable"; }; compose2nix = { @@ -55,7 +55,7 @@ }; }; # end inputs - outputs = inputs@{ self, nixpkgs, nixpkgs-unstable, nix-darwin, home-manager, nix-homebrew, nix-flatpak, disko, sops-nix, compose2nix, flox-flake, genebean-omp-themes, ... }: let + outputs = inputs@{ self, nixpkgs, nixpkgs-unstable, nix-darwin, home-manager, nix-homebrew, nix-flatpak, disko, sops-nix, nixpkgs-terraform, compose2nix, genebean-omp-themes, ... }: let # creates a macOS system config darwinHostConfig = system: hostname: username: nix-darwin.lib.darwinSystem { @@ -65,8 +65,9 @@ allowUnfree = true; permittedInsecurePackages = [ "python-2.7.18.7" ]; }; + overlays = [ nixpkgs-terraform.overlays.default ]; }; - specialArgs = { inherit inputs username hostname flox-flake; }; + specialArgs = { inherit inputs username hostname; }; modules = [ nix-homebrew.darwinModules.nix-homebrew { nix-homebrew = { @@ -95,20 +96,14 @@ # creates a nixos system config nixosHostConfig = system: hostname: username: nixpkgs.lib.nixosSystem { - specialArgs = { inherit inputs username hostname compose2nix flox-flake; + specialArgs = { inherit inputs username hostname compose2nix; pkgs = import nixpkgs { inherit system; config = { allowUnfree = true; permittedInsecurePackages = [ "electron-21.4.4" ]; }; - }; - pkgs-unstable = import nixpkgs-unstable { - inherit system; - config = { - allowUnfree = true; - permittedInsecurePackages = [ "electron-21.4.4" ]; - }; + overlays = [ nixpkgs-terraform.overlays.default ]; }; }; modules = [ @@ -141,13 +136,7 @@ allowUnfree = true; permittedInsecurePackages = [ "electron-21.4.4" ]; }; - }; - pkgs-unstable = import nixpkgs-unstable { - inherit system; - config = { - allowUnfree = true; - permittedInsecurePackages = [ "electron-21.4.4" ]; - }; + overlays = [ nixpkgs-terraform.overlays.default ]; }; }; modules = [ diff --git a/modules/hosts/darwin/mightymac/default.nix b/modules/hosts/darwin/mightymac/default.nix index 473e651..daeeb46 100644 --- a/modules/hosts/darwin/mightymac/default.nix +++ b/modules/hosts/darwin/mightymac/default.nix @@ -8,6 +8,8 @@ kopia kubectx reposurgeon + # terraform-versions."1.5.7" + terraformer ]; }; @@ -20,6 +22,7 @@ ]; brews = [ "adr-tools" + "awscli" "helm" "kind" "kubernetes-cli" diff --git a/modules/hosts/nixos/rainbow-planet/default.nix b/modules/hosts/nixos/rainbow-planet/default.nix index a050630..340404a 100644 --- a/modules/hosts/nixos/rainbow-planet/default.nix +++ b/modules/hosts/nixos/rainbow-planet/default.nix @@ -1,4 +1,4 @@ -{ config, flox-flake, pkgs, username, ... }: { +{ config, pkgs, username, ... }: { imports = [ ./hardware-configuration.nix ../../../system/common/linux/flatpaks.nix @@ -18,7 +18,6 @@ # host specific apps boinc brightnessctl - #flox-flake.packages.${pkgs.system}.default gnome.gnome-tweaks gnome.nautilus gnomeExtensions.dash-to-panel diff --git a/modules/system/common/all-darwin.nix b/modules/system/common/all-darwin.nix index 4b8b7ee..3af3fa0 100644 --- a/modules/system/common/all-darwin.nix +++ b/modules/system/common/all-darwin.nix @@ -1,4 +1,4 @@ -{ pkgs, flox-flake, hostname, username, ... }: { +{ pkgs, hostname, username, ... }: { environment = { shells = with pkgs; [ bash zsh ]; loginShell = pkgs.zsh; @@ -10,7 +10,6 @@ age bandwhich coreutils - #flox-flake.packages.${pkgs.system}.default hugo mas nmap @@ -95,15 +94,11 @@ "nix-command" "repl-flake" ]; - trusted-public-keys = [ - "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" - "flox-cache-public-1:7F4OyH7ZCnFhcze3fJdfyXYLQw/aV7GEed86nQ7IsOs=" + extra-substituters = [ + "https://nixpkgs-terraform.cachix.org" ]; - substituters = [ - "https://cache.nixos.org" - ]; - trusted-substituters = [ - "https://cache.flox.dev" + extra-trusted-public-keys = [ + "nixpkgs-terraform.cachix.org-1:8Sit092rIdAVENA3ZVeH9hzSiqI/jng6JiCrQ1Dmusw=" ]; trusted-users = [ "@admin" "${username}" ]; }; diff --git a/modules/system/common/all-nixos.nix b/modules/system/common/all-nixos.nix index 5d3761a..4e9bed4 100644 --- a/modules/system/common/all-nixos.nix +++ b/modules/system/common/all-nixos.nix @@ -43,15 +43,11 @@ "flakes" "nix-command" ]; - trusted-public-keys = [ - "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" - "flox-cache-public-1:7F4OyH7ZCnFhcze3fJdfyXYLQw/aV7GEed86nQ7IsOs=" + extra-substituters = [ + "https://nixpkgs-terraform.cachix.org" ]; - substituters = [ - "https://cache.nixos.org" - ]; - trusted-substituters = [ - "https://cache.flox.dev" + extra-trusted-public-keys = [ + "nixpkgs-terraform.cachix.org-1:8Sit092rIdAVENA3ZVeH9hzSiqI/jng6JiCrQ1Dmusw=" ]; trusted-users = [ "${username}" ]; };