Regenerated
This commit is contained in:
+81
-113
@@ -1,8 +1,8 @@
|
|||||||
Rewrite my ./generated/modules/traveldroid/apps/emacs/emacs.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
|
||||||
Avoid infinite recursion
|
Avoid infinite recursion
|
||||||
Just look at how to rewrite this, ignore previous interactions around this nix.
|
Just look at how to rewrite this, ignore previous interactions around this nix.
|
||||||
Solve the error. That is really important.
|
Solve the error. That is really important.
|
||||||
Lopok at the way hyprland is using config files.
|
|
||||||
|
|
||||||
error:
|
error:
|
||||||
… while calling the 'seq' builtin
|
… while calling the 'seq' builtin
|
||||||
@@ -19,82 +19,92 @@ error:
|
|||||||
| ^
|
| ^
|
||||||
375| else
|
375| else
|
||||||
|
|
||||||
error: The option `home' does not exist. Definition values:
|
error: The option `stylix' does not exist. Definition values:
|
||||||
- In `/nix/store/cpciwvh5yx2qw51ypda3lygshrr2834f-source/Droidnix/generated/modules/traveldroid/apps/emacs/emacs.nix':
|
- In `/nix/store/fidsc6g16ir0rrf5g8cxdyz0hy24zc5z-source/Droidnix/generated/modules/traveldroid/desktop/stylix.nix':
|
||||||
{
|
{
|
||||||
file = {
|
base16Scheme = "/nix/store/fidsc6g16ir0rrf5g8cxdyz0hy24zc5z-source/Droidnix/assets/system/theming/stylix/catppuccin-mocha.yaml";
|
||||||
"emacs/early-init.el" = {
|
enable = true;
|
||||||
source = "/nix/store/cpciwvh5yx2qw51ypda3lygshrr2834f-source/Droidnix/assets/traveldroid/conf/emacs/early-init.el";
|
polarity = "dark";
|
||||||
target = ".emacs.d/early-init.el";
|
targets = {
|
||||||
...
|
...
|
||||||
Did you mean `time', `boot' or `jobs'?
|
|
||||||
|
Did you mean `lib', `nix' or `stubby'?
|
||||||
Command 'nix --extra-experimental-features 'nix-command flakes' build --print-out-paths '.#nixosConfigurations."traveldroid".config.system.build.nixos-rebuild' --no-link' returned non-zero exit status 1.
|
Command 'nix --extra-experimental-features 'nix-command flakes' build --print-out-paths '.#nixosConfigurations."traveldroid".config.system.build.nixos-rebuild' --no-link' returned non-zero exit status 1.
|
||||||
|
|
||||||
|
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
{ pkgs, flakeRoot,... }:
|
{ lib, config, pkgs, flakeRoot, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
username = config.defaultUser or "henrov";
|
||||||
|
moduleName = "stylix";
|
||||||
|
|
||||||
|
# Path to stylix assets
|
||||||
|
assetPath = ../../../assets/system/conf/${moduleName};
|
||||||
|
|
||||||
|
# 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
|
||||||
{
|
{
|
||||||
programs.emacs = {
|
############################
|
||||||
enable = true;
|
# System packages
|
||||||
# install with tree sitter enabled
|
############################
|
||||||
package = (pkgs.emacs-pgtk.override { withTreeSitter = true; });
|
environment.systemPackages = [
|
||||||
extraPackages = epkgs: [
|
pkgs.feh
|
||||||
# also install all tree sitter grammars
|
pkgs.st
|
||||||
epkgs.manualPackages.treesit-grammars.with-all-grammars
|
];
|
||||||
epkgs.nerd-icons # nerd fonts support
|
|
||||||
epkgs.doom-modeline # model line
|
stylix = {
|
||||||
epkgs.diminish # hides modes from modeline
|
enable = true;
|
||||||
epkgs.eldoc # doc support
|
base16Scheme = "${flakeRoot}/assets/system/theming/stylix/catppuccin-mocha.yaml";
|
||||||
epkgs.pulsar # pulses the cursor when jumping about
|
polarity = "dark";
|
||||||
epkgs.which-key # help porcelain
|
targets = {
|
||||||
epkgs.expreg # expand region
|
gtk = { enable = true; };
|
||||||
epkgs.vundo # undo tree
|
};
|
||||||
epkgs.puni # structured editing
|
};
|
||||||
epkgs.avy # jumping utility
|
|
||||||
epkgs.consult # emacs right click
|
############################
|
||||||
epkgs.vertico # minibuffer completion
|
# Home Manager user settings
|
||||||
epkgs.marginalia # annotations for completions
|
############################
|
||||||
epkgs.crux # utilities
|
# Use the _module.args.hmUsers style to avoid "option does not exist"
|
||||||
epkgs.magit # git porcelain
|
_module.args.hmUsers = {
|
||||||
epkgs.nerd-icons-corfu # nerd icons for completion
|
"${username}" = {
|
||||||
epkgs.corfu # completion
|
# Copy all stylix config files into ~/.config/stylix/
|
||||||
epkgs.cape # completion extensions
|
xdg.configFile =
|
||||||
epkgs.orderless # search paradigm
|
lib.mapAttrs' (name: value: {
|
||||||
epkgs.yasnippet # snippets support
|
name = "${moduleName}/${name}";
|
||||||
epkgs.yasnippet-snippets # commonly used snippets
|
value = { inherit (value) source; };
|
||||||
epkgs.rg # ripgrep
|
}) files;
|
||||||
epkgs.exec-path-from-shell # load env and path
|
|
||||||
epkgs.eat # better shell
|
# Optionally include stylix.conf
|
||||||
epkgs.rust-mode # rust mode (when rust-ts doesn't cut it)
|
home.file."${moduleName}/stylix.conf".text = stylixConf;
|
||||||
epkgs.rustic # more rust things
|
|
||||||
epkgs.nix-mode # nix lang
|
# Session variables
|
||||||
epkgs.hcl-mode # hashicorp file mode
|
home.sessionVariables = {
|
||||||
epkgs.shell-pop # quick shell popup
|
STYLIX_CONF = "$HOME/.config/stylix/stylix.conf";
|
||||||
epkgs.envrc # support for loading .envrc
|
|
||||||
epkgs.nixpkgs-fmt # format nix files
|
XCURSOR_THEME = cursorName;
|
||||||
epkgs.f # string + file utilities
|
XCURSOR_SIZE = toString cursorSize;
|
||||||
epkgs.gptel # llm chat (mainly claude)
|
HYPRCURSOR_THEME = cursorName;
|
||||||
epkgs.catppuccin-theme # catppuccin theme
|
HYPRCURSOR_SIZE = toString cursorSize;
|
||||||
epkgs.eldoc-box # docs in a box
|
};
|
||||||
epkgs.sideline # mainly for flymake errors on the side
|
};
|
||||||
epkgs.sideline-flymake # mainly for flymake errors on the side
|
};
|
||||||
epkgs.sideline-eglot # mainly for flymake errors on the side
|
|
||||||
];
|
|
||||||
};
|
|
||||||
home.sessionVariables = {
|
|
||||||
EDITOR = "emacs";
|
|
||||||
XDG_SCREENSHOTS_DIR = "~/screenshots";
|
|
||||||
};
|
|
||||||
home.file = {
|
|
||||||
emacs-init = {
|
|
||||||
source = "${flakeRoot}/assets/traveldroid/conf/emacs/early-init.el";
|
|
||||||
target = ".emacs.d/early-init.el";
|
|
||||||
};
|
|
||||||
emacs = {
|
|
||||||
source = "${flakeRoot}/assets/traveldroid/conf/emacs/init.el";
|
|
||||||
target = ".emacs.d/init.el";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
@@ -196,45 +206,3 @@ in
|
|||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
hyprland.nix
|
|
||||||
|
|
||||||
{ lib, config, pkgs, flakeRoot, home-manager, inputs, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
username = config.defaultUser or "henrov";
|
|
||||||
assetPath = "${flakeRoot}/assets/traveldroid/conf/hypr/";
|
|
||||||
|
|
||||||
# Read all files in the asset directory
|
|
||||||
assetFiles = builtins.attrNames (builtins.readDir assetPath);
|
|
||||||
|
|
||||||
# Convert files to Home Manager xdg config entries
|
|
||||||
hyprFiles = lib.genAttrs assetFiles (f: {
|
|
||||||
# Destination path in home directory
|
|
||||||
name = ".config/hypr/${f}";
|
|
||||||
# Source file path
|
|
||||||
value = { source = "${assetPath}/${f}"; };
|
|
||||||
});
|
|
||||||
|
|
||||||
# Determine Hyprland package
|
|
||||||
hyprlandPkg =
|
|
||||||
pkgs.hyprland or
|
|
||||||
pkgs.hyprland-git or
|
|
||||||
inputs.hyprland.packages.${pkgs.system}.default;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
environment.systemPackages = [ hyprlandPkg ];
|
|
||||||
|
|
||||||
_module.args.hmUsers = {
|
|
||||||
${username} = {
|
|
||||||
home.packages = [ hyprlandPkg ];
|
|
||||||
|
|
||||||
# Merge all files in the asset folder into ~/.config/hypr/
|
|
||||||
home.file = lib.mkMerge hyprFiles;
|
|
||||||
|
|
||||||
# Optional: Hyprland settings
|
|
||||||
settings.general."col.active_border" = "0xff97cbcd 0xff89b4fa";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|||||||
+12
-24
@@ -707,7 +707,7 @@ let
|
|||||||
moduleName = "stylix";
|
moduleName = "stylix";
|
||||||
|
|
||||||
# Path to stylix assets
|
# Path to stylix assets
|
||||||
assetPath = ../../../assets/system/conf/${moduleName};
|
assetPath = "${flakeRoot}/assets/system/conf/${moduleName}";
|
||||||
|
|
||||||
# Read all files in the asset directory
|
# Read all files in the asset directory
|
||||||
programFiles = builtins.readDir assetPath;
|
programFiles = builtins.readDir assetPath;
|
||||||
@@ -728,43 +728,31 @@ let
|
|||||||
cursorSize = 24;
|
cursorSize = 24;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
############################
|
#################################
|
||||||
# System packages
|
# System packages
|
||||||
############################
|
#################################
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
pkgs.feh
|
pkgs.feh
|
||||||
pkgs.st
|
pkgs.st
|
||||||
];
|
];
|
||||||
|
|
||||||
stylix = {
|
#################################
|
||||||
enable = true;
|
# Home Manager user-level configuration
|
||||||
base16Scheme = "${flakeRoot}/assets/system/theming/stylix/catppuccin-mocha.yaml";
|
#################################
|
||||||
polarity = "dark";
|
|
||||||
targets = {
|
|
||||||
gtk = { enable = true; };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
############################
|
|
||||||
# Home Manager user settings
|
|
||||||
############################
|
|
||||||
# Use the _module.args.hmUsers style to avoid "option does not exist"
|
|
||||||
_module.args.hmUsers = {
|
_module.args.hmUsers = {
|
||||||
"${username}" = {
|
"${username}" = {
|
||||||
# Copy all stylix config files into ~/.config/stylix/
|
# Copy all stylix config files into ~/.config/stylix/
|
||||||
xdg.configFile =
|
home.file = lib.mkMerge (lib.mapAttrs' (name: value: {
|
||||||
lib.mapAttrs' (name: value: {
|
name = "${moduleName}/${name}";
|
||||||
name = "${moduleName}/${name}";
|
value = { inherit (value) source; };
|
||||||
value = { inherit (value) source; };
|
}) files);
|
||||||
}) files;
|
|
||||||
|
|
||||||
# Optionally include stylix.conf
|
# Include stylix.conf if it exists
|
||||||
home.file."${moduleName}/stylix.conf".text = stylixConf;
|
home.file."${moduleName}/stylix.conf".text = stylixConf;
|
||||||
|
|
||||||
# Session variables
|
# Session variables for Stylix & cursors
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
STYLIX_CONF = "$HOME/.config/stylix/stylix.conf";
|
STYLIX_CONF = "$HOME/.config/stylix/stylix.conf";
|
||||||
|
|
||||||
XCURSOR_THEME = cursorName;
|
XCURSOR_THEME = cursorName;
|
||||||
XCURSOR_SIZE = toString cursorSize;
|
XCURSOR_SIZE = toString cursorSize;
|
||||||
HYPRCURSOR_THEME = cursorName;
|
HYPRCURSOR_THEME = cursorName;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ let
|
|||||||
moduleName = "stylix";
|
moduleName = "stylix";
|
||||||
|
|
||||||
# Path to stylix assets
|
# Path to stylix assets
|
||||||
assetPath = ../../../assets/system/conf/${moduleName};
|
assetPath = "${flakeRoot}/assets/system/conf/${moduleName}";
|
||||||
|
|
||||||
# Read all files in the asset directory
|
# Read all files in the asset directory
|
||||||
programFiles = builtins.readDir assetPath;
|
programFiles = builtins.readDir assetPath;
|
||||||
@@ -26,43 +26,31 @@ let
|
|||||||
cursorSize = 24;
|
cursorSize = 24;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
############################
|
#################################
|
||||||
# System packages
|
# System packages
|
||||||
############################
|
#################################
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
pkgs.feh
|
pkgs.feh
|
||||||
pkgs.st
|
pkgs.st
|
||||||
];
|
];
|
||||||
|
|
||||||
stylix = {
|
#################################
|
||||||
enable = true;
|
# Home Manager user-level configuration
|
||||||
base16Scheme = "${flakeRoot}/assets/system/theming/stylix/catppuccin-mocha.yaml";
|
#################################
|
||||||
polarity = "dark";
|
|
||||||
targets = {
|
|
||||||
gtk = { enable = true; };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
############################
|
|
||||||
# Home Manager user settings
|
|
||||||
############################
|
|
||||||
# Use the _module.args.hmUsers style to avoid "option does not exist"
|
|
||||||
_module.args.hmUsers = {
|
_module.args.hmUsers = {
|
||||||
"${username}" = {
|
"${username}" = {
|
||||||
# Copy all stylix config files into ~/.config/stylix/
|
# Copy all stylix config files into ~/.config/stylix/
|
||||||
xdg.configFile =
|
home.file = lib.mkMerge (lib.mapAttrs' (name: value: {
|
||||||
lib.mapAttrs' (name: value: {
|
name = "${moduleName}/${name}";
|
||||||
name = "${moduleName}/${name}";
|
value = { inherit (value) source; };
|
||||||
value = { inherit (value) source; };
|
}) files);
|
||||||
}) files;
|
|
||||||
|
|
||||||
# Optionally include stylix.conf
|
# Include stylix.conf if it exists
|
||||||
home.file."${moduleName}/stylix.conf".text = stylixConf;
|
home.file."${moduleName}/stylix.conf".text = stylixConf;
|
||||||
|
|
||||||
# Session variables
|
# Session variables for Stylix & cursors
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
STYLIX_CONF = "$HOME/.config/stylix/stylix.conf";
|
STYLIX_CONF = "$HOME/.config/stylix/stylix.conf";
|
||||||
|
|
||||||
XCURSOR_THEME = cursorName;
|
XCURSOR_THEME = cursorName;
|
||||||
XCURSOR_SIZE = toString cursorSize;
|
XCURSOR_SIZE = toString cursorSize;
|
||||||
HYPRCURSOR_THEME = cursorName;
|
HYPRCURSOR_THEME = cursorName;
|
||||||
|
|||||||
Reference in New Issue
Block a user