I started using this NixOS configuration as a base for my setup.
I decided to move the configuration into a Git repository to keep track of changes, but when I do, it breaks. Running nixos-rebuild
results in the following error:
β nixos sudo nixos-rebuild switch --flake ~/.dotfiles/nixos#nixos
building the system configuration...
error:
β¦ while calling the 'head' builtin
at /nix/store/g8zzlf6drg73c987ii390yicq4c0j778-source/lib/attrsets.nix:922:11:
921| || pred here (elemAt values 1) (head values) then
922| head values
| ^
923| else
β¦ while evaluating the attribute 'value'
at /nix/store/g8zzlf6drg73c987ii390yicq4c0j778-source/lib/modules.nix:807:9:
806| in warnDeprecation opt //
807| { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
| ^
808| inherit (res.defsFinal') highestPrio;
(stack trace truncated; use '--show-trace' to show the full trace)
error: getting status of '/nix/store/pdrbc49jdibvjw49p9bxln85fxz75kd3-source/pkgs/dmenu/default.nix': No such file or directory
The structure of my Nix configuration is as follows:
β nixos tree -L 1
.
βββ flake.lock
βββ flake.nix
βββ hosts
βββ modules
βββ overlays
βββ pkgs
The pkgs
directory has the following structure:
β nixos tree -L 1 pkgs
pkgs
βββ default.nix
βββ dmenu
βββ dwm
βββ st
The pkgs/default.nix
file contains:
pkgs: {
dmenu = pkgs.callPackage ./dmenu { };
dwm = pkgs.callPackage ./dwm { };
st = pkgs.callPackage ./st { };
}
Deleting the .git
folder resolves the issue.
if possible i dont wanna make a lot of changes to my config but i still wanna keep track of it through git
thx in advance