Compare commits
17 Commits
2ba8de9d84
...
9533a9e235
| Author | SHA1 | Date | |
|---|---|---|---|
| 9533a9e235 | |||
| a7e2955b66 | |||
| 82a9f9d9b9 | |||
| 4291649cf2 | |||
| 039b1501cc | |||
| 4f8d49a48c | |||
| 775f591394 | |||
| 06c226f7cd | |||
| 1de7d93147 | |||
| 539dfb9059 | |||
| 3a55272ec1 | |||
| f215d14817 | |||
| e2ebac9bbd | |||
| 98e5b9a9ef | |||
| e5ba7f8a95 | |||
| 9ca8142ce8 | |||
| 08580a1cf3 |
+389
-332
File diff suppressed because it is too large
Load Diff
+80
-35
@@ -1082,22 +1082,29 @@ This is top file of this level which contains just an import statement for all r
|
|||||||
** =generated/system/applications/terminal_shell/kitty.nix=
|
** =generated/system/applications/terminal_shell/kitty.nix=
|
||||||
This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder
|
This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder
|
||||||
#+BEGIN_SRC nix :tangle generated/system/applications/terminal_shell/kitty.nix :noweb tangle :mkdirp yes :eval never-html
|
#+BEGIN_SRC nix :tangle generated/system/applications/terminal_shell/kitty.nix :noweb tangle :mkdirp yes :eval never-html
|
||||||
{ config, pkgs, lib, user, inputs, flakeRoot, ... }:
|
{ config, pkgs, lib, user, ... }:
|
||||||
|
let
|
||||||
|
kittyConfigDir = "${config.home-manager.users.${user.username}.xdg.configHome}/kitty";
|
||||||
|
in
|
||||||
{
|
{
|
||||||
# NixOS-level packages (optional, if you want Kitty installed system-wide)
|
|
||||||
environment.systemPackages = with pkgs; [ kitty ];
|
|
||||||
|
|
||||||
# Home Manager configuration for Kitty
|
|
||||||
home-manager.users.${user.username} = {
|
home-manager.users.${user.username} = {
|
||||||
programs.kitty = {
|
programs.kitty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
font_family = "FiraCode Nerd Font Mono";
|
font_family = "JetBrainsMono Nerd Font";
|
||||||
include = [ "${flakeRoot}/assets/kitty/themes/Catppuccin-Mocha.conf" ];
|
font_size = 12.0;
|
||||||
background_opacity = 0.60;
|
cursor = "Beam";
|
||||||
dynamic_background_opacity = true;
|
cursor_blink_interval = -1;
|
||||||
|
shell = "${pkgs.zsh}/bin/zsh";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Catppuccin Mocha theme for Kitty
|
||||||
|
xdg.configFile."kitty/theme.conf".source = "${pkgs.catppuccin-kitty}/share/kitty/themes/Catppuccin-Mocha.conf";
|
||||||
|
xdg.configFile."kitty/kitty.conf".text = ''
|
||||||
|
include ${kittyConfigDir}/theme.conf
|
||||||
|
background_opacity 0.9
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
@@ -1110,16 +1117,26 @@ This is top file of this level which contains just an import statement for all r
|
|||||||
home-manager.users.${user.username} = {
|
home-manager.users.${user.username} = {
|
||||||
programs.starship = {
|
programs.starship = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# Starship settings (e.g., theme, modules)
|
|
||||||
settings = {
|
|
||||||
addNewline = false;
|
|
||||||
# Other settings...
|
|
||||||
};
|
|
||||||
# Enable Starship for specific shells
|
|
||||||
bash.enable = true;
|
|
||||||
zsh.enable = true;
|
|
||||||
fish.enable = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Catppuccin Mocha theme for Starship
|
||||||
|
xdg.configFile."starship.toml".text = ''
|
||||||
|
format = "$all"
|
||||||
|
|
||||||
|
[character]
|
||||||
|
success_symbol = "[❯](bold green)"
|
||||||
|
error_symbol = "[❯](bold red)"
|
||||||
|
|
||||||
|
[directory]
|
||||||
|
style = "bold lavender"
|
||||||
|
|
||||||
|
[git_branch]
|
||||||
|
symbol = " "
|
||||||
|
style = "bold maroon"
|
||||||
|
|
||||||
|
[package]
|
||||||
|
disabled = true
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
@@ -1127,37 +1144,65 @@ This is top file of this level which contains just an import statement for all r
|
|||||||
** =generated/system/applications/terminal_shell/zsh.nix=
|
** =generated/system/applications/terminal_shell/zsh.nix=
|
||||||
This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder
|
This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder
|
||||||
#+BEGIN_SRC nix :tangle generated/system/applications/terminal_shell/zsh.nix :noweb tangle :mkdirp yes :eval never-html
|
#+BEGIN_SRC nix :tangle generated/system/applications/terminal_shell/zsh.nix :noweb tangle :mkdirp yes :eval never-html
|
||||||
{
|
{ config, pkgs, lib, user, ... }:
|
||||||
config,
|
let
|
||||||
pkgs,
|
zshConfigDir = "${config.home-manager.users.${user.username}.xdg.configHome}/zsh";
|
||||||
lib,
|
in
|
||||||
user,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
{
|
||||||
home-manager.users.${user.username} = {
|
home-manager.users.${user.username} = {
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableCompletion = true;
|
enableCompletion = true;
|
||||||
dotDir = "${config.xdg.configHome}/zsh"; # Now correct: inside Home Manager scope
|
autosuggestions.enable = true;
|
||||||
|
syntaxHighlighting.enable = true;
|
||||||
oh-my-zsh = {
|
oh-my-zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
theme = "";
|
theme = "agnoster";
|
||||||
plugins = [
|
plugins = [
|
||||||
"git"
|
"git"
|
||||||
"sudo"
|
"zsh-autosuggestions"
|
||||||
"extract"
|
"zsh-syntax-highlighting"
|
||||||
"colored-man-pages"
|
|
||||||
"command-not-found"
|
|
||||||
"history"
|
|
||||||
"docker"
|
"docker"
|
||||||
"kubectl"
|
"kubectl"
|
||||||
|
"history"
|
||||||
|
"command-not-found"
|
||||||
|
"extract"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
autosuggestion.enable = true;
|
shellAliases = {
|
||||||
syntaxHighlighting.enable = true;
|
ls = "exa --icons -a --group-directories-first";
|
||||||
zshoptions = [ "AUTO_CD" ];
|
ll = "exa --icons -la --group-directories-first";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Consolidated .zshrc
|
||||||
|
xdg.configFile."zsh/.zshrc".text = lib.concatStringsSep "\n" [
|
||||||
|
"# Oh-My-Zsh"
|
||||||
|
"export ZSH=\"${zshConfigDir}\""
|
||||||
|
"source \"${pkgs.zsh}/share/zsh/functions/Newuser/zsh-newuser-install\""
|
||||||
|
"source \"${zshConfigDir}/oh-my-zsh.sh\""
|
||||||
|
""
|
||||||
|
"# Zsh options"
|
||||||
|
"setopt AUTO_CD"
|
||||||
|
"setopt CORRECT"
|
||||||
|
"setopt INTERACTIVE_COMMENTS"
|
||||||
|
""
|
||||||
|
"# Starship"
|
||||||
|
"eval \"$(starship init zsh)\""
|
||||||
|
""
|
||||||
|
"# fzf"
|
||||||
|
"source \"${pkgs.fzf}/shell/key-bindings.zsh\""
|
||||||
|
"source \"${pkgs.fzf}/shell/completion.zsh\""
|
||||||
|
""
|
||||||
|
"# User customizations"
|
||||||
|
"source \"${zshConfigDir}/custom.zsh\" 2>/dev/null"
|
||||||
|
];
|
||||||
|
|
||||||
|
# User customizations
|
||||||
|
xdg.configFile."zsh/custom.zsh".text = ''
|
||||||
|
export EDITOR="nvim"
|
||||||
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Generated
+12
-12
@@ -61,11 +61,11 @@
|
|||||||
"nixpkgs-stable": "nixpkgs-stable"
|
"nixpkgs-stable": "nixpkgs-stable"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1772818138,
|
"lastModified": 1772903801,
|
||||||
"narHash": "sha256-Q/zaIhzvvjCN6/oPcOsyljP0LO0RUvB90BSuDNVYNF8=",
|
"narHash": "sha256-S7r7clnIcoVqpDZwlnXwALm47xkOOGWECAak/wv1LwQ=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "emacs-overlay",
|
"repo": "emacs-overlay",
|
||||||
"rev": "594ce4b67cd089110785a9c23731f61767d233d3",
|
"rev": "02de28837fe7e824bdb6bae4d5c18c28ff500f0d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -119,11 +119,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1772807318,
|
"lastModified": 1772845525,
|
||||||
"narHash": "sha256-Qjw6ILt8cb2HQQpCmWNLMZZ63wEo1KjTQt+1BcQBr7k=",
|
"narHash": "sha256-Dp5Ir2u4jJDGCgeMRviHvEQDe+U37hMxp6RSNOoMMPc=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "daa2c221320809f5514edde74d0ad0193ad54ed8",
|
"rev": "27b93804fbef1544cb07718d3f0a451f4c4cd6c0",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -207,11 +207,11 @@
|
|||||||
"xdph": "xdph"
|
"xdph": "xdph"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1772833450,
|
"lastModified": 1772913214,
|
||||||
"narHash": "sha256-XuuvhTD/72mH8MBncTeOyN0JzLCtwav7lkwBQlIofd4=",
|
"narHash": "sha256-lI361+KhTUerHMYJOaDzVhIikAX1PNcZMNY1WEx/+dc=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "Hyprland",
|
"repo": "Hyprland",
|
||||||
"rev": "4152ac76d0813d9d0f67d2f04653a13fa6e17433",
|
"rev": "a4ecae91600d7e8ceb31610176d6b40cb816711b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -485,11 +485,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1772624091,
|
"lastModified": 1772773019,
|
||||||
"narHash": "sha256-QKyJ0QGWBn6r0invrMAK8dmJoBYWoOWy7lN+UHzW1jc=",
|
"narHash": "sha256-E1bxHxNKfDoQUuvriG71+f+s/NT0qWkImXsYZNFFfCs=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "80bdc1e5ce51f56b19791b52b2901187931f5353",
|
"rev": "aca4d95fce4914b3892661bcb80b8087293536c6",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -1,38 +1,30 @@
|
|||||||
{ config, pkgs, lib, user, ... }:
|
|
||||||
{
|
{
|
||||||
# NixOS: Install Starship system-wide (optional)
|
config,
|
||||||
environment.systemPackages = with pkgs; [ starship ];
|
pkgs,
|
||||||
|
lib,
|
||||||
# Home Manager: Configure Starship for the user
|
user,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
home-manager.users.${user.username} = {
|
home-manager.users.${user.username} = {
|
||||||
programs.starship = {
|
programs.starship = {
|
||||||
enable = true; # Enables Starship and adds init to shell configs
|
enable = true; # Globally enables Starship for all shells
|
||||||
settings = {
|
settings = {
|
||||||
|
addNewline = false;
|
||||||
# Example: Catppuccin Mocha theme
|
# Example: Catppuccin Mocha theme
|
||||||
add_newline = false;
|
|
||||||
format = "$all";
|
format = "$all";
|
||||||
[character]
|
|
||||||
success_symbol = "[❯](bold green)"
|
|
||||||
error_symbol = "[❯](bold red)"
|
|
||||||
vicmd_symbol = "[❮](bold blue)"
|
|
||||||
[directory]
|
|
||||||
truncation_length = 3
|
|
||||||
style = "bold blue"
|
|
||||||
[git_branch]
|
|
||||||
symbol = " "
|
|
||||||
style = "bold purple"
|
|
||||||
format = "[$symbol$branch]($style) "
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Optional: Manually ensure Starship init is in shell configs
|
# Optional: Ensure Starship init is in shell configs (if not auto-added)
|
||||||
xdg.configFile."bashrc".text = lib.concatStringsSep "\n" [
|
xdg.configFile."bashrc".text = lib.concatStringsSep "\n" [
|
||||||
"${config.programs.starship.extraInit}"
|
|
||||||
"eval \"$(starship init bash)\""
|
"eval \"$(starship init bash)\""
|
||||||
];
|
];
|
||||||
xdg.configFile."zshrc".text = lib.concatStringsSep "\n" [
|
xdg.configFile."zshrc".text = lib.concatStringsSep "\n" [
|
||||||
"${config.programs.starship.extraInit}"
|
|
||||||
"eval \"$(starship init zsh)\""
|
"eval \"$(starship init zsh)\""
|
||||||
];
|
];
|
||||||
|
xdg.configFile."config/fish/config.fish".text = ''
|
||||||
|
starship init fish | source
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,29 +5,87 @@
|
|||||||
user,
|
user,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
let
|
||||||
|
zshConfigDir = "${config.home-manager.users.${user.username}.xdg.configHome}/zsh";
|
||||||
|
in
|
||||||
{
|
{
|
||||||
home-manager.users.${user.username} = {
|
home-manager.users.${user.username} = {
|
||||||
|
# Install and enable Zsh
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableCompletion = true;
|
enableCompletion = true;
|
||||||
dotDir = "${config.xdg.configHome}/zsh"; # Now correct: inside Home Manager scope
|
dotDir = zshConfigDir;
|
||||||
|
autosuggestion.enable = true;
|
||||||
|
syntaxHighlighting.enable = true;
|
||||||
oh-my-zsh = {
|
oh-my-zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
theme = "";
|
theme = "agnoster"; # Popular minimal theme
|
||||||
plugins = [
|
plugins = [
|
||||||
"git"
|
"git"
|
||||||
"sudo"
|
"sudo"
|
||||||
"extract"
|
|
||||||
"colored-man-pages"
|
|
||||||
"command-not-found"
|
|
||||||
"history"
|
|
||||||
"docker"
|
"docker"
|
||||||
"kubectl"
|
"kubectl"
|
||||||
|
"zsh-autosuggestions"
|
||||||
|
"zsh-syntax-highlighting"
|
||||||
|
"history"
|
||||||
|
"command-not-found"
|
||||||
|
"extract"
|
||||||
|
"colored-man-pages"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
autosuggestion.enable = true;
|
# Shell options (setopt)
|
||||||
syntaxHighlighting.enable = true;
|
shellAliases = {
|
||||||
zshoptions = [ "AUTO_CD" ];
|
ls = "exa --icons -a --group-directories-first";
|
||||||
|
ll = "exa --icons -la --group-directories-first";
|
||||||
|
grep = "grep --color=auto";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Consolidated .zshrc with best practices
|
||||||
|
xdg.configFile."zsh/.zshrc".text = lib.concatStringsSep "\n" [
|
||||||
|
"# Enable Powerlevel10k (if installed)"
|
||||||
|
"${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme"
|
||||||
|
"# Oh-My-Zsh"
|
||||||
|
"export ZSH=\"${zshConfigDir}\""
|
||||||
|
"source \"${pkgs.zsh}/share/zsh/functions/Newuser/zsh-newuser-install\""
|
||||||
|
"source \"${zshConfigDir}/oh-my-zsh.sh\""
|
||||||
|
""
|
||||||
|
"# Zsh options"
|
||||||
|
"setopt AUTO_CD"
|
||||||
|
"setopt CORRECT"
|
||||||
|
"setopt INTERACTIVE_COMMENTS"
|
||||||
|
"setopt APPEND_HISTORY"
|
||||||
|
"setopt INC_APPEND_HISTORY"
|
||||||
|
"setopt HIST_IGNORE_ALL_DUPS"
|
||||||
|
"setopt HIST_REDUCE_BLANKS"
|
||||||
|
"setopt HIST_SAVE_NO_DUPS"
|
||||||
|
"setopt HIST_VERIFY"
|
||||||
|
"setopt SHARE_HISTORY"
|
||||||
|
""
|
||||||
|
"# Starship prompt (if enabled)"
|
||||||
|
"eval \"$(starship init zsh)\""
|
||||||
|
""
|
||||||
|
"# fzf key bindings and completion"
|
||||||
|
"source \"${pkgs.fzf}/shell/key-bindings.zsh\""
|
||||||
|
"source \"${pkgs.fzf}/shell/completion.zsh\""
|
||||||
|
""
|
||||||
|
"# Load direnv"
|
||||||
|
"eval \"$(direnv hook zsh)\""
|
||||||
|
""
|
||||||
|
"# Load nix-direnv (if using direnv with Nix)"
|
||||||
|
"if [ -f \"${pkgs.nix-direnv}/share/nix-direnv/direnvrc\" ]; then"
|
||||||
|
" source \"${pkgs.nix-direnv}/share/nix-direnv/direnvrc\""
|
||||||
|
"fi"
|
||||||
|
""
|
||||||
|
"# User-specific customizations"
|
||||||
|
"source \"${zshConfigDir}/custom.zsh\" 2>/dev/null"
|
||||||
|
];
|
||||||
|
|
||||||
|
# Optional: User customizations (managed separately)
|
||||||
|
xdg.configFile."zsh/custom.zsh".text = ''
|
||||||
|
# Add your custom aliases, functions, and exports here
|
||||||
|
export EDITOR="nvim"
|
||||||
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,136 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
lightdmConf = builtins.readFile ../../assets/conf/core/lightdm.conf;
|
|
||||||
lockPng = ../../assets/lockscreen.png;
|
|
||||||
|
|
||||||
greeterConfPath = ../../assets/conf/core/lightdm-gtk-greeter.conf;
|
|
||||||
greeterRaw = builtins.readFile greeterConfPath;
|
|
||||||
|
|
||||||
# Extract "key = value" from the greeter conf.
|
|
||||||
# Returns null if not found.
|
|
||||||
getIniValue = key:
|
|
||||||
let
|
|
||||||
lines = lib.splitString "\n" greeterRaw;
|
|
||||||
|
|
||||||
# Captures the value part (group 0) from a single line.
|
|
||||||
# We match line-by-line because Nix regex does NOT support PCRE flags like (?s).
|
|
||||||
m =
|
|
||||||
let
|
|
||||||
ms = builtins.filter (x: x != null) (map (line:
|
|
||||||
builtins.match
|
|
||||||
("^[[:space:]]*" + key + "[[:space:]]*=[[:space:]]*([^#;]+).*$")
|
|
||||||
line
|
|
||||||
) lines);
|
|
||||||
in
|
|
||||||
if ms == [] then null else builtins.elemAt ms 0;
|
|
||||||
in
|
|
||||||
if m == null then null else lib.strings.trim (builtins.elemAt m 0);
|
|
||||||
# In your greeter.conf these are *package keys*, not theme names.
|
|
||||||
themePkgKey = getIniValue "theme-name";
|
|
||||||
iconPkgKey = getIniValue "icon-theme-name";
|
|
||||||
cursorPkgKey = getIniValue "cursor-theme-name";
|
|
||||||
cursorSizeStr = getIniValue "cursor-theme-size";
|
|
||||||
cursorSize =
|
|
||||||
if cursorSizeStr == null then null
|
|
||||||
else lib.toInt (lib.strings.trim cursorSizeStr);
|
|
||||||
# Map package-keys (from greeter.conf) -> { package, name }
|
|
||||||
#
|
|
||||||
# IMPORTANT:
|
|
||||||
# - "name" must be the real theme/icon/cursor NAME as seen under share/themes or share/icons.
|
|
||||||
# - "package" is the Nixpkgs derivation providing it.
|
|
||||||
pkgMap = {
|
|
||||||
catppuccinThemePkg = {
|
|
||||||
package = pkgs.catppuccin-gtk.override {
|
|
||||||
accents = [ "blue" ];
|
|
||||||
variant = "mocha";
|
|
||||||
size = "standard";
|
|
||||||
tweaks = [ ];
|
|
||||||
};
|
|
||||||
name = "Catppuccin-Mocha-Standard-Blue-Dark";
|
|
||||||
};
|
|
||||||
|
|
||||||
papirus-icon-theme = {
|
|
||||||
package = pkgs.papirus-icon-theme;
|
|
||||||
name = "Papirus-Dark";
|
|
||||||
};
|
|
||||||
|
|
||||||
bibata-cursors = {
|
|
||||||
package = pkgs.bibata-cursors;
|
|
||||||
name = "Bibata-Modern-Ice";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
pick = key:
|
|
||||||
if key == null then
|
|
||||||
throw "lightdm: missing required key in ${toString greeterConfPath}"
|
|
||||||
else if !(pkgMap ? "${key}") then
|
|
||||||
throw "lightdm: unknown package key '${key}' in ${toString greeterConfPath}. Known keys: ${lib.concatStringsSep ", " (builtins.attrNames pkgMap)}"
|
|
||||||
else
|
|
||||||
pkgMap."${key}";
|
|
||||||
|
|
||||||
themeSel = pick themePkgKey;
|
|
||||||
iconSel = pick iconPkgKey;
|
|
||||||
cursorSel = pick cursorPkgKey;
|
|
||||||
|
|
||||||
# Rewrite greeter.conf so LightDM sees REAL names, not package keys.
|
|
||||||
# Also force background to lockPng.
|
|
||||||
greeterFixed =
|
|
||||||
''
|
|
||||||
[greeter]
|
|
||||||
theme-name = ${themeSel.name}
|
|
||||||
icon-theme-name = ${iconSel.name}
|
|
||||||
cursor-theme-name = ${cursorSel.name}
|
|
||||||
${lib.optionalString (cursorSize != null) "cursor-theme-size = ${toString cursorSize}"}
|
|
||||||
''
|
|
||||||
+ "\n"
|
|
||||||
+ greeterRaw;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
services.greetd.enable = false;
|
|
||||||
|
|
||||||
services.xserver = {
|
|
||||||
enable = true;
|
|
||||||
desktopManager.xterm.enable = false;
|
|
||||||
|
|
||||||
displayManager.lightdm = {
|
|
||||||
enable = true;
|
|
||||||
background = lockPng;
|
|
||||||
|
|
||||||
greeters.gtk = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
theme = {
|
|
||||||
name = themeSel.name;
|
|
||||||
package = themeSel.package;
|
|
||||||
};
|
|
||||||
|
|
||||||
iconTheme = {
|
|
||||||
name = iconSel.name;
|
|
||||||
package = iconSel.package;
|
|
||||||
};
|
|
||||||
|
|
||||||
cursorTheme = {
|
|
||||||
name = cursorSel.name;
|
|
||||||
package = cursorSel.package;
|
|
||||||
} // lib.optionalAttrs (cursorSize != null) {
|
|
||||||
size = cursorSize;
|
|
||||||
};
|
|
||||||
|
|
||||||
# This includes your (rewritten) greeter config.
|
|
||||||
extraConfig = greeterFixed;
|
|
||||||
};
|
|
||||||
|
|
||||||
extraConfig = lightdmConf;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.hyprland.enable = true;
|
|
||||||
|
|
||||||
# Optional: make them available system-wide as well
|
|
||||||
environment.systemPackages = [
|
|
||||||
themeSel.package
|
|
||||||
iconSel.package
|
|
||||||
cursorSel.package
|
|
||||||
];
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user