From 2d410ba8940c6fa9b9f89958948966542ccb210e Mon Sep 17 00:00:00 2001 From: Alexander Bantyev Date: Fri, 27 Jan 2023 22:51:09 +0400 Subject: [PATCH] Refactor: import modules in flake.nix --- flake.nix | 2 +- roles/base.nix | 11 +---------- roles/desktop.nix | 7 +------ 3 files changed, 3 insertions(+), 17 deletions(-) diff --git a/flake.nix b/flake.nix index eb4133b..fb5fc42 100644 --- a/flake.nix +++ b/flake.nix @@ -138,7 +138,7 @@ pkgs = pkgsFor system; in nixosSystem { inherit system; - modules = [ + modules = __attrValues self.nixosModules ++ [ (import (./machines + "/${name}")) { nixpkgs.pkgs = pkgs; } { device = name; } diff --git a/roles/base.nix b/roles/base.nix index 0491a40..68e5e14 100644 --- a/roles/base.nix +++ b/roles/base.nix @@ -1,21 +1,12 @@ { inputs, ... }: { - imports = with inputs.self.nixosModules; with inputs.self.nixosProfiles; [ + imports = with inputs.self.nixosProfiles; [ inputs.home-manager.nixosModules.home-manager - # MODULES - applications - secrets - secrets-envsubst - persist - bt-agent - - # PROFILES autoRun xdg boot - devices git gpg locale diff --git a/roles/desktop.nix b/roles/desktop.nix index 5411b1a..70a8520 100644 --- a/roles/desktop.nix +++ b/roles/desktop.nix @@ -1,12 +1,7 @@ { inputs, ... }: { - imports = with inputs.self.nixosModules; with inputs.self.nixosProfiles; [ + imports = with inputs.self.nixosProfiles; [ ./base.nix - # MODULES - themes - ezwg - - # PROFILES applications-setup bluetooth