Compare commits
4 Commits
c381580cca
...
6f5f70f439
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6f5f70f439 | ||
|
|
d40175d4a5 | ||
|
|
34eba60193 | ||
|
|
57230a32c3 |
@@ -1,4 +1,4 @@
|
|||||||
{ pkgs, inputs, lib, host, ... }:
|
{ pkgs, inputs, host, ... }:
|
||||||
{
|
{
|
||||||
imports = ([
|
imports = ([
|
||||||
inputs.sops-nix.nixosModules.sops
|
inputs.sops-nix.nixosModules.sops
|
||||||
@@ -43,6 +43,8 @@
|
|||||||
./system-modules/postgres.nix
|
./system-modules/postgres.nix
|
||||||
./system-modules/nx2site/proxy.nix
|
./system-modules/nx2site/proxy.nix
|
||||||
./system-modules/nx2site/gitea.nix
|
./system-modules/nx2site/gitea.nix
|
||||||
|
./system-modules/nx2site/radicale.nix
|
||||||
|
# ./system-modules/nx2site/nextcloud.nix
|
||||||
./system-modules/nx2site/vaultwarden.nix
|
./system-modules/nx2site/vaultwarden.nix
|
||||||
./system-modules/nx2site/paperless.nix
|
./system-modules/nx2site/paperless.nix
|
||||||
] else []);
|
] else []);
|
||||||
|
|||||||
Binary file not shown.
@@ -1,81 +0,0 @@
|
|||||||
{ config, lib, user, secrets, domain, ... }: let
|
|
||||||
calendars = [
|
|
||||||
{
|
|
||||||
name = "Preservation";
|
|
||||||
primary = true;
|
|
||||||
url = "https://dav.${domain}/nx2/preservation/";
|
|
||||||
color = "#dddddd";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "Effort";
|
|
||||||
primary = false;
|
|
||||||
url = "https://dav.${domain}/nx2/effort/";
|
|
||||||
color = "#dd2222";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "Experience";
|
|
||||||
primary = false;
|
|
||||||
url = "https://dav.${domain}/nx2/experience/";
|
|
||||||
color = "#2222dd";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "Exposure";
|
|
||||||
primary = false;
|
|
||||||
url = "https://dav.${domain}/nx2/exposure/";
|
|
||||||
color = "#22aa22";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "Engagement";
|
|
||||||
primary = false;
|
|
||||||
url = "https://dav.${domain}/nx2/engagement/";
|
|
||||||
color = "#8800CC";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
in {
|
|
||||||
accounts.calendar.accounts = let
|
|
||||||
makeCalendar = url: primary: color: {
|
|
||||||
inherit primary;
|
|
||||||
remote = {
|
|
||||||
type = "caldav";
|
|
||||||
userName = user;
|
|
||||||
inherit url;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
m = cc: lib.attrsets.mergeAttrsList ( map (c: { "${c.name}" = makeCalendar c.url c.primary c.color;}) cc );
|
|
||||||
in m calendars;
|
|
||||||
|
|
||||||
|
|
||||||
# TODO: Replace this once https://github.com/nix-community/home-manager/pull/5484 is merged.
|
|
||||||
# Make sure it works, though, including the order of calendars.
|
|
||||||
programs.thunderbird.settings = let
|
|
||||||
|
|
||||||
makeThunderbirdCalendar = cal: let
|
|
||||||
calendarAccountSafeName = (builtins.replaceStrings ["."] ["-"]) cal.name;
|
|
||||||
in {
|
|
||||||
"calendar.registry.${calendarAccountSafeName}.cache.enabled" = true;
|
|
||||||
"calendar.registry.${calendarAccountSafeName}.calendar-main-default" = cal.primary;
|
|
||||||
"calendar.registry.${calendarAccountSafeName}.calendar-main-in-composite" = true;
|
|
||||||
"calendar.registry.${calendarAccountSafeName}.color" = cal.color;
|
|
||||||
"calendar.registry.${calendarAccountSafeName}.name" = cal.name;
|
|
||||||
"calendar.registry.${calendarAccountSafeName}.type" = "caldav";
|
|
||||||
"calendar.registry.${calendarAccountSafeName}.uri" = config.accounts.calendar.accounts.${cal.name}.remote.url;
|
|
||||||
"calendar.registry.${calendarAccountSafeName}.username" = config.accounts.calendar.accounts.${cal.name}.remote.userName;
|
|
||||||
};
|
|
||||||
in lib.attrsets.mergeAttrsList (
|
|
||||||
map (cal: makeThunderbirdCalendar cal) calendars
|
|
||||||
) // {
|
|
||||||
|
|
||||||
"calendar.registry.sleep-as-android.cache.enabled" = true;
|
|
||||||
"calendar.registry.sleep-as-android.calendar-main-in-composite" = true;
|
|
||||||
"calendar.registry.sleep-as-android.color" = "#222233";
|
|
||||||
"calendar.registry.sleep-as-android.name" = "Sleep As Android";
|
|
||||||
"calendar.registry.sleep-as-android.type" = "ics";
|
|
||||||
"calendar.registry.sleep-as-android.readOnly" = true;
|
|
||||||
"calendar.registry.sleep-as-android.uri" = secrets.calendar.sleep-as-android-url;
|
|
||||||
|
|
||||||
"calendar.list.sortOrder" = lib.fold (cal: acc: cal.name + " " + acc) "" calendars;
|
|
||||||
|
|
||||||
# Keep these after removing the above.
|
|
||||||
"calendar.week.start" = 1;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -235,7 +235,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
"ui.background" = { # general background of the editor window
|
"ui.background" = { # general background of the editor window
|
||||||
# "bg" = background;
|
"bg" = background;
|
||||||
};
|
};
|
||||||
"ui.bufferline" = { # the top line ("tab"-line)
|
"ui.bufferline" = { # the top line ("tab"-line)
|
||||||
"fg" = accent.base;
|
"fg" = accent.base;
|
||||||
|
|||||||
@@ -2,78 +2,61 @@
|
|||||||
{
|
{
|
||||||
home = {
|
home = {
|
||||||
packages = with pkgs; [ hyprland-autoname-workspaces ];
|
packages = with pkgs; [ hyprland-autoname-workspaces ];
|
||||||
file.".config/hyprland-autoname-workspaces/config.toml".text = let
|
file.".config/hyprland-autoname-workspaces/config.toml".text = ''
|
||||||
icons = /* toml */ ''
|
version = "1.1.14"
|
||||||
DEFAULT = "{class}"
|
|
||||||
"Alacritty" = ""
|
|
||||||
"Bitwarden" = ""
|
|
||||||
"blueman-manager" = ""
|
|
||||||
"chatterino" = ""
|
|
||||||
"Chromium" = ""
|
|
||||||
"code" = ""
|
|
||||||
"code-oss" = ""
|
|
||||||
"codium" = ""
|
|
||||||
"codium-url-handler" = ""
|
|
||||||
"com.mitchellh.ghostty" = ""
|
|
||||||
"com.obsproject.Studio" = ""
|
|
||||||
"discord" = ""
|
|
||||||
"Element" = ""
|
|
||||||
"epicgameslauncher.exe" = ""
|
|
||||||
".*.exe" = ""
|
|
||||||
"firefox" = ""
|
|
||||||
"galaxyclient.exe" = ""
|
|
||||||
"Gimp-.*" = ""
|
|
||||||
"KiCad" = ""
|
|
||||||
"kitty" = ""
|
|
||||||
"libreoffice-calc" = ""
|
|
||||||
"libreoffice-writer" = ""
|
|
||||||
"lutris" = ""
|
|
||||||
"mpv" = ""
|
|
||||||
"obsidian" = ""
|
|
||||||
"org.inkscape.Inkscape" = ""
|
|
||||||
"org.remmina.Remmina" = ""
|
|
||||||
"pavucontrol" = ""
|
|
||||||
"pcbnew" = ""
|
|
||||||
"Signal" = ""
|
|
||||||
"spotify" = ""
|
|
||||||
"Spotify" = ""
|
|
||||||
"steam" = ""
|
|
||||||
"thunar" = ""
|
|
||||||
"thunderbird" = ""
|
|
||||||
"Tor Browser" = ""
|
|
||||||
"vesktop" = ""
|
|
||||||
"virt-manager" = ""
|
|
||||||
"VirtualBox" = ""
|
|
||||||
"VirtualBox Machine" = ""
|
|
||||||
"VirtualBox Manager" = ""
|
|
||||||
"VSCodium" = ""
|
|
||||||
"zathura" = ""
|
|
||||||
"zoom" = ""
|
|
||||||
'';
|
|
||||||
in /* toml */ ''
|
|
||||||
version = "1.1.15"
|
|
||||||
|
|
||||||
[format]
|
|
||||||
dedup = false
|
|
||||||
dedup_inactive_fullscreen = false
|
|
||||||
delim = " "
|
|
||||||
workspace = "{id}:{clients}"
|
|
||||||
workspace_empty = "{id}"
|
|
||||||
client = "{icon}"
|
|
||||||
client_fullscreen = "F{icon}"
|
|
||||||
client_active = "<u>{icon}</u>"
|
|
||||||
client_dup = "{icon}x{counter}"
|
|
||||||
client_dup_active = "<u>{icon}</u>{delim}{icon}x{counter_unfocused}"
|
|
||||||
client_dup_fullscreen = "F{icon}{delim}{icon}x{counter_unfocused}"
|
|
||||||
|
|
||||||
[exclude]
|
|
||||||
"steam" = "^(Friends List.*)?$"
|
|
||||||
"fcitx" = ".*"
|
|
||||||
|
|
||||||
[class]
|
[class]
|
||||||
${icons}
|
VirtualBox = ""
|
||||||
|
steam = ""
|
||||||
|
"VirtualBox Manager" = ""
|
||||||
|
"com.obsproject.Studio" = ""
|
||||||
|
"[Ff]irefox" = ""
|
||||||
|
"[Tt]hunderbird" = ""
|
||||||
|
pcbnew = ""
|
||||||
|
".*.exe" = ""
|
||||||
|
Element = ""
|
||||||
|
Signal = ""
|
||||||
|
Gimp = ""
|
||||||
|
VSCodium = ""
|
||||||
|
"[sS]potify" = ""
|
||||||
|
virt-manager = ""
|
||||||
|
lutris = ""
|
||||||
|
DEFAULT = "{class}"
|
||||||
|
"epicgameslauncher.exe" = ""
|
||||||
|
"[Cc]ode" = ""
|
||||||
|
"galaxyclient.exe" = ""
|
||||||
|
pavucontrol = ""
|
||||||
|
"Tor Browser" = ""
|
||||||
|
mpv = ""
|
||||||
|
chatterino = ""
|
||||||
|
libreoffice-writer = ""
|
||||||
|
kitty = ""
|
||||||
|
"com.michellh.ghostty" = ""
|
||||||
|
"cyberpunk2077.exe" = ""
|
||||||
|
KiCad = ""
|
||||||
|
"[tT]hunar" = ""
|
||||||
|
"riotclientux.exe" = ""
|
||||||
|
libreoffice-calc = ""
|
||||||
|
"org.remmina.Remmina" = ""
|
||||||
|
"org.inkscape.Inkscape" = ""
|
||||||
|
"VirtualBox Machine" = ""
|
||||||
|
Bitwarden = ""
|
||||||
|
"[gG]imp-.*" = ""
|
||||||
|
Chromium = ""
|
||||||
|
obsidian = ""
|
||||||
|
"leagueclientux.exe" = ""
|
||||||
|
zathura = ""
|
||||||
|
code-oss = ""
|
||||||
|
codium-url-handler = ""
|
||||||
|
discord = ""
|
||||||
|
vesktop = ""
|
||||||
|
blueman-manager = ""
|
||||||
|
Alacritty = ""
|
||||||
|
zoom = ""
|
||||||
|
spotify = ""
|
||||||
|
|
||||||
[class_active]
|
[class_active]
|
||||||
|
"(?i)ExampleOneTerm" = "icon"
|
||||||
|
|
||||||
[initial_class]
|
[initial_class]
|
||||||
|
|
||||||
@@ -91,11 +74,35 @@
|
|||||||
|
|
||||||
[initial_title_in_class]
|
[initial_title_in_class]
|
||||||
|
|
||||||
|
[initial_title]
|
||||||
|
"Spotify Premium" = ""
|
||||||
|
|
||||||
[initial_title_in_class_active]
|
[initial_title_in_class_active]
|
||||||
|
|
||||||
[initial_title_in_initial_class]
|
[initial_title_in_initial_class]
|
||||||
|
|
||||||
[initial_title_in_initial_class_active]
|
[initial_title_in_initial_class_active]
|
||||||
|
|
||||||
|
[exclude]
|
||||||
|
aProgram = "^$"
|
||||||
|
"" = "^$"
|
||||||
|
"(?i)fcitx" = ".*"
|
||||||
|
"[Ss]team" = "^(Friends List.*)?$"
|
||||||
|
"explorer.exe" = ".*"
|
||||||
|
"(?i)TestApp" = ""
|
||||||
|
|
||||||
|
[format]
|
||||||
|
dedup = false
|
||||||
|
dedup_inactive_fullscreen = false
|
||||||
|
delim = " "
|
||||||
|
workspace = "{id}:{clients}"
|
||||||
|
workspace_empty = "{id}"
|
||||||
|
client = "{icon}"
|
||||||
|
client_fullscreen = "{icon}"
|
||||||
|
client_active = "{icon}"
|
||||||
|
client_dup = "{icon}{counter_sup}"
|
||||||
|
client_dup_active = "*{icon}*{delim}{icon}{counter_unfocused_sup}"
|
||||||
|
client_dup_fullscreen = "[{icon}]{delim}{icon}{counter_unfocused_sup}"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -343,8 +343,8 @@ in {
|
|||||||
# "SUPER, F4,"
|
# "SUPER, F4,"
|
||||||
"SUPER, F5, exec, nx_gcal_event force-lookup"
|
"SUPER, F5, exec, nx_gcal_event force-lookup"
|
||||||
"SUPER SHIFT, F5, exec, nx_gcal_event reauthenticate"
|
"SUPER SHIFT, F5, exec, nx_gcal_event reauthenticate"
|
||||||
"SUPER, F6, exec, ${terminal-exec}'htop'"
|
"SUPER, F6, exec, ${terminal} -e 'htop'"
|
||||||
"SUPER, F7, exec, ${terminal-exec}'nmtui'"
|
"SUPER, F7, exec, ${terminal} -e 'nmtui'"
|
||||||
''SUPER, F8, exec, find ~/Pictures/wallpapers/* -type f -not -path "~/Pictures/wallpapers/.git/*" | sort -R | head -n 1 | xargs -d '\n' swww img --transition-type wipe --transition-angle 60 --transition-step 120 --transition-fps 120 --transition-duration 2''
|
''SUPER, F8, exec, find ~/Pictures/wallpapers/* -type f -not -path "~/Pictures/wallpapers/.git/*" | sort -R | head -n 1 | xargs -d '\n' swww img --transition-type wipe --transition-angle 60 --transition-step 120 --transition-fps 120 --transition-duration 2''
|
||||||
"SUPER, F9, execr, waybar_mode set ' '"
|
"SUPER, F9, execr, waybar_mode set ' '"
|
||||||
"SUPER, F9, submap, color"
|
"SUPER, F9, submap, color"
|
||||||
@@ -352,7 +352,7 @@ in {
|
|||||||
"SUPER, F11, exec, waybar"
|
"SUPER, F11, exec, waybar"
|
||||||
"SUPER SHIFT, F11, exec, pkill waybar "
|
"SUPER SHIFT, F11, exec, pkill waybar "
|
||||||
"SUPER, F12, exec, hyprland-autoname-workspaces"
|
"SUPER, F12, exec, hyprland-autoname-workspaces"
|
||||||
"SUPER SHIFT, F12, exec, pkill -9 hyprland-aut"
|
"SUPER SHIFT, F12, exec, pkill -9 hyprland-autoname-workspaces "
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
## ROW 1:
|
## ROW 1:
|
||||||
@@ -399,7 +399,7 @@ in {
|
|||||||
# "SUPER, T, exec, alacritty"
|
# "SUPER, T, exec, alacritty"
|
||||||
# "SUPER SHIFT, T, exec, alacritty -e sh -c "ssh nxace""
|
# "SUPER SHIFT, T, exec, alacritty -e sh -c "ssh nxace""
|
||||||
"SUPER, T, exec, SESSION_FROM_DE=TRUE ${terminal}"
|
"SUPER, T, exec, SESSION_FROM_DE=TRUE ${terminal}"
|
||||||
"SUPER SHIFT, T, exec, ${terminal-exec}'ssh nxace'"
|
"SUPER SHIFT, T, exec, ${terminal-exec} sh -c 'ssh nxace'"
|
||||||
"SUPER, Z, exec, waybar_mode set ' '"
|
"SUPER, Z, exec, waybar_mode set ' '"
|
||||||
"SUPER, Z, submap, tuda"
|
"SUPER, Z, submap, tuda"
|
||||||
"SUPER, U, exec, thunderbird "
|
"SUPER, U, exec, thunderbird "
|
||||||
|
|||||||
2
home.nix
2
home.nix
@@ -4,7 +4,6 @@
|
|||||||
./home-modules/auto-mount.nix
|
./home-modules/auto-mount.nix
|
||||||
./home-modules/bash.nix
|
./home-modules/bash.nix
|
||||||
./home-modules/bitwarden.nix
|
./home-modules/bitwarden.nix
|
||||||
./home-modules/calendar.nix
|
|
||||||
./home-modules/chatterino.nix
|
./home-modules/chatterino.nix
|
||||||
./home-modules/color-pallete.nix
|
./home-modules/color-pallete.nix
|
||||||
./home-modules/direnv.nix
|
./home-modules/direnv.nix
|
||||||
@@ -100,6 +99,7 @@
|
|||||||
ghostscript
|
ghostscript
|
||||||
|
|
||||||
inputs.zen-browser.packages."${system}".default
|
inputs.zen-browser.packages."${system}".default
|
||||||
|
gnome-calendar
|
||||||
|
|
||||||
] ++ (with pkgs-unstable; [
|
] ++ (with pkgs-unstable; [
|
||||||
obsidian
|
obsidian
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -118,6 +118,7 @@ in
|
|||||||
efiSupport = true;
|
efiSupport = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
kernelPackages = pkgs-unstable.linuxPackages_6_11;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
26
system-modules/nx2site/nextcloud.nix
Normal file
26
system-modules/nx2site/nextcloud.nix
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
{ config, domain, ... }:
|
||||||
|
{
|
||||||
|
sops.secrets = {
|
||||||
|
"nx2site/nextcloud/admin-pass" = { owner = "nextcloud"; };
|
||||||
|
"nx2site/nextcloud/db-pass" = { owner = "nextcloud"; };
|
||||||
|
# "nx2site/nextcloud/users-pass/nx2" = { owner = "nextcloud"; };
|
||||||
|
};
|
||||||
|
|
||||||
|
services = {
|
||||||
|
nextcloud = {
|
||||||
|
enable = true;
|
||||||
|
hostName = "nc.${domain}";
|
||||||
|
https = true;
|
||||||
|
configureRedis = true;
|
||||||
|
config = {
|
||||||
|
adminpassFile = config.sops.secrets."nx2site/nextcloud/admin-pass".path;
|
||||||
|
adminuser = "nx2";
|
||||||
|
|
||||||
|
dbtype = "pgsql";
|
||||||
|
# dbhost = config.services.postgresql.settings.port; # using usix socket
|
||||||
|
dbname = "nextcloud";
|
||||||
|
dbpassFile = config.sops.secrets."nx2site/nextcloud/db-pass".path;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -136,6 +136,13 @@
|
|||||||
listen = dl;
|
listen = dl;
|
||||||
locations = { "/" = { proxyPass = "http://127.0.0.1:8441"; }; };
|
locations = { "/" = { proxyPass = "http://127.0.0.1:8441"; }; };
|
||||||
};
|
};
|
||||||
|
"dav.${domain}" = lib.mkIf config.services.radicale.enable (vh // {
|
||||||
|
listen = dl;
|
||||||
|
locations = { "/" = { proxyPass = "http://127.0.0.1:5232"; }; };
|
||||||
|
});
|
||||||
|
"nc.${domain}" = vh // {
|
||||||
|
# directly to nc
|
||||||
|
};
|
||||||
"~^(.*).${domain}$" = {
|
"~^(.*).${domain}$" = {
|
||||||
listen = dl;
|
listen = dl;
|
||||||
root = "/var/nginx/webroot";
|
root = "/var/nginx/webroot";
|
||||||
|
|||||||
@@ -1,14 +1,23 @@
|
|||||||
{ config, domain, ... }:
|
{ config, domain, ... }:
|
||||||
{
|
{
|
||||||
sops.secrets = {
|
sops.secrets = {
|
||||||
"nx2site/radicale-htpasswd" = {};
|
"nx2site/radicale-htpasswd" = {
|
||||||
|
owner = "radicale";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
radicale = {
|
radicale = {
|
||||||
|
# is run by user radicale
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
server.hosts = let
|
server.hosts = let
|
||||||
port = builtins.toString 5232;
|
port = builtins.toString 5232;
|
||||||
in [ "192.168.178.32:${port}" ];
|
in [
|
||||||
|
"0.0.0.0:${port}"
|
||||||
|
"${domain}:${port}"
|
||||||
|
# "192.168.178.32:${port}"
|
||||||
|
];
|
||||||
auth = {
|
auth = {
|
||||||
type = "htpasswd";
|
type = "htpasswd";
|
||||||
htpasswd_filename = config.sops.secrets."nx2site/radicale-htpasswd".path;
|
htpasswd_filename = config.sops.secrets."nx2site/radicale-htpasswd".path;
|
||||||
@@ -16,4 +25,5 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
ensureDatabases = [
|
ensureDatabases = [
|
||||||
"gitea"
|
"gitea"
|
||||||
"vaultwarden"
|
"vaultwarden"
|
||||||
|
"nextcloud"
|
||||||
];
|
];
|
||||||
settings = {
|
settings = {
|
||||||
port = 5432; # default
|
port = 5432; # default
|
||||||
@@ -44,6 +45,10 @@
|
|||||||
name = "vaultwarden";
|
name = "vaultwarden";
|
||||||
ensureDBOwnership = true;
|
ensureDBOwnership = true;
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
name = "nextcloud";
|
||||||
|
ensureDBOwnership = true;
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
postgresqlBackup = {
|
postgresqlBackup = {
|
||||||
|
|||||||
@@ -20,6 +20,8 @@
|
|||||||
"nginx"
|
"nginx"
|
||||||
"adbusers"
|
"adbusers"
|
||||||
"postgres"
|
"postgres"
|
||||||
|
"radicale"
|
||||||
|
"nextcloud"
|
||||||
];
|
];
|
||||||
useDefaultShell = true;
|
useDefaultShell = true;
|
||||||
openssh.authorizedKeys.keys = [
|
openssh.authorizedKeys.keys = [
|
||||||
|
|||||||
Reference in New Issue
Block a user