mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 00:57:22 +01:00
refactor: eliminate old module setup [part 1]
This commit is contained in:
parent
da4cf4eca0
commit
de9b5cf40c
58 changed files with 2375 additions and 2899 deletions
1479
SwarselSystems.org
1479
SwarselSystems.org
File diff suppressed because it is too large
Load diff
|
|
@ -97,8 +97,8 @@
|
|||
{
|
||||
inherit lib;
|
||||
|
||||
nixosModules = import ./modules/nixos { inherit lib; };
|
||||
homeModules = import ./modules/home { inherit lib; };
|
||||
# nixosModules = import ./modules/nixos { inherit lib; };
|
||||
# homeModules = import ./modules/home { inherit lib; };
|
||||
packages = lib.swarselsystems.forEachSystem (pkgs: import ./pkgs { inherit lib pkgs; });
|
||||
formatter = lib.swarselsystems.forEachSystem (pkgs: pkgs.nixpkgs-fmt);
|
||||
overlays = import ./overlays { inherit self lib inputs; };
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@
|
|||
inputs.sops-nix.homeManagerModules.sops
|
||||
inputs.nix-index-database.hmModules.nix-index
|
||||
./profiles/home/common
|
||||
] ++ (builtins.attrValues outputs.homeModules);
|
||||
"${self}/profiles/home/common/sharedsetup.nix"
|
||||
];
|
||||
|
||||
nixpkgs = {
|
||||
overlays = [ outputs.overlays.default ];
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ self, pkgs, inputs, outputs, config, lib, modulesPath, primaryUser ? "swarsel", ... }:
|
||||
{ self, pkgs, inputs, config, lib, modulesPath, primaryUser ? "swarsel", ... }:
|
||||
let
|
||||
pubKeys = lib.filesystem.listFilesRecursive "${self}/secrets/keys/ssh";
|
||||
in
|
||||
|
|
@ -9,12 +9,15 @@ in
|
|||
"${modulesPath}/installer/cd-dvd/channel.nix"
|
||||
|
||||
"${self}/profiles/iso/minimal.nix"
|
||||
"${self}/profiles/nixos/common/sharedsetup.nix"
|
||||
"${self}/profiles/home/common/sharedsetup.nix"
|
||||
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.users."${primaryUser}".imports = [
|
||||
"${self}/profiles/home/common/settings.nix"
|
||||
] ++ (builtins.attrValues outputs.homeModules);
|
||||
"${self}/profiles/home/common/sharedsetup.nix"
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -200,13 +200,13 @@ in
|
|||
xkb_layout = "us";
|
||||
xkb_variant = "altgr-intl";
|
||||
};
|
||||
"2362:628:PIXA3854:00_093A:0274_Touchpad" = {
|
||||
dwt = "enabled";
|
||||
tap = "enabled";
|
||||
natural_scroll = "enabled";
|
||||
middle_emulation = "enabled";
|
||||
drag_lock = "disabled";
|
||||
};
|
||||
# "2362:628:PIXA3854:00_093A:0274_Touchpad" = {
|
||||
# dwt = "enabled";
|
||||
# tap = "enabled";
|
||||
# natural_scroll = "enabled";
|
||||
# middle_emulation = "enabled";
|
||||
# drag_lock = "disabled";
|
||||
# };
|
||||
"1133:50504:Logitech_USB_Receiver" = {
|
||||
xkb_layout = "us";
|
||||
xkb_variant = "altgr-intl";
|
||||
|
|
|
|||
|
|
@ -6,12 +6,15 @@ in
|
|||
imports = [
|
||||
|
||||
"${profilesPath}/nixos/server"
|
||||
"${profilesPath}/nixos/common/sharedsetup.nix"
|
||||
"${profilesPath}/home/common/sharedsetup.nix"
|
||||
./hardware-configuration.nix
|
||||
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.users."${primaryUser}".imports = [
|
||||
"${profilesPath}/home/server"
|
||||
"${profilesPath}/home/common/sharedsetup.nix"
|
||||
];
|
||||
}
|
||||
];
|
||||
|
|
@ -79,14 +82,11 @@ in
|
|||
|
||||
|
||||
swarselsystems = {
|
||||
hasBluetooth = false;
|
||||
hasFingerprint = false;
|
||||
isImpermanence = false;
|
||||
isLinux = true;
|
||||
isBtrfs = false;
|
||||
flakePath = "/root/.dotfiles";
|
||||
server = {
|
||||
enable = true;
|
||||
forgejo = true;
|
||||
ankisync = true;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ self, inputs, outputs, pkgs, lib, primaryUser, ... }:
|
||||
{ self, inputs, pkgs, lib, primaryUser, ... }:
|
||||
let
|
||||
profilesPath = "${self}/profiles";
|
||||
sharedOptions = {
|
||||
|
|
@ -14,6 +14,7 @@ in
|
|||
|
||||
"${profilesPath}/nixos/optional/autologin.nix"
|
||||
"${profilesPath}/nixos/common/settings.nix"
|
||||
"${profilesPath}/nixos/common/sharedsetup.nix"
|
||||
"${profilesPath}/nixos/common/home-manager.nix"
|
||||
"${profilesPath}/nixos/common/home-manager-extra.nix"
|
||||
"${profilesPath}/nixos/common/xserver.nix"
|
||||
|
|
@ -22,6 +23,7 @@ in
|
|||
"${profilesPath}/nixos/common/lanzaboote.nix"
|
||||
"${profilesPath}/nixos/common/sops.nix"
|
||||
"${profilesPath}/nixos/server/ssh.nix"
|
||||
"${profilesPath}/home/common/sharedsetup.nix"
|
||||
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
{
|
||||
|
|
@ -30,9 +32,10 @@ in
|
|||
"${profilesPath}/home/common/settings.nix"
|
||||
"${profilesPath}/home/common/sops.nix"
|
||||
"${profilesPath}/home/common/ssh.nix"
|
||||
] ++ (builtins.attrValues outputs.homeModules);
|
||||
"${profilesPath}/home/common/sharedsetup.nix"
|
||||
];
|
||||
}
|
||||
] ++ (builtins.attrValues outputs.nixosModules) ++ (builtins.attrValues outputs.homeModules);
|
||||
];
|
||||
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
|
|
|||
|
|
@ -32,13 +32,10 @@ in
|
|||
};
|
||||
|
||||
swarselsystems = {
|
||||
hasBluetooth = false;
|
||||
hasFingerprint = false;
|
||||
isImpermanence = false;
|
||||
isBtrfs = false;
|
||||
isLinux = true;
|
||||
server = {
|
||||
enable = true;
|
||||
kavita = true;
|
||||
navidrome = true;
|
||||
jellyfin = true;
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ in
|
|||
# put home-manager imports here that are for all servers and normal hosts
|
||||
inputs.sops-nix.homeManagerModules.sops
|
||||
inputs.nix-index-database.hmModules.nix-index
|
||||
] ++ (builtins.attrValues outputs.homeModules);
|
||||
];
|
||||
}
|
||||
] else [
|
||||
# put nixos imports here that are for darwin hosts
|
||||
|
|
@ -80,9 +80,9 @@ in
|
|||
home-manager.users."${macUser}".imports = [
|
||||
# put home-manager imports here that are for darwin hosts
|
||||
"${self}/profiles/darwin/home"
|
||||
] ++ (builtins.attrValues outputs.homeModules);
|
||||
];
|
||||
}
|
||||
]) ++ (builtins.attrValues outputs.nixosModules) ++ (builtins.attrValues outputs.homeModules)
|
||||
])
|
||||
));
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,6 +0,0 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
options.swarselsystems = {
|
||||
isBtrfs = lib.mkEnableOption "use btrfs filesystem";
|
||||
};
|
||||
}
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
options.swarselsystems = {
|
||||
cpuCount = lib.mkOption {
|
||||
type = lib.types.int;
|
||||
default = 8;
|
||||
};
|
||||
isSecondaryGpu = lib.mkEnableOption "device has a secondary GPU";
|
||||
SecondaryGpuCard = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
};
|
||||
temperatureHwmon = {
|
||||
isAbsolutePath = lib.mkEnableOption "absolute temperature path";
|
||||
path = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
};
|
||||
input-filename = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
options.swarselsystems = {
|
||||
inputs = lib.mkOption {
|
||||
type = lib.types.attrsOf (lib.types.attrsOf lib.types.str);
|
||||
default = { };
|
||||
};
|
||||
kyria = lib.mkOption {
|
||||
type = lib.types.attrsOf (lib.types.attrsOf lib.types.str);
|
||||
default = {
|
||||
"36125:53060:splitkb.com_splitkb.com_Kyria_rev3" = {
|
||||
xkb_layout = "us";
|
||||
xkb_variant = "altgr-intl";
|
||||
};
|
||||
"7504:24926:Kyria_Keyboard" = {
|
||||
xkb_layout = "us";
|
||||
xkb_variant = "altgr-intl";
|
||||
};
|
||||
};
|
||||
};
|
||||
touchpad = lib.mkOption {
|
||||
type = lib.types.attrsOf (lib.types.attrsOf lib.types.str);
|
||||
default = { };
|
||||
};
|
||||
standardinputs = lib.mkOption {
|
||||
type = lib.types.attrsOf (lib.types.attrsOf lib.types.str);
|
||||
default = lib.recursiveUpdate (lib.recursiveUpdate config.swarselsystems.touchpad config.swarselsystems.kyria) config.swarselsystems.inputs;
|
||||
internal = true;
|
||||
};
|
||||
keybindings = lib.mkOption {
|
||||
type = lib.types.attrsOf lib.types.str;
|
||||
default = { };
|
||||
};
|
||||
shellAliases = lib.mkOption {
|
||||
type = lib.types.attrsOf lib.types.str;
|
||||
default = { };
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
options.swarselsystems = {
|
||||
isLaptop = lib.mkEnableOption "laptop host";
|
||||
};
|
||||
|
||||
config.swarselsystems = {
|
||||
touchpad = lib.mkIf config.swarselsystems.isLaptop {
|
||||
"type:touchpad" = {
|
||||
dwt = "enabled";
|
||||
tap = "enabled";
|
||||
natural_scroll = "enabled";
|
||||
middle_emulation = "enabled";
|
||||
drag_lock = "disabled";
|
||||
};
|
||||
};
|
||||
waybarModules = lib.mkIf config.swarselsystems.isLaptop [
|
||||
"custom/outer-left-arrow-dark"
|
||||
"mpris"
|
||||
"custom/left-arrow-light"
|
||||
"network"
|
||||
"custom/vpn"
|
||||
"custom/left-arrow-dark"
|
||||
"pulseaudio"
|
||||
"custom/left-arrow-light"
|
||||
"battery"
|
||||
"custom/left-arrow-dark"
|
||||
"group/hardware"
|
||||
"custom/left-arrow-light"
|
||||
"clock#2"
|
||||
"custom/left-arrow-dark"
|
||||
"clock#1"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
options.swarselsystems = {
|
||||
monitors = lib.mkOption {
|
||||
type = lib.types.attrsOf (lib.types.attrsOf lib.types.str);
|
||||
default = { };
|
||||
};
|
||||
sharescreen = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
};
|
||||
lowResolution = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
};
|
||||
highResolution = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
options.swarselsystems = {
|
||||
isNixos = lib.mkEnableOption "nixos host";
|
||||
isPublic = lib.mkEnableOption "is a public machine (no secrets)";
|
||||
swayfxConfig = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "
|
||||
blur enable
|
||||
blur_xray disable
|
||||
blur_passes 1
|
||||
blur_radius 1
|
||||
shadows enable
|
||||
corner_radius 2
|
||||
titlebar_separator disable
|
||||
default_dim_inactive 0.02
|
||||
";
|
||||
internal = true;
|
||||
};
|
||||
};
|
||||
|
||||
config.swarselsystems = {
|
||||
startup = lib.mkIf (!config.swarselsystems.isNixos) [
|
||||
{ command = "sleep 60 && nixGL nextcloud --background"; }
|
||||
{ command = "sleep 60 && nixGL vesktop --start-minimized -enable-features=UseOzonePlatform -ozone-platform=wayland"; }
|
||||
{ command = "sleep 60 && nixGL syncthingtray --wait"; }
|
||||
{ command = "sleep 60 && ANKI_WAYLAND=1 nixGL anki"; }
|
||||
{ command = "nm-applet --indicator"; }
|
||||
{ command = "sleep 60 && OBSIDIAN_USE_WAYLAND=1 nixGL obsidian -enable-features=UseOzonePlatform -ozone-platform=wayland"; }
|
||||
{ command = "sleep 60 && element-desktop --hidden -enable-features=UseOzonePlatform -ozone-platform=wayland --disable-gpu-driver-bug-workarounds"; }
|
||||
];
|
||||
swayfxConfig = lib.mkIf (!config.swarselsystems.isNixos) " ";
|
||||
};
|
||||
}
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
options.swarselsystems = {
|
||||
isDarwin = lib.mkEnableOption "darwin host";
|
||||
isLinux = lib.mkEnableOption "whether this is a linux machine";
|
||||
mainUser = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "swarsel";
|
||||
};
|
||||
homeDir = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "/home/swarsel";
|
||||
};
|
||||
xdgDir = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "/run/user/1000";
|
||||
};
|
||||
flakePath = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "/home/swarsel/.dotfiles";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
options.swarselsystems = {
|
||||
startup = lib.mkOption {
|
||||
type = lib.types.listOf (lib.types.attrsOf lib.types.str);
|
||||
default = [
|
||||
{ command = "nextcloud --background"; }
|
||||
{ command = "vesktop --start-minimized --enable-speech-dispatcher --ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime"; }
|
||||
{ command = "element-desktop --hidden --enable-features=UseOzonePlatform --ozone-platform=wayland --disable-gpu-driver-bug-workarounds"; }
|
||||
{ command = "ANKI_WAYLAND=1 anki"; }
|
||||
{ command = "OBSIDIAN_USE_WAYLAND=1 obsidian"; }
|
||||
{ command = "nm-applet"; }
|
||||
{ command = "feishin"; }
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
{ self, lib, pkgs, ... }:
|
||||
{
|
||||
options.swarselsystems = {
|
||||
stylix = lib.mkOption {
|
||||
type = lib.types.attrs;
|
||||
default = {
|
||||
enable = true;
|
||||
base16Scheme = "${self}/programs/stylix/swarsel.yaml";
|
||||
polarity = "dark";
|
||||
opacity.popups = 0.5;
|
||||
cursor = {
|
||||
package = pkgs.banana-cursor;
|
||||
# package = pkgs.capitaine-cursors;
|
||||
name = "Banana";
|
||||
# name = "capitaine-cursors";
|
||||
size = 16;
|
||||
};
|
||||
fonts = {
|
||||
sizes = {
|
||||
terminal = 10;
|
||||
applications = 11;
|
||||
};
|
||||
serif = {
|
||||
# package = (pkgs.nerdfonts.override { fonts = [ "FiraMono" "FiraCode"]; });
|
||||
package = pkgs.cantarell-fonts;
|
||||
# package = pkgs.montserrat;
|
||||
name = "Cantarell";
|
||||
# name = "FiraCode Nerd Font Propo";
|
||||
# name = "Montserrat";
|
||||
};
|
||||
sansSerif = {
|
||||
# package = (pkgs.nerdfonts.override { fonts = [ "FiraMono" "FiraCode"]; });
|
||||
package = pkgs.cantarell-fonts;
|
||||
# package = pkgs.montserrat;
|
||||
name = "Cantarell";
|
||||
# name = "FiraCode Nerd Font Propo";
|
||||
# name = "Montserrat";
|
||||
};
|
||||
monospace = {
|
||||
package = pkgs.nerd-fonts.fira-mono; # has overrides
|
||||
name = "FiraCode Nerd Font Mono";
|
||||
};
|
||||
emoji = {
|
||||
package = pkgs.noto-fonts-emoji;
|
||||
name = "Noto Color Emoji";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
{ self, lib, ... }:
|
||||
{
|
||||
options.swarselsystems = {
|
||||
wallpaper = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
default = self + /wallpaper/lenovowp.png;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
{ lib, config, ... }:
|
||||
let
|
||||
generateIcons = n: lib.concatStringsSep " " (builtins.map (x: "{icon" + toString x + "}") (lib.range 0 (n - 1)));
|
||||
in
|
||||
{
|
||||
options.swarselsystems = {
|
||||
cpuString = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = generateIcons config.swarselsystems.cpuCount;
|
||||
description = "The generated icons string for use by Waybar.";
|
||||
internal = true;
|
||||
};
|
||||
waybarModules = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [
|
||||
"custom/outer-left-arrow-dark"
|
||||
"mpris"
|
||||
"custom/left-arrow-light"
|
||||
"network"
|
||||
"custom/vpn"
|
||||
"custom/left-arrow-dark"
|
||||
"pulseaudio"
|
||||
"custom/left-arrow-light"
|
||||
"custom/pseudobat"
|
||||
"battery"
|
||||
"custom/left-arrow-dark"
|
||||
"group/hardware"
|
||||
"custom/left-arrow-light"
|
||||
"clock#2"
|
||||
"custom/left-arrow-dark"
|
||||
"clock#1"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
{ lib, ... }:
|
||||
|
||||
{
|
||||
options.swarselsystems = {
|
||||
hasBluetooth = lib.mkEnableOption "bluetooth availability";
|
||||
hasFingerprint = lib.mkEnableOption "fingerprint sensor availability";
|
||||
trackpoint = {
|
||||
isAvailable = lib.mkEnableOption "trackpoint availability";
|
||||
trackpoint.device = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
options.swarselsystems = {
|
||||
server = {
|
||||
enable = lib.mkEnableOption "is a server machine";
|
||||
kavita = lib.mkEnableOption "enable kavita on server";
|
||||
jellyfin = lib.mkEnableOption "enable jellyfin on server";
|
||||
navidrome = lib.mkEnableOption "enable navidrome on server";
|
||||
spotifyd = lib.mkEnableOption "enable spotifyd on server";
|
||||
mpd = lib.mkEnableOption "enable mpd on server";
|
||||
matrix = lib.mkEnableOption "enable matrix on server";
|
||||
nextcloud = lib.mkEnableOption "enable nextcloud on server";
|
||||
immich = lib.mkEnableOption "enable immich on server";
|
||||
paperless = lib.mkEnableOption "enable paperless on server";
|
||||
transmission = lib.mkEnableOption "enable transmission and friends on server";
|
||||
syncthing = lib.mkEnableOption "enable syncthing on server";
|
||||
restic = lib.mkEnableOption "enable restic backups on server";
|
||||
monitoring = lib.mkEnableOption "enable monitoring on server";
|
||||
jenkins = lib.mkEnableOption "enable jenkins on server";
|
||||
emacs = lib.mkEnableOption "enable emacs server on server";
|
||||
forgejo = lib.mkEnableOption "enable forgejo on server";
|
||||
ankisync = lib.mkEnableOption "enable ankisync on server";
|
||||
freshrss = lib.mkEnableOption "enable freshrss on server";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -5,5 +5,6 @@ in
|
|||
{
|
||||
imports = [
|
||||
"${profilesPath}/home/common/settings.nix"
|
||||
"${profilesPath}/home/common/sharedsetup.nix"
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,14 +1,4 @@
|
|||
{ self, pkgs, lib, ... }:
|
||||
let
|
||||
lock-false = {
|
||||
Value = false;
|
||||
Status = "locked";
|
||||
};
|
||||
lock-true = {
|
||||
Value = true;
|
||||
Status = "locked";
|
||||
};
|
||||
in
|
||||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
|
|
@ -142,150 +132,16 @@ in
|
|||
|
||||
};
|
||||
|
||||
profiles.default = {
|
||||
profiles = {
|
||||
default = lib.recursiveUpdate
|
||||
{
|
||||
id = 0;
|
||||
isDefault = true;
|
||||
userChrome = builtins.readFile (self + /programs/firefox/chrome/userChrome.css);
|
||||
extensions = {
|
||||
packages = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||
tridactyl
|
||||
tampermonkey
|
||||
sidebery
|
||||
browserpass
|
||||
clearurls
|
||||
darkreader
|
||||
enhancer-for-youtube
|
||||
istilldontcareaboutcookies
|
||||
translate-web-pages
|
||||
ublock-origin
|
||||
reddit-enhancement-suite
|
||||
sponsorblock
|
||||
web-archives
|
||||
single-file
|
||||
widegithub
|
||||
enhanced-github
|
||||
unpaywall
|
||||
don-t-fuck-with-paste
|
||||
plasma-integration
|
||||
|
||||
# configure the default the same as trusted in order not to be annoyed
|
||||
noscript
|
||||
|
||||
# configure a shortcut 'ctrl+shift+c' with behaviour 'do nothing' in order to disable the dev console shortcut
|
||||
(buildFirefoxXpiAddon {
|
||||
pname = "shortkeys";
|
||||
version = "4.0.2";
|
||||
addonId = "Shortkeys@Shortkeys.com";
|
||||
url = "https://addons.mozilla.org/firefox/downloads/file/3673761/shortkeys-4.0.2.xpi";
|
||||
sha256 = "c6fe12efdd7a871787ac4526eea79ecc1acda8a99724aa2a2a55c88a9acf467c";
|
||||
meta = with lib;
|
||||
{
|
||||
description = "Easily customizable custom keyboard shortcuts for Firefox. To configure this addon go to Addons (ctrl+shift+a) ->Shortkeys ->Options. Report issues here (please specify that the issue is found in Firefox): https://github.com/mikecrittenden/shortkeys";
|
||||
mozPermissions = [
|
||||
"tabs"
|
||||
"downloads"
|
||||
"clipboardWrite"
|
||||
"browsingData"
|
||||
"storage"
|
||||
"bookmarks"
|
||||
"sessions"
|
||||
"<all_urls>"
|
||||
];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
})
|
||||
|
||||
];
|
||||
};
|
||||
|
||||
settings = {
|
||||
"extensions.autoDisableScopes" = 0;
|
||||
"browser.startup.homepage" = "https://outlook.office.com|https://satellite.vbc.ac.at|https://bitbucket.vbc.ac.at|https://github.com";
|
||||
"browser.bookmarks.showMobileBookmarks" = lock-true;
|
||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = lock-true;
|
||||
"browser.search.suggest.enabled" = lock-false;
|
||||
"browser.search.suggest.enabled.private" = lock-false;
|
||||
"browser.urlbar.suggest.searches" = lock-false;
|
||||
"browser.urlbar.showSearchSuggestionsFirst" = lock-false;
|
||||
"browser.topsites.contile.enabled" = lock-false;
|
||||
"browser.newtabpage.activity-stream.feeds.section.topstories" = lock-false;
|
||||
"browser.newtabpage.activity-stream.feeds.snippets" = lock-false;
|
||||
"browser.newtabpage.activity-stream.section.highlights.includePocket" = lock-false;
|
||||
"browser.newtabpage.activity-stream.section.highlights.includeBookmarks" = lock-false;
|
||||
"browser.newtabpage.activity-stream.section.highlights.includeDownloads" = lock-false;
|
||||
"browser.newtabpage.activity-stream.section.highlights.includeVisited" = lock-false;
|
||||
"browser.newtabpage.activity-stream.showSponsored" = lock-false;
|
||||
"browser.newtabpage.activity-stream.system.showSponsored" = lock-false;
|
||||
"browser.newtabpage.activity-stream.showSponsoredTopSites" = lock-false;
|
||||
};
|
||||
|
||||
search = {
|
||||
# default = "Kagi";
|
||||
default = "Google";
|
||||
# privateDefault = "Kagi";
|
||||
privateDefault = "Google";
|
||||
engines = {
|
||||
"Kagi" = {
|
||||
urls = [{
|
||||
template = "https://kagi.com/search";
|
||||
params = [
|
||||
{ name = "q"; value = "{searchTerms}"; }
|
||||
];
|
||||
}];
|
||||
iconUpdateURL = "https://kagi.com/favicon.ico";
|
||||
updateInterval = 24 * 60 * 60 * 1000; # every day
|
||||
definedAliases = [ "@k" ];
|
||||
};
|
||||
|
||||
"Nix Packages" = {
|
||||
urls = [{
|
||||
template = "https://search.nixos.org/packages";
|
||||
params = [
|
||||
{ name = "type"; value = "packages"; }
|
||||
{ name = "query"; value = "{searchTerms}"; }
|
||||
];
|
||||
}];
|
||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
definedAliases = [ "@np" ];
|
||||
};
|
||||
|
||||
"NixOS Wiki" = {
|
||||
urls = [{
|
||||
template = "https://nixos.wiki/index.php?search={searchTerms}";
|
||||
}];
|
||||
iconUpdateURL = "https://nixos.wiki/favicon.png";
|
||||
updateInterval = 24 * 60 * 60 * 1000; # every day
|
||||
definedAliases = [ "@nw" ];
|
||||
};
|
||||
|
||||
"NixOS Options" = {
|
||||
urls = [{
|
||||
template = "https://search.nixos.org/options";
|
||||
params = [
|
||||
{ name = "query"; value = "{searchTerms}"; }
|
||||
];
|
||||
}];
|
||||
|
||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
definedAliases = [ "@no" ];
|
||||
};
|
||||
|
||||
"Home Manager Options" = {
|
||||
urls = [{
|
||||
template = "https://home-manager-options.extranix.com/";
|
||||
params = [
|
||||
{ name = "query"; value = "{searchTerms}"; }
|
||||
];
|
||||
}];
|
||||
|
||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
definedAliases = [ "@hm" "@ho" "@hmo" ];
|
||||
};
|
||||
|
||||
"Google".metaData.alias = "@g";
|
||||
};
|
||||
force = true; # this is required because otherwise the search.json.mozlz4 symlink gets replaced on every firefox restart
|
||||
};
|
||||
}
|
||||
config.swarselsystems.firefox;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,13 @@
|
|||
{ lib, config, nixgl, ... }:
|
||||
{
|
||||
options.swarselsystems = {
|
||||
isSecondaryGpu = lib.mkEnableOption "device has a secondary GPU";
|
||||
SecondaryGpuCard = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
};
|
||||
};
|
||||
config = {
|
||||
nixGL = lib.mkIf (!config.swarselsystems.isNixos) {
|
||||
inherit (nixgl) packages;
|
||||
defaultWrapper = lib.mkDefault "mesa";
|
||||
|
|
@ -14,4 +22,5 @@
|
|||
"mesaPrime"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,10 +11,104 @@ let
|
|||
in
|
||||
{
|
||||
options.swarselsystems = {
|
||||
isLaptop = lib.mkEnableOption "laptop host";
|
||||
isNixos = lib.mkEnableOption "nixos host";
|
||||
isPublic = lib.mkEnableOption "is a public machine (no secrets)";
|
||||
isDarwin = lib.mkEnableOption "darwin host";
|
||||
isLinux = lib.mkEnableOption "whether this is a linux machine";
|
||||
isBtrfs = lib.mkEnableOption "use btrfs filesystem";
|
||||
mainUser = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "swarsel";
|
||||
};
|
||||
homeDir = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "/home/swarsel";
|
||||
};
|
||||
xdgDir = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "/run/user/1000";
|
||||
};
|
||||
flakePath = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "/home/swarsel/.dotfiles";
|
||||
};
|
||||
wallpaper = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
default = "${self}/wallpaper/lenovowp.png";
|
||||
};
|
||||
sharescreen = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
};
|
||||
lowResolution = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
};
|
||||
highResolution = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
};
|
||||
|
||||
stylix = lib.mkOption {
|
||||
type = lib.types.attrs;
|
||||
default = {
|
||||
enable = true;
|
||||
base16Scheme = "${self}/programs/stylix/swarsel.yaml";
|
||||
polarity = "dark";
|
||||
opacity.popups = 0.5;
|
||||
cursor = {
|
||||
package = pkgs.banana-cursor;
|
||||
# package = pkgs.capitaine-cursors;
|
||||
name = "Banana";
|
||||
# name = "capitaine-cursors";
|
||||
size = 16;
|
||||
};
|
||||
fonts = {
|
||||
sizes = {
|
||||
terminal = 10;
|
||||
applications = 11;
|
||||
};
|
||||
serif = {
|
||||
# package = (pkgs.nerdfonts.override { fonts = [ "FiraMono" "FiraCode"]; });
|
||||
package = pkgs.cantarell-fonts;
|
||||
# package = pkgs.montserrat;
|
||||
name = "Cantarell";
|
||||
# name = "FiraCode Nerd Font Propo";
|
||||
# name = "Montserrat";
|
||||
};
|
||||
sansSerif = {
|
||||
# package = (pkgs.nerdfonts.override { fonts = [ "FiraMono" "FiraCode"]; });
|
||||
package = pkgs.cantarell-fonts;
|
||||
# package = pkgs.montserrat;
|
||||
name = "Cantarell";
|
||||
# name = "FiraCode Nerd Font Propo";
|
||||
# name = "Montserrat";
|
||||
};
|
||||
monospace = {
|
||||
package = pkgs.nerd-fonts.fira-mono; # has overrides
|
||||
name = "FiraCode Nerd Font Mono";
|
||||
};
|
||||
emoji = {
|
||||
package = pkgs.noto-fonts-emoji;
|
||||
name = "Noto Color Emoji";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
stylixHomeTargets = lib.mkOption {
|
||||
type = lib.types.attrs;
|
||||
default = {
|
||||
emacs.enable = false;
|
||||
waybar.enable = false;
|
||||
sway.useWallpaper = false;
|
||||
firefox.profileNames = [ "default" ];
|
||||
};
|
||||
};
|
||||
|
||||
firefox = lib.mkOption {
|
||||
type = lib.types.attrs;
|
||||
default = {
|
||||
isDefault = false;
|
||||
userChrome = builtins.readFile "${self}/programs/firefox/chrome/userChrome.css";
|
||||
extensions = {
|
||||
packages = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||
|
|
@ -38,6 +132,9 @@ in
|
|||
unpaywall
|
||||
don-t-fuck-with-paste
|
||||
plasma-integration
|
||||
noscript
|
||||
|
||||
# configure a shortcut 'ctrl+shift+c' with behaviour 'do nothing' in order to disable the dev console shortcut
|
||||
(buildFirefoxXpiAddon {
|
||||
pname = "shortkeys";
|
||||
version = "4.0.2";
|
||||
|
|
@ -153,6 +250,6 @@ in
|
|||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
|
@ -3,12 +3,7 @@
|
|||
stylix = lib.mkIf (!config.swarselsystems.isNixos) (lib.recursiveUpdate
|
||||
{
|
||||
image = config.swarselsystems.wallpaper;
|
||||
targets = {
|
||||
emacs.enable = false;
|
||||
waybar.enable = false;
|
||||
sway.useWallpaper = false;
|
||||
firefox.profileNames = [ "default" ];
|
||||
};
|
||||
targets = config.swarselsystems.stylixHomeTargets;
|
||||
}
|
||||
config.swarselsystems.stylix);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,82 @@
|
|||
{ self, config, lib, ... }:
|
||||
let
|
||||
inherit (config.swarselsystems) monitors;
|
||||
workplaceSets = lib.mapAttrs' lib.swarselsystems.eachOutput monitors;
|
||||
workplaceOutputs = map (key: lib.getAttr key workplaceSets) (lib.attrNames workplaceSets);
|
||||
in
|
||||
{
|
||||
options.swarselsystems = {
|
||||
inputs = lib.mkOption {
|
||||
type = lib.types.attrsOf (lib.types.attrsOf lib.types.str);
|
||||
default = { };
|
||||
};
|
||||
monitors = lib.mkOption {
|
||||
type = lib.types.attrsOf (lib.types.attrsOf lib.types.str);
|
||||
default = { };
|
||||
};
|
||||
keybindings = lib.mkOption {
|
||||
type = lib.types.attrsOf lib.types.str;
|
||||
default = { };
|
||||
};
|
||||
startup = lib.mkOption {
|
||||
type = lib.types.listOf (lib.types.attrsOf lib.types.str);
|
||||
default = [
|
||||
{ command = "nextcloud --background"; }
|
||||
{ command = "vesktop --start-minimized --enable-speech-dispatcher --ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime"; }
|
||||
{ command = "element-desktop --hidden --enable-features=UseOzonePlatform --ozone-platform=wayland --disable-gpu-driver-bug-workarounds"; }
|
||||
{ command = "ANKI_WAYLAND=1 anki"; }
|
||||
{ command = "OBSIDIAN_USE_WAYLAND=1 obsidian"; }
|
||||
{ command = "nm-applet"; }
|
||||
{ command = "feishin"; }
|
||||
];
|
||||
};
|
||||
kyria = lib.mkOption {
|
||||
type = lib.types.attrsOf (lib.types.attrsOf lib.types.str);
|
||||
default = {
|
||||
"36125:53060:splitkb.com_splitkb.com_Kyria_rev3" = {
|
||||
xkb_layout = "us";
|
||||
xkb_variant = "altgr-intl";
|
||||
};
|
||||
"7504:24926:Kyria_Keyboard" = {
|
||||
xkb_layout = "us";
|
||||
xkb_variant = "altgr-intl";
|
||||
};
|
||||
};
|
||||
internal = true;
|
||||
};
|
||||
standardinputs = lib.mkOption {
|
||||
type = lib.types.attrsOf (lib.types.attrsOf lib.types.str);
|
||||
default = lib.recursiveUpdate (lib.recursiveUpdate config.swarselsystems.touchpad config.swarselsystems.kyria) config.swarselsystems.inputs;
|
||||
internal = true;
|
||||
};
|
||||
touchpad = lib.mkOption {
|
||||
type = lib.types.attrsOf (lib.types.attrsOf lib.types.str);
|
||||
default = { };
|
||||
internal = true;
|
||||
};
|
||||
swayfxConfig = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "
|
||||
blur enable
|
||||
blur_xray disable
|
||||
blur_passes 1
|
||||
blur_radius 1
|
||||
shadows enable
|
||||
corner_radius 2
|
||||
titlebar_separator disable
|
||||
default_dim_inactive 0.02
|
||||
";
|
||||
internal = true;
|
||||
};
|
||||
};
|
||||
config = {
|
||||
swarselsystems = {
|
||||
touchpad = lib.mkIf config.swarselsystems.isLaptop {
|
||||
"type:touchpad" = {
|
||||
dwt = "enabled";
|
||||
tap = "enabled";
|
||||
natural_scroll = "enabled";
|
||||
middle_emulation = "enabled";
|
||||
drag_lock = "disabled";
|
||||
};
|
||||
};
|
||||
swayfxConfig = lib.mkIf (!config.swarselsystems.isNixos) " ";
|
||||
};
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
checkConfig = false; # delete this line once SwayFX is fixed upstream
|
||||
|
|
@ -140,7 +212,12 @@ in
|
|||
};
|
||||
};
|
||||
input = config.swarselsystems.standardinputs;
|
||||
workspaceOutputAssign = workplaceOutputs;
|
||||
workspaceOutputAssign =
|
||||
let
|
||||
workplaceSets = lib.mapAttrs' lib.swarselsystems.eachOutput config.swarselsystems.monitors;
|
||||
workplaceOutputs = map (key: lib.getAttr key workplaceSets) (lib.attrNames workplaceSets);
|
||||
in
|
||||
workplaceOutputs;
|
||||
startup = config.swarselsystems.startup ++ [
|
||||
{ command = "kitty -T kittyterm -o confirm_os_window_close=0 zellij attach --create kittyterm"; }
|
||||
{ command = "sleep 60; kitty -T spotifytui -o confirm_os_window_close=0 spotify_player"; }
|
||||
|
|
@ -318,4 +395,5 @@ in
|
|||
${swayfxSettings}
|
||||
";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,62 @@
|
|||
{ self, config, lib, ... }:
|
||||
let
|
||||
generateIcons = n: lib.concatStringsSep " " (builtins.map (x: "{icon" + toString x + "}") (lib.range 0 (n - 1)));
|
||||
modulesLeft = [
|
||||
"custom/outer-left-arrow-dark"
|
||||
"mpris"
|
||||
"custom/left-arrow-light"
|
||||
"network"
|
||||
"custom/vpn"
|
||||
"custom/left-arrow-dark"
|
||||
"pulseaudio"
|
||||
"custom/left-arrow-light"
|
||||
];
|
||||
modulesRight = [
|
||||
"custom/left-arrow-dark"
|
||||
"group/hardware"
|
||||
"custom/left-arrow-light"
|
||||
"clock#2"
|
||||
"custom/left-arrow-dark"
|
||||
"clock#1"
|
||||
];
|
||||
in
|
||||
{
|
||||
options.swarselsystems = {
|
||||
cpuCount = lib.mkOption {
|
||||
type = lib.types.int;
|
||||
default = 8;
|
||||
};
|
||||
temperatureHwmon = {
|
||||
isAbsolutePath = lib.mkEnableOption "absolute temperature path";
|
||||
path = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
};
|
||||
input-filename = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
};
|
||||
};
|
||||
waybarModules = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = modulesLeft ++ [
|
||||
"custom/pseudobat"
|
||||
] ++ modulesRight;
|
||||
};
|
||||
cpuString = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = generateIcons config.swarselsystems.cpuCount;
|
||||
description = "The generated icons string for use by Waybar.";
|
||||
internal = true;
|
||||
};
|
||||
};
|
||||
config = {
|
||||
swarselsystems = {
|
||||
waybarModules = lib.mkIf config.swarselsystems.isLaptop (modulesLeft ++ [
|
||||
"battery"
|
||||
] ++ modulesRight);
|
||||
};
|
||||
programs.waybar = {
|
||||
|
||||
enable = true;
|
||||
systemd = {
|
||||
enable = true;
|
||||
|
|
@ -250,4 +305,5 @@
|
|||
};
|
||||
style = builtins.readFile (self + /programs/waybar/style.css);
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,13 @@ let
|
|||
inherit (config.swarselsystems) flakePath;
|
||||
in
|
||||
{
|
||||
options.swarselsystems = {
|
||||
shellAliases = lib.mkOption {
|
||||
type = lib.types.attrsOf lib.types.str;
|
||||
default = { };
|
||||
};
|
||||
};
|
||||
config = {
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
shellAliases = lib.recursiveUpdate
|
||||
|
|
@ -101,4 +108,5 @@ in
|
|||
bindkey '^W' my-backward-delete-whole-word
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -104,9 +104,14 @@ in
|
|||
};
|
||||
|
||||
firefox = {
|
||||
profiles = {
|
||||
profiles =
|
||||
let
|
||||
isDefault = false;
|
||||
in
|
||||
{
|
||||
dc = lib.recursiveUpdate
|
||||
{
|
||||
inherit isDefault;
|
||||
id = 1;
|
||||
settings = {
|
||||
"browser.startup.homepage" = "https://tower.vbc.ac.at|https://artifactory.vbc.ac.at";
|
||||
|
|
@ -115,13 +120,19 @@ in
|
|||
config.swarselsystems.firefox;
|
||||
cl = lib.recursiveUpdate
|
||||
{
|
||||
inherit isDefault;
|
||||
id = 2;
|
||||
settings = {
|
||||
"browser.startup.homepage" = "https://portal.azure.com";
|
||||
};
|
||||
}
|
||||
config.swarselsystems.firefox;
|
||||
ws = lib.recursiveUpdate { id = 3; } config.swarselsystems.firefox;
|
||||
ws = lib.recursiveUpdate
|
||||
{
|
||||
inherit isDefault;
|
||||
id = 3;
|
||||
}
|
||||
config.swarselsystems.firefox;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -6,5 +6,6 @@ in
|
|||
{
|
||||
imports = lib.swarselsystems.mkImports importNames "profiles/home/server" ++ [
|
||||
"${profilesPath}/home/common/settings.nix"
|
||||
"${profilesPath}/home/common/sharedsetup.nix"
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,12 @@
|
|||
{ lib, ... }:
|
||||
{ self, lib, ... }:
|
||||
let
|
||||
importNames = lib.swarselsystems.readNix "profiles/nixos/common";
|
||||
profilesPath = "${self}/profiles";
|
||||
in
|
||||
{
|
||||
imports = lib.swarselsystems.mkImports importNames "profiles/nixos/common";
|
||||
imports = lib.swarselsystems.mkImports importNames "profiles/nixos/common" ++ [
|
||||
"${profilesPath}/home/common/sharedsetup.nix"
|
||||
];
|
||||
|
||||
nixpkgs.config.permittedInsecurePackages = [
|
||||
"jitsi-meet-1.0.8043"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,18 @@
|
|||
{ pkgs, config, lib, ... }:
|
||||
{
|
||||
|
||||
options.swarselsystems = {
|
||||
hasBluetooth = lib.mkEnableOption "bluetooth availability";
|
||||
hasFingerprint = lib.mkEnableOption "fingerprint sensor availability";
|
||||
trackpoint = {
|
||||
isAvailable = lib.mkEnableOption "trackpoint availability";
|
||||
trackpoint.device = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
config = {
|
||||
hardware = {
|
||||
# opengl.driSupport32Bit = true is replaced with graphics.enable32Bit and hence redundant
|
||||
graphics = {
|
||||
|
|
@ -31,4 +43,5 @@
|
|||
};
|
||||
|
||||
services.fprintd.enable = lib.mkIf config.swarselsystems.hasFingerprint true;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,12 +8,7 @@
|
|||
config.swarselsystems.stylix;
|
||||
home-manager.users."${config.swarselsystems.mainUser}" = {
|
||||
stylix = {
|
||||
targets = {
|
||||
emacs.enable = false;
|
||||
waybar.enable = false;
|
||||
sway.useWallpaper = false;
|
||||
firefox.profileNames = [ "default" ];
|
||||
};
|
||||
targets = config.swarselsystems.stylixHomeTargets;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
options.swarselsystems.server.ankisync = lib.mkEnableOption "enable ankisync on server";
|
||||
config = lib.mkIf config.swarselsystems.server.ankisync {
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 22701 ];
|
||||
|
|
|
|||
|
|
@ -14,5 +14,7 @@ in
|
|||
"${profilesPath}/nixos/common/time.nix"
|
||||
"${profilesPath}/nixos/common/users.nix"
|
||||
"${profilesPath}/nixos/common/nix-ld.nix"
|
||||
"${profilesPath}/nixos/common/sharedsetup.nix"
|
||||
"${profilesPath}/home/common/sharedsetup.nix"
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
options.swarselsystems.server.emacs = lib.mkEnableOption "enable emacs server on server";
|
||||
config = lib.mkIf config.swarselsystems.server.emacs {
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 9812 ];
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
options.swarselsystems.server.forgejo = lib.mkEnableOption "enable forgejo on server";
|
||||
config = lib.mkIf config.swarselsystems.server.forgejo {
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 3000 ];
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
options.swarselsystems.server.freshrss = lib.mkEnableOption "enable freshrss on server";
|
||||
config = lib.mkIf config.swarselsystems.server.freshrss {
|
||||
|
||||
users.users.freshrss = {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
options.swarselsystems.server.immich = lib.mkEnableOption "enable immich on server";
|
||||
config = lib.mkIf config.swarselsystems.server.immich {
|
||||
|
||||
users.users.immich = {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
options.swarselsystems.server.jellyfin = lib.mkEnableOption "enable jellyfin on server";
|
||||
config = lib.mkIf config.swarselsystems.server.jellyfin {
|
||||
users.users.jellyfin = {
|
||||
extraGroups = [ "video" "render" "users" ];
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
options.swarselsystems.server.jenkins = lib.mkEnableOption "enable jenkins on server";
|
||||
config = lib.mkIf config.swarselsystems.server.jenkins {
|
||||
|
||||
services.jenkins = {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
options.swarselsystems.server.kavita = lib.mkEnableOption "enable kavita on server";
|
||||
config = lib.mkIf config.swarselsystems.server.kavita {
|
||||
environment.systemPackages = with pkgs; [
|
||||
calibre
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ let
|
|||
'';
|
||||
in
|
||||
{
|
||||
|
||||
options.swarselsystems.server.matrix = lib.mkEnableOption "enable matrix on server";
|
||||
config = lib.mkIf config.swarselsystems.server.matrix {
|
||||
environment.systemPackages = with pkgs; [
|
||||
matrix-synapse
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
{ self, lib, config, ... }:
|
||||
{
|
||||
options.swarselsystems.server.monitoring = lib.mkEnableOption "enable monitoring on server";
|
||||
config = lib.mkIf config.swarselsystems.server.monitoring {
|
||||
|
||||
sops.secrets = {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
options.swarselsystems.server.mpd = lib.mkEnableOption "enable mpd on server";
|
||||
config = lib.mkIf config.swarselsystems.server.mpd {
|
||||
users = {
|
||||
groups = {
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ let
|
|||
secretsDirectory = builtins.toString inputs.nix-secrets;
|
||||
in
|
||||
{
|
||||
options.swarselsystems.server.navidrome = lib.mkEnableOption "enable navidrome on server";
|
||||
config = lib.mkIf config.swarselsystems.server.navidrome {
|
||||
environment.systemPackages = with pkgs; [
|
||||
pciutils
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
options.swarselsystems.server.nextcloud = lib.mkEnableOption "enable nextcloud on server";
|
||||
config = lib.mkIf config.swarselsystems.server.nextcloud {
|
||||
|
||||
sops.secrets.nextcloudadminpass = {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
options.swarselsystems.server.paperless = lib.mkEnableOption "enable paperless on server";
|
||||
config = lib.mkIf config.swarselsystems.server.paperless {
|
||||
|
||||
users.users.paperless = {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
config = lib.mkIf (config.swarselsystems.server.mpd || config.swarselsystems.server.navidrome) {
|
||||
config = lib.mkIf (config?swarselsystems.server.mpd || config?swarselsystems.server.navidrome) {
|
||||
|
||||
security.rtkit.enable = true; # this is required for pipewire real-time access
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
options.swarselsystems.server.restic = lib.mkEnableOption "enable restic backups on server";
|
||||
config = lib.mkIf config.swarselsystems.server.restic {
|
||||
|
||||
# TODO
|
||||
|
|
|
|||
|
|
@ -3,6 +3,13 @@ let
|
|||
inherit (config.swarselsystems) flakePath;
|
||||
in
|
||||
{
|
||||
options.swarselsystems = {
|
||||
shellAliases = lib.mkOption {
|
||||
type = lib.types.attrsOf lib.types.str;
|
||||
default = { };
|
||||
};
|
||||
};
|
||||
config = {
|
||||
environment.shellAliases = lib.recursiveUpdate
|
||||
{
|
||||
npswitch = "cd ${flakePath}; git pull; sudo nixos-rebuild --flake .#$(hostname) switch; cd -;";
|
||||
|
|
@ -24,5 +31,5 @@ in
|
|||
#
|
||||
"SDL_ttf-2.0.11"
|
||||
];
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
options.swarselsystems.server.spotifyd = lib.mkEnableOption "enable spotifyd on server";
|
||||
config = lib.mkIf config.swarselsystems.server.spotifyd {
|
||||
users.groups.spotifyd = {
|
||||
gid = 65136;
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ let
|
|||
workHostName = lib.swarselsystems.getSecret "${secretsDirectory}/work/worklaptop-hostname";
|
||||
in
|
||||
{
|
||||
options.swarselsystems.server.syncthing = lib.mkEnableOption "enable syncthing on server";
|
||||
config = lib.mkIf config.swarselsystems.server.syncthing {
|
||||
|
||||
users.users.syncthing = {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
options.swarselsystems.server.transmission = lib.mkEnableOption "enable transmission and friends on server";
|
||||
config = lib.mkIf config.swarselsystems.server.transmission {
|
||||
|
||||
# this user/group section is probably unneeded
|
||||
|
|
|
|||
|
|
@ -55,15 +55,6 @@ in
|
|||
isLaptop = true;
|
||||
isNixos = true;
|
||||
cpuCount = 16;
|
||||
startup = [
|
||||
{ command = "nextcloud --background"; }
|
||||
{ command = "vesktop --start-minimized --enable-speech-dispatcher --ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime"; }
|
||||
{ command = "element-desktop --hidden --enable-features=UseOzonePlatform --ozone-platform=wayland --disable-gpu-driver-bug-workarounds"; }
|
||||
{ command = "ANKI_WAYLAND=1 anki"; }
|
||||
{ command = "OBSIDIAN_USE_WAYLAND=1 obsidian"; }
|
||||
{ command = "nm-applet"; }
|
||||
{ command = "feishin"; }
|
||||
];
|
||||
}
|
||||
sharedOptions;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue