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

181
flake.nix
View file

@ -13,34 +13,50 @@
}; };
}; };
outputs = { nixpkgs, home-manager, stylix, ... }: outputs = {
let nixpkgs,
default = { home-manager,
hostName = "Atlas"; stylix,
user = "xenia"; ...
system = "x86_64-linux"; }: let
group = "users"; default = {
shell = "fish"; hostName = "Atlas";
systemModules = [ ./system/hyprland.nix ]; user = "xenia";
serviceModules = [ ]; system = "x86_64-linux";
homeModules = [ ./home/hyprland/default.nix ]; group = "users";
stateVersion = "23.05"; shell = "fish";
}; systemModules = [./system/hyprland.nix];
systemConfig = { hostName ? default.hostName, user ? default.user serviceModules = [];
, system ? default.system, group ? default.group, shell ? default.shell homeModules = [./home/hyprland/default.nix];
, systemModules ? default.systemModules stateVersion = "23.05";
, serviceModules ? default.serviceModules };
, homeModules ? default.homeModules, stateVersion ? default.stateVersion systemConfig = {
}: hostName ? default.hostName,
let specialArgs = { inherit hostName user; }; user ? default.user,
in nixpkgs.lib.nixosSystem { system ? default.system,
inherit system specialArgs; group ? default.group,
modules = [ shell ? default.shell,
systemModules ? default.systemModules,
serviceModules ? default.serviceModules,
homeModules ? default.homeModules,
stateVersion ? default.stateVersion,
}: let
specialArgs = {inherit hostName user;};
in
nixpkgs.lib.nixosSystem {
inherit system specialArgs;
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;
@ -61,8 +77,8 @@
nix = { nix = {
enable = true; enable = true;
settings = { settings = {
trusted-users = [ "root" user ]; trusted-users = ["root" user];
experimental-features = [ "nix-command" "flakes" ]; experimental-features = ["nix-command" "flakes"];
auto-optimise-store = true; auto-optimise-store = true;
}; };
channel.enable = true; channel.enable = true;
@ -108,7 +124,7 @@
"steam-run" "steam-run"
"nomachine-client" "nomachine-client"
]; ];
system = { inherit stateVersion; }; system = {inherit stateVersion;};
networking = { networking = {
inherit hostName; inherit hostName;
firewall.enable = true; firewall.enable = 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";
@ -159,7 +173,7 @@
}; };
fonts = { fonts = {
packages = with pkgs; [ packages = with pkgs; [
(nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; }) (nerdfonts.override {fonts = ["NerdFontsSymbolsOnly"];})
emacs-all-the-icons-fonts emacs-all-the-icons-fonts
weather-icons weather-icons
noto-fonts noto-fonts
@ -176,26 +190,24 @@
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ/ZSSCN5sqrA+tdoIZr5EUm5DRuBV4dQ7J+QBEtUwUU xenia@Northstar" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ/ZSSCN5sqrA+tdoIZr5EUm5DRuBV4dQ7J+QBEtUwUU xenia@Northstar"
]; ];
in { in {
root.openssh = { inherit authorizedKeys; }; root.openssh = {inherit authorizedKeys;};
${user} = { ${user} = {
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; };
}; };
}; };
home-manager = { home-manager = {
extraSpecialArgs = { inherit hostName; }; extraSpecialArgs = {inherit hostName;};
useGlobalPkgs = true; useGlobalPkgs = true;
useUserPackages = true; useUserPackages = true;
users = { users = {
root = { root = {
imports = [ ./home/default.nix ]; imports = [./home/default.nix];
home = { home = {
inherit stateVersion; inherit stateVersion;
username = "root"; username = "root";
@ -208,9 +220,9 @@
homeDirectory = "/home/${user}"; homeDirectory = "/home/${user}";
in { in {
imports = imports =
[ ./hosts/${hostName}/home.nix ./home/default.nix ] [./hosts/${hostName}/home.nix ./home/default.nix]
++ homeModules; ++ homeModules;
home = { inherit username homeDirectory stateVersion; }; home = {inherit username homeDirectory stateVersion;};
programs.home-manager.enable = true; programs.home-manager.enable = true;
xdg.userDirs = { xdg.userDirs = {
enable = true; enable = true;
@ -223,20 +235,22 @@
}; };
}; };
}) })
] ++ systemModules ++ serviceModules; ]
}; ++ systemModules
in { ++ serviceModules;
nixosConfigurations = { };
in {
nixosConfigurations = {
## Server
## Server Legion = let
hostName = "Legion";
Legion = let user = "xenia";
hostName = "Legion"; system = "x86_64-linux";
user = "xenia"; in
system = "x86_64-linux"; systemConfig {
in systemConfig {
inherit hostName user system; inherit hostName user system;
systemModules = [ ./system/default.nix ]; systemModules = [./system/default.nix];
serviceModules = [ serviceModules = [
./services/adguardhome.nix ./services/adguardhome.nix
./services/caddy.nix ./services/caddy.nix
@ -246,43 +260,46 @@
./services/sshd.nix ./services/sshd.nix
./services/syncthing.nix ./services/syncthing.nix
]; ];
homeModules = [ ./home/default.nix ]; homeModules = [./home/default.nix];
}; };
## Personal ## Personal
Northstar = let Northstar = let
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];
}; };
Vanguard = let Vanguard = let
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];
}; };
## Work ## Work
Ronin = let Ronin = let
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 +1 @@
{ ... }: { imports = [ ./pass.nix ./email.nix ]; } {...}: {imports = [./pass.nix ./email.nix];}

View file

@ -1,8 +1,15 @@
{ config, lib, pkgs, hostName, ... }: { {
home.packages = with pkgs; [ davmail ]; config,
lib,
pkgs,
hostName,
...
}: {
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";
@ -21,17 +28,15 @@
port = 1025; port = 1025;
}; };
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,14 +59,13 @@
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";
expunge = "both"; expunge = "both";
remove = "both"; remove = "both";
patterns = [ "*" "!Notes" ]; patterns = ["*" "!Notes"];
subFolders = "Verbatim"; subFolders = "Verbatim";
}; };
msmtp.enable = lib.mkDefault accountEnabled; msmtp.enable = lib.mkDefault accountEnabled;
@ -83,10 +88,9 @@
port = 1026; port = 1026;
}; };
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";
@ -120,25 +124,25 @@
mbsync = { mbsync = {
enable = true; enable = true;
groups.inboxes = { groups.inboxes = {
proton = [ "INBOX" ]; proton = ["INBOX"];
icloud = [ "INBOX" ]; icloud = ["INBOX"];
outlook = [ "INBOX" ]; outlook = ["INBOX"];
}; };
}; };
}; };
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 = {
Description = "Podman container-protonmail-bridge.service"; Description = "Podman container-protonmail-bridge.service";
Documentation = [ "man:podman-generate-systemd(1)" ]; Documentation = ["man:podman-generate-systemd(1)"];
Wants = [ "network-online.target" ]; Wants = ["network-online.target"];
After = [ "network-online.target" ]; After = ["network-online.target"];
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 = ''
@ -165,26 +169,23 @@
Type = "notify"; Type = "notify";
NotifyAccess = "all"; NotifyAccess = "all";
}; };
Install.WantedBy = [ "default.target" ]; Install.WantedBy = ["default.target"];
}; };
davmail = lib.mkIf emailAccounts.outlook.mbsync.enable { davmail = lib.mkIf emailAccounts.outlook.mbsync.enable {
Unit = { Unit = {
Description = "Davmail server"; Description = "Davmail server";
Wants = [ "network-online.target" ]; Wants = ["network-online.target"];
After = [ "network-online.target" ]; After = ["network-online.target"];
}; };
Service = { Service = {
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,12 +1,18 @@
{ 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 =
(exts: with exts; [ pass-otp pass-update pass-audit pass-import ]); pkgs.pass-nodmenu.withExtensions
(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";
PASSWORD_STORE_ENABLE_EXTENSIONS = "true"; PASSWORD_STORE_ENABLE_EXTENSIONS = "true";

View file

@ -1,4 +1,4 @@
{ ... }: { {...}: {
# TODO: ipython config file # TODO: ipython config file
xdg.configFile = { xdg.configFile = {
"bat/themes/Catppuccin-mocha.tmTheme".source = ./Catppuccin-mocha.tmTheme; "bat/themes/Catppuccin-mocha.tmTheme".source = ./Catppuccin-mocha.tmTheme;

View file

@ -1,5 +1,5 @@
{ lib, ... }: { {lib, ...}: {
imports = [ ./config/default.nix ./scripts/default.nix ]; imports = [./config/default.nix ./scripts/default.nix];
stylix.targets = { stylix.targets = {
avizo.enable = true; avizo.enable = true;
firefox.enable = true; firefox.enable = true;
@ -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";
}; };
}; };
@ -49,7 +47,7 @@
git = true; git = true;
icons = true; icons = true;
enableAliases = true; enableAliases = true;
extraOptions = [ "--octal-permissions" ]; extraOptions = ["--octal-permissions"];
}; };
readline = { readline = {
enable = true; enable = true;
@ -126,9 +124,9 @@
enableFishIntegration = true; enableFishIntegration = true;
enableTransience = true; enableTransience = true;
settings = { settings = {
c = { symbol = " "; }; c = {symbol = " ";};
command_timeout = 1000; command_timeout = 1000;
container = { symbol = " "; }; container = {symbol = " ";};
add_newline = false; add_newline = false;
character = { character = {
success_symbol = "[!](bold green)"; success_symbol = "[!](bold green)";
@ -144,7 +142,7 @@
git_branch = { git_branch = {
symbol = " "; symbol = " ";
only_attached = true; only_attached = true;
ignore_branches = [ "master" "main" ]; ignore_branches = ["master" "main"];
}; };
git_commit = { git_commit = {
format = "[󰜘 $hash | $tag]($style) "; format = "[󰜘 $hash | $tag]($style) ";
@ -166,16 +164,16 @@
untracked = " "; untracked = " ";
typechanged = " "; typechanged = " ";
}; };
golang = { symbol = " "; }; golang = {symbol = " ";};
guix_shell = { symbol = " "; }; guix_shell = {symbol = " ";};
haskell = { symbol = " "; }; haskell = {symbol = " ";};
hostname = { hostname = {
ssh_only = true; ssh_only = true;
ssh_symbol = "󰢹 "; ssh_symbol = "󰢹 ";
}; };
java = { symbol = " "; }; java = {symbol = " ";};
localip = { disabled = false; }; localip = {disabled = false;};
lua = { symbol = " "; }; lua = {symbol = " ";};
memory_usage = { memory_usage = {
disabled = false; disabled = false;
symbol = "󰍛 "; symbol = "󰍛 ";
@ -214,12 +212,12 @@
Windows = " "; Windows = " ";
}; };
}; };
package = { symbol = "󰏗 "; }; package = {symbol = "󰏗 ";};
python = { python = {
symbol = "󰌠 "; symbol = "󰌠 ";
python_binary = "python3"; python_binary = "python3";
}; };
rust = { symbol = "󱘗 "; }; rust = {symbol = "󱘗 ";};
shell = { shell = {
disabled = false; disabled = false;
format = "using [$indicator ]($style)"; format = "using [$indicator ]($style)";
@ -228,7 +226,7 @@
powershell_indicator = "󰨊 "; powershell_indicator = "󰨊 ";
unknown_indicator = "󱔢 "; unknown_indicator = "󱔢 ";
}; };
status = { }; status = {};
sudo = { sudo = {
disabled = false; disabled = false;
symbol = "󰪋 "; symbol = "󰪋 ";

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;
@ -113,7 +117,7 @@
imagemagick imagemagick
languagetool languagetool
wordnet wordnet
(aspellWithDicts (ds: with ds; [ en en-computers en-science ])) (aspellWithDicts (ds: with ds; [en en-computers en-science]))
# For org-plot # For org-plot
gnuplot gnuplot
@ -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

@ -1,5 +1,5 @@
{ pkgs, ... }: { {pkgs, ...}: {
stylix.targets.firefox.profileNames = [ "default" ]; stylix.targets.firefox.profileNames = ["default"];
programs.firefox = { programs.firefox = {
enable = true; enable = true;
package = null; # Use system Firefox package = null; # Use system Firefox
@ -44,14 +44,12 @@
search = { search = {
default = "DuckDuckGo"; default = "DuckDuckGo";
force = true; force = true;
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 = definedAliases = ["@mn"];
"${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
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
@ -34,7 +39,7 @@
urgent = true; urgent = true;
notify = true; notify = true;
}; };
mouse = { hide-when-typing = "yes"; }; mouse = {hide-when-typing = "yes";};
}; };
}; };
gtk = { gtk = {
@ -50,7 +55,7 @@
}; };
theme = { theme = {
package = pkgs.catppuccin-gtk.override { package = pkgs.catppuccin-gtk.override {
accents = [ "lavender" ]; accents = ["lavender"];
size = "standard"; size = "standard";
variant = "mocha"; variant = "mocha";
}; };
@ -58,7 +63,7 @@
}; };
}; };
xdg.configFile = { xdg.configFile = {
"hypr/extra.conf" = lib.mkDefault { text = ""; }; "hypr/extra.conf" = lib.mkDefault {text = "";};
"hypr/hyprpaper.conf".text = '' "hypr/hyprpaper.conf".text = ''
preload = ${config.stylix.image} preload = ${config.stylix.image}
wallpaper = ,${config.stylix.image} wallpaper = ,${config.stylix.image}
@ -69,7 +74,7 @@
xwayland.enable = true; xwayland.enable = true;
systemd.enable = true; systemd.enable = true;
settings = { settings = {
monitor = [ ",preferred,auto,auto" ]; monitor = [",preferred,auto,auto"];
env = with config; [ env = with config; [
"XDG_CURRENT_DESKTOP=Hyprland" "XDG_CURRENT_DESKTOP=Hyprland"
"XDG_SESSION_TYPE=wayland" "XDG_SESSION_TYPE=wayland"
@ -165,8 +170,9 @@
"notifications" "notifications"
"swaync-.*" "swaync-.*"
]; ];
in (lib.lists.forEach layers blur) in
++ (lib.lists.forEach layers ignorealpha); (lib.lists.forEach layers blur)
++ (lib.lists.forEach layers ignorealpha);
windowrule = [ windowrule = [
# Float + move system windows # Float + move system windows
"float,org.kde.polkit-kde-authentication-agent-1|Pinentry" "float,org.kde.polkit-kde-authentication-agent-1|Pinentry"
@ -213,61 +219,61 @@
"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;
# See https://wiki.hyprland.org/Configuring/Keywords/ for more flatten (forEach (range 1 9) workspace)
"SUPER, F1, exec, ${pkgs.swaylock-effects}/bin/swaylock --screenshots --clock --indicator --grace-no-mouse" ++ [
"SUPER, Q, killactive," # See https://wiki.hyprland.org/Configuring/Keywords/ for more
"SUPER SHIFT, Q, exec, rofi -replace -show power-menu" "SUPER, F1, exec, ${pkgs.swaylock-effects}/bin/swaylock --screenshots --clock --indicator --grace-no-mouse"
"SUPER, V, togglefloating" "SUPER, Q, killactive,"
"SUPER, M, fullscreen, 0" "SUPER SHIFT, Q, exec, rofi -replace -show power-menu"
"SUPER SHIFT, M, fullscreen, 1" "SUPER, V, togglefloating"
"SUPER, tab, exec, rofi -replace -show window" "SUPER, M, fullscreen, 0"
"SUPER, P, exec, pkill rofi || rofi-pass" "SUPER SHIFT, M, fullscreen, 1"
"SUPER SHIFT, P, exec, pkill rofi || rofi-pass --last-used" "SUPER, tab, exec, rofi -replace -show window"
"SUPER ALT, P, exec, pkill rofi || rofi-pass --insert" "SUPER, P, exec, pkill rofi || rofi-pass"
"SUPER, Z, exec, swaync-client -t -sw" "SUPER SHIFT, P, exec, pkill rofi || rofi-pass --last-used"
"SUPER SHIFT, Z, exec, swaync-client -d -sw" "SUPER ALT, P, exec, pkill rofi || rofi-pass --insert"
"SUPER, Z, exec, swaync-client -t -sw"
"SUPER SHIFT, Z, exec, swaync-client -d -sw"
# Common program shortcuts # Common program shortcuts
"SUPER, Space, exec, rofi -replace -show combi" "SUPER, Space, exec, rofi -replace -show combi"
"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
'',Print,exec,${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)"'' '',Print,exec,${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)"''
",XF86Calculator,exec,rofi -replace -show calc" ",XF86Calculator,exec,rofi -replace -show calc"
# Movement binds # Movement binds
"SUPER, H, movefocus, l" "SUPER, H, movefocus, l"
"SUPER, L, movefocus, r" "SUPER, L, movefocus, r"
"SUPER, K, movefocus, u" "SUPER, K, movefocus, u"
"SUPER, J, movefocus, d" "SUPER, J, movefocus, d"
"SUPER SHIFT, H, movewindow, l" "SUPER SHIFT, H, movewindow, l"
"SUPER SHIFT, L, movewindow, r" "SUPER SHIFT, L, movewindow, r"
"SUPER SHIFT, K, movewindow, u" "SUPER SHIFT, K, movewindow, u"
"SUPER SHIFT, J, movewindow, d" "SUPER SHIFT, J, movewindow, d"
# Special workspaces # Special workspaces
"SUPER, comma, workspace, r-1" "SUPER, comma, workspace, r-1"
"SUPER SHIFT, comma, movetoworkspace, r-1" "SUPER SHIFT, comma, movetoworkspace, r-1"
"SUPER, period, workspace, r+1" "SUPER, period, workspace, r+1"
"SUPER SHIFT, period, movetoworkspace, r+1" "SUPER SHIFT, period, movetoworkspace, r+1"
"SUPER, N, workspace, empty" "SUPER, N, workspace, empty"
"SUPER SHIFT, N, movetoworkspace, empty" "SUPER SHIFT, N, movetoworkspace, empty"
"SUPER, minus, togglespecialworkspace" "SUPER, minus, togglespecialworkspace"
"SUPER SHIFT, minus, movetoworkspace, special" "SUPER SHIFT, minus, movetoworkspace, special"
"SUPER, bracketright, focusmonitor, +1" "SUPER, bracketright, focusmonitor, +1"
"SUPER SHIFT, bracketright, movecurrentworkspacetomonitor, +1" "SUPER SHIFT, bracketright, movecurrentworkspacetomonitor, +1"
"SUPER, bracketleft, focusmonitor, -1" "SUPER, bracketleft, focusmonitor, -1"
"SUPER SHIFT, bracketleft, movecurrentworkspacetomonitor, -1" "SUPER SHIFT, bracketleft, movecurrentworkspacetomonitor, -1"
"SUPER, O, focusurgentorlast" "SUPER, O, focusurgentorlast"
]; ];
bindl = [ bindl = [
# Sound # Sound
",XF86AudioMute,exec,${pkgs.avizo}/bin/volumectl %" ",XF86AudioMute,exec,${pkgs.avizo}/bin/volumectl %"

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { {pkgs, ...}: {
home.packages = [ pkgs.nyxt ]; home.packages = [pkgs.nyxt];
xdg.configFile."nyxt/config.lisp".source = ./config.lisp; xdg.configFile."nyxt/config.lisp".source = ./config.lisp;
} }

View file

@ -1,6 +1,6 @@
{ pkgs, ... }: { {pkgs, ...}: {
xdg.configFile."obs-studio/themes".source = ./themes; xdg.configFile."obs-studio/themes".source = ./themes;
home.packages = with pkgs; [ helvum ]; home.packages = with pkgs; [helvum];
programs.obs-studio = { programs.obs-studio = {
enable = true; enable = true;
plugins = with pkgs.obs-studio-plugins; [ plugins = with pkgs.obs-studio-plugins; [

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";
@ -11,10 +18,9 @@ stdenvNoCC.mkDerivation rec {
sha256 = "sha256-M58ts/xyVf+ZDidd4MEp/LlU3vk2imEwOnb0/sVJUYo="; sha256 = "sha256-M58ts/xyVf+ZDidd4MEp/LlU3vk2imEwOnb0/sVJUYo=";
}; };
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";
@ -12,7 +20,7 @@ stdenvNoCC.mkDerivation rec {
sha256 = "sha256-QexfqXH5a1IEhKBRjWSMdrEvThvLRzd4M32Xti1DCGE="; sha256 = "sha256-QexfqXH5a1IEhKBRjWSMdrEvThvLRzd4M32Xti1DCGE=";
}; };
nativeBuildInputs = [ gtk3 ]; nativeBuildInputs = [gtk3];
buildInputs = [ buildInputs = [
candy-icon-theme candy-icon-theme

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,27 +15,27 @@
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";
sidebar-mode = true; sidebar-mode = true;
sort = true; sort = true;
sorting-method = "fzf"; sorting-method = "fzf";
matching = "fuzzy"; matching = "fuzzy";
icon-theme = config.gtk.iconTheme.name; icon-theme = config.gtk.iconTheme.name;
show-icons = true; show-icons = true;
application-fallback-icon = "󰋙 "; application-fallback-icon = "󰋙 ";
drun-display-format = "{icon} {name} ({categories})"; drun-display-format = "{icon} {name} ({categories})";
disable-history = false; disable-history = false;
hide-scrollbar = true; hide-scrollbar = true;
display-window = " 󰧨 Move "; display-window = " 󰧨 Move ";
display-run = " 󰅴 Run "; display-run = " 󰅴 Run ";
display-drun = " 󱓞 Apps "; display-drun = " 󱓞 Apps ";
display-ssh = " 󰢹 SSH "; display-ssh = " 󰢹 SSH ";
display-combi = " 󰛡 Combi "; display-combi = " 󰛡 Combi ";
display-power-menu = " 󰐥 Power "; display-power-menu = " 󰐥 Power ";
}; };
}; };
} }

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { {pkgs, ...}: {
home.packages = [ home.packages = [
(pkgs.writeShellScriptBin "nixos-update" (pkgs.writeShellScriptBin "nixos-update"
(builtins.readFile ./nixos-update.sh)) (builtins.readFile ./nixos-update.sh))

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 +1 @@
{ ... }: { xdg.configFile."swaync/style.css".source = ./style.css; } {...}: {xdg.configFile."swaync/style.css".source = ./style.css;}

View file

@ -1,7 +1,11 @@
{ 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"];
}; };
programs.waybar = { programs.waybar = {
enable = true; enable = true;
@ -14,8 +18,8 @@
layer = "top"; layer = "top";
position = "top"; position = "top";
# Layout # Layout
"modules-left" = [ "hyprland/window" "mpris" ]; "modules-left" = ["hyprland/window" "mpris"];
"modules-center" = [ "hyprland/workspaces" ]; "modules-center" = ["hyprland/workspaces"];
"modules-right" = [ "modules-right" = [
"custom/notification" "custom/notification"
"pulseaudio" "pulseaudio"
@ -26,7 +30,7 @@
"tray" "tray"
]; ];
# Module config # Module config
"custom/separator" = { format = "|"; }; "custom/separator" = {format = "|";};
"hyprland/window" = { "hyprland/window" = {
"format" = "{title}"; "format" = "{title}";
# TODO workspace rewrites # TODO workspace rewrites
@ -54,19 +58,19 @@
show-special = false; show-special = false;
sort-by = "id"; sort-by = "id";
persistent-workspaces = { persistent-workspaces = {
"1" = [ ]; "1" = [];
"2" = [ ]; "2" = [];
"3" = [ ]; "3" = [];
"4" = [ ]; "4" = [];
"5" = [ ]; "5" = [];
"6" = [ ]; "6" = [];
}; };
}; };
mpris = { mpris = {
"format" = "> {player_icon} {player}"; "format" = "> {player_icon} {player}";
"tooltip-format" = "{player_icon} ({player}) {dynamic}"; "tooltip-format" = "{player_icon} ({player}) {dynamic}";
"interval" = 1; "interval" = 1;
"dynamic-order" = [ "album" "artist" "title" "position" "length" ]; "dynamic-order" = ["album" "artist" "title" "position" "length"];
"player-icons" = { "player-icons" = {
"default" = "󰲸 "; "default" = "󰲸 ";
"emms" = " "; "emms" = " ";
@ -78,7 +82,7 @@
"paused" = "󰏤"; "paused" = "󰏤";
"stopped" = "󰓛"; "stopped" = "󰓛";
}; };
"ignored-players" = [ ]; "ignored-players" = [];
}; };
pulseaudio = { pulseaudio = {
scroll-step = 5; scroll-step = 5;
@ -88,7 +92,7 @@
format-source-muted = "󰍭"; format-source-muted = "󰍭";
format-icons = { format-icons = {
car = "󰄍"; car = "󰄍";
default = [ "󰕿" "󰖀" "󰕾" ]; default = ["󰕿" "󰖀" "󰕾"];
hands-free = "󰥰"; hands-free = "󰥰";
headset = "󰋎"; headset = "󰋎";
phone = "󰏲"; phone = "󰏲";
@ -109,11 +113,11 @@
format = "󰻠 {usage}%"; format = "󰻠 {usage}%";
tooltip = false; tooltip = false;
}; };
memory = { format = "󰍛 {}%"; }; memory = {format = "󰍛 {}%";};
temperature = { temperature = {
critical-threshold = 80; critical-threshold = 80;
format = "{icon} {temperatureC}°C"; format = "{icon} {temperatureC}°C";
format-icons = [ "󱃃" "󰔏" "󱃂" ]; format-icons = ["󱃃" "󰔏" "󱃂"];
}; };
clock = { clock = {
format = "{:󰃭 %Y-%m-%d 󰥔 %R}"; format = "{:󰃭 %Y-%m-%d 󰥔 %R}";
@ -142,7 +146,7 @@
backlight = { backlight = {
format = "{icon} "; format = "{icon} ";
tooltip-format = "{percent}%"; tooltip-format = "{percent}%";
format-icons = [ "" "" "" "" "" "" "" "" "" ]; format-icons = ["" "" "" "" "" "" "" "" ""];
}; };
battery = { battery = {
states = { states = {
@ -153,9 +157,10 @@
format-charging = "󰂄 "; format-charging = "󰂄 ";
format-plugged = "󰚥 "; format-plugged = "󰚥 ";
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,4 +1,4 @@
{ ... }: { {...}: {
users.mutableUsers = false; users.mutableUsers = false;
system.autoUpgrade = { system.autoUpgrade = {
enable = true; enable = true;

View file

@ -1 +1 @@
{ } {}

View file

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

View file

@ -1,4 +1,4 @@
{ ... }: { {...}: {
wayland.windowManager.hyprland.settings.monitor = [ wayland.windowManager.hyprland.settings.monitor = [
"eDP-1,preferred,0x0,1.00" "eDP-1,preferred,0x0,1.00"
"desc:Acer Technologies ED270R TJMEE0043W01,highrr,-192x-1080,1.00" "desc:Acer Technologies ED270R TJMEE0043W01,highrr,-192x-1080,1.00"

View file

@ -1,17 +1,15 @@
{ pkgs, ... }: { {pkgs, ...}: {
# Setup keyfile # Setup keyfile
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 = ''
ipcp-accept-remote ipcp-accept-remote
''; '';
systemPackages = with pkgs; [ openfortivpn samba nomachine-client ]; systemPackages = with pkgs; [openfortivpn samba nomachine-client];
}; };
} }

View file

@ -1,4 +1,4 @@
{ ... }: { {...}: {
programs.git.userEmail = "evie.litherland-smith@ukaea.uk"; programs.git.userEmail = "evie.litherland-smith@ukaea.uk";
accounts.email.accounts = { accounts.email.accounts = {
proton.primary = false; proton.primary = false;

View file

@ -1,19 +1,17 @@
{ pkgs, ... }: { {pkgs, ...}: {
boot.loader.efi.efiSysMountPoint = "/boot/efi"; boot.loader.efi.efiSysMountPoint = "/boot/efi";
# Setup keyfile # Setup keyfile
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 = ''
ipcp-accept-remote ipcp-accept-remote
''; '';
systemPackages = with pkgs; [ openfortivpn samba nomachine-client ]; systemPackages = with pkgs; [openfortivpn samba nomachine-client];
}; };
} }

View file

@ -1,4 +1,4 @@
{ ... }: { {...}: {
programs.git.userEmail = "evie.litherland-smith@ukaea.uk"; programs.git.userEmail = "evie.litherland-smith@ukaea.uk";
accounts.email.accounts = { accounts.email.accounts = {
proton.primary = false; proton.primary = false;
@ -6,6 +6,6 @@
}; };
wayland.windowManager.hyprland.settings = { wayland.windowManager.hyprland.settings = {
misc.force_default_wallpaper = 0; misc.force_default_wallpaper = 0;
monitor = [ "desc:Dell Inc. DELL P3223QE CCG8YN3,highres,0x0,1.5" ]; monitor = ["desc:Dell Inc. DELL P3223QE CCG8YN3,highres,0x0,1.5"];
}; };
} }

View file

@ -1,9 +1,13 @@
{ config, pkgs, ... }: { {
boot.extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ]; config,
pkgs,
...
}: {
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
''; '';
hardware.opengl.driSupport32Bit = true; hardware.opengl.driSupport32Bit = true;
hardware.opengl.extraPackages = with pkgs; [ amdvlk rocmPackages.clr.icd ]; hardware.opengl.extraPackages = with pkgs; [amdvlk rocmPackages.clr.icd];
hardware.opengl.extraPackages32 = [ pkgs.driversi686Linux.amdvlk ]; hardware.opengl.extraPackages32 = [pkgs.driversi686Linux.amdvlk];
} }

View file

@ -1,4 +1,4 @@
{ ... }: { {...}: {
wayland.windowManager.hyprland.settings.monitor = [ wayland.windowManager.hyprland.settings.monitor = [
"desc:Acer Technologies ED270R TJMEE0043W01,highrr,0x0,1.00,vrr,2" "desc:Acer Technologies ED270R TJMEE0043W01,highrr,0x0,1.00,vrr,2"
"desc:Ancor Communications Inc VS278 FALMQS032358,preferred,-1920x0,1.00,vrr,0" "desc:Ancor Communications Inc VS278 FALMQS032358,preferred,-1920x0,1.00,vrr,0"

View file

@ -1,14 +1,17 @@
{ config, lib, pkgs, ... }:
{ {
config,
lib,
pkgs,
...
}: {
services.adguardhome = { services.adguardhome = {
enable = true; enable = true;
mutableSettings = false; mutableSettings = false;
settings = rec { settings = rec {
http.address = "0.0.0.0:3200"; http.address = "0.0.0.0:3200";
dns = { dns = {
bind_hosts = [ "127.0.0.1" "192.168.1.230" ]; bind_hosts = ["127.0.0.1" "192.168.1.230"];
bootstrap_dns = [ "9.9.9.9" "149.112.112.10" ]; bootstrap_dns = ["9.9.9.9" "149.112.112.10"];
ratelimit = 0; ratelimit = 0;
safe_search.enabled = true; safe_search.enabled = true;
rewrites = [ rewrites = [
@ -21,20 +24,20 @@
answer = "192.168.1.230"; answer = "192.168.1.230";
} }
]; ];
blocked_services.ids = [ ]; blocked_services.ids = [];
}; };
filtering = { inherit (dns) safe_search rewrites blocked_services; }; filtering = {inherit (dns) safe_search rewrites blocked_services;};
querylog.ignored = [ querylog.ignored = [
"discovery.syncthing.net" "discovery.syncthing.net"
"discovery-v6.syncthing.net" "discovery-v6.syncthing.net"
"matrix.tchncs.de" "matrix.tchncs.de"
]; ];
statistics = { inherit (querylog) ignored; }; statistics = {inherit (querylog) ignored;};
}; };
openFirewall = true; openFirewall = true;
}; };
networking.firewall = { networking.firewall = {
allowedTCPPorts = [ 53 ]; allowedTCPPorts = [53];
allowedUDPPorts = [ 53 ]; allowedUDPPorts = [53];
}; };
} }

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

@ -1,5 +1,5 @@
{ ... }: { {...}: {
networking.firewall.allowedTCPPorts = [ 80 443 ]; networking.firewall.allowedTCPPorts = [80 443];
services.caddy = { services.caddy = {
enable = true; enable = true;
email = "evie@xenia.me.uk"; email = "evie@xenia.me.uk";
@ -11,7 +11,7 @@
}; };
services.fail2ban = { services.fail2ban = {
enable = true; enable = true;
ignoreIP = [ "127.0.0.1/8" "::1" "192.168.1.0/16" ]; ignoreIP = ["127.0.0.1/8" "::1" "192.168.1.0/16"];
bantime-increment = { enable = true; }; bantime-increment = {enable = true;};
}; };
} }

View file

@ -1,5 +1,5 @@
{ ... }: { {...}: {
imports = [ ./caddy.nix ]; imports = [./caddy.nix];
services.gitea = { services.gitea = {
enable = true; enable = true;
settings = { settings = {
@ -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

@ -1,5 +1,5 @@
{ ... }: { {...}: {
imports = [ ./caddy.nix ]; imports = [./caddy.nix];
services.grafana = { services.grafana = {
enable = true; enable = true;
settings = { settings = {
@ -16,16 +16,16 @@
exporters = { exporters = {
node = { node = {
enable = true; enable = true;
enabledCollectors = [ "systemd" ]; enabledCollectors = ["systemd"];
port = 9002; port = 9002;
}; };
}; };
scrapeConfigs = [{ scrapeConfigs = [
job_name = "legion"; {
static_configs = job_name = "legion";
[{ targets = [ "127.0.0.1:${toString exporters.node.port}" ]; }]; static_configs = [{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

@ -1,5 +1,5 @@
{ pkgs, ... }: { {pkgs, ...}: {
imports = [ ./caddy.nix ]; imports = [./caddy.nix];
services.postgresql.enable = true; services.postgresql.enable = true;
services.postgresql.initialScript = pkgs.writeText "synapse-init.sql" '' services.postgresql.initialScript = pkgs.writeText "synapse-init.sql" ''
CREATE ROLE "matrix-synapse" WITH LOGIN PASSWORD 'synapse'; CREATE ROLE "matrix-synapse" WITH LOGIN PASSWORD 'synapse';
@ -13,18 +13,22 @@
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" ]; {
port = 8008; bind_addresses = ["127.0.0.1"];
type = "http"; port = 8008;
tls = false; type = "http";
x_forwarded = true; tls = false;
resources = [{ x_forwarded = true;
names = [ "client" "federation" ]; resources = [
compress = true; {
}]; names = ["client" "federation"];
}]; 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 = ''
header /.well-known/matrix/* Content-Type application/json header /.well-known/matrix/* Content-Type application/json

View file

@ -1,6 +1,6 @@
{ pkgs, ... }: { {pkgs, ...}: {
imports = [ ./caddy.nix ]; imports = [./caddy.nix];
environment.systemPackages = with pkgs; [ ffmpeg ]; environment.systemPackages = with pkgs; [ffmpeg];
services = { services = {
navidrome = { navidrome = {
enable = true; enable = true;
@ -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,7 +1,5 @@
{ ... }: {...}: {
imports = [./caddy.nix];
{
imports = [ ./caddy.nix ];
services.ntfy-sh = { services.ntfy-sh = {
enable = true; enable = true;
settings = { settings = {
@ -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,9 +1,12 @@
{ config, lib, pkgs, ... }:
{ {
config,
lib,
pkgs,
...
}: {
services.openssh = { services.openssh = {
enable = true; enable = true;
ports = [ 22 ]; ports = [22];
settings = { settings = {
UseDns = true; UseDns = true;
PermitRootLogin = "without-password"; PermitRootLogin = "without-password";

View file

@ -1,7 +1,7 @@
{ ... }: {...}: let
let devices = [ "Ion" "Legion" "Northstar" "Vanguard" ]; devices = ["Ion" "Legion" "Northstar" "Vanguard"];
in { in {
imports = [ ./caddy.nix ]; imports = [./caddy.nix];
services.syncthing = { services.syncthing = {
enable = true; enable = true;
systemService = true; systemService = true;
@ -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

@ -1,5 +1,5 @@
{ pkgs, ... }: { {pkgs, ...}: {
environment.systemPackages = [ pkgs.chromium ]; environment.systemPackages = [pkgs.chromium];
programs.chromium = rec { programs.chromium = rec {
enable = true; enable = true;
defaultSearchProviderEnabled = true; defaultSearchProviderEnabled = true;
@ -25,7 +25,7 @@
"SyncDisabled" = true; "SyncDisabled" = true;
"PasswordManagerEnabled" = false; "PasswordManagerEnabled" = false;
"SpellcheckEnabled" = true; "SpellcheckEnabled" = true;
"SpellcheckLanguage" = [ "en-GB" ]; "SpellcheckLanguage" = ["en-GB"];
"AllowDinosaurEasterEgg" = true; "AllowDinosaurEasterEgg" = true;
"AllowSystemNotifications" = true; "AllowSystemNotifications" = true;
"AutoFillEnabled" = false; "AutoFillEnabled" = false;

View file

@ -1,7 +1,7 @@
{ pkgs, ... }: { {pkgs, ...}: {
networking = { networking = {
networkmanager.enable = true; networkmanager.enable = true;
nameservers = [ "9.9.9.9" ]; nameservers = ["9.9.9.9"];
}; };
environment = { environment = {
systemPackages = with pkgs; [ systemPackages = with pkgs; [
@ -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,5 +1,9 @@
{ pkgs, user, ... }: { {
imports = [ ./default.nix ]; pkgs,
user,
...
}: {
imports = [./default.nix];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
dex dex
libnotify libnotify
@ -15,10 +19,10 @@
hardware.bluetooth.enable = true; hardware.bluetooth.enable = true;
services = { services = {
accounts-daemon.enable = true; accounts-daemon.enable = true;
dbus.packages = with pkgs; [ gcr ]; dbus.packages = with pkgs; [gcr];
greetd = { greetd = {
enable = true; enable = true;
settings.initial_session = { inherit user; }; settings.initial_session = {inherit user;};
}; };
pipewire = { pipewire = {
enable = true; enable = true;

View file

@ -1,7 +1,7 @@
{ ... }: { {...}: {
programs.firefox = { programs.firefox = {
enable = true; enable = true;
languagePacks = [ "en-GB" ]; languagePacks = ["en-GB"];
policies = { policies = {
Cookies = { Cookies = {
Behavior = "reject-tracker-and-partition-foreign"; Behavior = "reject-tracker-and-partition-foreign";
@ -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 = {
@ -52,7 +49,7 @@
Locked = true; Locked = true;
}; };
ManagedBookmarks = [ ManagedBookmarks = [
{ toplevel_name = "Managed Bookmarks"; } {toplevel_name = "Managed Bookmarks";}
{ {
name = "Server"; name = "Server";
children = [ children = [
@ -120,9 +117,9 @@
NoDefaultBookmarks = true; NoDefaultBookmarks = true;
OfferToSaveLogins = false; OfferToSaveLogins = false;
PasswordManagerEnabled = false; PasswordManagerEnabled = false;
PopupBlocking = { Default = true; }; PopupBlocking = {Default = true;};
RequestedLocales = [ "en-GB" ]; RequestedLocales = ["en-GB"];
SearchEngines = { Default = "DuckDuckGo"; }; SearchEngines = {Default = "DuckDuckGo";};
ShowHomeButton = false; ShowHomeButton = false;
StartDownloadsInTempDirectory = true; StartDownloadsInTempDirectory = true;
}; };

View file

@ -1,8 +1,8 @@
{ pkgs, ... }: { {pkgs, ...}: {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
prismlauncher prismlauncher
(retroarch.override { (retroarch.override {
cores = with libretro; [ dolphin mgba mupen64plus ]; cores = with libretro; [dolphin mgba mupen64plus];
}) })
]; ];
hardware.steam-hardware.enable = true; hardware.steam-hardware.enable = true;

View file

@ -1,5 +1,5 @@
{ ... }: { {...}: {
imports = [ ./desktop.nix ./games.nix ]; imports = [./desktop.nix ./games.nix];
services = { services = {
greetd.settings = let greetd.settings = let
command = '' command = ''
@ -9,8 +9,8 @@
--hide-cursor-delay 5 --steam -- steam -gamepadui --hide-cursor-delay 5 --steam -- steam -gamepadui
''; '';
in { in {
default_session = { inherit command; }; default_session = {inherit command;};
initial_session = { inherit command; }; initial_session = {inherit command;};
}; };
}; };
programs.steam.gamescopeSession.enable = true; programs.steam.gamescopeSession.enable = true;

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";
@ -35,58 +34,44 @@
webcord webcord
]; ];
}; };
security.pam.services.swaylock = { }; security.pam.services.swaylock = {};
services = { services = {
blueman.enable = true; blueman.enable = true;
udisks2.enable = true; udisks2.enable = true;
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;};
}; };
}; };
xdg.mime = rec { xdg.mime = rec {
enable = true; enable = true;
defaultApplications = { defaultApplications = {
"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" = ["firefox.desktop" "chromium-browser.desktop" "nyxt.desktop"];
"text/html" = "x-scheme-handler/http" = ["firefox.desktop" "chromium-browser.desktop" "nyxt.desktop"];
[ "firefox.desktop" "chromium-browser.desktop" "nyxt.desktop" ]; "x-scheme-handler/https" = ["firefox.desktop" "chromium-browser.desktop" "nyxt.desktop"];
"x-scheme-handler/http" = "x-scheme-handler/about" = ["firefox.desktop" "chromium-browser.desktop" "nyxt.desktop"];
[ "firefox.desktop" "chromium-browser.desktop" "nyxt.desktop" ]; "x-scheme-handler/chrome" = ["firefox.desktop" "chromium-browser.desktop" "nyxt.desktop"];
"x-scheme-handler/https" = "application/x-extension-htm" = ["firefox.desktop" "chromium-browser.desktop" "nyxt.desktop"];
[ "firefox.desktop" "chromium-browser.desktop" "nyxt.desktop" ]; "application/x-extension-html" = ["firefox.desktop" "chromium-browser.desktop" "nyxt.desktop"];
"x-scheme-handler/about" = "application/x-extension-shtml" = ["firefox.desktop" "chromium-browser.desktop" "nyxt.desktop"];
[ "firefox.desktop" "chromium-browser.desktop" "nyxt.desktop" ]; "application/xhtml+xml" = ["firefox.desktop" "chromium-browser.desktop" "nyxt.desktop"];
"x-scheme-handler/chrome" = "application/x-extension-xhtml" = ["firefox.desktop" "chromium-browser.desktop" "nyxt.desktop"];
[ "firefox.desktop" "chromium-browser.desktop" "nyxt.desktop" ]; "application/x-extension-xht" = ["firefox.desktop" "chromium-browser.desktop" "nyxt.desktop"];
"application/x-extension-htm" = "application/x-mozilla-bookmarks" = ["firefox.desktop" "chromium-browser.desktop"];
[ "firefox.desktop" "chromium-browser.desktop" "nyxt.desktop" ]; "x-scheme-handler/msteams" = ["firefox.desktop" "chromium-browser.desktop"];
"application/x-extension-html" = "x-scheme-handler/zoomus" = ["firefox.desktop" "chromium-browser.desktop"];
[ "firefox.desktop" "chromium-browser.desktop" "nyxt.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;
}; };
@ -95,7 +80,7 @@
light.enable = true; light.enable = true;
thunar = { thunar = {
enable = true; enable = true;
plugins = with pkgs.xfce; [ thunar-archive-plugin thunar-volman ]; plugins = with pkgs.xfce; [thunar-archive-plugin thunar-volman];
}; };
hyprland = { hyprland = {
enable = true; enable = true;