Hello, trying to clean up my config with variables and consolidating module .nix files and dotfiles. In any case… I think I’m close. Here is a tree dump, flake.nix
, home.nix
and error output :
tree dump… :
.
├── flake.nix
├── homeManagerModules
│ └── dotfiles
│ │ └── config
│ │ └── hypr
│ └── tmux.nix
├── hosts
│ └── tbnix
│ ├── default.nix
│ ├── hardware.nix
│ ├── home.nix
│ └── network.nix
├── nixosModules
└── hyprland.nix
## flake.nix
...
let
homeManager = {
df = ./homeManagerModules/dotfiles;
cfg = ./homeManagerModules/dotfiles/config;
};
system = "x86_64-linux";
in
...
{
# NixOS configuration entrypoint
nixosConfigurations = {
tbnix = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit system; inherit inputs;
};
modules = [
home-manager.nixosModules.home-manager {
home-manager.extraSpecialArgs = { inherit homeManager; };
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.fez = import ./hosts/tbnix/home.nix;
}
# nixos-cosmic.nixosModules.default
./hosts/tbnix
];
};
...
# ./hosts/tbnix/home.nix
{ inputs, config, lib, pkgs, modulesPath, homeManager, ... }:
{
imports = [
../common/home.nix
];
home.file = {
".config/hypr/common.conf" = {
source = {homeManager.cfg}/hypr/common.conf;
};
".config/hypr/keybind" = {
source = {homeManager.cfg}/hypr/keybind;
};
...
# ERROR
...
error: syntax error, unexpected '}', expecting '.' or '='
at /nix/store/5mj2gnkzi1qzdpl806rfsn7mbra8imqv-source/hosts/tbnix/home.nix:10:32:
9| ".config/hypr/common.conf" = {
10| source = {homeManager.cfg}/hypr/common.conf;
| ^
11| };
Thank you