Fixup modules
This commit is contained in:
parent
75fa39fe59
commit
8d35835f89
7 changed files with 104 additions and 19 deletions
|
|
@ -15,7 +15,9 @@
|
|||
./base_packages.nix
|
||||
./home_packages.nix
|
||||
./media.nix
|
||||
./coding.nix
|
||||
./flatpak.nix
|
||||
./nextcloud.nix
|
||||
./hyprland
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -209,8 +209,8 @@
|
|||
};
|
||||
|
||||
input = {
|
||||
kb_layout = "{config.mods.xkb.layout}";
|
||||
kb_variant = "{config.mods.xkb.variant}";
|
||||
kb_layout = "${config.mods.xkb.layout}";
|
||||
kb_variant = "${config.mods.xkb.variant}";
|
||||
repeat_delay = 200;
|
||||
force_no_accel = true;
|
||||
touchpad = {
|
||||
|
|
|
|||
81
modules/programs/nextcloud.nix
Normal file
81
modules/programs/nextcloud.nix
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
{ lib, config, pkgs, options, ... }: {
|
||||
options.mods = {
|
||||
nextcloud = {
|
||||
enable = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = "Enable nextcloud";
|
||||
};
|
||||
username = lib.mkOption {
|
||||
default = "DashieTM";
|
||||
example = "globi";
|
||||
type = lib.types.str;
|
||||
description = "Your username";
|
||||
};
|
||||
url = lib.mkOption {
|
||||
default = "cloud.dashie.org";
|
||||
example = "cloud.globi.org";
|
||||
type = lib.types.str;
|
||||
description = "Your url";
|
||||
};
|
||||
synclist = lib.mkOption {
|
||||
default = [ ];
|
||||
example = [
|
||||
{
|
||||
name = "sync globi folder";
|
||||
remote = "globi";
|
||||
local = "/home/globi";
|
||||
}
|
||||
];
|
||||
description = ''
|
||||
A list of folders to synchronize.
|
||||
This has to be an attribute list with the name, remote and local field (all strings).
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# config =
|
||||
# let
|
||||
# username = config.mods.nextcloud.username;
|
||||
# password = config.sops.secrets.nextcloud;
|
||||
# url = config.mods.nextcloud.url;
|
||||
# synclist = config.mods.nextcloud.synclist;
|
||||
# name = "test";
|
||||
# local = "test";
|
||||
# remote = "test";
|
||||
# in
|
||||
# lib.mkIf config.mods.nextcloud.enable
|
||||
# (lib.optionalAttrs (options?systemd.user.startServices) #{
|
||||
# builtins.listToAttrs
|
||||
# (map
|
||||
# ({ name, remote, local }: {
|
||||
# systemd.user = {
|
||||
# services."${name}" = {
|
||||
# Unit = {
|
||||
# Description = "Auto sync Nextcloud";
|
||||
# After = "network-online.target";
|
||||
# };
|
||||
# Service = {
|
||||
# Type = "simple";
|
||||
# ExecStart = "${pkgs.nextcloud-client}/bin/nextcloudcmd -h --path ${remote} ${local} https://${username}:${password}@${url}";
|
||||
# TimeoutStopSec = "180";
|
||||
# KillMode = "process";
|
||||
# KillSignal = "SIGINT";
|
||||
# };
|
||||
# Install.WantedBy = [ "multi-user.target" ];
|
||||
# };
|
||||
# timers.${name} = {
|
||||
# Unit.Description = "Automatic sync files with Nextcloud when booted up after 1 minute then rerun every 60 minutes";
|
||||
# Timer.OnBootSec = "1min";
|
||||
# Timer.OnUnitActiveSec = "60min";
|
||||
# Install.WantedBy = [ "multi-user.target" "timers.target" ];
|
||||
# };
|
||||
# startServices = true;
|
||||
# };
|
||||
# # });
|
||||
# }))
|
||||
# synclist
|
||||
# );
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue