commit message
This commit is contained in:
parent
270e1a0be4
commit
77afca4525
57 changed files with 971 additions and 423 deletions
|
|
@ -14,7 +14,6 @@
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
imports = [
|
imports = [
|
||||||
./modules
|
./modules
|
||||||
# ./options.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.pathsToLink = [
|
environment.pathsToLink = [
|
||||||
|
|
|
||||||
60
flake.lock
generated
60
flake.lock
generated
|
|
@ -216,11 +216,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1774738535,
|
"lastModified": 1775268934,
|
||||||
"narHash": "sha256-2jfBEZUC67IlnxO5KItFCAd7Oc+1TvyV/jQlR+2ykGQ=",
|
"narHash": "sha256-Sa5tW5kYPJornQEkFVD43F/0d4/WP+/GLTNktTFe2qU=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "769e07ef8f4cf7b1ec3b96ef015abec9bc6b1e2a",
|
"rev": "9dc93220c1c9a410ef6277d6dc55c571d9e592d0",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -304,11 +304,11 @@
|
||||||
"xdph": "xdph"
|
"xdph": "xdph"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1774734105,
|
"lastModified": 1775307976,
|
||||||
"narHash": "sha256-kO22x+rIp1SckR3Gi3+Nk0J9AP+kNcEgXikkE8bA04g=",
|
"narHash": "sha256-s7tT69WTAX8CdZg1Gr1L4n2W/IgyPCfFXJFllXS5A5g=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "Hyprland",
|
"repo": "Hyprland",
|
||||||
"rev": "38a7f03cf0e5ee116794a78581634ba3dab508fa",
|
"rev": "13fec3de9b40dbd075ce0ec5c88ef86117e25443",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -586,11 +586,11 @@
|
||||||
"optnix": "optnix"
|
"optnix": "optnix"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1774427328,
|
"lastModified": 1775272181,
|
||||||
"narHash": "sha256-KtGThScvwNbCm+6XwUKRfpTjJVKV9SHswm29px3m4pw=",
|
"narHash": "sha256-9Y3ASONdIdYtTbZCg7Nv+jntkXo9m1VMpxlMvvNhHWI=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixos-cli",
|
"repo": "nixos-cli",
|
||||||
"rev": "23e7540706eb5271f4ab37b9e52532637d57c63b",
|
"rev": "14dab96159beab052bf04be41c8e5cd486807042",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -664,11 +664,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_4": {
|
"nixpkgs_4": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1772956932,
|
"lastModified": 1774855581,
|
||||||
"narHash": "sha256-M0yS4AafhKxPPmOHGqIV0iKxgNO8bHDWdl1kOwGBwRY=",
|
"narHash": "sha256-YkreHeMgTCYvJ5fESV0YyqQK49bHGe2B51tH6claUh4=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "608d0cadfed240589a7eea422407a547ad626a14",
|
"rev": "15c6719d8c604779cf59e03c245ea61d3d7ab69b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -680,11 +680,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_5": {
|
"nixpkgs_5": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1774386573,
|
"lastModified": 1775036866,
|
||||||
"narHash": "sha256-4hAV26quOxdC6iyG7kYaZcM3VOskcPUrdCQd/nx8obc=",
|
"narHash": "sha256-ZojAnPuCdy657PbTq5V0Y+AHKhZAIwSIT2cb8UgAz/U=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "46db2e09e1d3f113a13c0d7b81e2f221c63b8ce9",
|
"rev": "6201e203d09599479a3b3450ed24fa81537ebc4e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -718,11 +718,11 @@
|
||||||
"noctalia-qs": "noctalia-qs"
|
"noctalia-qs": "noctalia-qs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1774747057,
|
"lastModified": 1775309721,
|
||||||
"narHash": "sha256-D/W/pgyH9+50fMbyh839j3NIOyf9X8VJCKrsMpRnqAI=",
|
"narHash": "sha256-yZIMJhv1Jg2I1bsag/chncl4nb/5pkrEKVwpkOqJqpI=",
|
||||||
"owner": "noctalia-dev",
|
"owner": "noctalia-dev",
|
||||||
"repo": "noctalia-shell",
|
"repo": "noctalia-shell",
|
||||||
"rev": "3b9e93a8b1e748df9329a97eb8d7ee58d02977da",
|
"rev": "819b2d33b04b2180b6ef19dab7f86af7d3603a52",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -741,11 +741,11 @@
|
||||||
"treefmt-nix": "treefmt-nix"
|
"treefmt-nix": "treefmt-nix"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1774734782,
|
"lastModified": 1775135550,
|
||||||
"narHash": "sha256-rq/8sJPI8wD4P3CXSyvW/dPuAa+qXGdqzAKM3eunZ+4=",
|
"narHash": "sha256-79JP2QTdvp1jg7HGxAW+xzhzhLnlKUi8yGXq9nDCeH0=",
|
||||||
"owner": "noctalia-dev",
|
"owner": "noctalia-dev",
|
||||||
"repo": "noctalia-qs",
|
"repo": "noctalia-qs",
|
||||||
"rev": "8e216ba101d761b8a71f359246941d50e22bad3f",
|
"rev": "e7224b756dcd10eec040df818a4c7a0fda5d6eff",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -766,11 +766,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1770000117,
|
"lastModified": 1774559664,
|
||||||
"narHash": "sha256-kZ1eLvCxfN+6RYQdcWUdIf+2WuiNiAfbJq+VetT+kos=",
|
"narHash": "sha256-a8FWQZgqaS7o484iH7dFK+F9t7oMahKbcH2piIwUwFc=",
|
||||||
"owner": "water-sucks",
|
"owner": "water-sucks",
|
||||||
"repo": "optnix",
|
"repo": "optnix",
|
||||||
"rev": "e3a8a63d8a9dcad01f499b2ece87db3545443f05",
|
"rev": "853323ece22fb1ffed19cea4ae22804032034a8e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -980,11 +980,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1772660329,
|
"lastModified": 1773297127,
|
||||||
"narHash": "sha256-IjU1FxYqm+VDe5qIOxoW+pISBlGvVApRjiw/Y/ttJzY=",
|
"narHash": "sha256-6E/yhXP7Oy/NbXtf1ktzmU8SdVqJQ09HC/48ebEGBpk=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "treefmt-nix",
|
"repo": "treefmt-nix",
|
||||||
"rev": "3710e0e1218041bbad640352a0440114b1e10428",
|
"rev": "71b125cd05fbfd78cab3e070b73544abe24c5016",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -1063,11 +1063,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1774759885,
|
"lastModified": 1775277437,
|
||||||
"narHash": "sha256-Y3D2GnZTO6BhGWeVcO6qUkiO5g0dDL2tmokLVWNC1WY=",
|
"narHash": "sha256-zCi04nIBNwTMt8n35w9cBgNUqnyhbjivsGlx6/Qhqug=",
|
||||||
"owner": "youwen5",
|
"owner": "youwen5",
|
||||||
"repo": "zen-browser-flake",
|
"repo": "zen-browser-flake",
|
||||||
"rev": "16e3f4cd221a030186a96015d82dcb3fb4afa4d6",
|
"rev": "de6d9094822a8f87fc380d1638f34d6cc6fa68ca",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,8 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
./internet
|
||||||
|
./sync
|
||||||
./terminal
|
./terminal
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,8 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./librewolf.nix
|
|
||||||
./zen-browser.nix
|
|
||||||
./tor.nix
|
|
||||||
./mail.nix
|
./mail.nix
|
||||||
./rss.nix
|
./messaging.nix
|
||||||
|
./zen-browser.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
35
home/apps/internet/mail.nix
Normal file
35
home/apps/internet/mail.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
osConfig,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs = {
|
||||||
|
thunderbird =
|
||||||
|
if osConfig.apps.internet.mail.enable then
|
||||||
|
{
|
||||||
|
enable = true;
|
||||||
|
profiles."default" = {
|
||||||
|
isDefault = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{ };
|
||||||
|
};
|
||||||
|
services = {
|
||||||
|
protonmail-bridge =
|
||||||
|
if osConfig.apps.internet.mail.providers.protonmail.enable then
|
||||||
|
{
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.protonmail-bridge;
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
gnome-keyring
|
||||||
|
];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{ };
|
||||||
|
};
|
||||||
|
}
|
||||||
47
home/apps/internet/messaging.nix
Normal file
47
home/apps/internet/messaging.nix
Normal file
|
|
@ -0,0 +1,47 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
osConfig,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs = {
|
||||||
|
element-desktop =
|
||||||
|
if osConfig.apps.messaging.element.enable then
|
||||||
|
{
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
default_server_config = {
|
||||||
|
"m.homeserver" = {
|
||||||
|
base_url =
|
||||||
|
if osConfig.apps.messaging.element.selfhosted then
|
||||||
|
"https://${osConfig.server.synapse.subdomain}.${osConfig.networking.domain}"
|
||||||
|
else
|
||||||
|
"https://matrix-client.matrix.org";
|
||||||
|
server_name =
|
||||||
|
if osConfig.apps.messaging.element.selfhosted then
|
||||||
|
"${osConfig.server.synapse.subdomain}.${osConfig.networking.domain}"
|
||||||
|
else
|
||||||
|
"matrix.org";
|
||||||
|
};
|
||||||
|
"m.identity_server" = {
|
||||||
|
base_url = "https://vector.im";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
default_theme = "dark";
|
||||||
|
disable_custom_urls = false;
|
||||||
|
disable_guests = false;
|
||||||
|
disable_login_language_selector = false;
|
||||||
|
disable_3pid_login = false;
|
||||||
|
force_verification = false;
|
||||||
|
brand = "Element";
|
||||||
|
integrations_ui_url = "https://scalar.vector.im/";
|
||||||
|
integrations_rest_url = "https://scalar.vector.im/api";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{ };
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
inputs,
|
inputs,
|
||||||
|
osConfig,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
|
@ -58,21 +59,16 @@ let
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
options = {
|
config =
|
||||||
internet.browsers = {
|
if osConfig.apps.internet.browsers.zen-browser.enable then
|
||||||
zen-browser = {
|
{
|
||||||
enable = lib.mkEnableOption "enable zen-browser";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkIf config.internet.browsers.zen-browser.enable {
|
|
||||||
home.packages = [
|
home.packages = [
|
||||||
(pkgs.wrapFirefox
|
(pkgs.wrapFirefox
|
||||||
inputs.zen-browser.packages.${pkgs.stdenv.hostPlatform.system}.zen-browser-unwrapped
|
inputs.zen-browser.packages.${pkgs.stdenv.hostPlatform.system}.zen-browser-unwrapped
|
||||||
{
|
{
|
||||||
extraPrefs = lib.concatLines (
|
extraPrefs = lib.concatLines (
|
||||||
lib.mapAttrsToList (
|
lib.mapAttrsToList (
|
||||||
name: value: ''lockPref(${lib.strings.toJSON name}, ${lib.strings.toJSON value});''
|
name: value: "lockPref(${lib.strings.toJSON name}, ${lib.strings.toJSON value});"
|
||||||
) prefs
|
) prefs
|
||||||
);
|
);
|
||||||
extraPolicies = {
|
extraPolicies = {
|
||||||
|
|
@ -94,5 +90,7 @@ in
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
];
|
];
|
||||||
};
|
}
|
||||||
|
else
|
||||||
|
{ };
|
||||||
}
|
}
|
||||||
20
home/apps/sync/default.nix
Normal file
20
home/apps/sync/default.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
osConfig,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
services = {
|
||||||
|
kdeconnect = {
|
||||||
|
enable = osConfig.apps.sync.kde-connect.enable;
|
||||||
|
indicator = osConfig.apps.sync.kde-connect.enable;
|
||||||
|
};
|
||||||
|
nextcloud-client = {
|
||||||
|
enable = osConfig.apps.sync.nextcloud.enable;
|
||||||
|
startInBackground = osConfig.apps.sync.nextcloud.enable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -13,9 +13,9 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
enableGitIntegration = true;
|
enableGitIntegration = true;
|
||||||
shellIntegration = {
|
shellIntegration = {
|
||||||
enableFishIntegration = true;
|
enableFishIntegration = osConfig.programs.fish.enable;
|
||||||
enableBashIntegration = true;
|
enableBashIntegration = osConfig.programs.bash.enable;
|
||||||
enableZshIntegration = true;
|
enableZshIntegration = osConfig.programs.zsh.enable;
|
||||||
};
|
};
|
||||||
font = {
|
font = {
|
||||||
name = "FiraCode Nerd Font";
|
name = "FiraCode Nerd Font";
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
vcs_backend_git = "enabled";
|
vcs_backend_git = "enabled";
|
||||||
vcs_msg_length = 50;
|
vcs_msg_length = 50;
|
||||||
preview_images = true;
|
preview_images = true;
|
||||||
preview_images_method = lib.mkIf config.terminal.kitty.enable "kitty";
|
preview_images_method = lib.mkIf osConfig.apps.terminal.kitty.enable "kitty";
|
||||||
preview_files = true;
|
preview_files = true;
|
||||||
preview_directories = true;
|
preview_directories = true;
|
||||||
collapse_preview = false;
|
collapse_preview = false;
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,16 @@
|
||||||
}:
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
options = {
|
||||||
|
desktop.window-managers = {
|
||||||
|
monitors = {
|
||||||
|
name = lib.mkOption {
|
||||||
|
default = "";
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
imports = [
|
imports = [
|
||||||
./hyprland.nix
|
./hyprland.nix
|
||||||
./niri.nix
|
./niri.nix
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@
|
||||||
options = {
|
options = {
|
||||||
desktop = {
|
desktop = {
|
||||||
hyprland = {
|
hyprland = {
|
||||||
enable = lib.mkEnableOption "enable hyprland";
|
|
||||||
monitors = lib.mkOption {
|
monitors = lib.mkOption {
|
||||||
default = [
|
default = [
|
||||||
",preferred,auto,1"
|
",preferred,auto,1"
|
||||||
|
|
@ -85,8 +84,8 @@
|
||||||
(lib.mkIf (osConfig.desktop.shell.noctalia.enable) "noctalia-shell")
|
(lib.mkIf (osConfig.desktop.shell.noctalia.enable) "noctalia-shell")
|
||||||
(lib.mkIf (osConfig.desktop.shell.noctalia.enable) "noctalia-shell ipc call wallpaper random")
|
(lib.mkIf (osConfig.desktop.shell.noctalia.enable) "noctalia-shell ipc call wallpaper random")
|
||||||
(lib.mkIf (osConfig.desktop.shell.swww.enable) "waypaper --restore --random")
|
(lib.mkIf (osConfig.desktop.shell.swww.enable) "waypaper --restore --random")
|
||||||
(lib.mkIf (osConfig.gaming.steam.enable) "adwaita-steam-gtk -u; steam -silent")
|
(lib.mkIf (osConfig.apps.gaming.steam.enable) "adwaita-steam-gtk -u; steam -silent")
|
||||||
(lib.mkIf (osConfig.internet.mail.providers.protonmail.enable) "protonmail-bridge -n")
|
(lib.mkIf (osConfig.apps.internet.mail.providers.protonmail.enable) "protonmail-bridge -n")
|
||||||
"echo $HYPRLAND_INSTANCE_SIGNATURE > ~/.config/hypr/instance_signature"
|
"echo $HYPRLAND_INSTANCE_SIGNATURE > ~/.config/hypr/instance_signature"
|
||||||
];
|
];
|
||||||
"$mod" = "SUPER";
|
"$mod" = "SUPER";
|
||||||
|
|
@ -98,7 +97,7 @@
|
||||||
(lib.mkIf (osConfig.desktop.shell.rofi.enable) "$mod, D, exec, rofi -show drun")
|
(lib.mkIf (osConfig.desktop.shell.rofi.enable) "$mod, D, exec, rofi -show drun")
|
||||||
"$mod, return, exec, ${osConfig.apps.terminal.binary}"
|
"$mod, return, exec, ${osConfig.apps.terminal.binary}"
|
||||||
(lib.mkIf (osConfig.desktop.utilities.grimblast.enable) ", print, exec, GRIMBLAST_EDITOR=gradia grimblast edit area")
|
(lib.mkIf (osConfig.desktop.utilities.grimblast.enable) ", print, exec, GRIMBLAST_EDITOR=gradia grimblast edit area")
|
||||||
(lib.mkIf (osConfig.desktop.shell.walker.enable && osConfig.misc.bitwarden.enable)
|
(lib.mkIf (osConfig.desktop.shell.walker.enable && osConfig.apps.misc.bitwarden.enable)
|
||||||
"$mod, B, exec, rbw unlocked || kitty --class kitty-floating -e rbw unlock; selected=$(rbw list | walker -d); wl-copy $(rbw get \"$selected\"); sleep 30; rbw lock"
|
"$mod, B, exec, rbw unlocked || kitty --class kitty-floating -e rbw unlock; selected=$(rbw list | walker -d); wl-copy $(rbw get \"$selected\"); sleep 30; rbw lock"
|
||||||
)
|
)
|
||||||
"$mod, F, fullscreen, 1"
|
"$mod, F, fullscreen, 1"
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,9 @@ in
|
||||||
if osConfig.desktop.window-managers.niri.enable then
|
if osConfig.desktop.window-managers.niri.enable then
|
||||||
{
|
{
|
||||||
home.file = {
|
home.file = {
|
||||||
"~/.config/niri/config.kdl" = ''
|
"~/.config/niri/config.kdl" = {
|
||||||
|
target = ".config/niri/config.kdl";
|
||||||
|
text = ''
|
||||||
input {
|
input {
|
||||||
|
|
||||||
keyboard {
|
keyboard {
|
||||||
|
|
@ -67,11 +69,11 @@ in
|
||||||
binds {
|
binds {
|
||||||
${modifier}+Down cooldown-ms=150 { focus-workspace-down; }
|
${modifier}+Down cooldown-ms=150 { focus-workspace-down; }
|
||||||
${modifier}+Up cooldown-ms=150 { focus-workspace-up; }
|
${modifier}+Up cooldown-ms=150 { focus-workspace-up; }
|
||||||
${modifier}+${osConfig.keybinds.hotkeys.terminal} { spawn "${osConfig.terminal.binary}";}
|
${modifier}+${osConfig.keybinds.hotkeys.terminal} { spawn "${osConfig.apps.terminal.binary}";}
|
||||||
${modifier}+Left {focus-column-left; }
|
${modifier}+Left {focus-column-left; }
|
||||||
${modifier}+Right {focus-column-right; }
|
${modifier}+Right {focus-column-right; }
|
||||||
${modifier}+${osConfig.keybinds.hotkeys.browser} { spawn "${osConfig.apps.browser.default}";}
|
${modifier}+${osConfig.keybinds.hotkeys.browser} { spawn "${osConfig.apps.internet.browsers.default}";}
|
||||||
${modifier}+${osConfig.keybinds.hotkeys.launcher} { spawn "${osConfig.desktop.window-managers.shell.launcher.default}";}
|
${modifier}+${osConfig.keybinds.hotkeys.launcher} { spawn "${osConfig.desktop.shell.launcher}";}
|
||||||
Print { screenshot;}
|
Print { screenshot;}
|
||||||
${modifier}+Shift+${osConfig.keybinds.hotkeys.close-window} { close-window; }
|
${modifier}+Shift+${osConfig.keybinds.hotkeys.close-window} { close-window; }
|
||||||
${modifier}+Shift+${osConfig.keybinds.hotkeys.editor} { spawn "${osConfig.apps.development.editor.default}";}
|
${modifier}+Shift+${osConfig.keybinds.hotkeys.editor} { spawn "${osConfig.apps.development.editor.default}";}
|
||||||
|
|
@ -103,6 +105,7 @@ in
|
||||||
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ };
|
{ };
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
defaultWorkspace = "workspace number 1";
|
defaultWorkspace = "workspace number 1";
|
||||||
terminal = osConfig.desktop.defaults.terminal.binary;
|
terminal = osConfig.apps.terminal.binary;
|
||||||
};
|
};
|
||||||
checkConfig = false;
|
checkConfig = false;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,20 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
|
||||||
options = {
|
|
||||||
bluetooth = {
|
|
||||||
enable = lib.mkEnableOption "enable bluetooth";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkIf config.bluetooth.enable {
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
bluez
|
|
||||||
bluetuith
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
|
||||||
options = {
|
|
||||||
internet.browsers = {
|
|
||||||
librewolf = {
|
|
||||||
enable = lib.mkEnableOption "enable librewolf";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkIf config.internet.browsers.librewolf.enable {
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
librewolf
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
|
||||||
options = {
|
|
||||||
internet = {
|
|
||||||
mail.enable = lib.mkEnableOption "enable e-mail";
|
|
||||||
mail.providers.protonmail.enable = lib.mkEnableOption "enable protonmail";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = {
|
|
||||||
programs = {
|
|
||||||
thunderbird = lib.mkIf config.internet.mail.enable {
|
|
||||||
enable = true;
|
|
||||||
profiles."default" = {
|
|
||||||
isDefault = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
services = {
|
|
||||||
protonmail-bridge = lib.mkIf config.internet.mail.providers.protonmail.enable {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.protonmail-bridge;
|
|
||||||
extraPackages = with pkgs; [
|
|
||||||
gnome-keyring
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
|
||||||
options = {
|
|
||||||
internet = {
|
|
||||||
rss.enable = lib.mkEnableOption "enable rss";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = {
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
(lib.mkIf (config.internet.rss.enable) newsflash)
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
|
||||||
options = {
|
|
||||||
internet = {
|
|
||||||
tor.enable = lib.mkEnableOption "enable tor";
|
|
||||||
browsers.tor-browser.enable = lib.mkEnableOption "enable tor-browser";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = {
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
(lib.mkIf (config.internet.browsers.tor-browser.enable) tor-browser)
|
|
||||||
(lib.mkIf (config.internet.tor.enable) oniux)
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./messaging
|
|
||||||
];
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
fedistar
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
|
||||||
options = {
|
|
||||||
messaging = {
|
|
||||||
enable = lib.mkEnableOption "enable all messaging";
|
|
||||||
element.enable = lib.mkEnableOption "enable element";
|
|
||||||
signal.enable = lib.mkEnableOption "enable signal";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = {
|
|
||||||
messaging = lib.mkIf config.messaging.enable {
|
|
||||||
element.enable = lib.mkDefault true;
|
|
||||||
signal.enable = lib.mkDefault true;
|
|
||||||
};
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
(lib.mkIf (config.messaging.signal.enable) signal-desktop)
|
|
||||||
];
|
|
||||||
programs = {
|
|
||||||
element-desktop = lib.mkIf config.messaging.element.enable {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -35,6 +35,7 @@ in
|
||||||
imports = [
|
imports = [
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
./custom.nix
|
./custom.nix
|
||||||
|
./options.nix
|
||||||
];
|
];
|
||||||
system.stateVersion = "25.05"; # Did you read the comment?
|
system.stateVersion = "25.05"; # Did you read the comment?
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@
|
||||||
|
|
||||||
desktop = {
|
desktop = {
|
||||||
hyprland = {
|
hyprland = {
|
||||||
enable = true;
|
|
||||||
numlock = true;
|
numlock = true;
|
||||||
monitors = [
|
monitors = [
|
||||||
"desc:AOC Q27G2WG4 0x00005F45, 2560x1440@144, 3840x0, 1 # main monitor"
|
"desc:AOC Q27G2WG4 0x00005F45, 2560x1440@144, 3840x0, 1 # main monitor"
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,6 @@
|
||||||
}:
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
options = {
|
|
||||||
|
|
||||||
};
|
|
||||||
config = {
|
config = {
|
||||||
user = {
|
user = {
|
||||||
userName = "marty";
|
userName = "marty";
|
||||||
|
|
@ -25,26 +22,54 @@
|
||||||
media.enable = true;
|
media.enable = true;
|
||||||
editing.enable = true;
|
editing.enable = true;
|
||||||
};
|
};
|
||||||
video = {
|
development = {
|
||||||
base.enable = true;
|
editor = {
|
||||||
media.enable = true;
|
vscodium.enable = true;
|
||||||
editing.enable = true;
|
emacs.enable = true;
|
||||||
|
default = "vscodium";
|
||||||
|
};
|
||||||
|
languages = {
|
||||||
|
python.enable = true;
|
||||||
|
};
|
||||||
|
godot.enable = true;
|
||||||
|
};
|
||||||
|
gaming = {
|
||||||
|
enable = true;
|
||||||
|
steam.enable = true;
|
||||||
|
minecraft.enable = true;
|
||||||
};
|
};
|
||||||
image = {
|
image = {
|
||||||
base.enable = true;
|
base.enable = true;
|
||||||
editing.enable = true;
|
editing.enable = true;
|
||||||
};
|
};
|
||||||
gaming = {
|
internet = {
|
||||||
steam.enable = true;
|
browsers = {
|
||||||
|
zen-browser.enable = true;
|
||||||
|
tor-browser.enable = true;
|
||||||
|
default = "zen";
|
||||||
};
|
};
|
||||||
terminal = {
|
mail = {
|
||||||
kitty = {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
|
providers = {
|
||||||
|
protonmail.enable = true;
|
||||||
};
|
};
|
||||||
default = "kitty";
|
};
|
||||||
toys = true;
|
};
|
||||||
|
messaging = {
|
||||||
|
signal.enable = true;
|
||||||
|
element = {
|
||||||
|
enable = true;
|
||||||
|
selfhosted = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
misc = {
|
||||||
|
obsidian.enable = true;
|
||||||
|
bitwarden.enable = true;
|
||||||
|
blender.enable = true;
|
||||||
};
|
};
|
||||||
sync = {
|
sync = {
|
||||||
|
kde-connect.enable = true;
|
||||||
|
nextcloud.enable = true;
|
||||||
syncthing = {
|
syncthing = {
|
||||||
devices = {
|
devices = {
|
||||||
marty-pc = {
|
marty-pc = {
|
||||||
|
|
@ -74,6 +99,21 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
terminal = {
|
||||||
|
kitty = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
default = "kitty";
|
||||||
|
tui = {
|
||||||
|
ranger.enable = true;
|
||||||
|
};
|
||||||
|
toys = true;
|
||||||
|
};
|
||||||
|
video = {
|
||||||
|
base.enable = true;
|
||||||
|
media.enable = true;
|
||||||
|
editing.enable = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
desktop = {
|
desktop = {
|
||||||
window-managers = {
|
window-managers = {
|
||||||
|
|
@ -84,7 +124,7 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
sway = {
|
sway = {
|
||||||
enable = false;
|
enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
shell = {
|
shell = {
|
||||||
|
|
@ -107,5 +147,10 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
server = {
|
||||||
|
synapse = {
|
||||||
|
subdomain = "yap";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -24,6 +24,7 @@
|
||||||
[
|
[
|
||||||
pavucontrol
|
pavucontrol
|
||||||
playerctl
|
playerctl
|
||||||
|
streamrip
|
||||||
]
|
]
|
||||||
else
|
else
|
||||||
[ ]
|
[ ]
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,8 @@
|
||||||
./development
|
./development
|
||||||
./gaming
|
./gaming
|
||||||
./image
|
./image
|
||||||
|
./internet
|
||||||
|
./messaging
|
||||||
./misc
|
./misc
|
||||||
./peripherals
|
./peripherals
|
||||||
./video
|
./video
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
development = {
|
apps.development = {
|
||||||
editor = {
|
editor = {
|
||||||
vscodium.enable = lib.mkEnableOption "enable vscodium";
|
vscodium.enable = lib.mkEnableOption "enable vscodium";
|
||||||
emacs.enable = lib.mkEnableOption "enable emacs";
|
emacs.enable = lib.mkEnableOption "enable emacs";
|
||||||
|
|
@ -25,15 +25,15 @@
|
||||||
[
|
[
|
||||||
nixfmt
|
nixfmt
|
||||||
]
|
]
|
||||||
++ (if config.development.editor.vscodium.enable then [ vscodium ] else [ ]);
|
++ (if config.apps.development.editor.vscodium.enable then [ vscodium ] else [ ]);
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
vscode =
|
vscode =
|
||||||
if config.development.editor.vscodium.enable then
|
if config.apps.development.editor.vscodium.enable then
|
||||||
{
|
{
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.vscodium;
|
package = pkgs.vscodium;
|
||||||
defaultEditor = if (config.development.editor.default == "vscodium") then true else false;
|
defaultEditor = if (config.apps.development.editor.default == "vscodium") then true else false;
|
||||||
# profiles.default.extensions = with pkgs.vscode-extensions; [
|
# profiles.default.extensions = with pkgs.vscode-extensions; [
|
||||||
# catppuccin.catppuccin-vsc
|
# catppuccin.catppuccin-vsc
|
||||||
# catppuccin.catppuccin-vsc-icons
|
# catppuccin.catppuccin-vsc-icons
|
||||||
|
|
@ -51,11 +51,11 @@
|
||||||
};
|
};
|
||||||
services = {
|
services = {
|
||||||
emacs =
|
emacs =
|
||||||
if config.development.editor.emacs.enable then
|
if config.apps.development.editor.emacs.enable then
|
||||||
{
|
{
|
||||||
enable = true;
|
enable = true;
|
||||||
install = true;
|
install = true;
|
||||||
defaultEditor = if (config.development.editor.default == "emacs") then true else false;
|
defaultEditor = if (config.apps.development.editor.default == "emacs") then true else false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ };
|
{ };
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
inputs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
|
@ -10,13 +11,25 @@
|
||||||
apps.internet.browsers = {
|
apps.internet.browsers = {
|
||||||
zen-browser = {
|
zen-browser = {
|
||||||
enable = lib.mkEnableOption "enable zen browser";
|
enable = lib.mkEnableOption "enable zen browser";
|
||||||
package = inputs.zen-browser.packages.${pkgs.stdenv.hostPlatform.system}.default;
|
package = lib.mkOption {
|
||||||
binary = "${config.apps.internet.browsers.zen-browser.package}/bin/zen";
|
default = inputs.zen-browser.packages.${pkgs.stdenv.hostPlatform.system}.default;
|
||||||
|
description = "zen browser package";
|
||||||
|
};
|
||||||
|
binary = lib.mkOption {
|
||||||
|
default = "${config.apps.internet.browsers.zen-browser.package}/bin/zen";
|
||||||
|
description = "zen browser binary";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
tor-browser = {
|
tor-browser = {
|
||||||
enable = lib.mkEnableOption "enable tor browser";
|
enable = lib.mkEnableOption "enable tor browser";
|
||||||
package = pkgs.tor-browser;
|
package = lib.mkOption {
|
||||||
binary = "${config.apps.internet.browsers.tor-browser.package}/bin/tor-browser";
|
default = pkgs.tor-browser;
|
||||||
|
description = "zen browser package";
|
||||||
|
};
|
||||||
|
binary = lib.mkOption {
|
||||||
|
default = "${config.apps.internet.browsers.tor-browser.package}/bin/tor-browser";
|
||||||
|
description = "zen browser binary";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
default = lib.mkOption {
|
default = lib.mkOption {
|
||||||
default = "zen";
|
default = "zen";
|
||||||
|
|
|
||||||
35
modules/apps/internet/mail.nix
Normal file
35
modules/apps/internet/mail.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
apps.internet = {
|
||||||
|
mail.enable = lib.mkEnableOption "enable e-mail";
|
||||||
|
mail.providers.protonmail.enable = lib.mkEnableOption "enable protonmail";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = {
|
||||||
|
programs = {
|
||||||
|
thunderbird =
|
||||||
|
if config.apps.internet.mail.enable then
|
||||||
|
{
|
||||||
|
enable = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{ };
|
||||||
|
};
|
||||||
|
services = {
|
||||||
|
protonmail-bridge =
|
||||||
|
if config.apps.internet.mail.providers.protonmail.enable then
|
||||||
|
{
|
||||||
|
enable = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{ };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
26
modules/apps/messaging/default.nix
Normal file
26
modules/apps/messaging/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
apps.messaging = {
|
||||||
|
signal.enable = lib.mkEnableOption "enable signal";
|
||||||
|
element = {
|
||||||
|
enable = lib.mkEnableOption "enable element";
|
||||||
|
selfhosted = lib.mkEnableOption "selfhosted matrix server?";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = {
|
||||||
|
environment.systemPackages =
|
||||||
|
with pkgs;
|
||||||
|
[ ]
|
||||||
|
++ (if config.apps.messaging.element.enable then [ element-desktop ] else [ ])
|
||||||
|
++ (if config.apps.messaging.signal.enable then [ signal-desktop ] else [ ]);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -33,11 +33,13 @@
|
||||||
++ (
|
++ (
|
||||||
if (config.apps.misc.bitwarden.enable) then
|
if (config.apps.misc.bitwarden.enable) then
|
||||||
|
|
||||||
[ rbw ]
|
[
|
||||||
|
rbw
|
||||||
|
pinentry-curses
|
||||||
|
]
|
||||||
++ (
|
++ (
|
||||||
if (config.desktop.shell.rofi.enable) then
|
if (config.desktop.shell.rofi.enable) then
|
||||||
[
|
[
|
||||||
pinentry-curses
|
|
||||||
rofi-rbw
|
rofi-rbw
|
||||||
]
|
]
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,9 @@
|
||||||
kde-connect = {
|
kde-connect = {
|
||||||
enable = lib.mkEnableOption "enable kde-connect";
|
enable = lib.mkEnableOption "enable kde-connect";
|
||||||
};
|
};
|
||||||
|
nextcloud = {
|
||||||
|
enable = lib.mkEnableOption "enable nextcloud client";
|
||||||
|
};
|
||||||
syncthing = {
|
syncthing = {
|
||||||
enable = lib.mkEnableOption "enable syncthing";
|
enable = lib.mkEnableOption "enable syncthing";
|
||||||
devices = lib.mkOption {
|
devices = lib.mkOption {
|
||||||
|
|
@ -30,6 +33,17 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
config = {
|
config = {
|
||||||
|
environment.systemPackages =
|
||||||
|
with pkgs;
|
||||||
|
[ ]
|
||||||
|
++ (
|
||||||
|
if config.apps.sync.nextcloud.enable then
|
||||||
|
[
|
||||||
|
nextcloud-client
|
||||||
|
]
|
||||||
|
else
|
||||||
|
[ ]
|
||||||
|
);
|
||||||
programs = {
|
programs = {
|
||||||
kdeconnect =
|
kdeconnect =
|
||||||
if config.apps.sync.kde-connect.enable then
|
if config.apps.sync.kde-connect.enable then
|
||||||
|
|
|
||||||
|
|
@ -14,14 +14,10 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
# apps.terminal =
|
apps.terminal = {
|
||||||
# if (config.apps.terminal.default == "kitty") then
|
package = pkgs.kitty;
|
||||||
# {
|
binary = "${pkgs.kitty}/bin/kitty";
|
||||||
# package = pkgs.kitty;
|
};
|
||||||
# binary = "${pkgs.kitty}/bin/kitty";
|
|
||||||
# }
|
|
||||||
# else
|
|
||||||
# { };
|
|
||||||
environment.systemPackages =
|
environment.systemPackages =
|
||||||
with pkgs;
|
with pkgs;
|
||||||
[ ]
|
[ ]
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,10 @@
|
||||||
++ (
|
++ (
|
||||||
if config.apps.video.base.enable then
|
if config.apps.video.base.enable then
|
||||||
|
|
||||||
[ mpv ]
|
[
|
||||||
|
mpv
|
||||||
|
yt-dlp
|
||||||
|
]
|
||||||
else
|
else
|
||||||
[ ]
|
[ ]
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@
|
||||||
imports = [
|
imports = [
|
||||||
./apps
|
./apps
|
||||||
./desktop
|
./desktop
|
||||||
|
./server
|
||||||
./system
|
./system
|
||||||
./user
|
./user
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@
|
||||||
};
|
};
|
||||||
programs = {
|
programs = {
|
||||||
uwsm = {
|
uwsm = {
|
||||||
|
enable = true;
|
||||||
waylandCompositors = {
|
waylandCompositors = {
|
||||||
hyprland =
|
hyprland =
|
||||||
if config.desktop.window-managers.hyprland.enable then
|
if config.desktop.window-managers.hyprland.enable then
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,10 @@
|
||||||
default = "E";
|
default = "E";
|
||||||
description = "editor hotkey";
|
description = "editor hotkey";
|
||||||
};
|
};
|
||||||
|
close-window = lib.mkOption {
|
||||||
|
default = "Q";
|
||||||
|
description = "close window hotkey";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
{
|
{
|
||||||
enable = true;
|
enable = true;
|
||||||
wrapperFeatures.gtk = true;
|
wrapperFeatures.gtk = true;
|
||||||
package = null;
|
package = pkgs.swayfx;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ };
|
{ };
|
||||||
|
|
|
||||||
|
|
@ -42,13 +42,13 @@
|
||||||
default = 8088;
|
default = 8088;
|
||||||
};
|
};
|
||||||
password = lib.mkOption {
|
password = lib.mkOption {
|
||||||
default = "EO3HgIK+QJNQN53efrF6zQ==:Ju6k++dsM4pLLgYjP9sLbUWOiNuQMrUH/g6QArdtKXzYisuzaR+XeJL4hEC9Zo3ekVa8EVnPnQu/mJoHxxkLOA==";
|
default = "";
|
||||||
}
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
config = {
|
config = {
|
||||||
config.server.arr = lib.mkIf config.server.arr.enable {
|
server.arr = lib.mkIf config.server.arr.enable {
|
||||||
prowlarr.enable = lib.mkDefault true;
|
prowlarr.enable = lib.mkDefault true;
|
||||||
radarr.enable = lib.mkDefault true;
|
radarr.enable = lib.mkDefault true;
|
||||||
sonarr.enable = lib.mkDefault true;
|
sonarr.enable = lib.mkDefault true;
|
||||||
|
|
@ -58,28 +58,28 @@
|
||||||
services = {
|
services = {
|
||||||
prowlarr = lib.mkIf config.server.arr.prowlarr.enable {
|
prowlarr = lib.mkIf config.server.arr.prowlarr.enable {
|
||||||
enable = true;
|
enable = true;
|
||||||
server = {
|
settings.server = {
|
||||||
bindaddress = "0.0.0.0";
|
bindaddress = "0.0.0.0";
|
||||||
port = config.server.arr.prowlarr.port;
|
port = config.server.arr.prowlarr.port;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
radarr = lib.mkIf config.server.arr.radarr.enable {
|
radarr = lib.mkIf config.server.arr.radarr.enable {
|
||||||
enable = true;
|
enable = true;
|
||||||
server = {
|
settings.server = {
|
||||||
bindaddress = "0.0.0.0";
|
bindaddress = "0.0.0.0";
|
||||||
port = config.server.arr.radarr.port;
|
port = config.server.arr.radarr.port;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
sonarr = lib.mkIf config.server.arr.sonarr.enable {
|
sonarr = lib.mkIf config.server.arr.sonarr.enable {
|
||||||
enable = true;
|
enable = true;
|
||||||
server = {
|
settings.server = {
|
||||||
bindaddress = "0.0.0.0";
|
bindaddress = "0.0.0.0";
|
||||||
port = config.server.arr.sonarr.port;
|
port = config.server.arr.sonarr.port;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
lidarr = lib.mkIf config.server.arr.lidarr.enable {
|
lidarr = lib.mkIf config.server.arr.lidarr.enable {
|
||||||
enable = true;
|
enable = true;
|
||||||
server = {
|
settings.server = {
|
||||||
bindaddress = "0.0.0.0";
|
bindaddress = "0.0.0.0";
|
||||||
port = config.server.arr.lidarr.port;
|
port = config.server.arr.lidarr.port;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
12
modules/server/cloud/default.nix
Normal file
12
modules/server/cloud/default.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./immich.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
70
modules/server/cloud/immich.nix
Normal file
70
modules/server/cloud/immich.nix
Normal file
|
|
@ -0,0 +1,70 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
server.cloud.immich = {
|
||||||
|
enable = lib.mkEnableOption "enable immich";
|
||||||
|
port = lib.mkOption {
|
||||||
|
default = 2283;
|
||||||
|
description = "immich port";
|
||||||
|
};
|
||||||
|
public = lib.mkEnableOption "public immich";
|
||||||
|
subdomain = lib.mkOption {
|
||||||
|
default = "photos";
|
||||||
|
description = "immich subdomain";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = {
|
||||||
|
users =
|
||||||
|
if config.server.cloud.immich.enable then
|
||||||
|
{
|
||||||
|
users.immich = {
|
||||||
|
isSystemUser = true;
|
||||||
|
createHome = true;
|
||||||
|
home = "/var/lib/immich";
|
||||||
|
group = "immich";
|
||||||
|
extraGroups = [
|
||||||
|
"video"
|
||||||
|
"render"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
groups.immich = { };
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{ };
|
||||||
|
services = {
|
||||||
|
immich = {
|
||||||
|
enable = config.server.cloud.immich.enable;
|
||||||
|
port = config.server.cloud.immich.port;
|
||||||
|
host = "127.0.0.1";
|
||||||
|
machine-learning = {
|
||||||
|
enable = true;
|
||||||
|
environment = {
|
||||||
|
MACHINE_LEARNING_MODEL_TTL = "600";
|
||||||
|
MACHINE_LEARNING_REQUEST_THREADS = "4";
|
||||||
|
MACHINE_LEARNING_MODEL_INTER_OP_THREADS = "2";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
nginx =
|
||||||
|
if config.server.cloud.immich.enable && config.server.cloud.immich.public then
|
||||||
|
{
|
||||||
|
virtualHosts."${config.server.cloud.immich.subdomain}.${config.networking.domain}" = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://127.0.0.1:${toString config.server.cloud.immich.port}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{ };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -7,6 +7,11 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./docker
|
./arr
|
||||||
|
./cloud
|
||||||
|
./media
|
||||||
|
./misc
|
||||||
|
./social
|
||||||
|
./nginx.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
|
||||||
programs = {
|
|
||||||
lazydocker = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
12
modules/server/media/default.nix
Normal file
12
modules/server/media/default.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./jellyfin.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -11,48 +11,51 @@
|
||||||
enable = lib.mkEnableOption "enable jelyfin";
|
enable = lib.mkEnableOption "enable jelyfin";
|
||||||
port = lib.mkOption {
|
port = lib.mkOption {
|
||||||
default = 8096;
|
default = 8096;
|
||||||
description = "set jellyfin port"
|
description = "set jellyfin port";
|
||||||
};
|
};
|
||||||
public = {
|
public = lib.mkEnableOption "make jellyfin public";
|
||||||
enable = lib.mkEnableOption "make jellyfin public";
|
|
||||||
subdomain = lib.mkOption {
|
subdomain = lib.mkOption {
|
||||||
default = "watch";
|
default = "watch";
|
||||||
description = "set jellyfin subdomain";
|
description = "set jellyfin subdomain";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
jellyseer = {
|
jellyseer = {
|
||||||
enable = lib.mkEnableOption "enable jellyseer";
|
enable = lib.mkEnableOption "enable jellyseer";
|
||||||
port = lib.mkOption {
|
port = lib.mkOption {
|
||||||
default = 8097;
|
default = 8097;
|
||||||
description = "set jellyseer port"
|
description = "set jellyseer port";
|
||||||
};
|
};
|
||||||
public = {
|
public = lib.mkEnableOption "make jellyseer public";
|
||||||
enable = lib.mkEnableOption "make jellyseer public";
|
|
||||||
subdomain = lib.mkOption {
|
subdomain = lib.mkOption {
|
||||||
default = "jellyseer";
|
default = "jellyseer";
|
||||||
description = "set jellyseer subdomain";
|
description = "set jellyseer subdomain";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
config = {
|
config = {
|
||||||
environment.systemPackages = config.server.jellyfin.enable [
|
environment.systemPackages =
|
||||||
|
[ ]
|
||||||
|
++ (
|
||||||
|
if config.server.jellyfin.enable then
|
||||||
|
[
|
||||||
pkgs.jellyfin
|
pkgs.jellyfin
|
||||||
pkgs.jellyfin-web
|
pkgs.jellyfin-web
|
||||||
pkgs.jellyfin-ffmpeg
|
pkgs.jellyfin-ffmpeg
|
||||||
];
|
]
|
||||||
|
else
|
||||||
|
[ ]
|
||||||
|
);
|
||||||
services = {
|
services = {
|
||||||
jellyfin = lib.mkIf config.server.jellyfin.enable {
|
jellyfin = lib.mkIf config.server.jellyfin.enable {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
};
|
};
|
||||||
jellyseer = lib.mkIf config.server-jellyseer.enable {
|
seerr = lib.mkIf config.server.jellyseer.enable {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
nginx.virtualHosts = {
|
nginx.virtualHosts = {
|
||||||
"${config.server.jellyfin.public.subdomain}.${config.domain}" =
|
"${config.server.jellyfin.subdomain}.${config.networking.domain}" =
|
||||||
lib.mkIf config.server.jellyfin.public.enable
|
lib.mkIf config.server.jellyfin.public
|
||||||
{
|
{
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
|
|
@ -60,7 +63,9 @@
|
||||||
proxyPass = "http://127.0.0.1:${config.server.jellyfin.port}";
|
proxyPass = "http://127.0.0.1:${config.server.jellyfin.port}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"${config.server.jellyseer.public.subdomain}.${config.domain}" = lib.mkIf config.server.jellyfin.public.enable {
|
"${config.server.jellyseer.subdomain}.${config.networking.domain}" =
|
||||||
|
lib.mkIf config.server.jellyfin.public
|
||||||
|
{
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
|
|
@ -70,6 +75,4 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
34
modules/server/misc/dawarich.nix
Normal file
34
modules/server/misc/dawarich.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
server.misc.dawarich = {
|
||||||
|
enable = lib.mkEnableOption "enable dawarich";
|
||||||
|
port = lib.mkOption {
|
||||||
|
default = 2975;
|
||||||
|
description = "dawarich port";
|
||||||
|
};
|
||||||
|
public = lib.mkEnableOption "make dawarich public";
|
||||||
|
subdomain = lib.mkOption {
|
||||||
|
default = "dawarich";
|
||||||
|
description = "dawarich subdomain";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = {
|
||||||
|
services.dawarich = {
|
||||||
|
enable = config.server.misc.dawarich.enable;
|
||||||
|
webPort = config.server.misc.dawarich.port;
|
||||||
|
localDomain =
|
||||||
|
if config.server.misc.dawarich.public then
|
||||||
|
"${config.server.misc.dawarich.subdomain}.${config.networking.domain}"
|
||||||
|
else
|
||||||
|
config.networking.hostName;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
14
modules/server/misc/default.nix
Normal file
14
modules/server/misc/default.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./dawarich.nix
|
||||||
|
./forgejo.nix
|
||||||
|
./lauti.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
72
modules/server/misc/forgejo.nix
Normal file
72
modules/server/misc/forgejo.nix
Normal file
|
|
@ -0,0 +1,72 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
server.misc.forgejo = {
|
||||||
|
enable = lib.mkEnableOption "enable forgejo";
|
||||||
|
port = lib.mkOption {
|
||||||
|
default = 2934;
|
||||||
|
description = "forgejo port";
|
||||||
|
};
|
||||||
|
public = lib.mkEnableOption "public forgejo";
|
||||||
|
subdomain = lib.mkOption {
|
||||||
|
default = "git";
|
||||||
|
description = "forgejo subdomain";
|
||||||
|
};
|
||||||
|
settings = {
|
||||||
|
app_name = lib.mkOption {
|
||||||
|
default = "${config.user.userName}'s code dump";
|
||||||
|
description = "forgejo app name";
|
||||||
|
};
|
||||||
|
app_slogan = lib.mkOption {
|
||||||
|
default = "if code could talk, mine would cry";
|
||||||
|
description = "forgejo app slogan";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = {
|
||||||
|
services = {
|
||||||
|
forgejo = {
|
||||||
|
enable = config.server.misc.forgejo.enable;
|
||||||
|
database.type = "postgres";
|
||||||
|
settings = {
|
||||||
|
server = {
|
||||||
|
DOMAIN = "${config.server.misc.forgejo.subdomain}.${config.networking.domain}";
|
||||||
|
ROOT_URL = "https://${config.server.misc.forgejo.subdomain}.${config.networking.domain}";
|
||||||
|
HTTP_PORT = config.server.misc.forgejo.port;
|
||||||
|
};
|
||||||
|
DEFAULT = {
|
||||||
|
APP_NAME = config.server.misc.forgejo.settings.app_name;
|
||||||
|
APP_SLOGAN = config.server.misc.forgejo.settings.app_slogan;
|
||||||
|
};
|
||||||
|
REPOSITORY = {
|
||||||
|
ENABLE_PUSH_CREATE_USER = true;
|
||||||
|
ENABLE_PUSH_CREATE_ORG = true;
|
||||||
|
|
||||||
|
};
|
||||||
|
service.DISABLE_REGISTRATION = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
nginx = {
|
||||||
|
virtualHosts = {
|
||||||
|
"${config.server.misc.forgejo.subdomain}.${config.networking.domain}" =
|
||||||
|
if config.server.misc.forgejo.public then
|
||||||
|
{
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://127.0.0.1:${toString config.server.misc.forgejo.port}";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{ };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
51
modules/server/misc/lauti.nix
Normal file
51
modules/server/misc/lauti.nix
Normal file
|
|
@ -0,0 +1,51 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
server.misc.lauti = {
|
||||||
|
enable = lib.mkEnableOption "enable lauti";
|
||||||
|
port = lib.mkOption {
|
||||||
|
default = 3333;
|
||||||
|
description = "lauti port";
|
||||||
|
};
|
||||||
|
public = lib.mkEnableOption "make lauti public";
|
||||||
|
subdomain = lib.mkOption {
|
||||||
|
default = "lauti";
|
||||||
|
description = "lauti subdomain";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = {
|
||||||
|
|
||||||
|
services = {
|
||||||
|
eintopf = {
|
||||||
|
enable = config.server.misc.lauti.enable;
|
||||||
|
settings = {
|
||||||
|
LAUTI_ADMIN_EMAIL = "test@example.org";
|
||||||
|
LAUTI_BASE_URL = "https://freising.space";
|
||||||
|
LAUTI_OSM_TILE_CACHE_DIR = "/var/lib/eintopf/osm";
|
||||||
|
LAUTI_OSM_TILE_SERVER = "https://tile.openstreetmap.org/{z}/{x}/{y}.png";
|
||||||
|
LAUTI_TIMEZONE = "Europe/Berlin";
|
||||||
|
LAUTI_LANGUAGE = "en";
|
||||||
|
};
|
||||||
|
secrets = [ /etc/lauti-secrets ];
|
||||||
|
};
|
||||||
|
nginx = {
|
||||||
|
virtualHosts = {
|
||||||
|
${"freising.space"} = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://127.0.0.1:3333";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -6,20 +6,6 @@
|
||||||
}:
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
options = {
|
|
||||||
domain = lib.mkOption {
|
|
||||||
default = "marty.tf";
|
|
||||||
description = "set domain name";
|
|
||||||
};
|
|
||||||
email = lib.mkOption {
|
|
||||||
default = "${config.user.userName}@${config.domain}";
|
|
||||||
description = "set email";
|
|
||||||
};
|
|
||||||
nginx = {
|
|
||||||
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
users = {
|
users = {
|
||||||
users = {
|
users = {
|
||||||
|
|
@ -50,7 +36,7 @@
|
||||||
security = {
|
security = {
|
||||||
acme = {
|
acme = {
|
||||||
acceptTerms = true;
|
acceptTerms = true;
|
||||||
defaults.email = config.email;
|
defaults.email = config.user.email;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
13
modules/server/social/default.nix
Normal file
13
modules/server/social/default.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./gotosocial.nix
|
||||||
|
./synapse.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
64
modules/server/social/gotosocial.nix
Normal file
64
modules/server/social/gotosocial.nix
Normal file
|
|
@ -0,0 +1,64 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
server.social.gotosocial = {
|
||||||
|
enable = lib.mkEnableOption "enable gotosocial";
|
||||||
|
port = lib.mkOption {
|
||||||
|
default = 8008;
|
||||||
|
description = "gotosocial port";
|
||||||
|
};
|
||||||
|
public = lib.mkOption {
|
||||||
|
default = true;
|
||||||
|
description = "public gotosocial";
|
||||||
|
};
|
||||||
|
subdomain = lib.mkOption {
|
||||||
|
default = "fedi";
|
||||||
|
description = "gotosocial subdomain";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = {
|
||||||
|
services = {
|
||||||
|
gotosocial = {
|
||||||
|
enable = config.server.social.gotosocial.enable;
|
||||||
|
settings = {
|
||||||
|
application_name = "The Martyverse";
|
||||||
|
host = "${config.server.social.gotosocial.subdomain}.${config.networking.domain}";
|
||||||
|
bind-address = "127.0.0.1";
|
||||||
|
port = config.server.social.gotosocial.port;
|
||||||
|
protocol = "https";
|
||||||
|
landing-page-user = "${config.user.userName}";
|
||||||
|
db-address = "/home/${config.user.userName}/gotosocial/storage/sqlite.db";
|
||||||
|
storage-local-base-path = "/home/${config.user.userName}/gotosocial/storage";
|
||||||
|
db-type = "sqlite";
|
||||||
|
accounts-allow-custom-css = true;
|
||||||
|
accounts-registration-open = true;
|
||||||
|
accounts-reason-required = true;
|
||||||
|
accounts-registration-backlog-limit = 20;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
nginx = {
|
||||||
|
virtualHosts = {
|
||||||
|
"${config.server.social.gotosocial.subdomain}.${config.networking.domain}" =
|
||||||
|
if config.server.social.gotosocial.public && config.server.social.gotosocial.enable then
|
||||||
|
{
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://127.0.0.1:${toString config.server.social.gotosocial.port}";
|
||||||
|
proxyWebsockets = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{ };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
116
modules/server/social/synapse.nix
Normal file
116
modules/server/social/synapse.nix
Normal file
|
|
@ -0,0 +1,116 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
fqdn = "${config.server.synapse.subdomain}.${config.networking.domain}";
|
||||||
|
baseUrl = "https://${fqdn}";
|
||||||
|
clientConfig."m.homeserver".base_url = baseUrl;
|
||||||
|
serverConfig."m.server" = "${fqdn}:443";
|
||||||
|
mkWellKnown = data: ''
|
||||||
|
default_type application/json;
|
||||||
|
add_header Access-Control-Allow-Origin *;
|
||||||
|
return 200 '${builtins.toJSON data}';
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
server.synapse = {
|
||||||
|
enable = lib.mkEnableOption "enable synapse";
|
||||||
|
subdomain = lib.mkOption {
|
||||||
|
default = "yap";
|
||||||
|
description = "synapse subdomain";
|
||||||
|
};
|
||||||
|
port = lib.mkOption {
|
||||||
|
default = 8008;
|
||||||
|
description = "synapse port";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = {
|
||||||
|
services =
|
||||||
|
if config.server.synapse.enable then
|
||||||
|
{
|
||||||
|
postgresql.enable = true;
|
||||||
|
matrix-synapse = {
|
||||||
|
enable = true;
|
||||||
|
configureRedisLocally = true;
|
||||||
|
extras = [
|
||||||
|
"cache-memory" # Provide statistics about caching memory consumption
|
||||||
|
"jwt" # JSON Web Token authentication
|
||||||
|
"oidc" # OpenID Connect authentication
|
||||||
|
"postgres" # PostgreSQL database backend
|
||||||
|
"redis" # Redis support for the replication stream between worker processes
|
||||||
|
#"saml2" # SAML2 authentication
|
||||||
|
"sentry" # Error tracking and performance metrics
|
||||||
|
"systemd" # Provide the JournalHandler used in the default log_config
|
||||||
|
"url-preview" # Support for oEmbed URL previews
|
||||||
|
];
|
||||||
|
settings = {
|
||||||
|
url_preview_enabled = true;
|
||||||
|
server_name = "${config.networking.domain}";
|
||||||
|
public_baseurl = baseUrl;
|
||||||
|
media_store_path = "/mnt/Data/Matrix/Media";
|
||||||
|
max_upload_size = "10G";
|
||||||
|
enable_registration = false;
|
||||||
|
generic = {
|
||||||
|
enabled = true;
|
||||||
|
outbound = true;
|
||||||
|
urlPrefix = "https://https://yap.marty.tf/webhooks/";
|
||||||
|
allowJsTransformationFunctions = false;
|
||||||
|
waitForComplete = false;
|
||||||
|
enableHttpGet = false;
|
||||||
|
};
|
||||||
|
listeners = [
|
||||||
|
{
|
||||||
|
port = config.server.synapse.port;
|
||||||
|
bind_addresses = [ "127.0.0.1" ];
|
||||||
|
type = "http";
|
||||||
|
tls = false;
|
||||||
|
x_forwarded = true;
|
||||||
|
resources = [
|
||||||
|
{
|
||||||
|
names = [
|
||||||
|
"client"
|
||||||
|
"federation"
|
||||||
|
];
|
||||||
|
compress = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
nginx = {
|
||||||
|
virtualHosts = {
|
||||||
|
"${config.networking.domain}" = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
locations."= /.well-known/matrix/server".extraConfig = mkWellKnown serverConfig;
|
||||||
|
locations."= /.well-known/matrix/client".extraConfig = mkWellKnown clientConfig;
|
||||||
|
};
|
||||||
|
"${config.server.synapse.subdomain}.${config.networking.domain}" = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
locations = {
|
||||||
|
"~ ^(/_matrix|/_synapse/client|/)" = {
|
||||||
|
proxyPass = "http://127.0.0.1:${toString config.server.synapse.port}";
|
||||||
|
proxyWebsockets = true;
|
||||||
|
extraConfig =
|
||||||
|
"proxy_set_header X-Forwarded-For $remote_addr;"
|
||||||
|
+ "proxy_set_header X-Forwarded-Proto $scheme;"
|
||||||
|
+ "proxy_set_header Host $host:$server_port;";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{ };
|
||||||
|
};
|
||||||
|
}
|
||||||
13
modules/system/bluetooth.nix
Normal file
13
modules/system/bluetooth.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
bluez
|
||||||
|
bluetuith
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -7,12 +7,13 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
./bluetooth.nix
|
||||||
./boot.nix
|
./boot.nix
|
||||||
./git.nix
|
./git.nix
|
||||||
./shell.nix
|
./shell.nix
|
||||||
./networking.nix
|
./networking.nix
|
||||||
./localization.nix
|
./localization.nix
|
||||||
./fira-code.nix
|
./fonts.nix
|
||||||
./nixos-cli.nix
|
./nixos-cli.nix
|
||||||
./ssh.nix
|
./ssh.nix
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
networking = {
|
networking = {
|
||||||
domain = "maty.tf";
|
domain = "marty.tf";
|
||||||
networkmanager.enable = true;
|
networkmanager.enable = true;
|
||||||
firewall = {
|
firewall = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -39,4 +39,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
oniux
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue