Symlinks are not created
Open
Nobody has claimed this yet.
- Dominant language
- Nix
- Stars
- 628
- Forks
- 64
- PR merge metrics
- No merged PRs in 30d
Description
I'm trying to automatically create symlinks so that I don't have to manually create them or copy files to ~/.config, but the symlinks just aren't created.
# modules/darwin/home/default.nix
{ options, config, lib, pkgs, inputs, ... }:
with lib;
with lib.shiro;
let
cfg = config.shiro.home;
in
{
options.shiro.home = with types; {
file = mkOpt attrs { }
"A set of files to be managed by home-manager's <option>home.file</option>.";
configFile = mkOpt attrs { }
"A set of files to be managed by home-manager's <option>xdg.configFile</option>.";
extraOptions = mkOpt attrs { } "Options to pass directly to home-manager.";
};
config = {
shiro.home.extraOptions = {
home.stateVersion = config.system.stateVersion;
home.file = mkAliasDefinitions options.shiro.home.file;
xdg.enable = true;
xdg.configFile = mkAliasDefinitions options.shiro.home.configFile;
};
snowfallorg.users.${config.shiro.user.name}.home.config = mkAliasDefinitions options.shiro.home.extraOptions;
home-manager = {
useUserPackages = true;
useGlobalPkgs = true;
};
};
}
# modules/darwin/tools/sketchybar/default.nix
{ options, config, lib, pkgs, ... }:
with lib;
with lib.shiro;
let
cfg = config.shiro.tools.sketchybar;
in
{
options.shiro.tools.sketchybar = with types; {
enable = mkBoolOpt false "Whether or not to install sketchybar";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [ sketchybar ];
shiro.home.configFile.sketchybar = {
source = config.lib.file.mkOutOfStoreSymlink ./config;
recursive = true;
executable = true;
};
};
};
services.sketchybar = {
enable = true;
package = pkgs.sketchybar;
};
};
}
I've already tried
configFile.sketchybar = {
source = config.lib.file.mkOutOfStoreSymlink "~/.nix/modules/darwin/tools/sketchybar/config"
}
configFile.sketchybar = {
source = config.lib.file.mkOutOfStoreSymlink "./config"
}
configFile.sketchybar = {
source = "./config"
}
and the same with file."$HOME/.config/sketchybar" = {}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with modules/darwin/home/default.nix and modules/darwin/tools/sketchybar/default.nix, then trace how shiro.home.configFile is passed to home-manager's xdg.configFile. Reproduce the missing symlink with the shown sketchybar configuration and verify that the configured ~/.config/sketchybar link is created.
Written by the indexing model from the issue text.
Assessment
- Domain
- devops, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100