diff --git a/system/modules/nix/default.nix b/system/modules/nix/default.nix index f43c52b..2ff9461 100644 --- a/system/modules/nix/default.nix +++ b/system/modules/nix/default.nix @@ -2,13 +2,9 @@ { imports = [ - ./nh.nix - ./nix.nix - ./nixpkgs.nix - ./subs.nix + ./nh + ./nix + ./nixpkgs + ./subs ]; - - options.systemModules.nixOptions = { - enable = lib.mkEnableOption "Enable nix related configuration modules"; - }; } diff --git a/system/modules/nix/nh.nix b/system/modules/nix/nh/default.nix similarity index 71% rename from system/modules/nix/nh.nix rename to system/modules/nix/nh/default.nix index b31e99a..7e052e1 100644 --- a/system/modules/nix/nh.nix +++ b/system/modules/nix/nh/default.nix @@ -1,12 +1,13 @@ { pkgs, lib, config, ... }: let - cfg = config.systemModules.nixOptions; inherit (lib) mkIf; + host = config.systemModules.host; in { - config = mkIf cfg.enable { + config = mkIf (host.type != "phone") { + # TODO: i dont't want to hardcode this. environment.variables.FLAKE = "/home/ooks/.config/ooknix/"; programs.nh = { diff --git a/system/modules/nix/nix.nix b/system/modules/nix/nix/default.nix similarity index 78% rename from system/modules/nix/nix.nix rename to system/modules/nix/nix/default.nix index 81d993b..b55bd89 100644 --- a/system/modules/nix/nix.nix +++ b/system/modules/nix/nix/default.nix @@ -1,11 +1,12 @@ -{ config, lib, pkgs, inputs, ... }: +{ config, lib, inputs, ... }: let - cfg = config.systemModules.nixOptions; + inherit (lib) mkIf; + host = config.systemModules.host; in { - config = lib.mkIf cfg.enable { + config = mkIf (host.type != "phone") { nix = { settings = { trusted-users = [ "root" "@wheel" ]; diff --git a/system/modules/nix/nixpkgs.nix b/system/modules/nix/nixpkgs/default.nix similarity index 74% rename from system/modules/nix/nixpkgs.nix rename to system/modules/nix/nixpkgs/default.nix index ff7aa58..c97cb93 100644 --- a/system/modules/nix/nixpkgs.nix +++ b/system/modules/nix/nixpkgs/default.nix @@ -1,11 +1,12 @@ { outputs, lib, config, ... }: let - cfg = config.systemModules.nixOptions; + inherit (lib) mkIf; + host = config.systemModules.host; in { - config = lib.mkIf cfg.enable { + config = mkIf host.type != "phone" { nixpkgs = { overlays = builtins.attrValues outputs.overlays; config = { diff --git a/system/modules/nix/subs.nix b/system/modules/nix/subs/default.nix similarity index 89% rename from system/modules/nix/subs.nix rename to system/modules/nix/subs/default.nix index 8ddc92e..1fb48cb 100644 --- a/system/modules/nix/subs.nix +++ b/system/modules/nix/subs/default.nix @@ -1,11 +1,12 @@ { lib, config, ... }: let - cfg = config.systemModules.nixOptions; + inherit (lib) mkIf; + host = config.systemModules.host; in { - config = lib.mkIf cfg.enable { + config = mkIf (host.type != "phone") { nix.settings = { substituters = [ "https://cache.nixos.org?priority=10"