From e888ebe69c2f1acf8676b5b6c42cbc7e14f06ae9 Mon Sep 17 00:00:00 2001 From: ooks-io Date: Sun, 26 May 2024 15:56:21 +1200 Subject: [PATCH] refactor(flake): no import = --- flake.nix | 11 ++++---- flake/nixos.nix | 70 +++++++++++++++++++++++++------------------------ 2 files changed, 42 insertions(+), 39 deletions(-) diff --git a/flake.nix b/flake.nix index bea4ab2..760c2fd 100644 --- a/flake.nix +++ b/flake.nix @@ -3,7 +3,7 @@ description = "a nix configuration written by an orangutan"; outputs = { flake-parts, nixpkgs, self, ... } @ inputs: - flake-parts.lib.mkFlake {inherit inputs;} ({withSystem, ...}: { + flake-parts.lib.mkFlake { inherit inputs; } { systems = [ "x86_64-linux" @@ -12,13 +12,14 @@ imports = [ ./flake/pkgs + ./flake/nixos.nix ]; - flake = { - nixosConfigurations = import ./flake/nixos.nix {inherit self inputs nixpkgs;}; - }; + # flake = { + # nixosConfigurations = import ./flake/nixos.nix {inherit self inputs nixpkgs;}; + # }; - }); + }; # External inputs we depend on inputs = { diff --git a/flake/nixos.nix b/flake/nixos.nix index 8c5fa6d..7df08ce 100644 --- a/flake/nixos.nix +++ b/flake/nixos.nix @@ -1,7 +1,7 @@ -{ inputs, nixpkgs, self, ... }: +{ inputs, self, ... }: let - inherit (nixpkgs.lib) nixosSystem; + inherit (inputs.nixpkgs.lib) nixosSystem; hm = inputs.home-manager.nixosModules.home-manager; @@ -20,39 +20,41 @@ let in { - ooksdesk = nixosSystem { - inherit specialArgs; - system = "x86_64-linux"; - modules = [ - "${hosts}/ooksdesk" - hm - base - gaming - workstation - ]; - }; - ookst480s = nixosSystem { - inherit specialArgs; - system = "x86_64-linux"; - modules = [ - "${hosts}/ookst480s" - hm - base + flake.nixosConfigurations = { + ooksdesk = nixosSystem { + inherit specialArgs; + system = "x86_64-linux"; + modules = [ + "${hosts}/ooksdesk" + hm + base + gaming + workstation + ]; + }; + ookst480s = nixosSystem { + inherit specialArgs; + system = "x86_64-linux"; + modules = [ + "${hosts}/ookst480s" + hm + base - workstation - ]; - }; - ooksmedia = nixosSystem { - inherit specialArgs; - system = "x86_64-linux"; - modules = [ - "${hosts}/ooksmedia" - hm - base + workstation + ]; + }; + ooksmedia = nixosSystem { + inherit specialArgs; + system = "x86_64-linux"; + modules = [ + "${hosts}/ooksmedia" + hm + base - gaming - workstation - media-server - ]; + gaming + workstation + media-server + ]; + }; }; }