Compare commits

...

2 Commits

Author SHA1 Message Date
b17bc19cfd
hyprland: edit config shortcut 2024-04-22 16:49:46 -04:00
3e1b60d7c3
home: add option for location of nixfiles repo
This is used by the flake registry as well as a shortcut for editing
Hyprland config
2024-04-22 16:48:40 -04:00
3 changed files with 14 additions and 2 deletions

View File

@ -14,7 +14,7 @@ in {
};
to = {
type = "git";
url = "file://${config.home.homeDirectory}/nixfiles";
url = "file://${config.nixfiles.path}";
};
};
};

View File

@ -61,5 +61,12 @@ in
default = (lib.hasAttrByPath [ "nixfiles" "meta" "wayland" ] osConfig) && osConfig.nixfiles.meta.wayland;
example = true;
};
path = lib.mkOption {
description = "The absolute path of the nixfiles flake";
type = lib.types.str;
default = "${config.home.homeDirectory}/nixfiles";
defaultText = "\${config.home.homeDirectory}/nixfiles";
example = "/etc/nixos";
};
};
}

View File

@ -298,7 +298,12 @@ in
"$mod, mouse_up, workspace, e-1"
# show this file (help)
("$mod, slash, exec, ${terminal} -e ${pkgs.neovim}/bin/nvim '+set nomodifiable' '+noremap q :q<CR>' " + args.vars.self.outPath + "/home/hyprland.nix")
("$mod, slash, exec, ${terminal} -e ${pkgs.neovim}/bin/nvim '+set nomodifiable' '+noremap q :q<CR>' "
+ lib.escapeShellArg (args.vars.self.outPath + "/home/sessions/hyprland/default.nix"))
# edit this file
("$mod SHIFT, slash, exec, ${terminal} -e ${pkgs.neovim}/bin/nvim "
+ lib.escapeShellArg (config.nixfiles.path + "/home/sessions/hyprland/default.nix"))
];
# repeat, ignore mods