mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-07 06:19:00 +00:00
users/foo-dogsquared/programs/git: add instaweb submodule option
This commit is contained in:
parent
dfc6a358be
commit
3bb6e776b9
@ -5,10 +5,15 @@ let
|
||||
cfg = userCfg.programs.git;
|
||||
in
|
||||
{
|
||||
options.users.foo-dogsquared.programs.git.enable =
|
||||
lib.mkEnableOption "foo-dogsquared's Git setup";
|
||||
options.users.foo-dogsquared.programs.git = {
|
||||
enable = lib.mkEnableOption "foo-dogsquared's Git setup";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
instaweb.enable = lib.mkEnableOption "install additional files for instaweb setup";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable (
|
||||
lib.mkMerge [
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
tea # So you don't have to see some teas, I guess.
|
||||
hut # So you don't have to see Sourcehut's brutalist design, I guess.
|
||||
@ -77,5 +82,26 @@ in
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
(lib.mkIf cfg.instaweb.enable {
|
||||
state.ports.git-instaweb.value = 15432;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
lighttpd
|
||||
];
|
||||
|
||||
programs.git.extraConfig.instaweb = {
|
||||
local = true;
|
||||
httpd = "lighttpd";
|
||||
port = config.state.ports.git-instaweb.value;
|
||||
};
|
||||
|
||||
users.foo-dogsquared.programs.custom-homepage.sections.quicklinks.links =
|
||||
lib.mkBefore (lib.singleton {
|
||||
text = "Current git repo";
|
||||
url = "http://localhost:${builtins.toString config.state.ports.git-instaweb.value}";
|
||||
});
|
||||
})
|
||||
]);
|
||||
}
|
||||
|
@ -17,7 +17,10 @@ in {
|
||||
|
||||
users.foo-dogsquared.programs = {
|
||||
shell.enable = lib.mkDefault true;
|
||||
git.enable = lib.mkDefault true;
|
||||
git = {
|
||||
enable = lib.mkDefault true;
|
||||
instaweb.enable = true;
|
||||
};
|
||||
jujutsu.enable = lib.mkDefault true;
|
||||
keys.gpg.enable = true;
|
||||
keys.ssh.enable = true;
|
||||
|
Loading…
Reference in New Issue
Block a user