commit 1ccc0f2c368f35d3082e4b7cef5789f40a6e1bfe
parent 208827b8f8a37fc8bc148c7b0e18791a78cd0cc9
Author: vin <vin@vineetk.net>
Date: Wed, 7 May 2025 17:00:14 -0400
run nixfmt
Diffstat:
8 files changed, 1255 insertions(+), 1013 deletions(-)
diff --git a/flake.nix b/flake.nix
@@ -1,20 +1,20 @@
{
- description = "my nixos configuration";
+ description = "my nixos configuration";
- inputs = {
+ inputs = {
# nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
- nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable-small";
- nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.11";
+ nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable-small";
+ nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.11";
- home-manager = {
- url = "github:nix-community/home-manager";
- inputs.nixpkgs.follows = "nixpkgs";
- };
+ home-manager = {
+ url = "github:nix-community/home-manager";
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
- everblush-gtk = {
- url = "github:everblush/gtk";
- inputs.nixpkgs.follows = "nixpkgs";
- };
+ everblush-gtk = {
+ url = "github:everblush/gtk";
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
simple-nixos-mailserver = {
url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-24.11";
@@ -33,58 +33,72 @@
url = "/data/src/clones/llm/llama.cpp";
inputs.nixpkgs.follows = "nixpkgs";
};
- };
+ };
- outputs = { self, home-manager, nixpkgs, nixpkgs-stable, everblush-gtk, agenix, simple-nixos-mailserver, llama-cpp, ... }@inputs: {
- # TODO: deduplicate this
- nixosConfigurations = {
- demiurge = nixpkgs.lib.nixosSystem {
- system = "x86_64-linux";
- specialArgs = inputs;
- modules = [
- ./hosts/demiurge
- agenix.nixosModules.default
+ outputs =
+ {
+ self,
+ home-manager,
+ nixpkgs,
+ nixpkgs-stable,
+ everblush-gtk,
+ agenix,
+ simple-nixos-mailserver,
+ llama-cpp,
+ ...
+ }@inputs:
+ {
+ # TODO: deduplicate this
+ nixosConfigurations = {
+ demiurge = nixpkgs.lib.nixosSystem {
+ system = "x86_64-linux";
+ specialArgs = inputs;
+ modules = [
+ ./hosts/demiurge
+ agenix.nixosModules.default
- home-manager.nixosModules.home-manager {
- home-manager.extraSpecialArgs = {
- inherit inputs;
- hostname = "demiurge";
- };
- home-manager.useGlobalPkgs = true;
- home-manager.useUserPackages = true;
- home-manager.users.vin = import ./home.nix;
- }
- ];
- };
+ home-manager.nixosModules.home-manager
+ {
+ home-manager.extraSpecialArgs = {
+ inherit inputs;
+ hostname = "demiurge";
+ };
+ home-manager.useGlobalPkgs = true;
+ home-manager.useUserPackages = true;
+ home-manager.users.vin = import ./home.nix;
+ }
+ ];
+ };
- hastur = nixpkgs.lib.nixosSystem {
- system = "x86_64-linux";
- specialArgs = inputs;
- modules = [
- ./hosts/hastur
- agenix.nixosModules.default
+ hastur = nixpkgs.lib.nixosSystem {
+ system = "x86_64-linux";
+ specialArgs = inputs;
+ modules = [
+ ./hosts/hastur
+ agenix.nixosModules.default
- home-manager.nixosModules.home-manager {
- home-manager.extraSpecialArgs = {
- inherit inputs;
- hostname = "hastur";
- };
- home-manager.useGlobalPkgs = true;
- home-manager.useUserPackages = true;
- home-manager.users.vin = import ./home.nix;
- }
- ];
- };
+ home-manager.nixosModules.home-manager
+ {
+ home-manager.extraSpecialArgs = {
+ inherit inputs;
+ hostname = "hastur";
+ };
+ home-manager.useGlobalPkgs = true;
+ home-manager.useUserPackages = true;
+ home-manager.users.vin = import ./home.nix;
+ }
+ ];
+ };
- saklas = nixpkgs-stable.lib.nixosSystem {
- system = "x86_64-linux";
- specialArgs = inputs;
- modules = [
- ./hosts/saklas
- agenix.nixosModules.default
- simple-nixos-mailserver.nixosModule
- ];
- };
- };
- };
+ saklas = nixpkgs-stable.lib.nixosSystem {
+ system = "x86_64-linux";
+ specialArgs = inputs;
+ modules = [
+ ./hosts/saklas
+ agenix.nixosModules.default
+ simple-nixos-mailserver.nixosModule
+ ];
+ };
+ };
+ };
}
diff --git a/home.nix b/home.nix
@@ -1,48 +1,60 @@
-{ config, lib, pkgs, inputs, hostname, ... }:
+{
+ config,
+ lib,
+ pkgs,
+ inputs,
+ hostname,
+ ...
+}:
let
colors = import ./colors.nix;
- isync-oauth2 = with pkgs; buildEnv {
- # takens from:
- # https://github.com/wentasah/nix-conf/raw/master/modules/mail.nix
- # https://github.com/NixOS/nixpkgs/issues/108480#issuecomment-1115108802
- name = "isync";
- paths = [ pkgs.isync ];
- pathsToLink = ["/bin"];
- nativeBuildInputs = [ makeWrapper ];
- postBuild = ''
+ isync-oauth2 =
+ with pkgs;
+ buildEnv {
+ # takens from:
+ # https://github.com/wentasah/nix-conf/raw/master/modules/mail.nix
+ # https://github.com/NixOS/nixpkgs/issues/108480#issuecomment-1115108802
+ name = "isync";
+ paths = [ pkgs.isync ];
+ pathsToLink = [ "/bin" ];
+ nativeBuildInputs = [ makeWrapper ];
+ postBuild = ''
wrapProgram "$out/bin/mbsync" \
--prefix SASL_PATH : "${cyrus_sasl}/lib/sasl2:${cyrus-sasl-xoauth2}/lib/sasl2"
'';
- };
-
- uvtools = with pkgs; appimageTools.wrapType2 rec {
- pname = "UVtools";
- version = "5.0.6";
- src = fetchurl {
- url = "https://github.com/sn4k3/${pname}/releases/download/v${version}/${pname}_linux-x64_v${version}.AppImage";
- hash = "sha256-T1E2+7YocWbspRrpWoexfLmm7LZSb4Nkw8WSBD6zTHs";
};
- extraPkgs = pkgs: [ pkgs.icu ];
- };
-in {
- home = {
- username = "vin";
- homeDirectory = "/home/vin";
- stateVersion = "24.05";
- packages = with pkgs; [
+ uvtools =
+ with pkgs;
+ appimageTools.wrapType2 rec {
+ pname = "UVtools";
+ version = "5.0.6";
+ src = fetchurl {
+ url = "https://github.com/sn4k3/${pname}/releases/download/v${version}/${pname}_linux-x64_v${version}.AppImage";
+ hash = "sha256-T1E2+7YocWbspRrpWoexfLmm7LZSb4Nkw8WSBD6zTHs";
+ };
+ extraPkgs = pkgs: [ pkgs.icu ];
+ };
+in
+{
+ home = {
+ username = "vin";
+ homeDirectory = "/home/vin";
+ stateVersion = "24.05";
+
+ packages = with pkgs; [
# normal utils
- neofetch
- rclone
+ neofetch
+ rclone
wcalc
# programming
python3
# CAD software
- kicad
+ kicad
openscad
# document writing and viewing
@@ -51,7 +63,7 @@ in {
zathura
# messaging
- profanity
+ profanity
vesktop
# email
@@ -64,19 +76,19 @@ in {
amdgpu_top
# encryption
- age
+ age
age-plugin-yubikey
oathToolkit
yubikey-agent
yubikey-manager
# system utils
- dmenu
+ dmenu
file
htop
- mlocate
- ncdu
- tree
+ mlocate
+ ncdu
+ tree
unzip
p7zip
@@ -84,8 +96,8 @@ in {
scrot
sxiv
xclip
- xdotool
- xwallpaper
+ xdotool
+ xwallpaper
# wayland and desktop-related
grim
@@ -96,36 +108,32 @@ in {
# 3d printing
prusa-slicer
uvtools
- ];
+ ];
- preferXdgDirectories = true;
+ preferXdgDirectories = true;
- sessionPath = [
- "$HOME/bin"
- "$HOME/.local/bin"
- ];
+ sessionPath = [
+ "$HOME/bin"
+ "$HOME/.local/bin"
+ ];
- sessionVariables = {
- EDITOR = "nvim";
+ sessionVariables = {
+ EDITOR = "nvim";
VISUAL = "nvim";
- PAGER = "less";
- LESS = "-iR";
- LESSHISTFILE = "/dev/null";
- BROWSER = "qutebrowser";
+ PAGER = "less";
+ LESS = "-iR";
+ LESSHISTFILE = "/dev/null";
+ BROWSER = "qutebrowser";
- GOPROXY = "direct";
+ GOPROXY = "direct";
- AGE_KEY = "$HOME/.ssh/id_ed25519";
- AGE_PUB = "$AGE_KEY.pub";
- KASI_DIR =
- if hostname == "demiurge" then
- "/data/kasi"
- else
- "/home/vin/.kasi";
- KASI_ENCRYPT = "age -R $AGE_PUB";
- KASI_DECRYPT = "age -d -i $AGE_KEY";
- KASI_EXT = "age";
- KASI_CLIPBOARD = "wl-copy -o";
+ AGE_KEY = "$HOME/.ssh/id_ed25519";
+ AGE_PUB = "$AGE_KEY.pub";
+ KASI_DIR = if hostname == "demiurge" then "/data/kasi" else "/home/vin/.kasi";
+ KASI_ENCRYPT = "age -R $AGE_PUB";
+ KASI_DECRYPT = "age -d -i $AGE_KEY";
+ KASI_EXT = "age";
+ KASI_CLIPBOARD = "wl-copy -o";
# w3m is only used for aerc html preview
W3M_DIR = "/var/empty";
@@ -135,8 +143,8 @@ in {
CRAWL_DIR = "$HOME/.local/share/crawl";
- MOZ_ACCELERATED = 1;
- MOZ_WEBRENDER = 1;
+ MOZ_ACCELERATED = 1;
+ MOZ_WEBRENDER = 1;
LM_LICENSE_FILE =
if hostname == "demiurge" then
@@ -146,21 +154,21 @@ in {
# broken qt6.9 rendering
QTWEBENGINE_FORCE_USE_GBM = 0;
- };
+ };
- shellAliases = {
+ shellAliases = {
# shortened commands
md = "mkdir -p";
- e = "$EDITOR";
+ e = "$EDITOR";
p = "$PAGER";
m = "aerc";
- gc = "git clone";
+ gc = "git clone";
cbc = "wl-copy -c; wl-copy -cp";
# default arguments to commands
- ls = "ls -F --color=auto";
+ ls = "ls -F --color=auto";
rsync = "rsync --no-inc-recursive";
- mpv = "mpv --save-position-on-quit";
+ mpv = "mpv --save-position-on-quit";
wget = "wget --no-hsts";
ytdl = "noglob yt-dlp";
@@ -171,27 +179,27 @@ in {
nr = "nix run";
ns = "nix search";
nsh = "nix shell";
- };
- };
-
- fonts.fontconfig = {
- enable = true;
- defaultFonts = {
- emoji = [];
- monospace = [ "Comic Code" ];
- sansSerif = [ "Cantarell" ];
- serif = [ "CMU Serif" ];
- };
- };
-
- gtk = {
- enable = true;
- font.name = "monospace 11";
- iconTheme.name = "rose-pine";
- iconTheme.package = pkgs.rose-pine-icon-theme;
- theme.name = "Everblush";
- theme.package = inputs.everblush-gtk.packages.x86_64-linux.default;
- };
+ };
+ };
+
+ fonts.fontconfig = {
+ enable = true;
+ defaultFonts = {
+ emoji = [ ];
+ monospace = [ "Comic Code" ];
+ sansSerif = [ "Cantarell" ];
+ serif = [ "CMU Serif" ];
+ };
+ };
+
+ gtk = {
+ enable = true;
+ font.name = "monospace 11";
+ iconTheme.name = "rose-pine";
+ iconTheme.package = pkgs.rose-pine-icon-theme;
+ theme.name = "Everblush";
+ theme.package = inputs.everblush-gtk.packages.x86_64-linux.default;
+ };
dconf.settings = {
"org/virt-manager/virt-manager/connections" = {
@@ -223,8 +231,13 @@ in {
expunge = "both";
remove = "both";
patterns = [
- "*" "!Calendar*" "!Contacts*" "!Conversation*"
- "!Notes*" "!Journal*" "!Tasks*"
+ "*"
+ "!Calendar*"
+ "!Contacts*"
+ "!Conversation*"
+ "!Notes*"
+ "!Journal*"
+ "!Tasks*"
];
};
@@ -281,7 +294,7 @@ in {
};
};
- programs = {
+ programs = {
home-manager.enable = true;
aerc.enable = true;
@@ -300,9 +313,10 @@ in {
pad = "10x10";
};
- colors = let
- rmhash = s: builtins.substring 1 (-1) s;
- in
+ colors =
+ let
+ rmhash = s: builtins.substring 1 (-1) s;
+ in
{
alpha = 0.9;
@@ -330,41 +344,41 @@ in {
};
};
- git = {
- enable = true;
- difftastic = {
- enable = true;
- background = "dark";
- color = "always";
- display = "side-by-side-show-both";
- };
- extraConfig = {
- user = {
- email = "git@vineetk.net";
- name = "vin";
- signingkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEvM0xCLziR+ZT/SYE1aZM6dklbw4fEC17TWqbADIZRH kou@demiurge";
- };
- sendemail = {
- suppresscc = "self";
- annotate = true;
- };
- format.signOff = true;
- pull.rebase = true;
- init.defaultBranch = "master";
- http = {
- version = "HTTP/1.1";
- postBuffer = 524288000;
- };
- commit.gpgsign = false;
- gpg.format = "ssh";
- "gpg \"ssh\"".allowedSignersFile = "/home/vin/.ssh/allowed_signers";
- };
- ignores = [
- "*~"
- ".*~"
- "*.swp"
- ];
- };
+ git = {
+ enable = true;
+ difftastic = {
+ enable = true;
+ background = "dark";
+ color = "always";
+ display = "side-by-side-show-both";
+ };
+ extraConfig = {
+ user = {
+ email = "git@vineetk.net";
+ name = "vin";
+ signingkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEvM0xCLziR+ZT/SYE1aZM6dklbw4fEC17TWqbADIZRH kou@demiurge";
+ };
+ sendemail = {
+ suppresscc = "self";
+ annotate = true;
+ };
+ format.signOff = true;
+ pull.rebase = true;
+ init.defaultBranch = "master";
+ http = {
+ version = "HTTP/1.1";
+ postBuffer = 524288000;
+ };
+ commit.gpgsign = false;
+ gpg.format = "ssh";
+ "gpg \"ssh\"".allowedSignersFile = "/home/vin/.ssh/allowed_signers";
+ };
+ ignores = [
+ "*~"
+ ".*~"
+ "*.swp"
+ ];
+ };
mbsync = {
enable = true;
@@ -379,12 +393,18 @@ in {
bindings = {
# I wish there was a more elegant way of setting Anime4K
- "Ctrl+1" = "no-osd change-list glsl-shaders set '~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Restore_CNN_VL.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_VL.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl'; show-text 'Anime4K: Mode A (HQ)'";
- "Ctrl+2" = "no-osd change-list glsl-shaders set '~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Restore_CNN_Soft_VL.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_VL.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl'; show-text 'Anime4K: Mode B (HQ)'";
- "Ctrl+3" = "no-osd change-list glsl-shaders set '~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Upscale_Denoise_CNN_x2_VL.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl'; show-text 'Anime4K: Mode C (HQ)'";
- "Ctrl+4" = "no-osd change-list glsl-shaders set '~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Restore_CNN_VL.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_VL.glsl:~~/shaders/Anime4K_Restore_CNN_M.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl'; show-text 'Anime4K: Mode A+A (HQ)'";
- "Ctrl+5" = "no-osd change-list glsl-shaders set '~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Restore_CNN_Soft_VL.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_VL.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Restore_CNN_Soft_M.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl'; show-text 'Anime4K: Mode B+B (HQ)'";
- "Ctrl+6" = "no-osd change-list glsl-shaders set '~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Upscale_Denoise_CNN_x2_VL.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Restore_CNN_M.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl'; show-text 'Anime4K: Mode C+A (HQ)'";
+ "Ctrl+1" =
+ "no-osd change-list glsl-shaders set '~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Restore_CNN_VL.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_VL.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl'; show-text 'Anime4K: Mode A (HQ)'";
+ "Ctrl+2" =
+ "no-osd change-list glsl-shaders set '~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Restore_CNN_Soft_VL.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_VL.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl'; show-text 'Anime4K: Mode B (HQ)'";
+ "Ctrl+3" =
+ "no-osd change-list glsl-shaders set '~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Upscale_Denoise_CNN_x2_VL.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl'; show-text 'Anime4K: Mode C (HQ)'";
+ "Ctrl+4" =
+ "no-osd change-list glsl-shaders set '~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Restore_CNN_VL.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_VL.glsl:~~/shaders/Anime4K_Restore_CNN_M.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl'; show-text 'Anime4K: Mode A+A (HQ)'";
+ "Ctrl+5" =
+ "no-osd change-list glsl-shaders set '~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Restore_CNN_Soft_VL.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_VL.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Restore_CNN_Soft_M.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl'; show-text 'Anime4K: Mode B+B (HQ)'";
+ "Ctrl+6" =
+ "no-osd change-list glsl-shaders set '~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Upscale_Denoise_CNN_x2_VL.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Restore_CNN_M.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl'; show-text 'Anime4K: Mode C+A (HQ)'";
"Ctrl+0" = "no-osd change-list glsl-shaders clr ''; show-text 'GLSL shaders cleared'";
};
@@ -406,16 +426,16 @@ in {
};
hooks = {
postNew = ''
- notmuch tag +13f0 -- tag:new and to:"*@13f0.net"
- notmuch tag +vineetk -- tag:new and to:"*@vineetk.net"
- notmuch tag +university -- tag:new and to:***REDACTED_EMAIL***
- notmuch tag +openbsd_announce -inbox -- tag:new and to:announce@openbsd.org
- notmuch tag +openbsd_arm -inbox -- tag:new and to:arm@openbsd.org
- notmuch tag +openbsd_misc -inbox -- tag:new and to:misc@openbsd.org
- notmuch tag +opensmtpd_misc -inbox -- tag:new and to:misc@opensmtpd.org
- notmuch tag +oss_security -inbox -- tag:new and to:oss-security@lists.openwall.com
- notmuch tag +tuhs -inbox -- tag:new and to:tuhs@tuhs.org
- '';
+ notmuch tag +13f0 -- tag:new and to:"*@13f0.net"
+ notmuch tag +vineetk -- tag:new and to:"*@vineetk.net"
+ notmuch tag +university -- tag:new and to:***REDACTED_EMAIL***
+ notmuch tag +openbsd_announce -inbox -- tag:new and to:announce@openbsd.org
+ notmuch tag +openbsd_arm -inbox -- tag:new and to:arm@openbsd.org
+ notmuch tag +openbsd_misc -inbox -- tag:new and to:misc@openbsd.org
+ notmuch tag +opensmtpd_misc -inbox -- tag:new and to:misc@opensmtpd.org
+ notmuch tag +oss_security -inbox -- tag:new and to:oss-security@lists.openwall.com
+ notmuch tag +tuhs -inbox -- tag:new and to:tuhs@tuhs.org
+ '';
preNew = "mbsync -a";
};
};
@@ -437,27 +457,31 @@ in {
plugins = with pkgs.vimPlugins; [
{
- plugin = (pkgs.vimUtils.buildVimPlugin {
- name = "everblush-nvim";
- src = pkgs.fetchFromGitHub {
- owner = "everblush";
- repo = "nvim";
- rev = "9a0e695fdd57b340d3ba2b72406e3ca519029f25";
- hash = "sha256-O6Erp+Tzk5TV5gpgVs73cO6v9vgeUVYpunrtf/7Ppic=";
- };
- });
+ plugin = (
+ pkgs.vimUtils.buildVimPlugin {
+ name = "everblush-nvim";
+ src = pkgs.fetchFromGitHub {
+ owner = "everblush";
+ repo = "nvim";
+ rev = "9a0e695fdd57b340d3ba2b72406e3ca519029f25";
+ hash = "sha256-O6Erp+Tzk5TV5gpgVs73cO6v9vgeUVYpunrtf/7Ppic=";
+ };
+ }
+ );
config = ''
lua << END
- require 'everblush'.setup {
- transparent_background = true,
+ require 'everblush'.setup {
+ transparent_background = true,
- override = {
- LineNr = { fg = '#b3b9b8' },
- },
- }
+ override = {
+ LineNr = { fg = '#b3b9b8' },
+ },
+ }
END
'';
}
+
+ vim-nix
];
viAlias = true;
@@ -510,49 +534,49 @@ in {
};
extraConfig = ''
-# javascript
-config.set('content.javascript.enabled', True, 'chrome-devtools://*')
-config.set('content.javascript.enabled', True, 'devtools://*')
-config.set('content.javascript.enabled', True, 'chrome://*/*')
-config.set('content.javascript.enabled', True, 'qute://*/*')
-
-config.set('content.javascript.enabled', True, 'floridapolytechnic.instructure.com')
-config.set('content.javascript.enabled', True, '*.floridapoly.edu')
-config.set('content.javascript.enabled', True, 'login.microsoftonline.com')
-config.set('content.javascript.enabled', True, 'www.microsoft365.com')
-config.set('content.javascript.enabled', True, 'flpoly-my.sharepoint.com')
-config.set('content.javascript.enabled', True, 'flpoly.sharepoint.com')
-config.set('content.javascript.enabled', True, 'teams.microsoft.com')
-config.set('content.javascript.enabled', True, 'ieeexplore.ieee.org')
-
-config.set('content.javascript.enabled', True, 'gitlab.com')
-config.set('content.javascript.enabled', True, 'cloud.binary.ninja')
-config.set('content.javascript.enabled', True, 'console.hetzner.cloud')
-config.set('content.javascript.enabled', True, '*.hetzner.com')
-config.set('content.javascript.enabled', True, '*.digikey.com')
-config.set('content.javascript.enabled', True, '*.demiurge.epistemia')
-
-# Allow locally loaded documents to access remote URLs.
-config.set('content.local_content_can_access_remote_urls', True, 'file:///home/vin/.local/share/qutebrowser/userscripts/*')
-config.set('content.local_content_can_access_file_urls', False, 'file:///home/vin/.local/share/qutebrowser/userscripts/*')
-
-# disable dark mode for some sites
-config.set('colors.webpage.darkmode.enabled', False, 'flpoly-my.sharepoint.com')
-config.set('colors.webpage.darkmode.enabled', False, 'flpoly.sharepoint.com')
-config.set('colors.webpage.darkmode.enabled', False, 'teams.microsoft.com')
-
-config.set('colors.webpage.darkmode.enabled', False, 'cloud.binary.ninja')
-config.set('colors.webpage.darkmode.enabled', False, 'git.vineetk.net')
-
-# prevent accidental exiting
-config.unbind("<Ctrl+q>", mode="normal")
-
-# source theme from nixos
-config.source("theme.py")
-
-# source redirectors
-config.source("redirectors.py")
-'';
+ # javascript
+ config.set('content.javascript.enabled', True, 'chrome-devtools://*')
+ config.set('content.javascript.enabled', True, 'devtools://*')
+ config.set('content.javascript.enabled', True, 'chrome://*/*')
+ config.set('content.javascript.enabled', True, 'qute://*/*')
+
+ config.set('content.javascript.enabled', True, 'floridapolytechnic.instructure.com')
+ config.set('content.javascript.enabled', True, '*.floridapoly.edu')
+ config.set('content.javascript.enabled', True, 'login.microsoftonline.com')
+ config.set('content.javascript.enabled', True, 'www.microsoft365.com')
+ config.set('content.javascript.enabled', True, 'flpoly-my.sharepoint.com')
+ config.set('content.javascript.enabled', True, 'flpoly.sharepoint.com')
+ config.set('content.javascript.enabled', True, 'teams.microsoft.com')
+ config.set('content.javascript.enabled', True, 'ieeexplore.ieee.org')
+
+ config.set('content.javascript.enabled', True, 'gitlab.com')
+ config.set('content.javascript.enabled', True, 'cloud.binary.ninja')
+ config.set('content.javascript.enabled', True, 'console.hetzner.cloud')
+ config.set('content.javascript.enabled', True, '*.hetzner.com')
+ config.set('content.javascript.enabled', True, '*.digikey.com')
+ config.set('content.javascript.enabled', True, '*.demiurge.epistemia')
+
+ # Allow locally loaded documents to access remote URLs.
+ config.set('content.local_content_can_access_remote_urls', True, 'file:///home/vin/.local/share/qutebrowser/userscripts/*')
+ config.set('content.local_content_can_access_file_urls', False, 'file:///home/vin/.local/share/qutebrowser/userscripts/*')
+
+ # disable dark mode for some sites
+ config.set('colors.webpage.darkmode.enabled', False, 'flpoly-my.sharepoint.com')
+ config.set('colors.webpage.darkmode.enabled', False, 'flpoly.sharepoint.com')
+ config.set('colors.webpage.darkmode.enabled', False, 'teams.microsoft.com')
+
+ config.set('colors.webpage.darkmode.enabled', False, 'cloud.binary.ninja')
+ config.set('colors.webpage.darkmode.enabled', False, 'git.vineetk.net')
+
+ # prevent accidental exiting
+ config.unbind("<Ctrl+q>", mode="normal")
+
+ # source theme from nixos
+ config.source("theme.py")
+
+ # source redirectors
+ config.source("redirectors.py")
+ '';
};
tmux = {
@@ -564,80 +588,80 @@ config.source("redirectors.py")
terminal = "screen-256color";
extraConfig = ''
-# status bar
-set-option -g status-style bg=terminal
-set-option -g status-style fg=terminal
+ # status bar
+ set-option -g status-style bg=terminal
+ set-option -g status-style fg=terminal
+
+ set-option -g window-status-format "#[bg=terminal fg=terminal noreverse]#{window_index}:#{window_name}"
+ set-option -g window-status-current-format "#[bg=black fg=terminal]#{window_index}:#{window_name}#{window_flags}"
-set-option -g window-status-format "#[bg=terminal fg=terminal noreverse]#{window_index}:#{window_name}"
-set-option -g window-status-current-format "#[bg=black fg=terminal]#{window_index}:#{window_name}#{window_flags}"
+ set-option -g status-right "%R %b %d %Y"
-set-option -g status-right "%R %b %d %Y"
+ # colorscheme stuff
+ set-option -sa terminal-features ',*:RGB'
+ '';
+ };
-# colorscheme stuff
-set-option -sa terminal-features ',*:RGB'
-'';
+ yt-dlp = {
+ enable = true;
+ settings = {
+ merge-output-format = "mkv";
+ embed-subs = true;
+ embed-metadata = true;
+ embed-thumbnail = true;
+ sub-langs = "en,-livechat";
+ format = "bestvideo[height<=?1440]+bestaudio/best";
+ downloader = "aria2c";
+ downloader-args = "aria2c:'-c -x8 -s8 -k1M'";
+ };
};
- yt-dlp = {
- enable = true;
- settings = {
- merge-output-format = "mkv";
- embed-subs = true;
- embed-metadata = true;
- embed-thumbnail = true;
- sub-langs = "en,-livechat";
- format = "bestvideo[height<=?1440]+bestaudio/best";
- downloader = "aria2c";
- downloader-args = "aria2c:'-c -x8 -s8 -k1M'";
- };
- };
-
- zsh = {
- enable = true;
- enableCompletion = true;
- defaultKeymap = "emacs";
- history = {
- ignoreDups = true;
- ignoreSpace = true;
- };
- initContent = ''
- # auto-correct commands
- setopt correctall
-
- # fix meta/ctrl-backspace
- autoload -Uz select-word-style
- select-word-style bash
- '';
- syntaxHighlighting = {
- enable = true;
- highlighters = [
- "main"
- "brackets"
- "pattern"
- ];
- patterns = {
- "rm -rf *" = "fg=white,bold,bg=red";
- };
- };
- };
- };
-
- services = {
- # batsignal
- # borgmatic
- # dunst?
- # glance?
- # gpg-agent with ssh?
- # mpd and ncmpcpp?
- # nextcloud-client?
- # pass-secret-service?
- # plan9port for plumbing?
- # recoll?
- # remmina?
- # screen-locker
- # sxhkd if using bspwm and not i3
- # unison
- # vdirsyncer
+ zsh = {
+ enable = true;
+ enableCompletion = true;
+ defaultKeymap = "emacs";
+ history = {
+ ignoreDups = true;
+ ignoreSpace = true;
+ };
+ initContent = ''
+ # auto-correct commands
+ setopt correctall
+
+ # fix meta/ctrl-backspace
+ autoload -Uz select-word-style
+ select-word-style bash
+ '';
+ syntaxHighlighting = {
+ enable = true;
+ highlighters = [
+ "main"
+ "brackets"
+ "pattern"
+ ];
+ patterns = {
+ "rm -rf *" = "fg=white,bold,bg=red";
+ };
+ };
+ };
+ };
+
+ services = {
+ # batsignal
+ # borgmatic
+ # dunst?
+ # glance?
+ # gpg-agent with ssh?
+ # mpd and ncmpcpp?
+ # nextcloud-client?
+ # pass-secret-service?
+ # plan9port for plumbing?
+ # recoll?
+ # remmina?
+ # screen-locker
+ # sxhkd if using bspwm and not i3
+ # unison
+ # vdirsyncer
# parametric equalizer (and other stuff I don't use) in pipewire
easyeffects = {
@@ -864,15 +888,15 @@ set-option -sa terminal-features ',*:RGB'
};
};
- poweralertd.enable = true;
+ poweralertd.enable = true;
- redshift = {
- enable = false;
- dawnTime = "07:00";
- duskTime = "00:00";
- temperature.day = 6500;
- temperature.night = 4500;
- };
+ redshift = {
+ enable = false;
+ dawnTime = "07:00";
+ duskTime = "00:00";
+ temperature.day = 6500;
+ temperature.night = 4500;
+ };
syncthing = {
enable = true;
@@ -905,474 +929,485 @@ set-option -sa terminal-features ',*:RGB'
folders = {
"bin" = {
- devices = [ "demiurge" "hastur" ];
- path =
- if hostname == "demiurge" then
- "/data/bin"
- else
- "/home/vin/bin";
+ devices = [
+ "demiurge"
+ "hastur"
+ ];
+ path = if hostname == "demiurge" then "/data/bin" else "/home/vin/bin";
};
"docs" = {
- devices = [ "demiurge" "hastur" ];
- path =
- if hostname == "demiurge" then
- "/data/docs"
- else
- "/home/vin/docs";
+ devices = [
+ "demiurge"
+ "hastur"
+ ];
+ path = if hostname == "demiurge" then "/data/docs" else "/home/vin/docs";
};
"emacs.d" = {
- devices = [ "demiurge" "hastur" ];
+ devices = [
+ "demiurge"
+ "hastur"
+ ];
path = "/home/vin/.emacs.d";
};
"kasi" = {
- devices = [ "demiurge" "hastur" ];
- path =
- if hostname == "demiurge" then
- "/data/kasi"
- else
- "/home/vin/.kasi";
+ devices = [
+ "demiurge"
+ "hastur"
+ ];
+ path = if hostname == "demiurge" then "/data/kasi" else "/home/vin/.kasi";
};
"lit" = {
- devices = [ "demiurge" "hastur" ];
- path =
- if hostname == "demiurge" then
- "/data_wd/lit"
- else
- "/home/vin/lit";
+ devices = [
+ "demiurge"
+ "hastur"
+ ];
+ path = if hostname == "demiurge" then "/data_wd/lit" else "/home/vin/lit";
};
"pics" = {
- devices = [ "demiurge" "hastur" ];
- path =
- if hostname == "demiurge" then
- "/data_wd/pics"
- else
- "/home/vin/pics";
+ devices = [
+ "demiurge"
+ "hastur"
+ ];
+ path = if hostname == "demiurge" then "/data_wd/pics" else "/home/vin/pics";
};
"iphone" = {
- devices = [ "demiurge" "hastur" "iphonebob" ];
- path =
- if hostname == "demiurge" then
- "/data_wd/iphone"
- else
- "/home/vin/iphone";
+ devices = [
+ "demiurge"
+ "hastur"
+ "iphonebob"
+ ];
+ path = if hostname == "demiurge" then "/data_wd/iphone" else "/home/vin/iphone";
};
};
};
};
};
- xdg = {
- enable = true;
+ xdg = {
+ enable = true;
configFile = {
"qutebrowser/theme.py".text = ''
-# Colors.
-bg0 = "${colors.current.primary.background}"
-bg1 = "${colors.current.normal.black}"
-bg2 = "${colors.current.bright.black}"
-fg0 = "${colors.current.primary.foreground}"
-fg1 = "${colors.current.normal.white}"
-red = "${colors.current.normal.red}"
-blue = "${colors.current.normal.blue}"
-green = "${colors.current.normal.green}"
-yellow = "${colors.current.normal.yellow}"
-cyan = "${colors.current.normal.cyan}"
-magenta = "${colors.current.normal.magenta}"
-
-# --- Applying colors --- #
-
-# Completion menu.
-c.colors.completion.category.bg = bg1
-c.colors.completion.category.border.top = bg0
-c.colors.completion.category.border.bottom = bg0
-c.colors.completion.category.fg = fg0
-c.colors.completion.even.bg = bg1
-c.colors.completion.odd.bg = bg1
-c.colors.completion.item.selected.bg = bg2
-c.colors.completion.item.selected.border.bottom = bg2
-c.colors.completion.item.selected.border.top = bg2
-c.colors.completion.item.selected.fg = blue
-c.colors.completion.item.selected.match.fg = blue
-c.colors.completion.match.fg = red
-c.colors.completion.odd.bg = bg1
-c.colors.completion.scrollbar.fg = fg0
-c.colors.completion.scrollbar.bg = bg1
-
-# Statusline.
-c.colors.statusbar.caret.bg = bg0
-c.colors.statusbar.caret.fg = magenta
-c.colors.statusbar.caret.selection.bg = bg0
-c.colors.statusbar.caret.selection.fg = red
-c.colors.statusbar.command.bg = bg0
-c.colors.statusbar.command.fg = fg0
-c.colors.statusbar.insert.bg = bg0
-c.colors.statusbar.insert.fg = green
-c.colors.statusbar.normal.bg = bg0
-c.colors.statusbar.normal.fg = fg0
-c.colors.statusbar.passthrough.bg = bg0
-c.colors.statusbar.passthrough.fg = blue
-c.colors.statusbar.private.bg = bg0
-c.colors.statusbar.private.fg = fg0
-c.colors.statusbar.progress.bg = green
-c.colors.statusbar.url.error.fg = red
-c.colors.statusbar.url.fg = fg0
-c.colors.statusbar.url.hover.fg = cyan
-c.colors.statusbar.url.success.http.fg = green
-c.colors.statusbar.url.success.https.fg = green
-c.colors.statusbar.url.warn.fg = yellow
-
-# Tabline.
-c.colors.tabs.bar.bg = bg0
-c.colors.tabs.even.bg = bg1
-c.colors.tabs.even.fg = fg1
-c.colors.tabs.indicator.error = red
-c.colors.tabs.indicator.start = blue
-c.colors.tabs.indicator.stop = green
-c.colors.tabs.indicator.system = "rgb"
-c.colors.tabs.odd.bg = bg1
-c.colors.tabs.odd.fg = fg1
-c.colors.tabs.pinned.even.bg = bg2
-c.colors.tabs.pinned.even.fg = fg1
-c.colors.tabs.pinned.odd.bg = bg2
-c.colors.tabs.pinned.odd.fg = fg1
-c.colors.tabs.pinned.selected.even.bg = bg0
-c.colors.tabs.pinned.selected.even.fg = green
-c.colors.tabs.pinned.selected.odd.bg = bg0
-c.colors.tabs.pinned.selected.odd.fg = green
-c.colors.tabs.pinned.selected.even.bg = bg0
-c.colors.tabs.pinned.selected.even.fg = blue
-c.colors.tabs.selected.odd.bg = bg0
-c.colors.tabs.selected.odd.fg = fg0
-c.colors.tabs.selected.even.bg = bg0
-c.colors.tabs.selected.even.fg = fg0
-
-# Hints.
-c.colors.hints.bg = bg2
-c.colors.hints.fg = fg0
-c.colors.hints.match.fg = red
-c.hints.border = "2px solid " + bg1
-
-# Messages.
-c.colors.messages.error.bg = bg1
-c.colors.messages.error.border = bg1
-c.colors.messages.error.fg = red
-c.colors.messages.info.bg = bg1
-c.colors.messages.info.border = bg1
-c.colors.messages.info.fg = blue
-c.colors.messages.warning.bg = bg1
-c.colors.messages.warning.border = bg1
-c.colors.messages.warning.fg = yellow
-
-# Download bar.
-c.colors.downloads.bar.bg = bg0
-c.colors.downloads.error.bg = bg2
-c.colors.downloads.error.fg = red
-c.colors.downloads.start.bg = bg2
-c.colors.downloads.start.fg = blue
-c.colors.downloads.stop.bg = bg2
-c.colors.downloads.stop.fg = green
-
-# Keyhints.
-c.colors.keyhint.bg = bg0
-c.colors.keyhint.fg = fg0
-c.colors.keyhint.suffix.fg = yellow
-
-# Default color for about:blank pages (or if the css didn't specify)
-#c.colors.webpage.bg = bg1
-
-# Context menu.
-c.colors.contextmenu.disabled.bg = bg1
-c.colors.contextmenu.disabled.fg = fg1
-c.colors.contextmenu.menu.bg = bg1
-c.colors.contextmenu.menu.fg = fg0
-c.colors.contextmenu.selected.bg = bg2
-c.colors.contextmenu.selected.fg = blue
-
-# Prompts.
-c.colors.prompts.bg = bg1
-c.colors.prompts.border = "2px solid " + bg0
-c.colors.prompts.fg = fg0
-c.colors.prompts.selected.bg = bg2
-c.colors.prompts.selected.fg = blue
+ # Colors.
+ bg0 = "${colors.current.primary.background}"
+ bg1 = "${colors.current.normal.black}"
+ bg2 = "${colors.current.bright.black}"
+ fg0 = "${colors.current.primary.foreground}"
+ fg1 = "${colors.current.normal.white}"
+ red = "${colors.current.normal.red}"
+ blue = "${colors.current.normal.blue}"
+ green = "${colors.current.normal.green}"
+ yellow = "${colors.current.normal.yellow}"
+ cyan = "${colors.current.normal.cyan}"
+ magenta = "${colors.current.normal.magenta}"
+
+ # --- Applying colors --- #
+
+ # Completion menu.
+ c.colors.completion.category.bg = bg1
+ c.colors.completion.category.border.top = bg0
+ c.colors.completion.category.border.bottom = bg0
+ c.colors.completion.category.fg = fg0
+ c.colors.completion.even.bg = bg1
+ c.colors.completion.odd.bg = bg1
+ c.colors.completion.item.selected.bg = bg2
+ c.colors.completion.item.selected.border.bottom = bg2
+ c.colors.completion.item.selected.border.top = bg2
+ c.colors.completion.item.selected.fg = blue
+ c.colors.completion.item.selected.match.fg = blue
+ c.colors.completion.match.fg = red
+ c.colors.completion.odd.bg = bg1
+ c.colors.completion.scrollbar.fg = fg0
+ c.colors.completion.scrollbar.bg = bg1
+
+ # Statusline.
+ c.colors.statusbar.caret.bg = bg0
+ c.colors.statusbar.caret.fg = magenta
+ c.colors.statusbar.caret.selection.bg = bg0
+ c.colors.statusbar.caret.selection.fg = red
+ c.colors.statusbar.command.bg = bg0
+ c.colors.statusbar.command.fg = fg0
+ c.colors.statusbar.insert.bg = bg0
+ c.colors.statusbar.insert.fg = green
+ c.colors.statusbar.normal.bg = bg0
+ c.colors.statusbar.normal.fg = fg0
+ c.colors.statusbar.passthrough.bg = bg0
+ c.colors.statusbar.passthrough.fg = blue
+ c.colors.statusbar.private.bg = bg0
+ c.colors.statusbar.private.fg = fg0
+ c.colors.statusbar.progress.bg = green
+ c.colors.statusbar.url.error.fg = red
+ c.colors.statusbar.url.fg = fg0
+ c.colors.statusbar.url.hover.fg = cyan
+ c.colors.statusbar.url.success.http.fg = green
+ c.colors.statusbar.url.success.https.fg = green
+ c.colors.statusbar.url.warn.fg = yellow
+
+ # Tabline.
+ c.colors.tabs.bar.bg = bg0
+ c.colors.tabs.even.bg = bg1
+ c.colors.tabs.even.fg = fg1
+ c.colors.tabs.indicator.error = red
+ c.colors.tabs.indicator.start = blue
+ c.colors.tabs.indicator.stop = green
+ c.colors.tabs.indicator.system = "rgb"
+ c.colors.tabs.odd.bg = bg1
+ c.colors.tabs.odd.fg = fg1
+ c.colors.tabs.pinned.even.bg = bg2
+ c.colors.tabs.pinned.even.fg = fg1
+ c.colors.tabs.pinned.odd.bg = bg2
+ c.colors.tabs.pinned.odd.fg = fg1
+ c.colors.tabs.pinned.selected.even.bg = bg0
+ c.colors.tabs.pinned.selected.even.fg = green
+ c.colors.tabs.pinned.selected.odd.bg = bg0
+ c.colors.tabs.pinned.selected.odd.fg = green
+ c.colors.tabs.pinned.selected.even.bg = bg0
+ c.colors.tabs.pinned.selected.even.fg = blue
+ c.colors.tabs.selected.odd.bg = bg0
+ c.colors.tabs.selected.odd.fg = fg0
+ c.colors.tabs.selected.even.bg = bg0
+ c.colors.tabs.selected.even.fg = fg0
+
+ # Hints.
+ c.colors.hints.bg = bg2
+ c.colors.hints.fg = fg0
+ c.colors.hints.match.fg = red
+ c.hints.border = "2px solid " + bg1
+
+ # Messages.
+ c.colors.messages.error.bg = bg1
+ c.colors.messages.error.border = bg1
+ c.colors.messages.error.fg = red
+ c.colors.messages.info.bg = bg1
+ c.colors.messages.info.border = bg1
+ c.colors.messages.info.fg = blue
+ c.colors.messages.warning.bg = bg1
+ c.colors.messages.warning.border = bg1
+ c.colors.messages.warning.fg = yellow
+
+ # Download bar.
+ c.colors.downloads.bar.bg = bg0
+ c.colors.downloads.error.bg = bg2
+ c.colors.downloads.error.fg = red
+ c.colors.downloads.start.bg = bg2
+ c.colors.downloads.start.fg = blue
+ c.colors.downloads.stop.bg = bg2
+ c.colors.downloads.stop.fg = green
+
+ # Keyhints.
+ c.colors.keyhint.bg = bg0
+ c.colors.keyhint.fg = fg0
+ c.colors.keyhint.suffix.fg = yellow
+
+ # Default color for about:blank pages (or if the css didn't specify)
+ #c.colors.webpage.bg = bg1
+
+ # Context menu.
+ c.colors.contextmenu.disabled.bg = bg1
+ c.colors.contextmenu.disabled.fg = fg1
+ c.colors.contextmenu.menu.bg = bg1
+ c.colors.contextmenu.menu.fg = fg0
+ c.colors.contextmenu.selected.bg = bg2
+ c.colors.contextmenu.selected.fg = blue
+
+ # Prompts.
+ c.colors.prompts.bg = bg1
+ c.colors.prompts.border = "2px solid " + bg0
+ c.colors.prompts.fg = fg0
+ c.colors.prompts.selected.bg = bg2
+ c.colors.prompts.selected.fg = blue
'';
"qutebrowser/redirectors.py".text = ''
-# I don't remember who I took this from. probably in qutebrowser m$hub issues
-
-import operator, re, typing
-from urllib.parse import urljoin
-
-from qutebrowser.api import interceptor, message
-from PyQt6.QtCore import QUrl
-
-def _pastebin_redir(url: QUrl) -> bool:
- p = url.path().strip('/')
- if p.isalnum():
- url.setPath(urljoin("/raw/", p))
- return True
- return False
-
-# Any return value other than a literal 'False' means we redirected
-REDIRECT_MAP = {
- "new.reddit.com": operator.methodcaller('setHost', 'redlib.demiurge.epistemia'),
- "np.reddit.com": operator.methodcaller('setHost', 'redlib.demiurge.epistemia'),
- "old.reddit.com": operator.methodcaller('setHost', 'redlib.demiurge.epistemia'),
- "reddit.com": operator.methodcaller('setHost', 'redlib.demiurge.epistemia'),
- "www.reddit.com": operator.methodcaller('setHost', 'redlib.demiurge.epistemia'),
-
- "www.youtube.com": operator.methodcaller('setHost', 'invidious.demiurge.epistemia'),
- "youtube.com": operator.methodcaller('setHost', 'invidious.demiurge.epistemia'),
- "youtu.be": operator.methodcaller('setHost', 'invidious.demiurge.epistemia'),
-
- "imgur.com": operator.methodcaller('setHost', 'rimgo.bloat.cat'),
- "i.imgur.com": operator.methodcaller('setHost', 'rimgo.bloat.cat'),
-
- # Causes an infinite loop if the paste does not exist...
- "pastebin.com": _pastebin_redir,
- } # type: typing.Dict[str, typing.Callable[..., typing.Optional[bool]]]
-
-def int_fn(info: interceptor.Request):
- """Block the given request if necessary."""
- if (info.resource_type != interceptor.ResourceType.main_frame or
- info.request_url.scheme() in {"data", "blob"}):
- return
- url = info.request_url
- redir = REDIRECT_MAP.get(url.host())
- if redir is not None and redir(url) is not False:
- message.info("Redirecting to " + url.toString())
- info.redirect(url)
-
-interceptor.register(int_fn)
+ # I don't remember who I took this from. probably in qutebrowser m$hub issues
+
+ import operator, re, typing
+ from urllib.parse import urljoin
+
+ from qutebrowser.api import interceptor, message
+ from PyQt6.QtCore import QUrl
+
+ def _pastebin_redir(url: QUrl) -> bool:
+ p = url.path().strip('/')
+ if p.isalnum():
+ url.setPath(urljoin("/raw/", p))
+ return True
+ return False
+
+ # Any return value other than a literal 'False' means we redirected
+ REDIRECT_MAP = {
+ "new.reddit.com": operator.methodcaller('setHost', 'redlib.demiurge.epistemia'),
+ "np.reddit.com": operator.methodcaller('setHost', 'redlib.demiurge.epistemia'),
+ "old.reddit.com": operator.methodcaller('setHost', 'redlib.demiurge.epistemia'),
+ "reddit.com": operator.methodcaller('setHost', 'redlib.demiurge.epistemia'),
+ "www.reddit.com": operator.methodcaller('setHost', 'redlib.demiurge.epistemia'),
+
+ "www.youtube.com": operator.methodcaller('setHost', 'invidious.demiurge.epistemia'),
+ "youtube.com": operator.methodcaller('setHost', 'invidious.demiurge.epistemia'),
+ "youtu.be": operator.methodcaller('setHost', 'invidious.demiurge.epistemia'),
+
+ "imgur.com": operator.methodcaller('setHost', 'rimgo.bloat.cat'),
+ "i.imgur.com": operator.methodcaller('setHost', 'rimgo.bloat.cat'),
+
+ # Causes an infinite loop if the paste does not exist...
+ "pastebin.com": _pastebin_redir,
+ } # type: typing.Dict[str, typing.Callable[..., typing.Optional[bool]]]
+
+ def int_fn(info: interceptor.Request):
+ """Block the given request if necessary."""
+ if (info.resource_type != interceptor.ResourceType.main_frame or
+ info.request_url.scheme() in {"data", "blob"}):
+ return
+ url = info.request_url
+ redir = REDIRECT_MAP.get(url.host())
+ if redir is not None and redir(url) is not False:
+ message.info("Redirecting to " + url.toString())
+ info.redirect(url)
+
+ interceptor.register(int_fn)
'';
};
- mimeApps = {
- enable = true;
- defaultApplications = {
- "application/pdf" = [ "zathura.desktop" ];
- "application/xhtml+xml" = [ "qutebrowser.desktop" "librewolf.desktop" ];
- "text/html" = [ "qutebrowser.desktop" "librewolf.desktop" ];
- "text/xml" = [ "qutebrowser.desktop" "librewolf.desktop" ];
- };
- };
-
- userDirs = {
- createDirectories = false;
- desktop = "$HOME/";
- documents = "$HOME/docs";
- download = "$HOME/tmp";
- music = "$HOME/music";
- pictures = "$HOME/pics";
- publicShare = "$HOME/";
- templates = "$HOME/";
- videos = "$HOME/";
- };
- };
+ mimeApps = {
+ enable = true;
+ defaultApplications = {
+ "application/pdf" = [ "zathura.desktop" ];
+ "application/xhtml+xml" = [
+ "qutebrowser.desktop"
+ "librewolf.desktop"
+ ];
+ "text/html" = [
+ "qutebrowser.desktop"
+ "librewolf.desktop"
+ ];
+ "text/xml" = [
+ "qutebrowser.desktop"
+ "librewolf.desktop"
+ ];
+ };
+ };
+
+ userDirs = {
+ createDirectories = false;
+ desktop = "$HOME/";
+ documents = "$HOME/docs";
+ download = "$HOME/tmp";
+ music = "$HOME/music";
+ pictures = "$HOME/pics";
+ publicShare = "$HOME/";
+ templates = "$HOME/";
+ videos = "$HOME/";
+ };
+ };
wayland.windowManager.sway = {
- enable = true;
+ enable = true;
package = pkgs.swayfx;
# https://github.com/nix-community/home-manager/issues/5379#issuecomment-2096066969
checkConfig = false;
- config = {
+ config = {
input."type:pointer".accel_profile = "flat";
output."*".background = "~/pics/wp/elite_milky_way_below.png center";
- bars = [ {
- colors = {
- # background = colors.current.primary.background;
- background = "#000000";
- statusline = colors.current.primary.foreground;
- focusedWorkspace = {
- background = colors.current.normal.black;
- border = colors.current.normal.black;
- text = colors.current.normal.green;
- };
- activeWorkspace = {
- background = colors.current.normal.black;
- border = colors.current.normal.black;
- text = colors.current.primary.foreground;
- };
- inactiveWorkspace = {
- background = colors.current.primary.background;
- border = colors.current.primary.background;
- text = colors.current.normal.white;
- };
- };
- command = "${pkgs.sway}/bin/swaybar";
- position = "top";
- statusCommand = "while date +'%Y-%m-%d %X'; do sleep 1; done";
- } ];
-
- colors = {
- focused = {
- background = colors.current.primary.background;
- border = colors.current.primary.background;
- childBorder = colors.current.primary.background;
- indicator = colors.current.normal.black;
- text = colors.current.normal.green;
- };
- focusedInactive = {
- background = colors.current.primary.background;
- border = colors.current.primary.background;
- childBorder = colors.current.primary.background;
- indicator = colors.current.normal.black;
- text = colors.current.primary.foreground;
- };
- unfocused = {
- background = colors.current.normal.black;
- border = colors.current.normal.black;
- childBorder = colors.current.normal.black;
- indicator = colors.current.primary.background;
- text = colors.current.normal.white;
- };
- };
+ bars = [
+ {
+ colors = {
+ # background = colors.current.primary.background;
+ background = "#000000";
+ statusline = colors.current.primary.foreground;
+ focusedWorkspace = {
+ background = colors.current.normal.black;
+ border = colors.current.normal.black;
+ text = colors.current.normal.green;
+ };
+ activeWorkspace = {
+ background = colors.current.normal.black;
+ border = colors.current.normal.black;
+ text = colors.current.primary.foreground;
+ };
+ inactiveWorkspace = {
+ background = colors.current.primary.background;
+ border = colors.current.primary.background;
+ text = colors.current.normal.white;
+ };
+ };
+ command = "${pkgs.sway}/bin/swaybar";
+ position = "top";
+ statusCommand = "while date +'%Y-%m-%d %X'; do sleep 1; done";
+ }
+ ];
+
+ colors = {
+ focused = {
+ background = colors.current.primary.background;
+ border = colors.current.primary.background;
+ childBorder = colors.current.primary.background;
+ indicator = colors.current.normal.black;
+ text = colors.current.normal.green;
+ };
+ focusedInactive = {
+ background = colors.current.primary.background;
+ border = colors.current.primary.background;
+ childBorder = colors.current.primary.background;
+ indicator = colors.current.normal.black;
+ text = colors.current.primary.foreground;
+ };
+ unfocused = {
+ background = colors.current.normal.black;
+ border = colors.current.normal.black;
+ childBorder = colors.current.normal.black;
+ indicator = colors.current.primary.background;
+ text = colors.current.normal.white;
+ };
+ };
focus = {
- mouseWarping = true;
+ mouseWarping = true;
wrapping = "yes";
};
- fonts = {
- names = [ "monospace" ];
- size = 11.0;
- };
+ fonts = {
+ names = [ "monospace" ];
+ size = 11.0;
+ };
gaps = {
inner = 15;
smartGaps = true;
};
- keybindings =
- let
- left = "n";
- down = "e";
- up = "o";
- right = "i";
- modifier = config.wayland.windowManager.sway.config.modifier;
- menu = config.wayland.windowManager.sway.config.menu;
- terminal = config.wayland.windowManager.sway.config.terminal;
- in lib.mkOptionDefault {
- "${modifier}+Return" = "exec ${terminal}";
- "${modifier}+p" = "exec ${menu}";
- "${modifier}+b" = "exec bm t";
- "${modifier}+Shift+b" = "exec kasimenu";
- "${modifier}+u" = "exec kasimenu user";
- "${modifier}+Shift+u" = "exec kasimenu email";
- "${modifier}+Shift+t" = "exec kasimenu_totp";
-
- "${modifier}+Shift+q" = "kill";
- "${modifier}+Shift+c" = "reload";
- "Mod1+Mod4+Ctrl+Shift+e" = "exit";
-
- "${modifier}+${left}" = "focus left;";
- "${modifier}+${down}" = "focus down;";
- "${modifier}+${up}" = "focus up;";
- "${modifier}+${right}" = "focus right;";
- "${modifier}+Shift+${left}" = "move left";
- "${modifier}+Shift+${down}" = "move down";
- "${modifier}+Shift+${up}" = "move up";
- "${modifier}+Shift+${right}" = "move right";
-
- # TODO do this programatically
- "${modifier}+1" = "workspace number 1";
- "${modifier}+2" = "workspace number 2";
- "${modifier}+3" = "workspace number 3";
- "${modifier}+4" = "workspace number 4";
- "${modifier}+5" = "workspace number 5";
- "${modifier}+6" = "workspace number 6";
- "${modifier}+7" = "workspace number 7";
- "${modifier}+8" = "workspace number 8";
- "${modifier}+9" = "workspace number 9";
- "${modifier}+0" = "workspace number 10";
- "${modifier}+Shift+1" = "move container to workspace number 1";
- "${modifier}+Shift+2" = "move container to workspace number 2";
- "${modifier}+Shift+3" = "move container to workspace number 3";
- "${modifier}+Shift+4" = "move container to workspace number 4";
- "${modifier}+Shift+5" = "move container to workspace number 5";
- "${modifier}+Shift+6" = "move container to workspace number 6";
- "${modifier}+Shift+7" = "move container to workspace number 7";
- "${modifier}+Shift+8" = "move container to workspace number 8";
- "${modifier}+Shift+9" = "move container to workspace number 9";
- "${modifier}+Shift+0" = "move container to workspace number 10";
-
- "${modifier}+Ctrl+Shift+b" = "splith";
- "${modifier}+Ctrl+Shift+v" = "splitv";
- "${modifier}+s" = "layout stacking";
- "${modifier}+t" = "layout tabbed";
- "${modifier}+Ctrl+Shift+t" = "layout toggle split";
- "${modifier}+Shift+f" = "fullscreen";
- "${modifier}+Shift+space" = "floating toggle";
- "${modifier}+space" = "focus mode_toggle";
- "${modifier}+a" = "focus parent";
-
- "${modifier}+r" = "mode resize";
- };
-
- menu = "${pkgs.wmenu}/bin/wmenu-run";
-
- modes.resize =
- let
- left = "n";
- down = "e";
- up = "o";
- right = "i";
- in lib.mkOptionDefault {
- ${left} = "resize shrink width 10px";
- ${down} = "resize grow height 10px";
- ${up} = "resize shrink width 10px";
- ${right} = "resize grow width 10px";
- Escape = "mode default";
- };
-
- modifier = "Mod4";
-
- terminal = "foot";
-
- window = {
- border = 0;
- titlebar = false;
- };
+ keybindings =
+ let
+ left = "n";
+ down = "e";
+ up = "o";
+ right = "i";
+ modifier = config.wayland.windowManager.sway.config.modifier;
+ menu = config.wayland.windowManager.sway.config.menu;
+ terminal = config.wayland.windowManager.sway.config.terminal;
+ in
+ lib.mkOptionDefault {
+ "${modifier}+Return" = "exec ${terminal}";
+ "${modifier}+p" = "exec ${menu}";
+ "${modifier}+b" = "exec bm t";
+ "${modifier}+Shift+b" = "exec kasimenu";
+ "${modifier}+u" = "exec kasimenu user";
+ "${modifier}+Shift+u" = "exec kasimenu email";
+ "${modifier}+Shift+t" = "exec kasimenu_totp";
+
+ "${modifier}+Shift+q" = "kill";
+ "${modifier}+Shift+c" = "reload";
+ "Mod1+Mod4+Ctrl+Shift+e" = "exit";
+
+ "${modifier}+${left}" = "focus left;";
+ "${modifier}+${down}" = "focus down;";
+ "${modifier}+${up}" = "focus up;";
+ "${modifier}+${right}" = "focus right;";
+ "${modifier}+Shift+${left}" = "move left";
+ "${modifier}+Shift+${down}" = "move down";
+ "${modifier}+Shift+${up}" = "move up";
+ "${modifier}+Shift+${right}" = "move right";
+
+ # TODO do this programatically
+ "${modifier}+1" = "workspace number 1";
+ "${modifier}+2" = "workspace number 2";
+ "${modifier}+3" = "workspace number 3";
+ "${modifier}+4" = "workspace number 4";
+ "${modifier}+5" = "workspace number 5";
+ "${modifier}+6" = "workspace number 6";
+ "${modifier}+7" = "workspace number 7";
+ "${modifier}+8" = "workspace number 8";
+ "${modifier}+9" = "workspace number 9";
+ "${modifier}+0" = "workspace number 10";
+ "${modifier}+Shift+1" = "move container to workspace number 1";
+ "${modifier}+Shift+2" = "move container to workspace number 2";
+ "${modifier}+Shift+3" = "move container to workspace number 3";
+ "${modifier}+Shift+4" = "move container to workspace number 4";
+ "${modifier}+Shift+5" = "move container to workspace number 5";
+ "${modifier}+Shift+6" = "move container to workspace number 6";
+ "${modifier}+Shift+7" = "move container to workspace number 7";
+ "${modifier}+Shift+8" = "move container to workspace number 8";
+ "${modifier}+Shift+9" = "move container to workspace number 9";
+ "${modifier}+Shift+0" = "move container to workspace number 10";
+
+ "${modifier}+Ctrl+Shift+b" = "splith";
+ "${modifier}+Ctrl+Shift+v" = "splitv";
+ "${modifier}+s" = "layout stacking";
+ "${modifier}+t" = "layout tabbed";
+ "${modifier}+Ctrl+Shift+t" = "layout toggle split";
+ "${modifier}+Shift+f" = "fullscreen";
+ "${modifier}+Shift+space" = "floating toggle";
+ "${modifier}+space" = "focus mode_toggle";
+ "${modifier}+a" = "focus parent";
+
+ "${modifier}+r" = "mode resize";
+ };
+
+ menu = "${pkgs.wmenu}/bin/wmenu-run";
+
+ modes.resize =
+ let
+ left = "n";
+ down = "e";
+ up = "o";
+ right = "i";
+ in
+ lib.mkOptionDefault {
+ ${left} = "resize shrink width 10px";
+ ${down} = "resize grow height 10px";
+ ${up} = "resize shrink width 10px";
+ ${right} = "resize grow width 10px";
+ Escape = "mode default";
+ };
+
+ modifier = "Mod4";
+
+ terminal = "foot";
+
+ window = {
+ border = 0;
+ titlebar = false;
+ };
defaultWorkspace = "workspace number 1";
- workspaceAutoBackAndForth = true;
+ workspaceAutoBackAndForth = true;
};
extraConfig = ''
- mouse_warping container
+ mouse_warping container
- blur enable
- blur_xray disable
- blur_radius 3
- blur_passes 5
+ blur enable
+ blur_xray disable
+ blur_radius 3
+ blur_passes 5
- corner_radius 10
+ corner_radius 10
- shadows enable
- shadow_blur_radius 10
+ shadows enable
+ shadow_blur_radius 10
- for_window [class="Emacs"] opacity 0.9
- for_window [app_id="qutebrowser"] opacity 0.9
- for_window [app_id="vesktop"] opacity 0.9
+ for_window [class="Emacs"] opacity 0.9
+ for_window [app_id="qutebrowser"] opacity 0.9
+ for_window [app_id="vesktop"] opacity 0.9
- for_window [title="profanity"] move container to workspace 9
- for_window [app_id="vesktop"] move container to workspace 10
+ for_window [title="profanity"] move container to workspace 9
+ for_window [app_id="vesktop"] move container to workspace 10
- exec ${pkgs.qutebrowser}/bin/qutebrowser
- exec ${pkgs.vesktop}/bin/vesktop --use-vulkan --ozone-platform=wayland --enable-features=UseOzonePlatform,Vulkan
- exec ${config.wayland.windowManager.sway.config.terminal} -T profanity -e ${pkgs.profanity}/bin/profanity
+ exec ${pkgs.qutebrowser}/bin/qutebrowser
+ exec ${pkgs.vesktop}/bin/vesktop --use-vulkan --ozone-platform=wayland --enable-features=UseOzonePlatform,Vulkan
+ exec ${config.wayland.windowManager.sway.config.terminal} -T profanity -e ${pkgs.profanity}/bin/profanity
# for elite va
- bindsym --whole-window BTN_SIDE echo press >/tmp/elite_va.fifo
- bindsym --whole-window --release BTN_SIDE echo release >/tmp/elite_va.fifo
+ bindsym --whole-window BTN_SIDE echo press >/tmp/elite_va.fifo
+ bindsym --whole-window --release BTN_SIDE echo release >/tmp/elite_va.fifo
'';
- };
+ };
}
diff --git a/hosts/demiurge/default.nix b/hosts/demiurge/default.nix
@@ -1,28 +1,36 @@
-{ config, home-manager, lib, pkgs, inputs, llama-cpp, ... }:
+{
+ config,
+ home-manager,
+ lib,
+ pkgs,
+ inputs,
+ llama-cpp,
+ ...
+}:
{
- imports =
- [
- ./hardware.nix
- home-manager.nixosModules.default
- ];
+ imports = [
+ ./hardware.nix
+ home-manager.nixosModules.default
+ ];
# nixpkgs stuff
nixpkgs = {
config = {
# selectively allow unfree packages
- allowUnfreePredicate = pkg:
+ allowUnfreePredicate =
+ pkg:
builtins.elem (lib.getName pkg) [
-/*
- "cuda_cccl"
- "cuda_cudart"
- "cuda_nvcc"
- "cudnn"
- "libcublas"
- "libcufile"
- "quartus-prime-lite"
- "quartus-prime-lite-unwrapped"
-*/
+ /*
+ "cuda_cccl"
+ "cuda_cudart"
+ "cuda_nvcc"
+ "cudnn"
+ "libcublas"
+ "libcufile"
+ "quartus-prime-lite"
+ "quartus-prime-lite-unwrapped"
+ */
"steam"
"steam-unwrapped"
];
@@ -40,11 +48,13 @@
(self: super: {
invidious = super.invidious.overrideAttrs (old: {
# try removing shorts by ignoring any videos shorter than 65 seconds
- postPatch = old.postPatch + ''
- sed -i '/GROUP BY channel/a\ AND length_seconds > 65' src/invidious/database/channels.cr
- sed -i 's/\({view_name}\) \(ORDER BY published\)/\1 WHERE length_seconds > 65 \2/' src/invidious/users.cr
- sed -i 's/\({values})\) \(ORDER BY published\)/\1 AND length_seconds > 65 \2/' src/invidious/users.cr
- '';
+ postPatch =
+ old.postPatch
+ + ''
+ sed -i '/GROUP BY channel/a\ AND length_seconds > 65' src/invidious/database/channels.cr
+ sed -i 's/\({view_name}\) \(ORDER BY published\)/\1 WHERE length_seconds > 65 \2/' src/invidious/users.cr
+ sed -i 's/\({values})\) \(ORDER BY published\)/\1 AND length_seconds > 65 \2/' src/invidious/users.cr
+ '';
});
})
(self: super: {
@@ -61,11 +71,21 @@
})
(self: super: {
alvr = super.alvr.overrideAttrs (old: {
- buildInputs = old.buildInputs ++ [ super.android-tools super.usbutils ];
+ buildInputs = old.buildInputs ++ [
+ super.android-tools
+ super.usbutils
+ ];
nativeBuildInputs = old.nativeBuildInputs ++ [ super.makeWrapper ];
- postInstall = (old.postInstall or "") + ''
- wrapProgram $out/bin/alvr_dashboard --prefix PATH : "${super.lib.makeBinPath [ super.android-tools super.usbutils ]}"
- '';
+ postInstall =
+ (old.postInstall or "")
+ + ''
+ wrapProgram $out/bin/alvr_dashboard --prefix PATH : "${
+ super.lib.makeBinPath [
+ super.android-tools
+ super.usbutils
+ ]
+ }"
+ '';
});
})
];
@@ -94,7 +114,10 @@
efi.canTouchEfiVariables = true;
};
- zfs.extraPools = [ "data_wd" "nvme_warm" ];
+ zfs.extraPools = [
+ "data_wd"
+ "nvme_warm"
+ ];
};
# disable wifi and open some ports
@@ -105,7 +128,11 @@
wireless.enable = false;
firewall = {
- allowedTCPPorts = [ 22 80 443 ];
+ allowedTCPPorts = [
+ 22
+ 80
+ 443
+ ];
allowedUDPPorts = [ 51413 ];
};
@@ -127,11 +154,16 @@
ip route del 100.100.100.100/32 dev tailscale0
'';
- peers = [{
- allowedIPs = [ "0.0.0.0/0" "::0/0" ];
- endpoint = "45.134.142.206:51820";
- publicKey = "H5t7PsMDnUAHrR8D2Jt3Mh6N6w43WmCzrOHShlEU+zw=";
- }];
+ peers = [
+ {
+ allowedIPs = [
+ "0.0.0.0/0"
+ "::0/0"
+ ];
+ endpoint = "45.134.142.206:51820";
+ publicKey = "H5t7PsMDnUAHrR8D2Jt3Mh6N6w43WmCzrOHShlEU+zw=";
+ }
+ ];
};
};
@@ -145,7 +177,10 @@
};
# enable flakes and nix cli
- nix.settings.experimental-features = [ "nix-command" "flakes" ];
+ nix.settings.experimental-features = [
+ "nix-command"
+ "flakes"
+ ];
# Define a user account.
users.users = {
@@ -229,36 +264,38 @@
# I prefer doas over sudo for simplicity
doas = {
enable = true;
- extraRules = [{
- users = ["vin"];
- keepEnv = true;
- persist = true;
- }];
+ extraRules = [
+ {
+ users = [ "vin" ];
+ keepEnv = true;
+ persist = true;
+ }
+ ];
};
pki.certificates = [
''
------BEGIN CERTIFICATE-----
-MIIDMDCCAhigAwIBAgIUcSUafnojcFKod3f436VELfEKoFkwDQYJKoZIhvcNAQEL
-BQAwHTEbMBkGA1UEAwwSZGVtaXVyZ2UuZXBpc3RlbWlhMB4XDTI1MDMwMzEwMjQw
-OVoXDTI2MDMwMzEwMjQwOVowHTEbMBkGA1UEAwwSZGVtaXVyZ2UuZXBpc3RlbWlh
-MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwiRlreCXc7f+yWclxR2M
-639g0+Lr/c9HrX7EM2/olavPAtZgCzqqvJsDmXq4AURlwd82wZUZxXjWFwlRji/+
-WViXQBTWwnXVjc9MJlxTq2X2zfU2GIxYsrA1ZQuj0wVHlA+R/66oL0Padc/qQZfv
-sshQnrqnutvGobBWEGJXcCIDiwUGgHlIoelwY9G0GLE/rkVujNjAonyMhVGJHVUv
-lXyc3RNslQHymr4Wl6+lL6V6XfuB1taECJYSLXPx66TvJqod2Io+b7T7cWp+9g9U
-B2jQu1YnPRpwjdPvbOCPjPbOP6UcbyHdbHAidSM0FSL5riVUmugwDwbQKXFFX2gH
-hwIDAQABo2gwZjAfBgNVHREEGDAWghQqLmRlbWl1cmdlLmVwaXN0ZW1pYTATBgNV
-HSUEDDAKBggrBgEFBQcDATAPBgNVHRMECDAGAQH/AgEAMB0GA1UdDgQWBBTjMVhw
-zmkE6P5jFHkLVQE2gNB2ejANBgkqhkiG9w0BAQsFAAOCAQEAWvnwB83vXzQFpObF
-vn/nfZ9wYpNaBsE15ab3Fwd2nDc55KDkDWgBi5Xl8fwN3OhFOU2XXBCYqbCU6asx
-OnSx9glbhJioORO7B5ENbEYrpB97SaWASNXrBQ2KiQT5aC+9xb52K53kkk0tTn2l
-nBb+jyLItzWX99H6EavOq69a4T2BObZaSPQAfpM8FIrKl+UZC3152+bi8wKfG4K4
-FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM
-/ek8Rmf6DTLaFBx+raWyDTgMY23lvWTKDTT1+dZnRNcg72bFpIdqHsDrIg/IBjZ0
-3eGfkQ==
------END CERTIFICATE-----
-''
+ -----BEGIN CERTIFICATE-----
+ MIIDMDCCAhigAwIBAgIUcSUafnojcFKod3f436VELfEKoFkwDQYJKoZIhvcNAQEL
+ BQAwHTEbMBkGA1UEAwwSZGVtaXVyZ2UuZXBpc3RlbWlhMB4XDTI1MDMwMzEwMjQw
+ OVoXDTI2MDMwMzEwMjQwOVowHTEbMBkGA1UEAwwSZGVtaXVyZ2UuZXBpc3RlbWlh
+ MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwiRlreCXc7f+yWclxR2M
+ 639g0+Lr/c9HrX7EM2/olavPAtZgCzqqvJsDmXq4AURlwd82wZUZxXjWFwlRji/+
+ WViXQBTWwnXVjc9MJlxTq2X2zfU2GIxYsrA1ZQuj0wVHlA+R/66oL0Padc/qQZfv
+ sshQnrqnutvGobBWEGJXcCIDiwUGgHlIoelwY9G0GLE/rkVujNjAonyMhVGJHVUv
+ lXyc3RNslQHymr4Wl6+lL6V6XfuB1taECJYSLXPx66TvJqod2Io+b7T7cWp+9g9U
+ B2jQu1YnPRpwjdPvbOCPjPbOP6UcbyHdbHAidSM0FSL5riVUmugwDwbQKXFFX2gH
+ hwIDAQABo2gwZjAfBgNVHREEGDAWghQqLmRlbWl1cmdlLmVwaXN0ZW1pYTATBgNV
+ HSUEDDAKBggrBgEFBQcDATAPBgNVHRMECDAGAQH/AgEAMB0GA1UdDgQWBBTjMVhw
+ zmkE6P5jFHkLVQE2gNB2ejANBgkqhkiG9w0BAQsFAAOCAQEAWvnwB83vXzQFpObF
+ vn/nfZ9wYpNaBsE15ab3Fwd2nDc55KDkDWgBi5Xl8fwN3OhFOU2XXBCYqbCU6asx
+ OnSx9glbhJioORO7B5ENbEYrpB97SaWASNXrBQ2KiQT5aC+9xb52K53kkk0tTn2l
+ nBb+jyLItzWX99H6EavOq69a4T2BObZaSPQAfpM8FIrKl+UZC3152+bi8wKfG4K4
+ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM
+ /ek8Rmf6DTLaFBx+raWyDTgMY23lvWTKDTT1+dZnRNcg72bFpIdqHsDrIg/IBjZ0
+ 3eGfkQ==
+ -----END CERTIFICATE-----
+ ''
];
sudo.enable = false;
@@ -343,7 +380,11 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM
default_user_preferences = {
captions = [ "English" ];
dark_mode = "dark";
- feed_menu = [ "Popular" "Subscriptions" "Playlists" ];
+ feed_menu = [
+ "Popular"
+ "Subscriptions"
+ "Playlists"
+ ];
max_results = 100;
quality = "dash";
save_player_pos = true;
@@ -420,9 +461,9 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM
};
"sdui.demiurge.epistemia" = {
-# addSSL = true;
-# sslCertificate = "/var/demiurge.epistemia.crt";
-# sslCertificateKey = "/var/demiurge.epistemia.key";
+ # addSSL = true;
+ # sslCertificate = "/var/demiurge.epistemia.crt";
+ # sslCertificateKey = "/var/demiurge.epistemia.key";
locations."/" = {
proxyPass = "http://127.0.0.1:7860";
proxyWebsockets = true;
@@ -623,7 +664,10 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM
name = "free software directory";
engine = "mediawiki";
shortcut = "fsd";
- categories = ["it" "software wikis"];
+ categories = [
+ "it"
+ "software wikis"
+ ];
base_url = "https://directory.fsf.org/";
search_type = "title";
timeout = 5.0;
@@ -637,7 +681,10 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM
name = "gentoo";
engine = "mediawiki";
shortcut = "ge";
- categories = ["it" "software wikis"];
+ categories = [
+ "it"
+ "software wikis"
+ ];
base_url = "https://wiki.gentoo.org/";
api_path = "api.php";
search_type = "text";
@@ -744,7 +791,10 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM
engine = "stackexchange";
shortcut = "st";
api_site = "stackoverflow";
- categories = ["it" "q&a"];
+ categories = [
+ "it"
+ "q&a"
+ ];
}
{
@@ -752,7 +802,10 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM
engine = "stackexchange";
shortcut = "ubuntu";
api_site = "askubuntu";
- categories = ["it" "q&a"];
+ categories = [
+ "it"
+ "q&a"
+ ];
}
{
@@ -760,15 +813,21 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM
engine = "stackexchange";
shortcut = "su";
api_site = "superuser";
- categories = ["it" "q&a"];
+ categories = [
+ "it"
+ "q&a"
+ ];
}
- {
+ {
name = "nixos.discourse";
engine = "discourse";
shortcut = "dnos";
base_url = "https://discourse.nixos.org";
- categories = ["it" "q&a"];
+ categories = [
+ "it"
+ "q&a"
+ ];
}
{
@@ -786,7 +845,10 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM
url_query = "URL";
title_query = "Title";
content_query = "Snippet";
- categories = ["general" "web"];
+ categories = [
+ "general"
+ "web"
+ ];
shortcut = "wib";
about.website = "https://wiby.me/";
}
@@ -796,7 +858,10 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM
engine = "mediawiki";
weight = 0.5;
shortcut = "wb";
- categories = ["general" "wikimedia"];
+ categories = [
+ "general"
+ "wikimedia"
+ ];
base_url = "https://{language}.wikibooks.org/";
search_type = "text";
about = {
@@ -809,7 +874,10 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM
name = "wiktionary";
engine = "mediawiki";
shortcut = "wt";
- categories = ["dictionaries" "wikimedia"];
+ categories = [
+ "dictionaries"
+ "wikimedia"
+ ];
base_url = "https://{language}.wiktionary.org/";
search_type = "text";
about = {
@@ -823,7 +891,10 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM
engine = "mediawiki";
weight = 0.5;
shortcut = "wv";
- categories = ["general" "wikimedia"];
+ categories = [
+ "general"
+ "wikimedia"
+ ];
base_url = "https://{language}.wikiversity.org/";
search_type = "text";
about = {
@@ -849,7 +920,10 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM
shortcut = "br";
time_range_support = true;
paging = true;
- categories = ["general" "web"];
+ categories = [
+ "general"
+ "web"
+ ];
brave_category = "search";
}
@@ -858,7 +932,10 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM
engine = "brave";
network = "brave";
shortcut = "brimg";
- categories = ["images" "web"];
+ categories = [
+ "images"
+ "web"
+ ];
brave_category = "images";
}
@@ -873,7 +950,10 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM
title_xpath = "./h4/a[2]";
content_xpath = "./p";
first_page_num = 1;
- categories = ["it" "repos"];
+ categories = [
+ "it"
+ "repos"
+ ];
about = {
website = "https://sr.ht";
wikidata_id = "Q78514485";
@@ -914,12 +994,12 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM
udev = {
enable = true;
extraRules = ''
- # ST-Link v2.1
- SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374b", MODE:="0666"
+ # ST-Link v2.1
+ SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374b", MODE:="0666"
- # Oculus Quest 2
- SUBSYSTEM=="usb", ATTR{idVendor}=="2833", ATTR{idProduct}=="0186", MODE="0660",
- GROUP="input", SYMLINK+="ocuquest%n"
+ # Oculus Quest 2
+ SUBSYSTEM=="usb", ATTR{idVendor}=="2833", ATTR{idProduct}=="0186", MODE="0660",
+ GROUP="input", SYMLINK+="ocuquest%n"
'';
};
@@ -928,9 +1008,9 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM
xserver = {
enable = true;
autorun = false;
- displayManager.startx.enable = true;
+ displayManager.startx.enable = true;
modules = [ pkgs.xf86_input_wacom ];
- videoDrivers = [ "amdgpu" ];
+ videoDrivers = [ "amdgpu" ];
wacom.enable = true;
};
};
@@ -940,26 +1020,26 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM
services = {
invidious_token = {
script = ''
-set -euo pipefail
-
-a="$(${pkgs.podman}/bin/podman run quay.io/invidious/youtube-trusted-session-generator | sed -n 4,5p)"
-visitor_data=$(echo "$a" | sed -n 1p | cut -d' ' -f2)
-po_token=$(echo "$a" | sed -n 2p | cut -d' ' -f2)
-day=$(date +%e | tr -d ' ')
-
-printf '{"visitor_data": "%s",\n"po_token": "%s",\n' \
- "$visitor_data" "$po_token" \
- >/run/invidious_settings
-
-if [ $((day % 2)) -eq 0 ]; then
- printf '"force_resolve": "ipv6"}\n' >>/run/invidious_settings
-else
- printf '"force_resolve": "ipv4"}\n' >>/run/invidious_settings
-fi
-
-${pkgs.systemd}/bin/systemctl restart invidious-sig-helper
-${pkgs.systemd}/bin/systemctl restart invidious
- '';
+ set -euo pipefail
+
+ a="$(${pkgs.podman}/bin/podman run quay.io/invidious/youtube-trusted-session-generator | sed -n 4,5p)"
+ visitor_data=$(echo "$a" | sed -n 1p | cut -d' ' -f2)
+ po_token=$(echo "$a" | sed -n 2p | cut -d' ' -f2)
+ day=$(date +%e | tr -d ' ')
+
+ printf '{"visitor_data": "%s",\n"po_token": "%s",\n' \
+ "$visitor_data" "$po_token" \
+ >/run/invidious_settings
+
+ if [ $((day % 2)) -eq 0 ]; then
+ printf '"force_resolve": "ipv6"}\n' >>/run/invidious_settings
+ else
+ printf '"force_resolve": "ipv4"}\n' >>/run/invidious_settings
+ fi
+
+ ${pkgs.systemd}/bin/systemctl restart invidious-sig-helper
+ ${pkgs.systemd}/bin/systemctl restart invidious
+ '';
serviceConfig = {
Type = "oneshot";
User = "root";
diff --git a/hosts/demiurge/hardware.nix b/hosts/demiurge/hardware.nix
@@ -1,53 +1,70 @@
# Do not modify this file! It was generated by ‘nixos-generate-config’
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
-{ config, lib, pkgs, modulesPath, ... }:
+{
+ config,
+ lib,
+ pkgs,
+ modulesPath,
+ ...
+}:
{
- imports =
- [ (modulesPath + "/installer/scan/not-detected.nix")
- ];
+ imports = [
+ (modulesPath + "/installer/scan/not-detected.nix")
+ ];
- boot.initrd.availableKernelModules = [ "mpt3sas" "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
+ boot.initrd.availableKernelModules = [
+ "mpt3sas"
+ "nvme"
+ "xhci_pci"
+ "ahci"
+ "usbhid"
+ "usb_storage"
+ "sd_mod"
+ ];
boot.initrd.kernelModules = [ "amdgpu" ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
- fileSystems."/" =
- { device = "zroot/root";
- fsType = "zfs";
- options = [ "zfsutil" ];
- };
-
- fileSystems."/nix" =
- { device = "zroot/nix";
- fsType = "zfs";
- options = [ "zfsutil" ];
- };
-
- fileSystems."/var" =
- { device = "zroot/var";
- fsType = "zfs";
- options = [ "zfsutil" ];
- };
-
- fileSystems."/home" =
- { device = "zroot/home";
- fsType = "zfs";
- options = [ "zfsutil" ];
- };
-
- fileSystems."/data" =
- { device = "nvme_warm";
- fsType = "zfs";
- options = [ "zfsutil" ];
- };
-
- fileSystems."/boot" =
- { device = "/dev/disk/by-uuid/1C01-EE5C";
- fsType = "vfat";
- options = [ "fmask=0022" "dmask=0022" ];
- };
+ fileSystems."/" = {
+ device = "zroot/root";
+ fsType = "zfs";
+ options = [ "zfsutil" ];
+ };
+
+ fileSystems."/nix" = {
+ device = "zroot/nix";
+ fsType = "zfs";
+ options = [ "zfsutil" ];
+ };
+
+ fileSystems."/var" = {
+ device = "zroot/var";
+ fsType = "zfs";
+ options = [ "zfsutil" ];
+ };
+
+ fileSystems."/home" = {
+ device = "zroot/home";
+ fsType = "zfs";
+ options = [ "zfsutil" ];
+ };
+
+ fileSystems."/data" = {
+ device = "nvme_warm";
+ fsType = "zfs";
+ options = [ "zfsutil" ];
+ };
+
+ fileSystems."/boot" = {
+ device = "/dev/disk/by-uuid/1C01-EE5C";
+ fsType = "vfat";
+ options = [
+ "fmask=0022"
+ "dmask=0022"
+ ];
+ };
swapDevices = [ ];
diff --git a/hosts/hastur/default.nix b/hosts/hastur/default.nix
@@ -2,14 +2,20 @@
# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
-{ config, home-manager, lib, pkgs, inputs, ... }:
+{
+ config,
+ home-manager,
+ lib,
+ pkgs,
+ inputs,
+ ...
+}:
{
- imports =
- [
- ./hardware.nix
- home-manager.nixosModules.default
- ];
+ imports = [
+ ./hardware.nix
+ home-manager.nixosModules.default
+ ];
# decrypt agenix secrets
age.secrets = {
@@ -26,10 +32,12 @@
zfsSupport = true;
efiSupport = true;
efiInstallAsRemovable = true;
- mirroredBoots = [{
- devices = [ "nodev" ];
- path = "/boot";
- }];
+ mirroredBoots = [
+ {
+ devices = [ "nodev" ];
+ path = "/boot";
+ }
+ ];
};
# disable wifi and open some ports
@@ -50,10 +58,10 @@
phase2="auth=MSCHAPv2"
identity="***REDACTED_EMAIL***"
password="***REDACTED_PASSWORD***"
- '';
+ '';
};
- FloridaPoly_BYOD = {};
+ FloridaPoly_BYOD = { };
iphonebob.pskRaw = "***REDACTED_PSK***";
Retreat_86WiFi.pskRaw = "***REDACTED_PSK***";
@@ -85,11 +93,16 @@
ip route del 100.100.100.100/32 dev tailscale0
'';
- peers = [{
- allowedIPs = [ "0.0.0.0/0" "::0/0" ];
- endpoint = "45.134.142.219:51820";
- publicKey = "FVEKAMJqaJU2AwWn5Mg9TK9IAfJc4XDUmSzEeC/VXGs=";
- }];
+ peers = [
+ {
+ allowedIPs = [
+ "0.0.0.0/0"
+ "::0/0"
+ ];
+ endpoint = "45.134.142.219:51820";
+ publicKey = "FVEKAMJqaJU2AwWn5Mg9TK9IAfJc4XDUmSzEeC/VXGs=";
+ }
+ ];
};
};
@@ -103,7 +116,10 @@
};
# enable flakes and nix cli
- nix.settings.experimental-features = [ "nix-command" "flakes" ];
+ nix.settings.experimental-features = [
+ "nix-command"
+ "flakes"
+ ];
# Define a user account.
users.users.vin = {
@@ -128,7 +144,8 @@
};
# selectively allow unfree packages
- nixpkgs.config.allowUnfreePredicate = pkg:
+ nixpkgs.config.allowUnfreePredicate =
+ pkg:
builtins.elem (lib.getName pkg) [
"quartus-prime-lite"
"quartus-prime-lite-unwrapped"
@@ -176,27 +193,29 @@
# I prefer doas over sudo for simplicity
doas = {
enable = true;
- extraRules = [{
- users = ["vin"];
- keepEnv = true;
- persist = true;
- }];
+ extraRules = [
+ {
+ users = [ "vin" ];
+ keepEnv = true;
+ persist = true;
+ }
+ ];
};
pki.certificates = [
''
------BEGIN CERTIFICATE-----
-MIIBoDCCAUagAwIBAgIRANI8aOT3LE+pzmsQWjcDOIgwCgYIKoZIzj0EAwIwLjER
-MA8GA1UEChMIZGVtaXVyZ2UxGTAXBgNVBAMTEGRlbWl1cmdlIFJvb3QgQ0EwHhcN
-MjUwMjE4MDUzNTA5WhcNMzUwMjE2MDUzNTA5WjAuMREwDwYDVQQKEwhkZW1pdXJn
-ZTEZMBcGA1UEAxMQZGVtaXVyZ2UgUm9vdCBDQTBZMBMGByqGSM49AgEGCCqGSM49
-AwEHA0IABMv8weeXJSDLygVlBxxAHLCvQCdf2COCk0QffNeDaVlIU/NFo3IyPSqG
-E3YtWEWamU/icgsJS999z3BZ5O+cTP6jRTBDMA4GA1UdDwEB/wQEAwIBBjASBgNV
-HRMBAf8ECDAGAQH/AgEBMB0GA1UdDgQWBBRM51S3OgTxXwNhdSSHw6llz0APFzAK
-BggqhkjOPQQDAgNIADBFAiA9alHJ1XHLlKNRUGRL4tdFC3RZYHtoN8BmBHEfDa1S
-LQIhANgsvYmyCp/Nur2RKaV25CDg3kMYVBXED2HVDy8qa+3i
------END CERTIFICATE-----
-''
+ -----BEGIN CERTIFICATE-----
+ MIIBoDCCAUagAwIBAgIRANI8aOT3LE+pzmsQWjcDOIgwCgYIKoZIzj0EAwIwLjER
+ MA8GA1UEChMIZGVtaXVyZ2UxGTAXBgNVBAMTEGRlbWl1cmdlIFJvb3QgQ0EwHhcN
+ MjUwMjE4MDUzNTA5WhcNMzUwMjE2MDUzNTA5WjAuMREwDwYDVQQKEwhkZW1pdXJn
+ ZTEZMBcGA1UEAxMQZGVtaXVyZ2UgUm9vdCBDQTBZMBMGByqGSM49AgEGCCqGSM49
+ AwEHA0IABMv8weeXJSDLygVlBxxAHLCvQCdf2COCk0QffNeDaVlIU/NFo3IyPSqG
+ E3YtWEWamU/icgsJS999z3BZ5O+cTP6jRTBDMA4GA1UdDwEB/wQEAwIBBjASBgNV
+ HRMBAf8ECDAGAQH/AgEBMB0GA1UdDgQWBBRM51S3OgTxXwNhdSSHw6llz0APFzAK
+ BggqhkjOPQQDAgNIADBFAiA9alHJ1XHLlKNRUGRL4tdFC3RZYHtoN8BmBHEfDa1S
+ LQIhANgsvYmyCp/Nur2RKaV25CDg3kMYVBXED2HVDy8qa+3i
+ -----END CERTIFICATE-----
+ ''
];
sudo.enable = false;
@@ -273,8 +292,8 @@ LQIhANgsvYmyCp/Nur2RKaV25CDg3kMYVBXED2HVDy8qa+3i
udev = {
enable = true;
extraRules = ''
- # ST-Link v2.1
- SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374b", MODE:="0666"
+ # ST-Link v2.1
+ SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374b", MODE:="0666"
'';
};
@@ -283,8 +302,8 @@ LQIhANgsvYmyCp/Nur2RKaV25CDg3kMYVBXED2HVDy8qa+3i
xserver = {
enable = true;
autorun = false;
- displayManager.startx.enable = true;
- videoDrivers = [ "modesetting" ];
+ displayManager.startx.enable = true;
+ videoDrivers = [ "modesetting" ];
};
};
diff --git a/hosts/hastur/hardware.nix b/hosts/hastur/hardware.nix
@@ -1,47 +1,63 @@
# Do not modify this file! It was generated by ‘nixos-generate-config’
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
-{ config, lib, pkgs, modulesPath, ... }:
+{
+ config,
+ lib,
+ pkgs,
+ modulesPath,
+ ...
+}:
{
- imports =
- [ (modulesPath + "/installer/scan/not-detected.nix")
- ];
+ imports = [
+ (modulesPath + "/installer/scan/not-detected.nix")
+ ];
- boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
+ boot.initrd.availableKernelModules = [
+ "xhci_pci"
+ "thunderbolt"
+ "nvme"
+ "usb_storage"
+ "sd_mod"
+ "rtsx_pci_sdmmc"
+ ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
- fileSystems."/" =
- { device = "zroot/root";
- fsType = "zfs";
- };
-
- fileSystems."/nix" =
- { device = "zroot/nix";
- fsType = "zfs";
- };
-
- fileSystems."/var" =
- { device = "zroot/var";
- fsType = "zfs";
- };
-
- fileSystems."/home" =
- { device = "zroot/home";
- fsType = "zfs";
- };
-
- fileSystems."/boot" =
- { device = "/dev/disk/by-uuid/BCF1-95FF";
- fsType = "vfat";
- options = [ "fmask=0022" "dmask=0022" ];
- };
-
- swapDevices =
- [ { device = "/dev/disk/by-uuid/7e66a653-5438-486f-99c6-0a1a51ef7d96"; }
+ fileSystems."/" = {
+ device = "zroot/root";
+ fsType = "zfs";
+ };
+
+ fileSystems."/nix" = {
+ device = "zroot/nix";
+ fsType = "zfs";
+ };
+
+ fileSystems."/var" = {
+ device = "zroot/var";
+ fsType = "zfs";
+ };
+
+ fileSystems."/home" = {
+ device = "zroot/home";
+ fsType = "zfs";
+ };
+
+ fileSystems."/boot" = {
+ device = "/dev/disk/by-uuid/BCF1-95FF";
+ fsType = "vfat";
+ options = [
+ "fmask=0022"
+ "dmask=0022"
];
+ };
+
+ swapDevices = [
+ { device = "/dev/disk/by-uuid/7e66a653-5438-486f-99c6-0a1a51ef7d96"; }
+ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
diff --git a/hosts/saklas/default.nix b/hosts/saklas/default.nix
@@ -1,4 +1,10 @@
-{ config, lib, pkgs, inputs, ... }:
+{
+ config,
+ lib,
+ pkgs,
+ inputs,
+ ...
+}:
{
imports = [
@@ -38,8 +44,17 @@
wireless.enable = false;
firewall = {
- allowedTCPPorts = [ 22 80 443 5222 5269 ];
- allowedUDPPorts = [ 3478 51820 ];
+ allowedTCPPorts = [
+ 22
+ 80
+ 443
+ 5222
+ 5269
+ ];
+ allowedUDPPorts = [
+ 3478
+ 51820
+ ];
};
};
@@ -52,10 +67,16 @@
"95.217.18.52/32"
"2a01:4f9:c010:a653::1/64"
];
- dns = [ "185.12.64.1" "185.12.64.2" ];
+ dns = [
+ "185.12.64.1"
+ "185.12.64.2"
+ ];
routes = [
{ Destination = "172.31.1.1"; }
- { Gateway = "172.31.1.1"; GatewayOnLink = true; }
+ {
+ Gateway = "172.31.1.1";
+ GatewayOnLink = true;
+ }
];
};
};
@@ -70,7 +91,10 @@
};
# enable flakes and nix cli
- nix.settings.experimental-features = [ "nix-command" "flakes" ];
+ nix.settings.experimental-features = [
+ "nix-command"
+ "flakes"
+ ];
# user accounts
users.users.root.openssh.authorizedKeys.keys = [
@@ -133,7 +157,11 @@
"xmpp.vineetk.net" = {
group = config.services.prosody.group;
- extraDomainNames = [ "vineetk.net" "muc.vineetk.net" "u.vineetk.net" ];
+ extraDomainNames = [
+ "vineetk.net"
+ "muc.vineetk.net"
+ "u.vineetk.net"
+ ];
reloadServices = [ "prosody" ];
};
};
@@ -142,11 +170,13 @@
# I prefer doas over sudo for simplicity
doas = {
enable = true;
- extraRules = [{
- users = [ "vin" ];
- keepEnv = true;
- persist = true;
- }];
+ extraRules = [
+ {
+ users = [ "vin" ];
+ keepEnv = true;
+ persist = true;
+ }
+ ];
};
sudo.enable = false;
@@ -169,12 +199,36 @@
dns = {
base_domain = "epistemia";
extra_records = [
- { name = "invidious.demiurge.epistemia"; type = "A"; value = "100.64.0.2"; }
- { name = "llm.demiurge.epistemia"; type = "A"; value = "100.64.0.2"; }
- { name = "navidrome.demiurge.epistemia"; type = "A"; value = "100.64.0.2"; }
- { name = "redlib.demiurge.epistemia"; type = "A"; value = "100.64.0.2"; }
- { name = "sdui.demiurge.epistemia"; type = "A"; value = "100.64.0.2"; }
- { name = "searx.demiurge.epistemia"; type = "A"; value = "100.64.0.2"; }
+ {
+ name = "invidious.demiurge.epistemia";
+ type = "A";
+ value = "100.64.0.2";
+ }
+ {
+ name = "llm.demiurge.epistemia";
+ type = "A";
+ value = "100.64.0.2";
+ }
+ {
+ name = "navidrome.demiurge.epistemia";
+ type = "A";
+ value = "100.64.0.2";
+ }
+ {
+ name = "redlib.demiurge.epistemia";
+ type = "A";
+ value = "100.64.0.2";
+ }
+ {
+ name = "sdui.demiurge.epistemia";
+ type = "A";
+ value = "100.64.0.2";
+ }
+ {
+ name = "searx.demiurge.epistemia";
+ type = "A";
+ value = "100.64.0.2";
+ }
];
};
logtail.enabled = false;
@@ -199,7 +253,7 @@
ssl.cert = config.security.acme.certs."xmpp.vineetk.net".directory + "/full.pem";
ssl.key = config.security.acme.certs."xmpp.vineetk.net".directory + "/key.pem";
- muc = [{ domain = "muc.vineetk.net"; }];
+ muc = [ { domain = "muc.vineetk.net"; } ];
virtualHosts.vineetk = {
domain = "vineetk.net";
enabled = true;
@@ -233,7 +287,7 @@
locations."/" = {
proxyPass = "http://127.0.0.1:5232/";
extraConfig = ''
- proxy_pass_header Authorization;
+ proxy_pass_header Authorization;
'';
};
};
@@ -321,52 +375,56 @@
mailserver = {
enable = true;
fqdn = "mail.vineetk.net";
- domains = [ "vineetk.net" "vinbiz.ca" "13f0.net" ];
+ domains = [
+ "vineetk.net"
+ "vinbiz.ca"
+ "13f0.net"
+ ];
# A list of all login accounts. To create the password hashes, use
# nix-shell -p mkpasswd --run 'mkpasswd -sm bcrypt'
loginAccounts = {
"vineet@vineetk.net" = {
hashedPasswordFile = config.age.secrets.email_vineetk.path;
- aliases = ["@vineetk.net"];
+ aliases = [ "@vineetk.net" ];
};
"kar@13f0.net" = {
hashedPasswordFile = config.age.secrets.email_13f0.path;
- aliases = ["@13f0.net"];
+ aliases = [ "@13f0.net" ];
sieveScript = ''
-require [ "fileinto", "mailbox" ];
-
-if address :matches [ "to", "cc" ] "announce@openbsd.org" {
- fileinto :create "openbsd_announce";
- stop;
-}
-if address :matches [ "to", "cc" ] "arm@openbsd.org" {
- fileinto :create "openbsd_arm";
- stop;
-}
-if address :matches [ "to", "cc" ] "misc@openbsd.org" {
- fileinto :create "openbsd_misc";
- stop;
-}
-if address :matches [ "to", "cc" ] "misc@opensmtpd.org" {
- fileinto :create "opensmtpd_misc";
- stop;
-}
-if address :matches [ "to", "cc" ] "oss-security@lists.openwall.com" {
- fileinto :create "oss_security";
- stop;
-}
-if address :matches [ "to", "cc" ] "tuhs@tuhs.org" {
- fileinto :create "tuhs";
- stop;
-}
+ require [ "fileinto", "mailbox" ];
+
+ if address :matches [ "to", "cc" ] "announce@openbsd.org" {
+ fileinto :create "openbsd_announce";
+ stop;
+ }
+ if address :matches [ "to", "cc" ] "arm@openbsd.org" {
+ fileinto :create "openbsd_arm";
+ stop;
+ }
+ if address :matches [ "to", "cc" ] "misc@openbsd.org" {
+ fileinto :create "openbsd_misc";
+ stop;
+ }
+ if address :matches [ "to", "cc" ] "misc@opensmtpd.org" {
+ fileinto :create "opensmtpd_misc";
+ stop;
+ }
+ if address :matches [ "to", "cc" ] "oss-security@lists.openwall.com" {
+ fileinto :create "oss_security";
+ stop;
+ }
+ if address :matches [ "to", "cc" ] "tuhs@tuhs.org" {
+ fileinto :create "tuhs";
+ stop;
+ }
'';
};
"vineet@vinbiz.ca" = {
hashedPasswordFile = config.age.secrets.email_vinbiz.path;
- aliases = ["postmaster@vinbiz.ca"];
+ aliases = [ "postmaster@vinbiz.ca" ];
};
"suresh@vinbiz.ca".hashedPasswordFile = config.age.secrets.email_vinbiz.path;
"revathy@vinbiz.ca".hashedPasswordFile = config.age.secrets.email_vinbiz.path;
diff --git a/secrets/secrets.nix b/secrets/secrets.nix
@@ -5,7 +5,10 @@ let
demiurge = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICXDBcX7hXJCaKDRNaIAfycU83Y2J+uEB4wcALBOQpse";
hastur = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN2ZUuPSPpIRULzMscBo5DJmA0UbFtG0jaANuzHo5aSQ";
saklas = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM7RCmfdgJKPnaBi336ZcvDWboxPj8lTtW1eDTN5qR2R";
- systems = [ demiurge saklas ];
+ systems = [
+ demiurge
+ saklas
+ ];
in
{
"email_vinbiz.age".publicKeys = users ++ [ saklas ];