From c4f5a3af823da865b3ad1a2becd9ef05f22f6c21 Mon Sep 17 00:00:00 2001 From: James Patrick Date: Wed, 15 Dec 2021 00:27:39 -0500 Subject: [PATCH] Namespacing "this" for err globals? --- modules/applications/emacs.nix | 2 +- modules/applications/firefox.nix | 2 +- modules/applications/nextcloud.nix | 2 +- modules/applications/sway/sway.nix | 2 +- modules/default.nix | 12 ++++-------- modules/profiles/graphical.nix | 7 ++----- modules/system/flatpak.nix | 2 +- modules/system/fonts.nix | 2 +- modules/system/gtk.nix | 2 +- 9 files changed, 13 insertions(+), 20 deletions(-) diff --git a/modules/applications/emacs.nix b/modules/applications/emacs.nix index 5319b6c..5e89eb9 100644 --- a/modules/applications/emacs.nix +++ b/modules/applications/emacs.nix @@ -3,7 +3,7 @@ # - Language tools (grammer) let cfg = config.application.emacs; - graphical = config.graphical; + graphical = config.this.graphical; in with lib; { options = { application.emacs = { diff --git a/modules/applications/firefox.nix b/modules/applications/firefox.nix index 977679f..cfaf88c 100644 --- a/modules/applications/firefox.nix +++ b/modules/applications/firefox.nix @@ -1,7 +1,7 @@ { config, pkgs, lib, ... }: let cfg = config.application.firefox; - graphical = config.graphical; + graphical = config.this.graphical; sway_cfg = config.applications.sway; in with lib; { options = { diff --git a/modules/applications/nextcloud.nix b/modules/applications/nextcloud.nix index 8f43226..5cd7747 100644 --- a/modules/applications/nextcloud.nix +++ b/modules/applications/nextcloud.nix @@ -1,7 +1,7 @@ { config, lib, pkgs, ... }: let cfg = config.application.nextcloud; - graphical = config.graphical; + graphical = config.this.graphical; in with lib; { options = { application.nextcloud = { diff --git a/modules/applications/sway/sway.nix b/modules/applications/sway/sway.nix index 416c320..0723785 100644 --- a/modules/applications/sway/sway.nix +++ b/modules/applications/sway/sway.nix @@ -1,7 +1,7 @@ { config, lib, pkgs, ... }: let cfg = config.application.sway; - graphical = config.graphical; + graphical = config.this.graphical; in with lib; { options = { application.sway = { diff --git a/modules/default.nix b/modules/default.nix index 0878b19..cf8c71e 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -1,12 +1,8 @@ { config, pkgs, lib, ... }: { - options = { - graphical = { - enable = lib.mkOption { - default = false; - type = with lib.types; bool; - description = "Does this actually need X/Wayland"; - }; - }; + options.this.graphical.enable = lib.mkOption { + default = false; + type = with lib.types; bool; + description = "Does this actually need X/Wayland"; }; imports = [ diff --git a/modules/profiles/graphical.nix b/modules/profiles/graphical.nix index 4fd6e96..8ce04fe 100644 --- a/modules/profiles/graphical.nix +++ b/modules/profiles/graphical.nix @@ -1,7 +1,4 @@ -{ config, lib, pkgs, ... }: - -let grpahical = config.graphical; -in { +{ config, lib, pkgs, ... }: { imports = [ ../applications/firefox.nix ../applications/nextcloud.nix @@ -10,7 +7,7 @@ in { ./minimal.nix ]; - graphical.enable = true; + this.graphical.enable = true; # Enable sound. sound.enable = true; diff --git a/modules/system/flatpak.nix b/modules/system/flatpak.nix index 8ca23ba..e1c34d2 100644 --- a/modules/system/flatpak.nix +++ b/modules/system/flatpak.nix @@ -1,7 +1,7 @@ { config, lib, pkgs, ... }: let cfg = config.systems.flatpak; - graphical = config.graphical; + graphical = config.this.graphical; in with lib; { options = { systems.flatpak = { diff --git a/modules/system/fonts.nix b/modules/system/fonts.nix index 1a9b5ef..63922d2 100644 --- a/modules/system/fonts.nix +++ b/modules/system/fonts.nix @@ -1,5 +1,5 @@ { config, lib, pkgs, ... }: -let graphical = config.graphical; +let graphical = config.this.graphical; in { config = lib.mkIf graphical.enable { fonts = { diff --git a/modules/system/gtk.nix b/modules/system/gtk.nix index 498914d..2f367e4 100644 --- a/modules/system/gtk.nix +++ b/modules/system/gtk.nix @@ -1,5 +1,5 @@ { config, lib, pkgs, ... }: -let graphical = config.graphical; +let graphical = config.this.graphical; in with lib; { config = mkIf graphical.enable { home-manager.users.james = {