1
Fork 0

Satellite dev module (+ other changes probably, including eww install)

This commit is contained in:
Matei Adriel 2023-02-05 04:01:18 +01:00
parent 5e696cf9d0
commit da817da3b9
No known key found for this signature in database
10 changed files with 42 additions and 15 deletions
modules/home-manager

View file

@ -5,4 +5,5 @@
discord = import ./discord.nix;
fonts = import ./fonts.nix;
firefox = import ./firefox;
satellite-dev = import ./satellite-dev.nix;
}

View file

@ -0,0 +1,25 @@
{ lib, config, ... }: {
options.satellite-dev = {
enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = "While true, makes out of store symlinks for files in dev mode";
};
root = lib.mkOption {
type = lib.types.str;
default = "~/Projects/satellite";
description = "Where the satellite repo is cloned";
};
path = lib.mkOption {
type = lib.types.functionTo lib.types.path;
description = "The function used to conditionally symlink in or out of store based on the above paths";
};
};
config.satellite-dev.path = path:
if config.satellite-dev.enable then
config.lib.file.mkOutOfStoreSymlink "${config.satellite-dev.root}/${path}"
else "${../..}/${path}";
}