summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/home-manager/personal/environment.nix24
-rw-r--r--modules/nixos/personal/gui.nix43
2 files changed, 37 insertions, 30 deletions
diff --git a/modules/home-manager/personal/environment.nix b/modules/home-manager/personal/environment.nix
index c97faff..3c674de 100644
--- a/modules/home-manager/personal/environment.nix
+++ b/modules/home-manager/personal/environment.nix
@@ -1,11 +1,14 @@
-{ config, lib, pkgs, ... }:
-
{
- home.packages = with pkgs; [ coreutils moreutils ];
+ config,
+ lib,
+ pkgs,
+ ...
+} @ inputs: {
+ home.packages = with pkgs; [coreutils moreutils];
personal.home.wallpaper =
- lib.mkDefault pkgs.personal.static.wallpapers.nga-1973-68-1;
+ lib.mkDefault (inputs.osConfig.stylix.image or pkgs.personal.static.wallpapers.nga-1973-68-1);
- programs.bash = { enable = lib.mkDefault true; };
+ programs.bash = {enable = lib.mkDefault true;};
home = {
shellAliases = {
@@ -14,15 +17,16 @@
ssh = "TERM=xterm-256color ssh";
edit = "$EDITOR";
};
- sessionVariables = { CDPATH = "~"; };
+ sessionVariables = {CDPATH = "~";};
};
services.gpg-agent = {
enableBashIntegration = lib.mkDefault config.programs.bash.enable;
- pinentryFlavor = lib.mkDefault (if config.personal.gui.enable then
- "qt"
- else
- "tty");
+ pinentryFlavor = lib.mkDefault (
+ if config.personal.gui.enable
+ then "qt"
+ else "tty"
+ );
grabKeyboardAndMouse =
lib.mkDefault false; # insecure, but necessary with keepass auto-type
};
diff --git a/modules/nixos/personal/gui.nix b/modules/nixos/personal/gui.nix
index 64c732e..6e2a5d7 100644
--- a/modules/nixos/personal/gui.nix
+++ b/modules/nixos/personal/gui.nix
@@ -1,6 +1,9 @@
-{ config, lib, pkgs, ... }@extraArgs:
-
-let
+{
+ config,
+ lib,
+ pkgs,
+ ...
+} @ extraArgs: let
cfg = config.personal.gui;
wallpaper = pkgs.personal.static.wallpapers.nga-1973-68-1;
importedStylix = extraArgs ? stylix;
@@ -22,7 +25,7 @@ in {
displayManager = {
lightdm = {
enable = true;
- background = lib.mkDefault wallpaper;
+ background = lib.mkDefault (config.stylix.image or wallpaper);
greeters.gtk = {
enable = true;
extraConfig = ''
@@ -56,22 +59,22 @@ in {
};
})
(lib.mkIf cfg.stylix.enable ({
- assertions = let
- missingArgAssertion = name: {
- assertion = lib.hasAttr name extraArgs;
- message =
- "attribute ${name} missing: add it in lib.nixosSystem's specialArgs, or set config.personal.gui.stylix.enable to false";
- };
- in [ (missingArgAssertion "stylix") ];
- } // lib.optionalAttrs importedStylix {
- stylix = {
- image = lib.mkDefault wallpaper;
- polarity = lib.mkDefault "dark";
- fonts.sizes = {
- applications = 10;
- desktop = 12;
+ assertions = let
+ missingArgAssertion = name: {
+ assertion = lib.hasAttr name extraArgs;
+ message = "attribute ${name} missing: add it in lib.nixosSystem's specialArgs, or set config.personal.gui.stylix.enable to false";
+ };
+ in [(missingArgAssertion "stylix")];
+ }
+ // lib.optionalAttrs importedStylix {
+ stylix = {
+ image = lib.mkDefault wallpaper;
+ polarity = lib.mkDefault "dark";
+ fonts.sizes = {
+ applications = 10;
+ desktop = 12;
+ };
};
- };
- }))
+ }))
]);
}