Regenerated

This commit is contained in:
2026-03-25 12:27:50 +00:00
parent d3d61d7157
commit 44e2cfea2b
4 changed files with 142 additions and 16 deletions
+135 -10
View File
@@ -1,19 +1,102 @@
Rewrite my ./generated/modules/traveldroid/system/dbus.nix to integrate nicely with my existing flake.nix en host.nix
Rewrite my ./generated/modules/traveldroid/apps/emacs/emacs.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
This version worked, stay as close to it as you can.
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
at /nix/store/s7bvgynzfisna3jdq2cr4jx73xnhxs27-source/lib/modules.nix:402:18:
401| options = checked options;
402| config = checked (removeAttrs config [ "_module" ]);
| ^
403| _module = checked (config._module);
… while calling the 'throw' builtin
at /nix/store/s7bvgynzfisna3jdq2cr4jx73xnhxs27-source/lib/modules.nix:374:13:
373| else
374| throw baseMsg
| ^
375| else
error: The option `home' does not exist. Definition values:
- In `/nix/store/cpciwvh5yx2qw51ypda3lygshrr2834f-source/Droidnix/generated/modules/traveldroid/apps/emacs/emacs.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";
...
Did you mean `time', `boot' or `jobs'?
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.
------------------------------------------------------------------------
{ config, pkgs, lib, ... }:
{ pkgs, flakeRoot,... }:
{
services.dbus = {
enable = true;
# Use the dbus-broker backend explicitly
package = pkgs.dbus-broker;
};
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";
};
};
}
------------------------------------------------------------------------
flake.nix
@@ -113,3 +196,45 @@ 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";
};
};
}
+3 -3
View File
@@ -1057,15 +1057,15 @@ in
# Always use /bin/sh -c for multi-line commands
serviceConfig.ExecStart = ''
/bin/sh -c '
echo "Copying assets from ${assetPath} to ${homeDir} ..."
echo "Copying assets from ${assetPath} to ${homeDir}/Droidnix ..."
if [ ! -d "${assetPath}" ]; then
echo "ERROR: ${assetPath} does not exist"
exit 1
fi
mkdir -p "${homeDir}"
chown ${username}:${username} "${homeDir}"
mkdir -p "${homeDir}/Droidnix"
chown u+rwx ${username}:${username} "${homeDir}/Droidnix"
${pkgs.rsync}/bin/rsync -a --no-owner --no-group "${assetPath}/" "${homeDir}/"
+1
View File
@@ -0,0 +1 @@
rm -rf ~/Repos/nixos/Droidnix/generated && nix --extra-experimental-features "nix-command flakes" shell nixpkgs#emacs -c emacs --batch README.org -f org-babel-tangle && git add . && git commit -m "Regenerated" && git push && sudo nixos-rebuild test --flake .#traveldroid
+3 -3
View File
@@ -18,15 +18,15 @@ in
# Always use /bin/sh -c for multi-line commands
serviceConfig.ExecStart = ''
/bin/sh -c '
echo "Copying assets from ${assetPath} to ${homeDir} ..."
echo "Copying assets from ${assetPath} to ${homeDir}/Droidnix ..."
if [ ! -d "${assetPath}" ]; then
echo "ERROR: ${assetPath} does not exist"
exit 1
fi
mkdir -p "${homeDir}"
chown ${username}:${username} "${homeDir}"
mkdir -p "${homeDir}/Droidnix"
chown u+rwx ${username}:${username} "${homeDir}/Droidnix"
${pkgs.rsync}/bin/rsync -a --no-owner --no-group "${assetPath}/" "${homeDir}/"