feat: add lf in homelab

This commit is contained in:
Gustavo "Guz" L. de Mello
2024-02-12 14:58:06 -03:00
parent 13785cb7ba
commit 075552a3dd
2 changed files with 46 additions and 0 deletions

View File

@@ -11,6 +11,7 @@
shell = pkgs.zsh;
home = {
imports = [
../../../modules/home-manager/programs/lf.nix
../../../modules/home-manager/programs/starship.nix
../../../modules/home-manager/programs/tmux.nix
../../../modules/home-manager/programs/zsh.nix
@@ -18,6 +19,8 @@
../../../modules/home-manager/packages/nixx.nix
];
lf.enable = true;
starship.enable = true;
starship.enableZsh = true;

View File

@@ -0,0 +1,43 @@
{ config, lib, pkgs, ... }:
let
cfg = config.homelab.nextcloud;
in
{
imports = [ ];
options = with lib; with lib.types; {
enable = mkEnableOption "";
package = mkOption {
type = package;
default = pkgs.nextcloud28;
};
domain = mkOption {
type = str;
default = "nextcloud." + config.homelab.domain;
};
port = mkOption {
type = port;
default = 3030;
};
data = {
root = mkOption {
type = path;
default = config.homelab.storage + /nextcloud;
};
};
configureRedis = mkOption {
type = bool;
default = true;
};
};
config = lib.mkIf cfg.enable {
services.nextcloud = {
configureRedis = cfg.configureRedis;
enable = true;
package = cfg.package;
home = cfg.data.root;
hostName = cfg.domain;
https = true;
};
};
}