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
|
||||
Just look at how to rewrite this, ignore previous interactions around this nix.
|
||||
Solve the error. That is really important.
|
||||
Lopok at the way hyprland is using config files.
|
||||
|
||||
|
||||
error:
|
||||
… while calling the 'seq' builtin
|
||||
@@ -19,82 +19,92 @@ error:
|
||||
| ^
|
||||
375| else
|
||||
|
||||
error: The option `home' does not exist. Definition values:
|
||||
- In `/nix/store/cpciwvh5yx2qw51ypda3lygshrr2834f-source/Droidnix/generated/modules/traveldroid/apps/emacs/emacs.nix':
|
||||
error: The option `stylix' does not exist. Definition values:
|
||||
- In `/nix/store/fidsc6g16ir0rrf5g8cxdyz0hy24zc5z-source/Droidnix/generated/modules/traveldroid/desktop/stylix.nix':
|
||||
{
|
||||
file = {
|
||||
"emacs/early-init.el" = {
|
||||
source = "/nix/store/cpciwvh5yx2qw51ypda3lygshrr2834f-source/Droidnix/assets/traveldroid/conf/emacs/early-init.el";
|
||||
target = ".emacs.d/early-init.el";
|
||||
base16Scheme = "/nix/store/fidsc6g16ir0rrf5g8cxdyz0hy24zc5z-source/Droidnix/assets/system/theming/stylix/catppuccin-mocha.yaml";
|
||||
enable = true;
|
||||
polarity = "dark";
|
||||
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.
|
||||
|
||||
|
||||
------------------------------------------------------------------------
|
||||
{ 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;
|
||||
# install with tree sitter enabled
|
||||
package = (pkgs.emacs-pgtk.override { withTreeSitter = true; });
|
||||
extraPackages = epkgs: [
|
||||
# also install all tree sitter grammars
|
||||
epkgs.manualPackages.treesit-grammars.with-all-grammars
|
||||
epkgs.nerd-icons # nerd fonts support
|
||||
epkgs.doom-modeline # model line
|
||||
epkgs.diminish # hides modes from modeline
|
||||
epkgs.eldoc # doc support
|
||||
epkgs.pulsar # pulses the cursor when jumping about
|
||||
epkgs.which-key # help porcelain
|
||||
epkgs.expreg # expand region
|
||||
epkgs.vundo # undo tree
|
||||
epkgs.puni # structured editing
|
||||
epkgs.avy # jumping utility
|
||||
epkgs.consult # emacs right click
|
||||
epkgs.vertico # minibuffer completion
|
||||
epkgs.marginalia # annotations for completions
|
||||
epkgs.crux # utilities
|
||||
epkgs.magit # git porcelain
|
||||
epkgs.nerd-icons-corfu # nerd icons for completion
|
||||
epkgs.corfu # completion
|
||||
epkgs.cape # completion extensions
|
||||
epkgs.orderless # search paradigm
|
||||
epkgs.yasnippet # snippets support
|
||||
epkgs.yasnippet-snippets # commonly used snippets
|
||||
epkgs.rg # ripgrep
|
||||
epkgs.exec-path-from-shell # load env and path
|
||||
epkgs.eat # better shell
|
||||
epkgs.rust-mode # rust mode (when rust-ts doesn't cut it)
|
||||
epkgs.rustic # more rust things
|
||||
epkgs.nix-mode # nix lang
|
||||
epkgs.hcl-mode # hashicorp file mode
|
||||
epkgs.shell-pop # quick shell popup
|
||||
epkgs.envrc # support for loading .envrc
|
||||
epkgs.nixpkgs-fmt # format nix files
|
||||
epkgs.f # string + file utilities
|
||||
epkgs.gptel # llm chat (mainly claude)
|
||||
epkgs.catppuccin-theme # catppuccin theme
|
||||
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";
|
||||
};
|
||||
};
|
||||
############################
|
||||
# System packages
|
||||
############################
|
||||
environment.systemPackages = [
|
||||
pkgs.feh
|
||||
pkgs.st
|
||||
];
|
||||
|
||||
stylix = {
|
||||
enable = true;
|
||||
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 = {
|
||||
"${username}" = {
|
||||
# Copy all stylix config files into ~/.config/stylix/
|
||||
xdg.configFile =
|
||||
lib.mapAttrs' (name: value: {
|
||||
name = "${moduleName}/${name}";
|
||||
value = { inherit (value) source; };
|
||||
}) files;
|
||||
|
||||
# Optionally include stylix.conf
|
||||
home.file."${moduleName}/stylix.conf".text = stylixConf;
|
||||
|
||||
# Session variables
|
||||
home.sessionVariables = {
|
||||
STYLIX_CONF = "$HOME/.config/stylix/stylix.conf";
|
||||
|
||||
XCURSOR_THEME = cursorName;
|
||||
XCURSOR_SIZE = toString cursorSize;
|
||||
HYPRCURSOR_THEME = cursorName;
|
||||
HYPRCURSOR_SIZE = toString cursorSize;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
------------------------------------------------------------------------
|
||||
@@ -196,45 +206,3 @@ in
|
||||
home-manager.useGlobalPkgs = 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";
|
||||
|
||||
# Path to stylix assets
|
||||
assetPath = ../../../assets/system/conf/${moduleName};
|
||||
assetPath = "${flakeRoot}/assets/system/conf/${moduleName}";
|
||||
|
||||
# Read all files in the asset directory
|
||||
programFiles = builtins.readDir assetPath;
|
||||
@@ -728,43 +728,31 @@ let
|
||||
cursorSize = 24;
|
||||
in
|
||||
{
|
||||
############################
|
||||
#################################
|
||||
# System packages
|
||||
############################
|
||||
#################################
|
||||
environment.systemPackages = [
|
||||
pkgs.feh
|
||||
pkgs.st
|
||||
];
|
||||
|
||||
stylix = {
|
||||
enable = true;
|
||||
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"
|
||||
#################################
|
||||
# Home Manager user-level configuration
|
||||
#################################
|
||||
_module.args.hmUsers = {
|
||||
"${username}" = {
|
||||
# Copy all stylix config files into ~/.config/stylix/
|
||||
xdg.configFile =
|
||||
lib.mapAttrs' (name: value: {
|
||||
name = "${moduleName}/${name}";
|
||||
value = { inherit (value) source; };
|
||||
}) files;
|
||||
home.file = lib.mkMerge (lib.mapAttrs' (name: value: {
|
||||
name = "${moduleName}/${name}";
|
||||
value = { inherit (value) source; };
|
||||
}) files);
|
||||
|
||||
# Optionally include stylix.conf
|
||||
# Include stylix.conf if it exists
|
||||
home.file."${moduleName}/stylix.conf".text = stylixConf;
|
||||
|
||||
# Session variables
|
||||
# Session variables for Stylix & cursors
|
||||
home.sessionVariables = {
|
||||
STYLIX_CONF = "$HOME/.config/stylix/stylix.conf";
|
||||
|
||||
XCURSOR_THEME = cursorName;
|
||||
XCURSOR_SIZE = toString cursorSize;
|
||||
HYPRCURSOR_THEME = cursorName;
|
||||
|
||||
@@ -5,7 +5,7 @@ let
|
||||
moduleName = "stylix";
|
||||
|
||||
# Path to stylix assets
|
||||
assetPath = ../../../assets/system/conf/${moduleName};
|
||||
assetPath = "${flakeRoot}/assets/system/conf/${moduleName}";
|
||||
|
||||
# Read all files in the asset directory
|
||||
programFiles = builtins.readDir assetPath;
|
||||
@@ -26,43 +26,31 @@ let
|
||||
cursorSize = 24;
|
||||
in
|
||||
{
|
||||
############################
|
||||
#################################
|
||||
# System packages
|
||||
############################
|
||||
#################################
|
||||
environment.systemPackages = [
|
||||
pkgs.feh
|
||||
pkgs.st
|
||||
];
|
||||
|
||||
stylix = {
|
||||
enable = true;
|
||||
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"
|
||||
#################################
|
||||
# Home Manager user-level configuration
|
||||
#################################
|
||||
_module.args.hmUsers = {
|
||||
"${username}" = {
|
||||
# Copy all stylix config files into ~/.config/stylix/
|
||||
xdg.configFile =
|
||||
lib.mapAttrs' (name: value: {
|
||||
name = "${moduleName}/${name}";
|
||||
value = { inherit (value) source; };
|
||||
}) files;
|
||||
home.file = lib.mkMerge (lib.mapAttrs' (name: value: {
|
||||
name = "${moduleName}/${name}";
|
||||
value = { inherit (value) source; };
|
||||
}) files);
|
||||
|
||||
# Optionally include stylix.conf
|
||||
# Include stylix.conf if it exists
|
||||
home.file."${moduleName}/stylix.conf".text = stylixConf;
|
||||
|
||||
# Session variables
|
||||
# Session variables for Stylix & cursors
|
||||
home.sessionVariables = {
|
||||
STYLIX_CONF = "$HOME/.config/stylix/stylix.conf";
|
||||
|
||||
XCURSOR_THEME = cursorName;
|
||||
XCURSOR_SIZE = toString cursorSize;
|
||||
HYPRCURSOR_THEME = cursorName;
|
||||
|
||||
Reference in New Issue
Block a user