Reformat all using alejandra

This commit is contained in:
Evie Litherland-Smith 2024-01-30 14:21:50 +00:00
parent 6ed7892356
commit 09df446bd7
46 changed files with 499 additions and 441 deletions

View file

@ -13,8 +13,12 @@
}; };
}; };
outputs = { nixpkgs, home-manager, stylix, ... }: outputs = {
let nixpkgs,
home-manager,
stylix,
...
}: let
default = { default = {
hostName = "Atlas"; hostName = "Atlas";
user = "xenia"; user = "xenia";
@ -26,21 +30,33 @@
homeModules = [./home/hyprland/default.nix]; homeModules = [./home/hyprland/default.nix];
stateVersion = "23.05"; stateVersion = "23.05";
}; };
systemConfig = { hostName ? default.hostName, user ? default.user systemConfig = {
, system ? default.system, group ? default.group, shell ? default.shell hostName ? default.hostName,
, systemModules ? default.systemModules user ? default.user,
, serviceModules ? default.serviceModules system ? default.system,
, homeModules ? default.homeModules, stateVersion ? default.stateVersion group ? default.group,
}: shell ? default.shell,
let specialArgs = { inherit hostName user; }; systemModules ? default.systemModules,
in nixpkgs.lib.nixosSystem { serviceModules ? default.serviceModules,
homeModules ? default.homeModules,
stateVersion ? default.stateVersion,
}: let
specialArgs = {inherit hostName user;};
in
nixpkgs.lib.nixosSystem {
inherit system specialArgs; inherit system specialArgs;
modules = [ modules =
[
./hosts/${hostName}/configuration.nix ./hosts/${hostName}/configuration.nix
./hosts/${hostName}/hardware-configuration.nix ./hosts/${hostName}/hardware-configuration.nix
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
stylix.nixosModules.stylix stylix.nixosModules.stylix
({ config, lib, pkgs, ... }: { ({
config,
lib,
pkgs,
...
}: {
boot.loader = { boot.loader = {
systemd-boot.enable = true; systemd-boot.enable = true;
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;
@ -121,11 +137,9 @@
fish.enable = true; fish.enable = true;
}; };
image = ./wallpapers/space.png; image = ./wallpapers/space.png;
base16Scheme = base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
"${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
override = { override = {
scheme = scheme = "Catppuccin Mocha, using fg and bg colours from emacs modus-vivdendi-tinted";
"Catppuccin Mocha, using fg and bg colours from emacs modus-vivdendi-tinted";
base00 = "0d0e1c"; base00 = "0d0e1c";
base01 = "1d2235"; base01 = "1d2235";
base04 = "c6daff"; base04 = "c6daff";
@ -148,7 +162,7 @@
monospace = { monospace = {
name = "Iosevka Nerd Font"; name = "Iosevka Nerd Font";
package = package =
(pkgs.nerdfonts.override { fonts = [ "Iosevka" ]; }); pkgs.nerdfonts.override {fonts = ["Iosevka"];};
}; };
emoji = { emoji = {
name = "Noto Color Emoji"; name = "Noto Color Emoji";
@ -181,11 +195,9 @@
inherit group; inherit group;
isNormalUser = true; isNormalUser = true;
description = "Evie Litherland-Smith"; description = "Evie Litherland-Smith";
extraGroups = extraGroups = ["networkmanager" "wheel" "video" "input" "uinput"];
[ "networkmanager" "wheel" "video" "input" "uinput" ];
shell = pkgs.${shell}; shell = pkgs.${shell};
initialHashedPassword = initialHashedPassword = "$y$j9T$tHIPQt09Kf3KH2eIRze3g/$2mwSlcq27DTGvHNPJ5EP9/1CfL3bXP0F6oS/Vuffmn3";
"$y$j9T$tHIPQt09Kf3KH2eIRze3g/$2mwSlcq27DTGvHNPJ5EP9/1CfL3bXP0F6oS/Vuffmn3";
openssh = {inherit authorizedKeys;}; openssh = {inherit authorizedKeys;};
}; };
}; };
@ -223,18 +235,20 @@
}; };
}; };
}) })
] ++ systemModules ++ serviceModules; ]
++ systemModules
++ serviceModules;
}; };
in { in {
nixosConfigurations = { nixosConfigurations = {
## Server ## Server
Legion = let Legion = let
hostName = "Legion"; hostName = "Legion";
user = "xenia"; user = "xenia";
system = "x86_64-linux"; system = "x86_64-linux";
in systemConfig { in
systemConfig {
inherit hostName user system; inherit hostName user system;
systemModules = [./system/default.nix]; systemModules = [./system/default.nix];
serviceModules = [ serviceModules = [
@ -255,7 +269,8 @@
hostName = "Northstar"; hostName = "Northstar";
user = "xenia"; user = "xenia";
system = "x86_64-linux"; system = "x86_64-linux";
in systemConfig { in
systemConfig {
inherit hostName user system; inherit hostName user system;
systemModules = default.systemModules ++ [./system/games.nix]; systemModules = default.systemModules ++ [./system/games.nix];
}; };
@ -264,7 +279,8 @@
hostName = "Vanguard"; hostName = "Vanguard";
user = "xenia"; user = "xenia";
system = "x86_64-linux"; system = "x86_64-linux";
in systemConfig { in
systemConfig {
inherit hostName user system; inherit hostName user system;
systemModules = default.systemModules ++ [./system/games.nix]; systemModules = default.systemModules ++ [./system/games.nix];
}; };
@ -275,14 +291,15 @@
hostName = "Ronin"; hostName = "Ronin";
user = "elitherl"; user = "elitherl";
system = "x86_64-linux"; system = "x86_64-linux";
in systemConfig { inherit hostName user system; }; in
systemConfig {inherit hostName user system;};
Scorch = let Scorch = let
hostName = "Scorch"; hostName = "Scorch";
user = "elitherl"; user = "elitherl";
system = "x86_64-linux"; system = "x86_64-linux";
in systemConfig { inherit hostName user system; }; in
systemConfig {inherit hostName user system;};
}; };
}; };
} }

View file

@ -1,8 +1,15 @@
{ config, lib, pkgs, hostName, ... }: { {
config,
lib,
pkgs,
hostName,
...
}: {
home.packages = with pkgs; [davmail]; home.packages = with pkgs; [davmail];
accounts.email = { accounts.email = {
maildirBasePath = "Mail"; maildirBasePath = "Mail";
accounts = let realName = "Evie Litherland-Smith"; accounts = let
realName = "Evie Litherland-Smith";
in { in {
proton = let proton = let
host = "127.0.0.1"; host = "127.0.0.1";
@ -23,15 +30,13 @@
address = "e.litherlandsmith@proton.me"; address = "e.litherlandsmith@proton.me";
aliases = ["evie@xenia.me.uk" "evie@litherlandsmith.slmail.me"]; aliases = ["evie@xenia.me.uk" "evie@litherlandsmith.slmail.me"];
userName = address; userName = address;
passwordCommand = passwordCommand = "${pkgs.pass}/bin/pass show mbsync/${hostName}/proton | head -n1";
"${pkgs.pass}/bin/pass show mbsync/${hostName}/proton | head -n1";
mbsync = { mbsync = {
enable = lib.mkDefault accountEnabled; enable = lib.mkDefault accountEnabled;
create = "both"; create = "both";
expunge = "both"; expunge = "both";
remove = "both"; remove = "both";
patterns = patterns = ["*" "!All Mail" "!Labels*" "!Starred" "!Recovered Messages"];
[ "*" "!All Mail" "!Labels*" "!Starred" "!Recovered Messages" ];
subFolders = "Verbatim"; subFolders = "Verbatim";
extraConfig.account.AuthMechs = "LOGIN"; extraConfig.account.AuthMechs = "LOGIN";
}; };
@ -44,7 +49,8 @@
}; };
mu.enable = lib.mkDefault accountEnabled; mu.enable = lib.mkDefault accountEnabled;
}; };
icloud = let accountEnabled = true; icloud = let
accountEnabled = true;
in rec { in rec {
inherit realName; inherit realName;
primary = lib.mkDefault false; primary = lib.mkDefault false;
@ -53,8 +59,7 @@
smtp.host = "smtp.mail.me.com"; smtp.host = "smtp.mail.me.com";
address = "e.litherlandsmith@icloud.com"; address = "e.litherlandsmith@icloud.com";
userName = address; userName = address;
passwordCommand = passwordCommand = "${pkgs.pass}/bin/pass show mbsync/${hostName}/icloud | head -n1";
"${pkgs.pass}/bin/pass show mbsync/${hostName}/icloud | head -n1";
mbsync = { mbsync = {
enable = lib.mkDefault accountEnabled; enable = lib.mkDefault accountEnabled;
create = "both"; create = "both";
@ -85,8 +90,7 @@
address = "evie.litherland-smith@ukaea.uk"; address = "evie.litherland-smith@ukaea.uk";
aliases = ["elitherl@jet.uk"]; aliases = ["elitherl@jet.uk"];
userName = address; userName = address;
passwordCommand = passwordCommand = "${pkgs.pass}/bin/pass show mbsync/${hostName}/outlook | head -n1";
"${pkgs.pass}/bin/pass show mbsync/${hostName}/outlook | head -n1";
mbsync = { mbsync = {
enable = lib.mkDefault accountEnabled; enable = lib.mkDefault accountEnabled;
create = "both"; create = "both";
@ -126,7 +130,8 @@
}; };
}; };
}; };
systemd.user.services = let emailAccounts = config.accounts.email.accounts; systemd.user.services = let
emailAccounts = config.accounts.email.accounts;
in { in {
protonmail-bridge = lib.mkIf emailAccounts.proton.mbsync.enable { protonmail-bridge = lib.mkIf emailAccounts.proton.mbsync.enable {
Unit = { Unit = {
@ -137,8 +142,7 @@
RequiresMountsFor = "%t/containers"; RequiresMountsFor = "%t/containers";
}; };
Service = { Service = {
Environment = Environment = ["PODMAN_SYSTEMD_UNIT=%n" "PATH=/run/wrappers/bin/:$PATH"];
[ "PODMAN_SYSTEMD_UNIT=%n" "PATH=/run/wrappers/bin/:$PATH" ];
Restart = "always"; Restart = "always";
TimeoutStopSec = 70; TimeoutStopSec = 70;
ExecStart = '' ExecStart = ''
@ -177,12 +181,9 @@
Environment = ["PATH=/run/current-system/sw/bin/:$PATH"]; Environment = ["PATH=/run/current-system/sw/bin/:$PATH"];
Restart = "always"; Restart = "always";
ExecStartPre = with config.home; '' ExecStartPre = with config.home; ''
/bin/sh -c "if [ ! -f ${homeDirectory}/.davmail.properties ]; then cp ${ /bin/sh -c "if [ ! -f ${homeDirectory}/.davmail.properties ]; then cp ${./.davmail.properties} ${homeDirectory}/.davmail.properties; fi; chmod 644 ${homeDirectory}/.davmail.properties"
./.davmail.properties
} ${homeDirectory}/.davmail.properties; fi; chmod 644 ${homeDirectory}/.davmail.properties"
''; '';
ExecStart = ExecStart = "${pkgs.davmail}/bin/davmail -notray ${config.home.homeDirectory}/.davmail.properties";
"${pkgs.davmail}/bin/davmail -notray ${config.home.homeDirectory}/.davmail.properties";
}; };
Install.WantedBy = ["default.target"]; Install.WantedBy = ["default.target"];
}; };

View file

@ -1,11 +1,17 @@
{ config, lib, pkgs, ... }: { {
config,
lib,
pkgs,
...
}: {
xdg.configFile."pass-git-helper/git-pass-mapping.ini".source = xdg.configFile."pass-git-helper/git-pass-mapping.ini".source =
./git-pass-mapping.ini; ./git-pass-mapping.ini;
programs = { programs = {
gpg.enable = true; gpg.enable = true;
password-store = { password-store = {
enable = true; enable = true;
package = pkgs.pass-nodmenu.withExtensions package =
pkgs.pass-nodmenu.withExtensions
(exts: with exts; [pass-otp pass-update pass-audit pass-import]); (exts: with exts; [pass-otp pass-update pass-audit pass-import]);
settings = { settings = {
PASSWORD_STORE_DIR = "${config.home.homeDirectory}/.password-store"; PASSWORD_STORE_DIR = "${config.home.homeDirectory}/.password-store";

View file

@ -22,8 +22,7 @@
table_header_color = "#f5e0dc"; table_header_color = "#f5e0dc";
all_cpu_color = "#f5e0dc"; all_cpu_color = "#f5e0dc";
avg_cpu_color = "#eba0ac"; avg_cpu_color = "#eba0ac";
cpu_core_colors = cpu_core_colors = ["#f38ba8" "#fab387" "#f9e2af" "#a6e3a1" "#74c7ec" "#cba6f7"];
[ "#f38ba8" "#fab387" "#f9e2af" "#a6e3a1" "#74c7ec" "#cba6f7" ];
ram_color = "#a6e3a1"; ram_color = "#a6e3a1";
swap_color = "#fab387"; swap_color = "#fab387";
rx_color = "#a6e3a1"; rx_color = "#a6e3a1";
@ -39,8 +38,7 @@
high_battery_color = "#a6e3a1"; high_battery_color = "#a6e3a1";
medium_battery_color = "#f9e2af"; medium_battery_color = "#f9e2af";
low_battery_color = "#f38ba8"; low_battery_color = "#f38ba8";
gpu_core_colors = gpu_core_colors = ["#74c7ec" "#cba6f7" "#f38ba8" "#fab387" "#f9e2af" "#a6e3a1"];
[ "#74c7ec" "#cba6f7" "#f38ba8" "#fab387" "#f9e2af" "#a6e3a1" ];
arc_color = "#89dceb"; arc_color = "#89dceb";
}; };
}; };

View file

@ -1,4 +1,8 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
programs.emacs = { programs.emacs = {
# Clone emacs config from https://git.xenia.me.uk/xenia/emacs.git # Clone emacs config from https://git.xenia.me.uk/xenia/emacs.git
enable = true; enable = true;
@ -131,8 +135,17 @@
# Customised LaTeX install # Customised LaTeX install
# texlive.combined.scheme-full # texlive.combined.scheme-full
(texlive.combine { (texlive.combine {
inherit (pkgs.texlive) inherit
scheme-basic dvisvgm dvipng wrapfig amsmath ulem hyperref capt-of; (pkgs.texlive)
scheme-basic
dvisvgm
dvipng
wrapfig
amsmath
ulem
hyperref
capt-of
;
}) })
# Linters # Linters

View file

@ -1,6 +1,9 @@
{ config, lib, pkgs, ... }:
{ {
config,
lib,
pkgs,
...
}: {
programs.eww = { programs.eww = {
enable = true; enable = true;
package = pkgs.eww-wayland; package = pkgs.eww-wayland;

View file

@ -47,10 +47,8 @@
order = ["DuckDuckGo"]; order = ["DuckDuckGo"];
engines = { engines = {
"MyNixOS" = { "MyNixOS" = {
urls = urls = [{template = "https://mynixos.com/search?q={searchTerms}";}];
[{ template = "https://mynixos.com/search?q={searchTerms}"; }]; icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
icon =
"${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = ["@mn"]; definedAliases = ["@mn"];
}; };
}; };

View file

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }: { {
config,
lib,
pkgs,
...
}: {
imports = [ imports = [
../default.nix ../default.nix
../accounts/default.nix ../accounts/default.nix
@ -165,7 +170,8 @@
"notifications" "notifications"
"swaync-.*" "swaync-.*"
]; ];
in (lib.lists.forEach layers blur) in
(lib.lists.forEach layers blur)
++ (lib.lists.forEach layers ignorealpha); ++ (lib.lists.forEach layers ignorealpha);
windowrule = [ windowrule = [
# Float + move system windows # Float + move system windows
@ -213,8 +219,10 @@
"SUPER, ${toString w}, workspace, ${toString w}" "SUPER, ${toString w}, workspace, ${toString w}"
"SUPER SHIFT, ${toString w}, movetoworkspace, ${toString w}" "SUPER SHIFT, ${toString w}, movetoworkspace, ${toString w}"
]; ];
in with lib.lists; in
flatten (forEach (range 1 9) workspace) ++ [ with lib.lists;
flatten (forEach (range 1 9) workspace)
++ [
# See https://wiki.hyprland.org/Configuring/Keywords/ for more # See https://wiki.hyprland.org/Configuring/Keywords/ for more
"SUPER, F1, exec, ${pkgs.swaylock-effects}/bin/swaylock --screenshots --clock --indicator --grace-no-mouse" "SUPER, F1, exec, ${pkgs.swaylock-effects}/bin/swaylock --screenshots --clock --indicator --grace-no-mouse"
"SUPER, Q, killactive," "SUPER, Q, killactive,"
@ -234,9 +242,7 @@
"SUPER, Return, exec, foot" "SUPER, Return, exec, foot"
"SUPER SHIFT, Return, exec, emacsclient -c" "SUPER SHIFT, Return, exec, emacsclient -c"
"SUPER, S, exec, foot -e btm --group --battery" "SUPER, S, exec, foot -e btm --group --battery"
"SUPER, W, exec, nyxt --no-socket --with-file bookmarks=${ "SUPER, W, exec, nyxt --no-socket --with-file bookmarks=${../nyxt/bookmarks.lisp}"
../nyxt/bookmarks.lisp
}"
"SUPER, F, exec, thunar $HOME" "SUPER, F, exec, thunar $HOME"
# Misc useful binds # Misc useful binds

View file

@ -1,4 +1,11 @@
{ stdenvNoCC, fetchFromGitHub, gtk3, libsForQt5, gnome, hicolor-icon-theme }: {
stdenvNoCC,
fetchFromGitHub,
gtk3,
libsForQt5,
gnome,
hicolor-icon-theme,
}:
stdenvNoCC.mkDerivation rec { stdenvNoCC.mkDerivation rec {
pname = "candy-icon-theme"; pname = "candy-icon-theme";
version = "6a35be5cb133c6be8314807f55da3d795e24fb86"; version = "6a35be5cb133c6be8314807f55da3d795e24fb86";
@ -13,8 +20,7 @@ stdenvNoCC.mkDerivation rec {
nativeBuildInputs = [gtk3]; nativeBuildInputs = [gtk3];
buildInputs = buildInputs = [libsForQt5.breeze-icons gnome.adwaita-icon-theme hicolor-icon-theme];
[ libsForQt5.breeze-icons gnome.adwaita-icon-theme hicolor-icon-theme ];
dontDropIconThemeCache = true; dontDropIconThemeCache = true;

View file

@ -1,5 +1,13 @@
{ stdenvNoCC, fetchFromGitHub, gtk3, candy-icon-theme, gnome-icon-theme {
, ubuntu-themes, cinnamon, elementary-xfce-icon-theme }: stdenvNoCC,
fetchFromGitHub,
gtk3,
candy-icon-theme,
gnome-icon-theme,
ubuntu-themes,
cinnamon,
elementary-xfce-icon-theme,
}:
stdenvNoCC.mkDerivation rec { stdenvNoCC.mkDerivation rec {
pname = "sweet-folder-theme"; pname = "sweet-folder-theme";
version = "b2192ff1412472f036fdf9778c6b9dbcb6c044ec"; version = "b2192ff1412472f036fdf9778c6b9dbcb6c044ec";

View file

@ -1,4 +1,8 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
programs.rofi = { programs.rofi = {
enable = true; enable = true;
package = pkgs.rofi-wayland; package = pkgs.rofi-wayland;
@ -11,8 +15,8 @@
USERNAME_field='login' USERNAME_field='login'
''; '';
}; };
extraConfig = extraConfig = let
let power-menu = "power-menu:${pkgs.rofi-power-menu}/bin/rofi-power-menu"; power-menu = "power-menu:${pkgs.rofi-power-menu}/bin/rofi-power-menu";
in { in {
modi = "window,run,drun,ssh,${power-menu},combi"; modi = "window,run,drun,ssh,${power-menu},combi";
combi-modi = "window,drun,ssh"; combi-modi = "window,drun,ssh";

View file

@ -1,4 +1,8 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
programs.swaylock = { programs.swaylock = {
enable = true; enable = true;
package = pkgs.swaylock-effects; package = pkgs.swaylock-effects;
@ -9,9 +13,7 @@
indicator-caps-lock = true; indicator-caps-lock = true;
ignore-empty-password = true; ignore-empty-password = true;
show-failed-attempts = true; show-failed-attempts = true;
effect-blur = effect-blur = with config.wayland.windowManager.hyprland.settings.decoration.blur; "${toString size}x${toString passes}";
with config.wayland.windowManager.hyprland.settings.decoration.blur;
"${toString size}x${toString passes}";
effect-vignette = "0.5:0.5"; effect-vignette = "0.5:0.5";
fade-in = 0.2; fade-in = 0.2;
}; };

View file

@ -1,4 +1,8 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
systemd.user.targets.tray.Unit = { systemd.user.targets.tray.Unit = {
Description = "Home Manager System Tray"; Description = "Home Manager System Tray";
Requires = ["graphical-session-pre.target"]; Requires = ["graphical-session-pre.target"];
@ -155,7 +159,8 @@
tooltip-format = "{capacity}% {time}"; tooltip-format = "{capacity}% {time}";
format-icons = ["󱃍" "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"]; format-icons = ["󱃍" "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"];
}; };
"custom/notification" = let swaync = pkgs.swaynotificationcenter; "custom/notification" = let
swaync = pkgs.swaynotificationcenter;
in { in {
"tooltip" = false; "tooltip" = false;
"format" = "{icon}{}"; "format" = "{icon}{}";

View file

@ -1 +1,5 @@
{ config, pkgs, ... }: { } {
config,
pkgs,
...
}: {}

View file

@ -3,10 +3,8 @@
boot.initrd.secrets = {"/crypto_keyfile.bin" = null;}; boot.initrd.secrets = {"/crypto_keyfile.bin" = null;};
# Enable swap on luks # Enable swap on luks
boot.initrd.luks.devices."luks-761eeb11-3091-4142-9232-4fb33165eccd".device = boot.initrd.luks.devices."luks-761eeb11-3091-4142-9232-4fb33165eccd".device = "/dev/disk/by-uuid/761eeb11-3091-4142-9232-4fb33165eccd";
"/dev/disk/by-uuid/761eeb11-3091-4142-9232-4fb33165eccd"; boot.initrd.luks.devices."luks-761eeb11-3091-4142-9232-4fb33165eccd".keyFile = "/crypto_keyfile.bin";
boot.initrd.luks.devices."luks-761eeb11-3091-4142-9232-4fb33165eccd".keyFile =
"/crypto_keyfile.bin";
environment = { environment = {
etc."ppp/options".text = '' etc."ppp/options".text = ''

View file

@ -5,10 +5,8 @@
boot.initrd.secrets = {"/crypto_keyfile.bin" = null;}; boot.initrd.secrets = {"/crypto_keyfile.bin" = null;};
# Enable swap on luks # Enable swap on luks
boot.initrd.luks.devices."luks-47d34268-5100-4eba-b34d-220f4239c1cb".device = boot.initrd.luks.devices."luks-47d34268-5100-4eba-b34d-220f4239c1cb".device = "/dev/disk/by-uuid/47d34268-5100-4eba-b34d-220f4239c1cb";
"/dev/disk/by-uuid/47d34268-5100-4eba-b34d-220f4239c1cb"; boot.initrd.luks.devices."luks-47d34268-5100-4eba-b34d-220f4239c1cb".keyFile = "/crypto_keyfile.bin";
boot.initrd.luks.devices."luks-47d34268-5100-4eba-b34d-220f4239c1cb".keyFile =
"/crypto_keyfile.bin";
environment = { environment = {
etc."ppp/options".text = '' etc."ppp/options".text = ''

View file

@ -1,4 +1,8 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
boot.extraModulePackages = with config.boot.kernelPackages; [v4l2loopback]; boot.extraModulePackages = with config.boot.kernelPackages; [v4l2loopback];
boot.extraModprobeConfig = '' boot.extraModprobeConfig = ''
options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1 options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1

View file

@ -1,6 +1,9 @@
{ config, lib, pkgs, ... }:
{ {
config,
lib,
pkgs,
...
}: {
services.adguardhome = { services.adguardhome = {
enable = true; enable = true;
mutableSettings = false; mutableSettings = false;

View file

@ -1,6 +1,5 @@
{pkgs, ...}: { {pkgs, ...}: {
environment.systemPackages = with pkgs; [steamcmd]; environment.systemPackages = with pkgs; [steamcmd];
networking.firewall.allowedTCPPorts = [8777]; networking.firewall.allowedTCPPorts = [8777];
services.caddy.virtualHosts."astro.xenia.me.uk".extraConfig = services.caddy.virtualHosts."astro.xenia.me.uk".extraConfig = "reverse_proxy http://localhost:8777";
"reverse_proxy http://localhost:8777";
} }

View file

@ -18,6 +18,5 @@
}; };
appName = "Gitea"; appName = "Gitea";
}; };
services.caddy.virtualHosts."git.xenia.me.uk".extraConfig = services.caddy.virtualHosts."git.xenia.me.uk".extraConfig = "reverse_proxy http://localhost:3100";
"reverse_proxy http://localhost:3100";
} }

View file

@ -20,12 +20,12 @@
port = 9002; port = 9002;
}; };
}; };
scrapeConfigs = [{ scrapeConfigs = [
{
job_name = "legion"; job_name = "legion";
static_configs = static_configs = [{targets = ["127.0.0.1:${toString exporters.node.port}"];}];
[{ targets = [ "127.0.0.1:${toString exporters.node.port}" ]; }]; }
}]; ];
}; };
services.caddy.virtualHosts."grafana.xenia.me.uk".extraConfig = services.caddy.virtualHosts."grafana.xenia.me.uk".extraConfig = "reverse_proxy http://localhost:3000";
"reverse_proxy http://localhost:3000";
} }

View file

@ -13,17 +13,21 @@
matrix-synapse = { matrix-synapse = {
enable = true; enable = true;
settings.server_name = "xenia.me.uk"; settings.server_name = "xenia.me.uk";
settings.listeners = [{ settings.listeners = [
{
bind_addresses = ["127.0.0.1"]; bind_addresses = ["127.0.0.1"];
port = 8008; port = 8008;
type = "http"; type = "http";
tls = false; tls = false;
x_forwarded = true; x_forwarded = true;
resources = [{ resources = [
{
names = ["client" "federation"]; names = ["client" "federation"];
compress = true; compress = true;
}]; }
}]; ];
}
];
extraConfigFiles = ["/run/secrets/matrix-shared-secret"]; extraConfigFiles = ["/run/secrets/matrix-shared-secret"];
}; };
caddy.virtualHosts."xenia.me.uk".extraConfig = '' caddy.virtualHosts."xenia.me.uk".extraConfig = ''

View file

@ -10,7 +10,6 @@
MusicFolder = "/media/music"; MusicFolder = "/media/music";
}; };
}; };
caddy.virtualHosts."music.xenia.me.uk".extraConfig = caddy.virtualHosts."music.xenia.me.uk".extraConfig = "reverse_proxy http://localhost:4533";
"reverse_proxy http://localhost:4533";
}; };
} }

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
imports = [./caddy.nix]; imports = [./caddy.nix];
services.ntfy-sh = { services.ntfy-sh = {
enable = true; enable = true;
@ -12,6 +10,5 @@
enable-metrics = true; enable-metrics = true;
}; };
}; };
services.caddy.virtualHosts."ntfy.xenia.me.uk".extraConfig = services.caddy.virtualHosts."ntfy.xenia.me.uk".extraConfig = "reverse_proxy http://localhost:8800";
"reverse_proxy http://localhost:8800";
} }

View file

@ -1,6 +1,9 @@
{ config, lib, pkgs, ... }:
{ {
config,
lib,
pkgs,
...
}: {
services.openssh = { services.openssh = {
enable = true; enable = true;
ports = [22]; ports = [22];

View file

@ -1,5 +1,5 @@
{ ... }: {...}: let
let devices = [ "Ion" "Legion" "Northstar" "Vanguard" ]; devices = ["Ion" "Legion" "Northstar" "Vanguard"];
in { in {
imports = [./caddy.nix]; imports = [./caddy.nix];
services.syncthing = { services.syncthing = {
@ -10,14 +10,10 @@ in {
openDefaultPorts = true; openDefaultPorts = true;
settings = { settings = {
devices = { devices = {
"Ion".id = "Ion".id = "7DD4NPH-6T2ET5A-4FCLFWW-CS6UR2W-IO5XQXC-DM5B2Q4-6X7DGU2-UKKVEAB";
"7DD4NPH-6T2ET5A-4FCLFWW-CS6UR2W-IO5XQXC-DM5B2Q4-6X7DGU2-UKKVEAB"; "Legion".id = "3SSNCLP-ZZKNS65-7CKKGFY-KJYQU6S-P5BM7SB-MMW5ZLM-TMND6IV-ZMUO4AQ";
"Legion".id = "Northstar".id = "DJVVFUX-QRJNEUZ-OVEQ63J-KJIGNY7-O4MEOMH-GDKYHOB-BQES3O4-C3BJHQ2";
"3SSNCLP-ZZKNS65-7CKKGFY-KJYQU6S-P5BM7SB-MMW5ZLM-TMND6IV-ZMUO4AQ"; "Vanguard".id = "NCJBYBK-JRVFAAN-XO4I5AS-B5L7QD2-5PAMWX7-PHD5FQH-Q2EI32H-U3GF5AA";
"Northstar".id =
"DJVVFUX-QRJNEUZ-OVEQ63J-KJIGNY7-O4MEOMH-GDKYHOB-BQES3O4-C3BJHQ2";
"Vanguard".id =
"NCJBYBK-JRVFAAN-XO4I5AS-B5L7QD2-5PAMWX7-PHD5FQH-Q2EI32H-U3GF5AA";
}; };
folders = { folders = {
"Music" = { "Music" = {

View file

@ -38,7 +38,8 @@
}; };
virtualisation.podman.enable = true; virtualisation.podman.enable = true;
time.timeZone = "Europe/London"; time.timeZone = "Europe/London";
i18n = let locale = "en_GB.UTF-8"; i18n = let
locale = "en_GB.UTF-8";
in { in {
# Select internationalisation properties. # Select internationalisation properties.
defaultLocale = locale; defaultLocale = locale;

View file

@ -1,4 +1,8 @@
{ pkgs, user, ... }: { {
pkgs,
user,
...
}: {
imports = [./default.nix]; imports = [./default.nix];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
dex dex

View file

@ -26,19 +26,16 @@
ExtensionSettings = { ExtensionSettings = {
"queryamoid@kaply.com" = { "queryamoid@kaply.com" = {
installation_mode = "force_installed"; installation_mode = "force_installed";
install_url = install_url = "https://github.com/mkaply/queryamoid/releases/download/v0.1/query_amo_addon_id-0.1-fx.xpi";
"https://github.com/mkaply/queryamoid/releases/download/v0.1/query_amo_addon_id-0.1-fx.xpi";
}; };
"uBlock0@raymondhill.net" = { "uBlock0@raymondhill.net" = {
installation_mode = "force_installed"; installation_mode = "force_installed";
install_url = install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
"https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
}; };
# Catppuccin Mocha (Lavender) theme # Catppuccin Mocha (Lavender) theme
"{8446b178-c865-4f5c-8ccc-1d7887811ae3}" = { "{8446b178-c865-4f5c-8ccc-1d7887811ae3}" = {
installation_mode = "force_installed"; installation_mode = "force_installed";
install_url = install_url = "https://addons.mozilla.org/firefox/downloads/latest/catppuccin-mocha-lavender-git/latest.xpi";
"https://addons.mozilla.org/firefox/downloads/latest/catppuccin-mocha-lavender-git/latest.xpi";
}; };
}; };
FirefoxHome = { FirefoxHome = {

View file

@ -1,7 +1,6 @@
{pkgs, ...}: { {pkgs, ...}: {
imports = [./desktop.nix ./chromium.nix]; imports = [./desktop.nix ./chromium.nix];
nixpkgs.config.chromium.commandLineArgs = nixpkgs.config.chromium.commandLineArgs = "--enable-features=UseOzonePlatform --ozone-platform=wayland";
"--enable-features=UseOzonePlatform --ozone-platform=wayland";
environment = { environment = {
sessionVariables = { sessionVariables = {
NIXOS_OZONE_WL = "1"; NIXOS_OZONE_WL = "1";
@ -42,7 +41,8 @@
gvfs.enable = true; gvfs.enable = true;
tumbler.enable = true; tumbler.enable = true;
xserver.enable = false; xserver.enable = false;
greetd.settings = let command = "Hyprland"; greetd.settings = let
command = "Hyprland";
in { in {
default_session = {inherit command;}; default_session = {inherit command;};
initial_session = {inherit command;}; initial_session = {inherit command;};
@ -54,39 +54,24 @@
"application/pdf" = ["emacsclient.desktop" "emacs.desktop"]; "application/pdf" = ["emacsclient.desktop" "emacs.desktop"];
"application/epub+zip" = ["emacsclient.desktop" "emacs.desktop"]; "application/epub+zip" = ["emacsclient.desktop" "emacs.desktop"];
"application/oxps" = ["emacsclient.desktop" "emacs.desktop"]; "application/oxps" = ["emacsclient.desktop" "emacs.desktop"];
"image/jpeg" = "image/jpeg" = ["swayimg.desktop" "emacsclient.desktop" "emacs.desktop"];
[ "swayimg.desktop" "emacsclient.desktop" "emacs.desktop" ];
"image/png" = ["swayimg.desktop" "emacsclient.desktop" "emacs.desktop"]; "image/png" = ["swayimg.desktop" "emacsclient.desktop" "emacs.desktop"];
"video/mp4" = ["mpv.desktop"]; "video/mp4" = ["mpv.desktop"];
"text/csv" = ["emacsclient.desktop" "emacs.desktop"]; "text/csv" = ["emacsclient.desktop" "emacs.desktop"];
"text/html" = "text/html" = ["firefox.desktop" "chromium-browser.desktop" "nyxt.desktop"];
[ "firefox.desktop" "chromium-browser.desktop" "nyxt.desktop" ]; "x-scheme-handler/http" = ["firefox.desktop" "chromium-browser.desktop" "nyxt.desktop"];
"x-scheme-handler/http" = "x-scheme-handler/https" = ["firefox.desktop" "chromium-browser.desktop" "nyxt.desktop"];
[ "firefox.desktop" "chromium-browser.desktop" "nyxt.desktop" ]; "x-scheme-handler/about" = ["firefox.desktop" "chromium-browser.desktop" "nyxt.desktop"];
"x-scheme-handler/https" = "x-scheme-handler/chrome" = ["firefox.desktop" "chromium-browser.desktop" "nyxt.desktop"];
[ "firefox.desktop" "chromium-browser.desktop" "nyxt.desktop" ]; "application/x-extension-htm" = ["firefox.desktop" "chromium-browser.desktop" "nyxt.desktop"];
"x-scheme-handler/about" = "application/x-extension-html" = ["firefox.desktop" "chromium-browser.desktop" "nyxt.desktop"];
[ "firefox.desktop" "chromium-browser.desktop" "nyxt.desktop" ]; "application/x-extension-shtml" = ["firefox.desktop" "chromium-browser.desktop" "nyxt.desktop"];
"x-scheme-handler/chrome" = "application/xhtml+xml" = ["firefox.desktop" "chromium-browser.desktop" "nyxt.desktop"];
[ "firefox.desktop" "chromium-browser.desktop" "nyxt.desktop" ]; "application/x-extension-xhtml" = ["firefox.desktop" "chromium-browser.desktop" "nyxt.desktop"];
"application/x-extension-htm" = "application/x-extension-xht" = ["firefox.desktop" "chromium-browser.desktop" "nyxt.desktop"];
[ "firefox.desktop" "chromium-browser.desktop" "nyxt.desktop" ]; "application/x-mozilla-bookmarks" = ["firefox.desktop" "chromium-browser.desktop"];
"application/x-extension-html" = "x-scheme-handler/msteams" = ["firefox.desktop" "chromium-browser.desktop"];
[ "firefox.desktop" "chromium-browser.desktop" "nyxt.desktop" ]; "x-scheme-handler/zoomus" = ["firefox.desktop" "chromium-browser.desktop"];
"application/x-extension-shtml" =
[ "firefox.desktop" "chromium-browser.desktop" "nyxt.desktop" ];
"application/xhtml+xml" =
[ "firefox.desktop" "chromium-browser.desktop" "nyxt.desktop" ];
"application/x-extension-xhtml" =
[ "firefox.desktop" "chromium-browser.desktop" "nyxt.desktop" ];
"application/x-extension-xht" =
[ "firefox.desktop" "chromium-browser.desktop" "nyxt.desktop" ];
"application/x-mozilla-bookmarks" =
[ "firefox.desktop" "chromium-browser.desktop" ];
"x-scheme-handler/msteams" =
[ "firefox.desktop" "chromium-browser.desktop" ];
"x-scheme-handler/zoomus" =
[ "firefox.desktop" "chromium-browser.desktop" ];
}; };
addedAssociations = defaultApplications; addedAssociations = defaultApplications;
}; };