Regenerated
This commit is contained in:
+37
-27
@@ -1,38 +1,48 @@
|
||||
Rewrite my ./generated/traveldroid/todo/desktop/gtk.nix to integrate nicely with my existing flake.nix en host.nix
|
||||
Rewrite my ./generated/modules/traveldroid/desktop/stylix.nix to integrate nicely with my existing flake.nix en host.nix
|
||||
The only real change is that the following needs to be added on userlevel:
|
||||
|
||||
stylix.targets.gtk.enable = true;
|
||||
|
||||
|
||||
------------------------------------------------------------------------
|
||||
{ pkgs, user, ... }:
|
||||
{ lib, config, pkgs, flakeRoot, ... }:
|
||||
let # Determine the default username from host
|
||||
config username = config.defaultUser or "henrov";
|
||||
moduleName = "stylix";
|
||||
assetPath = "${flakeRoot}/assets/traveldroid/conf/";
|
||||
|
||||
# Read all files in the asset directory
|
||||
programFiles = builtins.readDir assetPath;
|
||||
files = lib.genAttrs (builtins.attrNames programFiles) (name: { source = "${assetPath}/${name}"; });
|
||||
# Optional stylix.conf
|
||||
stylixConfFile = "${assetPath}/stylix.conf";
|
||||
stylixConf = if builtins.pathExists stylixConfFile then builtins.readFile stylixConfFile else "";
|
||||
# Cursor defaults
|
||||
cursorName = "phinger-cursors-light";
|
||||
cursorSize = 24;
|
||||
in
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
gtk3 # GTK target
|
||||
gtk4 # GTK target
|
||||
];
|
||||
# Stylix GTK target
|
||||
stylix.targets.gtk.enable = true;
|
||||
############################ # System-level packages ############################
|
||||
environment.systemPackages = [ pkgs.feh pkgs.st ];
|
||||
# ############################ # Home Manager user config ############################
|
||||
_module.args.hmUsers = { ${username} = {
|
||||
# Map all config files into ~/.config/stylix/
|
||||
xdg.configFile = lib.mapAttrs'
|
||||
(name: value: { name = "${moduleName}/${name}";
|
||||
value = { inherit (value) source; };
|
||||
}) files;
|
||||
|
||||
home-manager.users.${user.username} = {
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme = {
|
||||
name = "Catppuccin-Mocha-Standard-Blue-Dark";
|
||||
package = pkgs.magnetic-catppuccin-gtk;
|
||||
};
|
||||
iconTheme = {
|
||||
name = "Papirus-Dark";
|
||||
package = pkgs.papirus-icon-theme;
|
||||
};
|
||||
gtk3.extraConfig = {
|
||||
gtk-application-prefer-dark-theme = 1;
|
||||
};
|
||||
gtk4.extraConfig = {
|
||||
gtk-application-prefer-dark-theme = 1;
|
||||
};
|
||||
# Environment variables for the session
|
||||
home.sessionVariables = {
|
||||
STYLIX_CONF = "$HOME/.config/stylix/stylix.conf";
|
||||
XCURSOR_THEME = cursorName;
|
||||
XCURSOR_SIZE = toString cursorSize;
|
||||
HYPRCURSOR_THEME = cursorName;
|
||||
HYPRCURSOR_SIZE = toString cursorSize;
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
------------------------------------------------------------------------
|
||||
|
||||
flake.nix
|
||||
|
||||
Reference in New Issue
Block a user