aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorDylan <boss@tehbox.org>2026-10-17 21:53:43 +1300
committerDylan <boss@tehbox.org>2026-10-17 21:53:43 +1300
commit280e1bbe5e733128a451260685cc8ecd10a042a3 (patch)
tree78bab82353bbfa00f9a781015e246c274a5c983b /flake.nix
parentbcfc69e424802276cc52fb6e00fb4a42e9c37816 (diff)
downloadnixos-configuration-280e1bbe5e733128a451260685cc8ecd10a042a3.tar.gz
nixos-configuration-280e1bbe5e733128a451260685cc8ecd10a042a3.zip
feat: Dendritic pattern
This re-write was done with the help of claude, and still needs a decent amount of changes before it properly follows the dendritic pattern
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix74
1 files changed, 6 insertions, 68 deletions
diff --git a/flake.nix b/flake.nix
index fcdf0cf..ec936c3 100644
--- a/flake.nix
+++ b/flake.nix
@@ -3,6 +3,11 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-26.05";
+ flake-parts = {
+ url = "github:hercules-ci/flake-parts";
+ inputs.nixpkgs-lib.follows = "nixpkgs";
+ };
+ import-tree.url = "github:vic/import-tree";
home-manager = {
url = "github:nix-community/home-manager/release-26.05";
inputs.nixpkgs.follows = "nixpkgs";
@@ -77,72 +82,5 @@
# };
};
- outputs = inputs@{self, nixpkgs, ... }: let
- system = "x86_64-linux";
- pkgs = import nixpkgs { inherit system; };
- deployPkgs = import nixpkgs {
- inherit system;
- overlays = [
- inputs.deploy-rs.overlays.default # or deploy-rs.overlays.default
- (self: super: { deploy-rs = { inherit (pkgs) deploy-rs; lib = super.deploy-rs.lib; }; })
- ];
- };
- in
- {
- nixosConfigurations = {
- nixy = nixpkgs.lib.nixosSystem {
- system = "x86_64-linux";
- specialArgs = {inherit inputs;};
- modules = [
- ./my-pkgs
- ./modules
-
- ./hardware-setups/tuf.nix
- ./computers/nixy.nix
-
- {
- environment.systemPackages = [
- deployPkgs.deploy-rs.deploy-rs
- ];
- }
-
- inputs.home-manager.nixosModules.home-manager
- {
- home-manager.useGlobalPkgs = true;
- home-manager.useUserPackages = true;
-
- home-manager.users.boss = import ./home-manager/home.nix;
- home-manager.extraSpecialArgs = {inherit inputs;};
- }
-
- inputs.stylix.nixosModules.stylix
- ];
- };
- nixnode = nixpkgs.lib.nixosSystem {
- system = "x86_64-linux";
- specialArgs = {inherit inputs;};
- modules = [
- ./modules
- ./hardware-setups/linode.nix
- ./computers/nixnode.nix
- ];
- };
- };
-
- deploy.nodes.nixnode = {
- hostname = "tehbox.org";
- profiles.system = {
- user = "root";
- sshUser = "boss";
- interactiveSudo = true;
- path = deployPkgs.deploy-rs.lib.activate.nixos self.nixosConfigurations.nixnode;
- };
- };
-
- checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) inputs.deploy-rs.lib;
-
- packages.x86_64-linux.teh-website = (nixpkgs.legacyPackages.x86_64-linux.callPackage ./website { });
- packages.x86_64-linux.stk-installers = (nixpkgs.legacyPackages.x86_64-linux.callPackage ./my-pkgs/stk-installers.nix { });
- };
-
+ outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } (inputs.import-tree ./modules);
}