diff options
-rw-r--r-- | modules/nixos/sils/default.nix | 1 | ||||
-rw-r--r-- | modules/nixos/sils/environment.nix | 45 | ||||
-rw-r--r-- | modules/nixos/sils/roles.nix | 1 | ||||
-rw-r--r-- | sys/default.nix | 1 | ||||
-rw-r--r-- | sys/environment/default.nix | 36 |
5 files changed, 47 insertions, 37 deletions
diff --git a/modules/nixos/sils/default.nix b/modules/nixos/sils/default.nix index 0098644..9324c46 100644 --- a/modules/nixos/sils/default.nix +++ b/modules/nixos/sils/default.nix @@ -2,6 +2,7 @@ imports = [ ./basesystem.nix ./bluetooth.nix + ./environment.nix ./hyprland.nix ./meta.nix ./networking.nix diff --git a/modules/nixos/sils/environment.nix b/modules/nixos/sils/environment.nix new file mode 100644 index 0000000..0ffa422 --- /dev/null +++ b/modules/nixos/sils/environment.nix @@ -0,0 +1,45 @@ +{ + config, + lib, + ... +}: let + cfg = config.sils.environment; +in { + options.sils.environment.enable = lib.mkEnableOption "custom env vars"; + config = lib.mkIf cfg.enable { + environment = { + sessionVariables = { + XDG_CACHE_HOME = "\${HOME}/.cache"; + XDG_CONFIG_HOME = "\${HOME}/.config"; + XDG_BIN_HOME = "\${HOME}/.local/bin"; + XDG_DATA_HOME = "\${HOME}/.local/share"; + XDG_STATE_HOME = "\${HOME}/.local/state"; + ZDOTDIR = "\${HOME}/.config/zsh"; + CARGO_HOME = "\${HOME}/.local/share/cargo"; + ANDROID_HOME = "\${HOME}/.local/share/android"; + ANSIBLE_HOME = "\${HOME}/.local/share/ansible"; + #_JAVA_OPTIONS = '-Djava.util.prefs.userRoot="\${XDG_CONFIG_HOME}/java"'; + WINEPREFIX = "\${HOME}/.local/share/wine"; + GRADLE_USER_HOME = "\${HOME}/.local/share/gradle"; + GTK2_RC_FILES = "\${HOME}/.config/gtk-2.0/gtkrc"; + EDITOR = "nvim"; + GOPATH = "\${HOME}/.local/share/go"; + XCOMPOSECACHE = "\${HOME}/.cache/X11/xcompose"; + CDPATH = ".:\${HOME}:\${HOME}/repos/:\${HOME}/srv"; + NIXOS_OZONE_WL = "1"; # wayland for electron apps + + #PYTHONSTARTUP="/etc/python/pythonrc"; + + PATH = [ + "\${XDG_BIN_HOME}" + ]; + }; + etc.crypttab = { + enable = true; + text = '' + storage UUID=f4ba9aae-e34f-4a72-98ab-88787f7c1986 none tpm2-device=auto,noauto + ''; + }; + }; + }; +} diff --git a/modules/nixos/sils/roles.nix b/modules/nixos/sils/roles.nix index bd7cb50..8ab2df3 100644 --- a/modules/nixos/sils/roles.nix +++ b/modules/nixos/sils/roles.nix @@ -6,6 +6,7 @@ in { then { basesystem.enable = true; bluetooth.enable = true; + environment.enable = true; hyprland.enable = true; networking.enable = true; nix-config.enable = true; diff --git a/sys/default.nix b/sys/default.nix index a6ccb88..18698e2 100644 --- a/sys/default.nix +++ b/sys/default.nix @@ -1,6 +1,5 @@ {...}: { imports = [ - ./environment ./font ./impermanence ./keyboard diff --git a/sys/environment/default.nix b/sys/environment/default.nix deleted file mode 100644 index e5b8c69..0000000 --- a/sys/environment/default.nix +++ /dev/null @@ -1,36 +0,0 @@ -{lib, ...}: { - environment = { - sessionVariables = { - XDG_CACHE_HOME = "\${HOME}/.cache"; - XDG_CONFIG_HOME = "\${HOME}/.config"; - XDG_BIN_HOME = "\${HOME}/.local/bin"; - XDG_DATA_HOME = "\${HOME}/.local/share"; - XDG_STATE_HOME = "\${HOME}/.local/state"; - ZDOTDIR = "\${HOME}/.config/zsh"; - CARGO_HOME = "\${HOME}/.local/share/cargo"; - ANDROID_HOME = "\${HOME}/.local/share/android"; - ANSIBLE_HOME = "\${HOME}/.local/share/ansible"; - #_JAVA_OPTIONS = '-Djava.util.prefs.userRoot="\${XDG_CONFIG_HOME}/java"'; - WINEPREFIX = "\${HOME}/.local/share/wine"; - GRADLE_USER_HOME = "\${HOME}/.local/share/gradle"; - GTK2_RC_FILES = "\${HOME}/.config/gtk-2.0/gtkrc"; - EDITOR = "nvim"; - GOPATH = "\${HOME}/.local/share/go"; - XCOMPOSECACHE = "\${HOME}/.cache/X11/xcompose"; - CDPATH = ".:\${HOME}:\${HOME}/repos/:\${HOME}/srv"; - NIXOS_OZONE_WL = "1"; # wayland for electron apps - - #PYTHONSTARTUP="/etc/python/pythonrc"; - - PATH = [ - "\${XDG_BIN_HOME}" - ]; - }; - etc.crypttab = { - enable = true; - text = '' - storage UUID=f4ba9aae-e34f-4a72-98ab-88787f7c1986 none tpm2-device=auto,noauto - ''; - }; - }; -} |