GAH, finally it works
This commit is contained in:
parent
9bce08c9ba
commit
488ec8ab62
2 changed files with 11 additions and 4 deletions
|
|
@ -1,4 +1,4 @@
|
|||
{ inputs, config, pkgs, lib, ... }:
|
||||
{ inputs, config, pkgs, lib, ... }@args:
|
||||
let
|
||||
my-emacs = ((pkgs.emacsPackagesFor pkgs.emacs-unstable)
|
||||
.emacsWithPackages (epkgs: with epkgs; [
|
||||
|
|
@ -17,6 +17,8 @@ in {
|
|||
|
||||
my.beets-config.enable = true;
|
||||
|
||||
my.flakeLocation = lib.mkIf (builtins.hasAttr "osConfig" args) args.osConfig.my.flakeLocation;
|
||||
|
||||
# Home Manager needs a bit of information about you and the paths it should
|
||||
# manage.
|
||||
home = {
|
||||
|
|
|
|||
|
|
@ -1,20 +1,25 @@
|
|||
{ inputs, config, pkgs, lib, ... }:
|
||||
{ inputs, config, pkgs, lib, ... }@args:
|
||||
let
|
||||
beets-cfg = config.my.beets-config;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
my.flakeLocation = lib.mkOption {
|
||||
default = "/home/${config.home.username}/nixos-config";
|
||||
description = "Location of nixos flake for config";
|
||||
type = lib.types.path;
|
||||
};
|
||||
my.beets-config.enable = lib.mkEnableOption "Enable beets configuration file";
|
||||
};
|
||||
|
||||
config = lib.mkIf beets-cfg.enable {
|
||||
# xdg.configFile."beets/config.yaml".source = ./beets-config/config.yaml;
|
||||
|
||||
|
||||
home = {
|
||||
file = {
|
||||
".config/beets/config.yaml" = {
|
||||
source = config.lib.file.mkOutOfStoreSymlink ./. + "submodules/beets-config/config.yaml";
|
||||
source = config.lib.file.mkOutOfStoreSymlink
|
||||
"${config.my.flakeLocation}/submodules/beets-config/config.yaml";
|
||||
# recursive = true;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue