lots of stuff

Signed-off-by: gwg313 <gwg313@pm.me>
This commit is contained in:
gwg313 2025-06-30 18:13:14 -04:00
parent cf1df09a9e
commit 58f06d6729
Signed by: gwg313
GPG key ID: 60FF63B4826B7400
55 changed files with 2154 additions and 584 deletions

1
.profile Normal file
View file

@ -0,0 +1 @@
export XDG_DATA_DIRS=$XDG_DATA_DIRS:/usr/share:/var/lib/flatpak/exports/share:$HOME/.local/share/flatpak/exports/share

View file

@ -20,10 +20,21 @@
# use the example session manager (no others are packaged yet so this is enabled by default, # use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now) # no need to redefine it in your config for now)
#media-session.enable = true; #media-session.enable = true;
extraConfig.pipewire.adjust-sample-rate = {
"context.properties" = {
"default.clock.rate" = 192000;
#"defautlt.allowed-rates" = [ 192000 48000 44100 ];
"defautlt.allowed-rates" = [ 192000 ];
#"default.clock.quantum" = 32;
#"default.clock.min-quantum" = 32;
#"default.clock.max-quantum" = 32;
};
};
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
pipewire pipewire
wireplumber wireplumber
easyeffects
]; ];
} }

18
common/gui/retroarch.nix Normal file
View file

@ -0,0 +1,18 @@
{ pkgs, ... }:
let
retroarchWithCores = (
pkgs.retroarch.withCores (
cores: with cores; [
bsnes
mgba
quicknes
genesis-plus-gx
]
)
);
in
{
environment.systemPackages = [
retroarchWithCores
];
}

View file

@ -3,7 +3,8 @@
lib, lib,
pkgs, pkgs,
... ...
}: { }:
{
options = { options = {
steam.enable = lib.mkEnableOption "Enables steam"; steam.enable = lib.mkEnableOption "Enables steam";
}; };
@ -13,8 +14,8 @@
nixpkgs.config.packageOverrides = pkgs: { nixpkgs.config.packageOverrides = pkgs: {
steam = pkgs.steam.override { steam = pkgs.steam.override {
extraPkgs = pkgs: extraPkgs =
with pkgs; [ pkgs: with pkgs; [
xorg.libXcursor xorg.libXcursor
xorg.libXi xorg.libXi
xorg.libXinerama xorg.libXinerama
@ -46,6 +47,9 @@
WINE_FULLSCREEN_FSR = "1"; WINE_FULLSCREEN_FSR = "1";
}; };
environment.systemPackages = with pkgs; [protonup]; environment.systemPackages = with pkgs; [
protonup
scanmem
];
}; };
} }

View file

@ -0,0 +1,26 @@
_: {
networking.extraHosts = ''
10.147.17.246 audiobooks.zerotier.gwg313.xyz
10.147.17.246 music.zerotier.gwg313.xyz
10.147.17.246 recipes.zerotier.gwg313.xyz
10.147.17.246 scholarsome.zerotier.gwg313.xyz
10.147.17.246 bookmarks.zerotier.gwg313.xyz
10.147.17.246 pastebin.zerotier.gwg313.xyz
10.147.17.246 snippets.zerotier.gwg313.xyz
10.147.17.246 git.zerotier.gwg313.xyz
10.147.17.246 s3.zerotier.gwg313.xyz
10.147.17.246 s3-console.zerotier.gwg313.xyz
10.147.17.246 registry.zerotier.gwg313.xyz
10.147.17.246 ci.zerotier.gwg313.xyz
10.1.10.50 music.gwg313.xyz
10.1.10.50 git.gwg313.xyz
10.1.10.50 ci.gwg313.xyz
10.1.10.50 registry.gwg313.xyz
10.1.10.50 s3.gwg313.xyz
10.1.10.50 s3-console.gwg313.xyz
10.1.10.50 pastebin.gwg313.xyz
'';
}

View file

@ -1,4 +1,4 @@
{ lib, ... }: { lib, pkgs, ... }:
{ {
imports = [ imports = [
./common.nix ./common.nix
@ -12,4 +12,13 @@
laptop.enable = lib.mkDefault false; laptop.enable = lib.mkDefault false;
nfs.enable = lib.mkDefault false; nfs.enable = lib.mkDefault false;
restic.enable = lib.mkDefault true; restic.enable = lib.mkDefault true;
services.flatpak.enable = true;
systemd.services.flatpak-repo = {
wantedBy = [ "multi-user.target" ];
path = [ pkgs.flatpak ];
script = ''
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
'';
};
# flatpak override --user --socket=wayland md.obsidian.Obsidian (Must run this for obsidian to launch)
} }

View file

@ -35,6 +35,6 @@
# inputs.superfile.packages.${system}.default # inputs.superfile.packages.${system}.default
]; ];
environment.sessionVariables = { environment.sessionVariables = {
FLAKE = "/home/${user}/repos/nixos-config"; NH_FLAKE = "/home/${user}/repos/nixos-config";
}; };
} }

View file

@ -25,6 +25,7 @@
"/home/${user}/Documents" "/home/${user}/Documents"
"/home/${user}/.local/share/password-store" "/home/${user}/.local/share/password-store"
]; ];
# extraBackupArgs = [ "--exclude-file=/home/gwg313/Documents/Celsus" ];
timerConfig = { timerConfig = {
OnCalendar = "23:00"; OnCalendar = "23:00";
}; };

View file

@ -1,7 +1,8 @@
{pkgs, ...}: { { pkgs, ... }:
{
stylix = { stylix = {
# base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-macchiato.yaml";
base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-latte.yaml"; base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-latte.yaml";
# base16Scheme = "${pkgs.base16-schemes}/share/themes/atelier-sulphurpool-light.yaml";
# image = ./wallpaper.jpg; # image = ./wallpaper.jpg;
image = ../../wallpapers/nixos-wallpaper-catppuccin-latte.png; image = ../../wallpapers/nixos-wallpaper-catppuccin-latte.png;
#polarity = "dark"; #polarity = "dark";
@ -9,22 +10,22 @@
enable = true; enable = true;
opacity.terminal = 1.0; opacity.terminal = 1.0;
fonts.sizes.terminal = 15; fonts.sizes.terminal = 18;
fonts = { fonts = {
serif = { serif = {
package = pkgs.meslo-lgs-nf; package = pkgs.lmodern;
name = "MesloLGS NF"; name = "Latin Modern Roman";
}; };
sansSerif = { sansSerif = {
package = pkgs.meslo-lgs-nf; package = pkgs.inter;
name = "MesloLGS NF"; name = "Inter";
}; };
monospace = { monospace = {
package = pkgs.ibm-plex; package = pkgs.fira-code;
name = "IBM Plex Mono"; name = "Fire Code";
}; };
emoji = { emoji = {

View file

@ -1,10 +1,10 @@
{ {
rounding = 15; rounding = 0;
gaps-in = 10; gaps-in = 5;
gaps-out = 10 * 2; gaps-out = 10;
active-opacity = 1; active-opacity = 1;
inactive-opacity = 0.89; inactive-opacity = 1;
blur = true; blur = false;
border-size = 3; border-size = 3;
animation-speed = "medium"; # "fast" | "medium" | "slow" animation-speed = "medium"; # "fast" | "medium" | "slow"
fetch = "fastfetch"; # "nerdfetch" | "neofetch" | "pfetch" | "none" fetch = "fastfetch"; # "nerdfetch" | "neofetch" | "pfetch" | "none"

View file

@ -1,11 +1,11 @@
{ {
rounding = 25; rounding = 0;
gaps-in = 12; gaps-in = 5;
gaps-out = 12 * 2; gaps-out = 10;
active-opacity = 1; active-opacity = 1;
inactive-opacity = 0.87; inactive-opacity = 1;
blur = true; blur = false;
border-size = 3; border-size = 4;
animation-speed = "slow"; # "fast" | "medium" | "slow" animation-speed = "slow"; # "fast" | "medium" | "slow"
fetch = "fastfetch"; # "nerdfetch" | "neofetch" | "pfetch" | "none" fetch = "fastfetch"; # "nerdfetch" | "neofetch" | "pfetch" | "none"

895
flake.lock generated

File diff suppressed because it is too large Load diff

View file

@ -9,6 +9,8 @@
# at the same time. Here's an working example: # at the same time. Here's an working example:
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
# Also see the 'unstable-packages' overlay at 'overlays/default.nix'. # Also see the 'unstable-packages' overlay at 'overlays/default.nix'.
nix-ld.url = "github:Mic92/nix-ld";
nix-ld.inputs.nixpkgs.follows = "nixpkgs";
nixpkgs-24_05.url = "github:NixOS/nixpkgs/nixos-24.05"; nixpkgs-24_05.url = "github:NixOS/nixpkgs/nixos-24.05";
secrets.url = "git+ssh://git@github.com/gwg313/nixos-secrets.git"; secrets.url = "git+ssh://git@github.com/gwg313/nixos-secrets.git";
hyprpolkitagent.url = "github:hyprwm/hyprpolkitagent"; hyprpolkitagent.url = "github:hyprwm/hyprpolkitagent";
@ -57,6 +59,10 @@
nixvim = { nixvim = {
url = "github:nix-community/nixvim"; url = "github:nix-community/nixvim";
}; };
nvf = {
url = "github:notashelf/nvf";
inputs.nixpkgs.follows = "nixpkgs";
};
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix"; pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
pre-commit-hooks.inputs.nixpkgs.follows = "nixpkgs"; pre-commit-hooks.inputs.nixpkgs.follows = "nixpkgs";
@ -69,6 +75,7 @@
nixpkgs, nixpkgs,
home-manager, home-manager,
colmena, colmena,
nix-ld,
... ...
}@inputs: }@inputs:
let let
@ -85,7 +92,6 @@
# pass to it, with each system as an argument # pass to it, with each system as an argument
forAllSystems = nixpkgs.lib.genAttrs systems; forAllSystems = nixpkgs.lib.genAttrs systems;
user = "gwg313"; user = "gwg313";
in in
{ {
# Your custom packages # Your custom packages
@ -145,6 +151,7 @@
modules = [ modules = [
# > Our main nixos configuration file < # > Our main nixos configuration file <
./hosts/candlekeep/configuration.nix ./hosts/candlekeep/configuration.nix
nix-ld.nixosModules.nix-ld
]; ];
}; };
}; };
@ -172,7 +179,7 @@
modules = [ modules = [
# > Our main home-manager configuration file < # > Our main home-manager configuration file <
./home-manager/machines/candlekeep.nix ./home-manager/machines/candlekeep.nix
inputs.nixcord.homeManagerModules.nixcord inputs.nixcord.homeModules.nixcord
inputs.stylix.homeManagerModules.stylix inputs.stylix.homeManagerModules.stylix
]; ];
}; };
@ -187,7 +194,7 @@
modules = [ modules = [
# > Our main home-manager configuration file < # > Our main home-manager configuration file <
./home-manager/machines/grymforge.nix ./home-manager/machines/grymforge.nix
inputs.nixcord.homeManagerModules.nixcord inputs.nixcord.homeModules.nixcord
inputs.stylix.homeManagerModules.stylix inputs.stylix.homeManagerModules.stylix
]; ];
}; };
@ -226,6 +233,13 @@
imports = [ ./hosts/waypoint/configuration.nix ]; imports = [ ./hosts/waypoint/configuration.nix ];
}; };
# kerby = {
# deployment = {
# targetHost = "waypoint"; # <- defined in ~/.ssh/config
# };
# imports = [./hosts/kerby/configuration.nix];
# };
seikan = { seikan = {
deployment = { deployment = {
targetHost = "seikan"; # <- defined in ~/.ssh/config targetHost = "seikan"; # <- defined in ~/.ssh/config

View file

@ -19,6 +19,8 @@
inputs.ags.homeManagerModules.default inputs.ags.homeManagerModules.default
# You can also split up your configuration and import pieces of it here: # You can also split up your configuration and import pieces of it here:
../modules/nvf
./candlekeep/variables.nix ./candlekeep/variables.nix
# ./nvim.nix # ./nvim.nix
../modules/common.nix ../modules/common.nix
@ -30,7 +32,7 @@
../modules/ssh.nix ../modules/ssh.nix
../modules/gh-dash.nix ../modules/gh-dash.nix
../modules/ags.nix ../modules/ags.nix
../modules/neovim # ../modules/neovim
../modules/yazi.nix ../modules/yazi.nix
# ../modules/hyprpanel.nix # ../modules/hyprpanel.nix
# ../modules/hyprlock.nix # ../modules/hyprlock.nix
@ -50,7 +52,7 @@
# You can also add overlays exported from other flakes: # You can also add overlays exported from other flakes:
# neovim-nightly-overlay.overlays.default # neovim-nightly-overlay.overlays.default
(final: prev: { neovim = inputs.neovim-config.packages."x86_64-linux".default; }) # (final: prev: { neovim = inputs.neovim-config.packages."x86_64-linux".default; })
# Or define it inline, for example: # Or define it inline, for example:
# (final: prev: { # (final: prev: {
@ -75,28 +77,38 @@
}; };
stylix = { stylix = {
base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-latte.yaml"; fonts = {
image = ../../wallpapers/hollow-knight.jpg; sizes = {
applications = 13; # UI font (GTK/Qt)
terminal = 14; # Comfortable for reading code/math
desktop = 13; # WM, notifications
popups = 12; # Tooltips, menus
};
};
# base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-macchiato.yaml";
base16Scheme = "${pkgs.base16-schemes}/share/themes/atelier-sulphurpool-light.yaml";
image = ../../wallpapers/floating_city.jpg;
# polarity = "dark";
autoEnable = true; autoEnable = true;
enable = true; enable = true;
targets.nixvim.enable = false;
opacity.terminal = 1.0; opacity.terminal = 1.0;
fonts.sizes.terminal = 15;
fonts = { fonts = {
serif = { serif = {
package = pkgs.meslo-lgs-nf; package = pkgs.lmodern;
name = "MesloLGS NF"; name = "Latin Modern Roman";
}; };
sansSerif = { sansSerif = {
package = pkgs.meslo-lgs-nf; package = pkgs.inter;
name = "MesloLGS NF"; name = "Inter";
}; };
monospace = { monospace = {
package = pkgs.ibm-plex; package = pkgs.fira-code;
name = "IBM Plex Mono"; name = "Fire Code";
}; };
emoji = { emoji = {
@ -105,12 +117,30 @@
}; };
}; };
cursor = { cursor = {
package = pkgs.bibata-cursors; package = pkgs.vanilla-dmz;
name = "Bibata-Modern-Classic"; name = "Vanilla-DMZ";
size = 20; size = 24;
}; };
}; };
gtk = {
enable = true;
iconTheme = {
name = "WhiteSur-Light";
package = pkgs.whitesur-icon-theme.override {
boldPanelIcons = true;
alternativeIcons = true;
};
};
# font.name = "Inter 13";
};
qt = {
enable = true;
platformTheme.name = "gtk";
style.name = "adwaita";
};
# Add stuff for your user as you see fit: # Add stuff for your user as you see fit:
# programs.neovim.enable = true; # programs.neovim.enable = true;
home.packages = with pkgs; [ home.packages = with pkgs; [

View file

@ -24,6 +24,7 @@
# ../modules/hyprlock.nix # ../modules/hyprlock.nix
# ../modules/hypridle.nix # ../modules/hypridle.nix
# ./nvim.nix # ./nvim.nix
../modules/nvf
../modules/common.nix ../modules/common.nix
../modules/hyprland ../modules/hyprland
# ../modules/hyprland.nix # ../modules/hyprland.nix
@ -32,9 +33,10 @@
../modules/devenv.nix ../modules/devenv.nix
../modules/gh-dash.nix ../modules/gh-dash.nix
../modules/ssh.nix ../modules/ssh.nix
../modules/neovim/default.nix # ../modules/neovim/default.nix
../modules/yazi.nix ../modules/yazi.nix
../modules/qutebrowser.nix ../modules/qutebrowser.nix
../scripts/default.nix
]; ];
nixpkgs = { nixpkgs = {
@ -73,31 +75,38 @@
}; };
stylix = { stylix = {
# base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-macchiato.yaml"; fonts = {
sizes = {
applications = 13; # UI font (GTK/Qt)
terminal = 14; # Comfortable for reading code/math
desktop = 13; # WM, notifications
popups = 12; # Tooltips, menus
};
};
base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-latte.yaml"; base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-latte.yaml";
image = ../../wallpapers/hollow-knight.jpg; # base16Scheme = "${pkgs.base16-schemes}/share/themes/atelier-sulphurpool-light.yaml";
image = ../../wallpapers/nixos-wallpaper-catppuccin-latte.png;
# polarity = "dark"; # polarity = "dark";
autoEnable = true; autoEnable = true;
enable = true; enable = true;
targets.nixvim.enable = false; targets.nixvim.enable = false;
opacity.terminal = 1.0; opacity.terminal = 1.0;
fonts.sizes.terminal = 20;
fonts = { fonts = {
serif = { serif = {
package = pkgs.meslo-lgs-nf; package = pkgs.lmodern;
name = "MesloLGS NF"; name = "Latin Modern Roman";
}; };
sansSerif = { sansSerif = {
package = pkgs.meslo-lgs-nf; package = pkgs.inter;
name = "MesloLGS NF"; name = "Inter";
}; };
monospace = { monospace = {
package = pkgs.ibm-plex; package = pkgs.fira-code;
name = "IBM Plex Mono"; name = "Fire Code";
}; };
emoji = { emoji = {
@ -106,12 +115,29 @@
}; };
}; };
cursor = { cursor = {
package = pkgs.bibata-cursors; package = pkgs.vanilla-dmz;
name = "Bibata-Modern-Classic"; name = "Vanilla-DMZ";
size = 20; size = 24;
}; };
}; };
gtk = {
enable = true;
iconTheme = {
name = "WhiteSur-Light";
package = pkgs.whitesur-icon-theme.override {
boldPanelIcons = true;
alternativeIcons = true;
};
};
# font.name = "Inter 13";
};
qt = {
enable = true;
platformTheme.name = "gtk";
style.name = "adwaita";
};
# Add stuff for your user as you see fit: # Add stuff for your user as you see fit:
# programs.neovim.enable = true; # programs.neovim.enable = true;
home.packages = with pkgs; [ openvpn ]; home.packages = with pkgs; [ openvpn ];

View file

@ -1,5 +1,6 @@
# A cat clone with syntax highlighting and Git integration. # A cat clone with syntax highlighting and Git integration.
{pkgs, ...}: { { pkgs, ... }:
{
programs.ags = { programs.ags = {
enable = true; enable = true;
# null or path, leave as null if you don't want hm to manage the config # null or path, leave as null if you don't want hm to manage the config
@ -8,7 +9,6 @@
# additional packages to add to gjs's runtime # additional packages to add to gjs's runtime
extraPackages = with pkgs; [ extraPackages = with pkgs; [
gtksourceview gtksourceview
webkitgtk
accountsservice accountsservice
libdbusmenu-gtk3 libdbusmenu-gtk3
]; ];

View file

@ -26,6 +26,7 @@
home.packages = home.packages =
with pkgs; with pkgs;
[ [
ncdu
# Editors # Editors
# neovim # Improved version of vim, often used with overlays. # neovim # Improved version of vim, often used with overlays.
# vim # Highly configurable text editor popular for efficiency and extensibility. # vim # Highly configurable text editor popular for efficiency and extensibility.
@ -46,7 +47,7 @@
ripgrep # Faster alternative to 'grep,' recursively searching directories for a regex pattern. ripgrep # Faster alternative to 'grep,' recursively searching directories for a regex pattern.
rm-improved # Enhanced file and directory removal tool with interactive prompts, advanced options, and improved user feedback. rm-improved # Enhanced file and directory removal tool with interactive prompts, advanced options, and improved user feedback.
tealdeer # Command-line utility providing simplified and community-driven man pages. tealdeer # Command-line utility providing simplified and community-driven man pages.
thefuck # Handy tool that corrects mistyped console commands. pay-respects # Handy tool that corrects mistyped console commands.
viddy # A modern watch command. Time machine and pager etc. viddy # A modern watch command. Time machine and pager etc.
# Multiplexers # Multiplexers

View file

@ -10,8 +10,10 @@
enable = true; enable = true;
userName = "gwg313"; userName = "gwg313";
userEmail = "gwg313@pm.me"; userEmail = "gwg313@pm.me";
extraConfig = { extraConfig = {
credential = {
helper = "!pass-git-helper $@";
};
user = { user = {
signingkey = "60FF63B4826B7400"; signingkey = "60FF63B4826B7400";
}; };
@ -60,7 +62,6 @@
default = "simple"; default = "simple";
autoSetupRemote = "true"; autoSetupRemote = "true";
followTags = "true"; followTags = "true";
}; };
pull = { pull = {
rebase = "true"; rebase = "true";
@ -142,5 +143,12 @@
pre-commit pre-commit
graphite-cli graphite-cli
tig tig
pass-git-helper
]; ];
xdg.configFile."pass-git-helper/git-pass-mapping.ini".text = ''
[git.gwg313.xyz*]
target=git/https/git.gwg313.xyz
line_username=1
'';
} }

View file

@ -144,6 +144,7 @@ in
disable_autoreload = true; disable_autoreload = true;
focus_on_activate = true; focus_on_activate = true;
new_window_takes_over_fullscreen = 2; new_window_takes_over_fullscreen = 2;
middle_click_paste = false;
}; };
windowrulev2 = [ windowrulev2 = [

View file

@ -8,7 +8,13 @@ in
enable = true; enable = true;
settings = lib.mkForce { settings = lib.mkForce {
disableStartupPopups = true;
notARepository = "skip";
promptToReturnFromSubprocess = false;
update.method = "never";
git = { git = {
commit.signOff = true;
overrideGpg = true; overrideGpg = true;
}; };
gui = { gui = {

View file

@ -22,7 +22,7 @@
inkscape inkscape
nicotine-plus nicotine-plus
anki anki
obsidian # obsidian
chromium chromium
vlc vlc
zotero zotero

View file

@ -1,39 +1,96 @@
{ pkgs, lib, ... }:
with lib;
let
defaultApps = {
browser = [ "zen-beta.desktop" ];
text = [ "org.gnome.TextEditor.desktop" ];
image = [ "imv-dir.desktop" ];
audio = [ "mpv.desktop" ];
video = [ "mpv.desktop" ];
directory = [ "thunar.desktop" ];
office = [ "libreoffice.desktop" ];
pdf = [ "zathura.desktop" ];
terminal = [ "kitty.desktop" ];
discord = [ "discord.desktop" ];
archive = [ "xarchiver.desktop" ];
};
mimeMap = {
text = [ "text/plain" ];
image = [
"image/bmp"
"image/gif"
"image/jpeg"
"image/jpg"
"image/png"
"image/svg+xml"
"image/tiff"
"image/vnd.microsoft.icon"
"image/webp"
];
audio = [
"audio/aac"
"audio/mpeg"
"audio/ogg"
"audio/opus"
"audio/wav"
"audio/webm"
"audio/x-matroska"
];
video = [
"video/mp2t"
"video/mp4"
"video/mpeg"
"video/ogg"
"video/webm"
"video/x-flv"
"video/x-matroska"
"video/x-msvideo"
];
directory = [ "inode/directory" ];
browser = [
"text/html"
"x-scheme-handler/about"
"x-scheme-handler/http"
"x-scheme-handler/https"
"x-scheme-handler/unknown"
];
office = [
"application/vnd.oasis.opendocument.text"
"application/vnd.oasis.opendocument.spreadsheet"
"application/vnd.oasis.opendocument.presentation"
"application/vnd.openxmlformats-officedocument.wordprocessingml.document"
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
"application/vnd.openxmlformats-officedocument.presentationml.presentation"
"application/msword"
"application/vnd.ms-excel"
"application/vnd.ms-powerpoint"
"application/rtf"
];
pdf = [ "application/pdf" ];
terminal = [ "terminal" ];
archive = [
"application/zip"
"application/rar"
"application/7z"
"application/*tar"
];
discord = [ "x-scheme-handler/discord" ];
};
associations =
with lists;
listToAttrs (
flatten (mapAttrsToList (key: map (type: attrsets.nameValuePair type defaultApps."${key}")) mimeMap)
);
in
{ {
xdg.mimeApps = { xdg = {
configFile."mimeapps.list".force = true;
mimeApps = {
enable = true; enable = true;
defaultApplications = { associations.added = associations;
"text/markdown" = "nvim.desktop"; defaultApplications = associations;
"text/plain" = "nvim.desktop";
"text/x-shellscript" = "nvim.desktop";
"text/x-python" = "nvim.desktop";
"text/x-go" = "nvim.desktop";
"text/css" = "nvim.desktop";
"text/javascript" = "nvim.desktop";
"text/x-c" = "nvim.desktop";
"text/x-c++" = "nvim.desktop";
"text/x-java" = "nvim.desktop";
"text/x-rust" = "nvim.desktop";
"text/x-yaml" = "nvim.desktop";
"text/x-toml" = "nvim.desktop";
"text/x-dockerfile" = "nvim.desktop";
"text/x-xml" = "nvim.desktop";
"text/x-php" = "nvim.desktop";
"image/jpeg" = "imv.desktop";
"image/jpg" = "imv.desktop";
"image/webp" = "imv.desktop";
"image/gif" = "zen.desktop";
"x-scheme-handler/http" = "zen.desktop";
"x-scheme-handler/https" = "zen.desktop";
"text/html" = "zen.desktop";
"application/pdf" = "zathura.desktop";
"image/png" = "imv-dir.desktop";
"x-scheme-handler/chrome" = "zen.desktop";
"application/x-extension-htm" = "zen.desktop";
"application/x-extension-html" = "zen.desktop";
"application/x-extension-shtml" = "zen.desktop";
"application/xhtml+xml" = "zen.desktop";
"application/x-extension-xhtml" = "zen.desktop";
"application/x-extension-xht" = "zen.desktop";
}; };
}; };
} }

View file

@ -8,6 +8,8 @@
loaded_python_provider = 0; # Python 2 loaded_python_provider = 0; # Python 2
}; };
colorscheme = "base16-atelier-sulphurpool-light";
clipboard = { clipboard = {
# Use system clipboard # Use system clipboard
register = "unnamedplus"; register = "unnamedplus";

View file

@ -0,0 +1,10 @@
{ ... }:
{
programs.nixvim = {
colorschemes.base16 = {
enable = true;
colorscheme = "atelier-sulphurpool-light";
autoLoad = true;
};
};
}

View file

@ -99,6 +99,7 @@
fsharp = [ "fantomas" ]; fsharp = [ "fantomas" ];
go = [ "gofmt" ]; go = [ "gofmt" ];
haskell = [ "ormolu" ]; haskell = [ "ormolu" ];
java = [ "google-java-format" ];
javascript = [ javascript = [
[ [
"prettierd" "prettierd"

View file

@ -3,7 +3,8 @@ _: {
# ./none-ls.nix # ./none-ls.nix
./autopairs.nix ./autopairs.nix
./bufferline.nix ./bufferline.nix
./catppuccin.nix ./base16.nix
# ./catppuccin.nix
./comment.nix ./comment.nix
./conform.nix ./conform.nix
./clangd-extensions.nix ./clangd-extensions.nix

View file

@ -101,6 +101,7 @@
# #
# initOptions.compilationDatabaseDirectory = "build"; # initOptions.compilationDatabaseDirectory = "build";
# }; # };
jdtls.enable = true;
clangd = { clangd = {
enable = true; enable = true;
filetypes = [ filetypes = [

View file

@ -0,0 +1,26 @@
{
inputs,
pkgs,
...
}:
{
imports = [
inputs.nvf.homeManagerModules.default
./options.nix
./languages.nix
./picker.nix
./snacks.nix
./keymaps.nix
./utils.nix
./mini.nix
];
programs.nvf = {
enable = true;
settings.vim = {
startPlugins = [
pkgs.vimPlugins.vim-kitty-navigator
];
};
};
}

View file

@ -0,0 +1,275 @@
{
programs.nvf.settings.vim = {
globals.mapleader = " ";
binds = {
whichKey = {
enable = true;
# TODO: registers
register = { };
};
};
keymaps = [
# General Mappings
{
key = "s";
mode = "n";
silent = true;
action = "<cmd>lua require('flash').jump()<cr>";
desc = "Flash";
}
{
key = "K";
mode = "n";
silent = true;
action = "<cmd>lua vim.lsp.buf.hover()<cr>";
desc = "LSP Hover";
}
{
key = "<C-tab>";
mode = "n";
silent = true;
action = "<cmd>bnext<cr>";
desc = "Next Buffer";
}
# Kitty navigator
{
key = "<C-h>";
mode = "n";
silent = true;
action = "<cmd>KittyNavigateLeft<cr>";
}
{
key = "<C-j>";
mode = "n";
silent = true;
action = "<cmd>KittyNavigateDown<cr>";
}
{
key = "<C-k>";
mode = "n";
silent = true;
action = "<cmd>KittyNavigateUp<cr>";
}
{
key = "<C-l>";
mode = "n";
silent = true;
action = "<cmd>KittyNavigateRight<cr>";
}
# Disable Arrow Keys in Normal Mode
# {
# key = "<Up>";
# mode = "n";
# silent = true;
# action = "k";
# desc = "Disable Up Arrow";
# }
# {
# key = "<Down>";
# mode = "n";
# silent = true;
# action = "j";
# desc = "Disable Down Arrow";
# }
# {
# key = "<Left>";
# mode = "n";
# silent = true;
# action = "h";
# desc = "Disable Left Arrow";
# }
# {
# key = "<Right>";
# mode = "n";
# silent = true;
# action = "l";
# desc = "Disable Right Arrow";
# }
# UI
{
key = "<leader>uw";
mode = "n";
silent = true;
action = "<cmd>set wrap!<cr>";
desc = "Toggle word wrapping";
}
{
key = "<leader>ul";
mode = "n";
silent = true;
action = "<cmd>set linebreak!<cr>";
desc = "Toggle linebreak";
}
{
key = "<leader>us";
mode = "n";
silent = true;
action = "<cmd>set spell!<cr>";
desc = "Toggle spellLazyGitcheck";
}
{
key = "<leader>uc";
mode = "n";
silent = true;
action = "<cmd>set cursorline!<cr>";
desc = "Toggle cursorline";
}
{
key = "<leader>un";
mode = "n";
silent = true;
action = "<cmd>set number!<cr>";
desc = "Toggle line numbers";
}
{
key = "<leader>ur";
mode = "n";
silent = true;
action = "<cmd>set relativenumber!<cr>";
desc = "Toggle relative line numbers";
}
{
key = "<leader>ut";
mode = "n";
silent = true;
action = "<cmd>set showtabline=2<cr>";
desc = "Show tabline";
}
{
key = "<leader>uT";
mode = "n";
silent = true;
action = "<cmd>set showtabline=0<cr>";
desc = "Hide tabline";
}
# Windows
{
key = "<leader>ws";
mode = "n";
silent = true;
action = "<cmd>split<cr>";
desc = "Split";
}
{
key = "<leader>wv";
mode = "n";
silent = true;
action = "<cmd>vsplit<cr>";
desc = "VSplit";
}
{
key = "<leader>wd";
mode = "n";
silent = true;
action = "<cmd>close<cr>";
desc = "Close";
}
{
key = "<leader>ma";
mode = "n";
silent = true;
action = "<cmd>close<cr>";
desc = "Close";
}
{
key = "<C-Left>";
mode = "n";
silent = true;
action = "<cmd>lua require('smart-splits').move_cursor_left()<cr>";
desc = "Move to left split";
}
{
key = "<C-Down>";
mode = "n";
silent = true;
action = "<cmd>lua require('smart-splits').move_cursor_down()<cr>";
desc = "Move to lower split";
}
{
key = "<C-Up>";
mode = "n";
silent = true;
action = "<cmd>lua require('smart-splits').move_cursor_up()<cr>";
desc = "Move to upper split";
}
{
key = "<C-Right>";
mode = "n";
silent = true;
action = "<cmd>lua require('smart-splits').move_cursor_right()<cr>";
desc = "Move to right split";
}
{
key = "<M-Left>";
mode = "n";
silent = true;
action = "<cmd>lua require('smart-splits').resize_left()<cr>";
desc = "Resize left";
}
{
key = "<M-Down>";
mode = "n";
silent = true;
action = "<cmd>lua require('smart-splits').resize_down()<cr>";
desc = "Resize down";
}
{
key = "<M-Up>";
mode = "n";
silent = true;
action = "<cmd>lua require('smart-splits').resize_up()<cr>";
desc = "Resize up";
}
{
key = "<M-Right>";
mode = "n";
silent = true;
action = "<cmd>lua require('smart-splits').resize_right()<cr>";
desc = "Resize right";
}
{
key = "<leader>w=";
mode = "n";
silent = true;
action = "<C-w>=";
desc = "Equalize Splits";
}
{
key = "<leader>we";
mode = "n";
silent = true;
action = "<cmd>lua require('smart-splits').swap_buf_right()<cr>";
desc = "Swap Buffer Right";
}
{
key = "<leader>wh";
mode = "n";
silent = true;
action = "<cmd>lua require('smart-splits').swap_buf_left()<cr>";
desc = "Swap Buffer Left";
}
{
key = "<C-o>";
mode = "n";
silent = true;
action = "<C-o>zz";
desc = "Jump back and center";
}
{
key = "<C-i>";
mode = "n";
silent = true;
action = "<C-i>zz";
desc = "Jump forward and center";
}
];
};
}

View file

@ -0,0 +1,49 @@
{
programs.nvf.settings.vim = {
diagnostics = {
enable = true;
nvim-lint.enable = true;
config.virtual_text = true;
};
syntaxHighlighting = true;
treesitter = {
enable = true;
autotagHtml = true;
context.enable = true;
highlight = {
enable = true;
additionalVimRegexHighlighting = true;
};
};
lsp = {
enable = true;
trouble.enable = true;
formatOnSave = true;
inlayHints.enable = true;
lightbulb.enable = true;
null-ls.enable = true;
otter-nvim.enable = true;
};
languages = {
enableDAP = true;
enableExtraDiagnostics = true;
enableFormat = true;
enableTreesitter = true;
astro.enable = true;
python.enable = true;
java.enable = true;
clang.enable = true;
go.enable = true;
markdown.enable = true;
ts.enable = true;
ts.extensions.ts-error-translator.enable = true;
css.enable = true;
svelte.enable = true;
html.enable = true;
bash.enable = true;
nix.enable = true;
tailwind.enable = true;
};
};
}

View file

@ -0,0 +1,13 @@
{
programs.nvf.settings.vim.mini = {
starter.enable = true;
comment.enable = true;
# cursorword.enable = true;
icons.enable = true;
indentscope.enable = true;
notify.enable = true;
pairs.enable = true;
diff.enable = true;
git.enable = true;
};
}

View file

@ -0,0 +1,23 @@
{
programs.nvf.settings.vim = {
viAlias = false;
vimAlias = true;
withNodeJs = true;
# syntaxHighlighting = true;
options = {
autoindent = true;
shiftwidth = 2;
signcolumn = "yes";
tabstop = 2;
softtabstop = 2;
wrap = false;
undofile = true;
shada = "!,'100,<50,s10,h";
};
clipboard = {
enable = true;
registers = "unnamedplus";
providers.wl-copy.enable = true;
};
};
}

View file

@ -0,0 +1,256 @@
{
programs.nvf.settings.vim = {
utility = {
oil-nvim.enable = true;
snacks-nvim = {
setupOpts = {
picker.enabled = true;
explorer.enabled = true;
};
};
};
keymaps = [
# Top Pickers & Explorer
{
key = "<leader> ";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.smart()<cr>";
desc = "Smart Find Files";
}
{
key = "<leader>,";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.buffers()<cr>";
desc = "Buffers";
}
{
key = "<leader>/";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.grep()<cr>";
desc = "Grep";
}
{
key = "<leader>:";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.command_history()<cr>";
desc = "Command History";
}
{
key = "<leader>e";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.explorer()<cr>";
desc = "File Explorer";
}
{
key = "-";
mode = "n";
silent = true;
action = "<cmd>Oil<cr>";
desc = "Oil";
}
# Find
{
key = "<leader>fb";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.buffers()<cr>";
desc = "Buffers";
}
{
key = "<leader>fc";
mode = "n";
silent = true;
action = ''<cmd>lua Snacks.picker.files({ cwd = vim.fn.stdpath("config") })<cr>'';
desc = "Find Config File";
}
{
key = "<leader>ff";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.files()<cr>";
desc = "Find Files";
}
{
key = "<leader>fg";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.git_files()<cr>";
desc = "Find Git Files";
}
{
key = "<leader>fp";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.projects()<cr>";
desc = "Projects";
}
{
key = "<leader>fr";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.recent()<cr>";
desc = "Recent";
}
{
key = "<leader>fn";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.notifications()<cr>";
desc = "Notification History";
}
{
key = "<leader>fe";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.icons()<cr>";
desc = "Emoji";
}
# Git
{
key = "<leader>gb";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.git_branches()<cr>";
desc = "Git Branches";
}
{
key = "<leader>gL";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.git_log()<cr>";
desc = "Git Log Line";
}
{
key = "<leader>gs";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.git_status()<cr>";
desc = "Git Status";
}
{
key = "<leader>gS";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.git_stash()<cr>";
desc = "Git Stash";
}
{
key = "<leader>gd";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.git_diff()<cr>";
desc = "Git Diff (Hunks)";
}
{
key = "<leader>gf";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.git_log_file()<cr>";
desc = "Git Log File";
}
# Grep
{
key = "<leader>sb";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.lines()<cr>";
desc = "Buffer Lines";
}
{
key = "<leader>st";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.todo_comments()<cr>";
desc = "Todos";
}
{
key = "<leader>sB";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.grep_buffers()<cr>";
desc = "Grep Open Buffers";
}
{
key = "<leader>sg";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.grep()<cr>";
desc = "Grep";
}
{
key = "<leader>sw";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.grep_word()<cr>";
desc = "Visual selection or word";
}
{
key = "<leader>sr";
mode = "n";
silent = true;
action = "<cmd>nohlsearch<cr>";
desc = "Reset search";
}
# LSP
{
key = "gd";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.lsp_definitions()<cr>";
desc = "Goto Definition";
}
{
key = "gD";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.lsp_declarations()<cr>";
desc = "Goto Declaration";
}
{
key = "gr";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.lsp_references()<cr>";
desc = "References";
nowait = true;
}
{
key = "gI";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.lsp_implementations()<cr>";
desc = "Goto Implementation";
}
{
key = "gy";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.lsp_type_definitions()<cr>";
desc = "Goto Type Definition";
}
{
key = "<leader>ss";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.lsp_symbols()<cr>";
desc = "LSP Symbols";
}
{
key = "<leader>sS";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.lsp_workspace_symbols()<cr>";
desc = "LSP Workspace Symbols";
}
];
};
}

View file

@ -0,0 +1,16 @@
{
programs.nvf.settings.vim.utility.snacks-nvim = {
enable = true;
setupOpts = {
image = {
enabled = true;
setupOpts.doc.inline = false;
};
quickfile.enabled = true;
statuscolumn.enabled = true;
zen.enabled = true;
bufdelete.enabled = true;
gitsigns.enabled = true;
};
};
}

View file

@ -0,0 +1,82 @@
{ lib, ... }:
{
programs.nvf.settings.vim = {
theme = lib.mkForce {
enable = true;
name = "catppuccin";
style = "latte";
transparent = false;
};
navigation = {
harpoon.enable = true;
};
utility = {
motion.flash-nvim.enable = true;
outline.aerial-nvim.enable = true;
diffview-nvim.enable = true;
surround.enable = true;
smart-splits.enable = true;
yanky-nvim.enable = true;
};
tabline.nvimBufferline.enable = true;
notes.todo-comments.enable = true;
assistant.copilot = {
enable = true;
cmp.enable = true;
};
statusline.lualine.enable = true;
autocomplete.blink-cmp = {
enable = true;
friendly-snippets.enable = true;
};
snippets.luasnip.enable = true;
ui = {
noice.enable = true;
colorizer.enable = true;
};
visuals = {
cinnamon-nvim.enable = true;
};
git = {
enable = true;
gitsigns.enable = true;
};
terminal.toggleterm = {
enable = true;
lazygit = {
enable = true;
mappings.open = "<leader>gl";
};
};
formatter.conform-nvim.enable = true;
binds.hardtime-nvim.enable = true;
utility.motion.precognition.enable = true;
binds.hardtime-nvim.setupOpts = {
max_count = 3; # Optional: limit of consecutive presses
disabled_keys = {
"<Up>" = false;
"<Down>" = false;
"<Left>" = false;
"<Right>" = false;
};
restricted_keys = {
"<Up>" = [
"n"
"x"
];
"<Down>" = [
"n"
"x"
];
"<Left>" = [
"n"
"x"
];
"<Right>" = [
"n"
"x"
];
};
};
};
}

View file

@ -5,11 +5,14 @@
enable = true; enable = true;
# additional packages to add to gjs's runtime # additional packages to add to gjs's runtime
# extraPackages = with pkgs; [ plugins = with pkgs.obs-studio-plugins; [
# gtksourceview wlrobs
# webkitgtk obs-backgroundremoval
# accountsservice obs-pipewire-audio-capture
# libdbusmenu-gtk3 obs-vaapi # optional AMD hardware acceleration
# ]; obs-gstreamer
obs-vkcapture
];
}; };
} }

View file

@ -2,22 +2,25 @@
{ pkgs, user, ... }: { pkgs, user, ... }:
{ {
# ctrl + m to toggle the menubar # ctrl + m to toggle the menubar
home.packages = with pkgs.xfce; [ home.packages = with pkgs; [
thunar xfce.thunar
xfconf xfce.xfconf
tumbler xfce.tumbler
thunar-archive-plugin xfce.thunar-archive-plugin
thunar-volman xfce.thunar-volman
xfce.thunar-media-tags-plugin
p7zip
xarchiver
]; ];
gtk = { # gtk = {
iconTheme = { # iconTheme = {
name = "WhiteSur"; # name = "WhiteSur";
package = pkgs.whitesur-icon-theme.override { # package = pkgs.whitesur-icon-theme.override {
boldPanelIcons = true; # boldPanelIcons = true;
alternativeIcons = true; # alternativeIcons = true;
}; # };
}; # };
}; # };
home.sessionVariables = { home.sessionVariables = {
XDG_ICON_DIR = "${pkgs.whitesur-icon-theme}/share/icons/WhiteSur"; XDG_ICON_DIR = "${pkgs.whitesur-icon-theme}/share/icons/WhiteSur";
@ -30,6 +33,38 @@
"file:///home/gwg313/repos Repositories" "file:///home/gwg313/repos Repositories"
]; ];
home.file.".config/xarchiver/xarchiverrc".text = ''
[xarchiver]
preferred_format=0
prefer_unzip=true
confirm_deletion=true
sort_filename_content=false
advanced_isearch=true
auto_expand=true
store_output=false
icon_size=2
show_archive_comment=false
show_sidebar=true
show_location_bar=true
show_toolbar=true
preferred_custom_cmd=
preferred_temp_dir=/tmp
preferred_extract_dir=/home/gwg313/Downloads
allow_sub_dir=0
ensure_directory=true
overwrite=false
full_path=2
touch=false
fresh=false
update=false
store_path=false
updadd=true
freshen=false
recurse=true
solid_archive=false
remove_files=false
'';
home.file.".config/xfce4/xfconf/xfce-perchannel-xml/thunar.xml".text = '' home.file.".config/xfce4/xfconf/xfce-perchannel-xml/thunar.xml".text = ''
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>

View file

@ -61,6 +61,7 @@
c = "clear"; c = "clear";
listen = "lsof -P -i -n"; listen = "lsof -P -i -n";
octal = "stat -c '%a %n'"; octal = "stat -c '%a %n'";
f = "$(pay-respects zsh)";
}; };
history = { history = {
@ -68,7 +69,7 @@
path = "${config.xdg.dataHome}/zsh/history"; path = "${config.xdg.dataHome}/zsh/history";
}; };
initExtra = '' initExtra = ''
eval $(thefuck --alias) eval "$(pay-respects zsh --alias)"
# search history based on what's typed in the prompt # search history based on what's typed in the prompt
autoload -U history-search-end autoload -U history-search-end

View file

@ -46,9 +46,12 @@
]; ];
laptop.enable = true; laptop.enable = true;
nfs.enable = true; # nfs.enable = true;
ssh.enable = true; ssh.enable = true;
ssh_guard.enable = true; ssh_guard.enable = true;
steam.enable = true;
programs.nix-ld.dev.enable = true;
# Bootloader. # Bootloader.
boot = { boot = {

View file

@ -19,6 +19,7 @@
../../common/gui/hyprland.nix ../../common/gui/hyprland.nix
../../common/gui/steam.nix ../../common/gui/steam.nix
../../common/gui/thunar.nix ../../common/gui/thunar.nix
../../common/gui/retroarch.nix
../../common/style/stylix.nix ../../common/style/stylix.nix
../../common/nixos/sysctl ../../common/nixos/sysctl
@ -45,6 +46,7 @@
# Import your generated (nixos-generate-config) hardware configuration # Import your generated (nixos-generate-config) hardware configuration
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
programs.obs-studio.enableVirtualCamera = true;
ssh.enable = true; ssh.enable = true;
ssh_guard.enable = true; ssh_guard.enable = true;

View file

@ -0,0 +1,112 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{
config,
pkgs,
lib,
inputs,
...
}:
{
# sops
sops = {
defaultSopsFile = ../../secrets/secrets.yaml;
defaultSopsFormat = "yaml";
age.keyFile = "/home/gwg313/.config/sops/age/keys.txt";
};
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
../../common/nixos/ssh/default.nix
inputs.sops-nix.nixosModules.sops
];
ssh.enable = true;
ssh_guard.enable = true;
ssh_client.enable = false;
services.openssh.authorizedKeysFiles = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINvOfDSjlvegGqfUS18XwXB7SvS2n9/hGYUpKxRb9vgb gwg313@pm.me"
];
services.openssh.settings = {
PermitRootLogin = lib.mkForce "yes";
AllowUsers = lib.mkForce [
"gwg313"
"root"
];
};
users.users.gwg313 = {
isNormalUser = true;
description = "gwg313";
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINvOfDSjlvegGqfUS18XwXB7SvS2n9/hGYUpKxRb9vgb gwg313@pm.me"
];
extraGroups = [
"networkmanager"
"wheel"
];
packages = with pkgs; [ ];
};
users.users = {
root = {
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINvOfDSjlvegGqfUS18XwXB7SvS2n9/hGYUpKxRb9vgb gwg313@pm.me"
];
};
};
# Bootloader.
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/sda";
boot.loader.grub.useOSProber = true;
networking.hostName = "kerby"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Enable networking
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "America/Toronto";
# Select internationalisation properties.
i18n.defaultLocale = "en_CA.UTF-8";
# Configure keymap in X11
services.xserver.xkb = {
layout = "us";
variant = "";
};
# Define a user account. Don't forget to set a password with passwd.
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
# wget
];
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
# List services that you want to enable:
# Enable the OpenSSH daemon.
# services.openssh.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.11"; # Did you read the comment?
}

View file

@ -0,0 +1,43 @@
# 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,
...
}:
{
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = [
"ata_piix"
"uhci_hcd"
"virtio_pci"
"virtio_scsi"
"sd_mod"
"sr_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/979e137f-7d21-4dac-b6eb-51c8add1cf48";
fsType = "ext4";
};
swapDevices = [ ];
# 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
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.ens18.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}

View file

@ -0,0 +1,15 @@
{ }:
{
services.kerberoskdc = {
enable = true;
realm = "LOCAL.GWG313.XYZ";
databaseFile = "/var/lib/krb5kdc/principal";
adminServer.enable = true;
kadmindPort = 749;
kdcPort = 88;
extraConfig = ''
max_life = 10h
max_renewable_life = 7d
'';
};
}

69
hosts/kerby/kerberos.nix Normal file
View file

@ -0,0 +1,69 @@
{
config,
lib,
pkgs,
...
}:
{
services.krb5kdc = {
enable = true;
realms = {
"EXAMPLE.LOCAL" = {
aclFile = "/etc/krb5kdc/kadm5.acl";
dictFile = "/etc/krb5kdc/kadm5.dict";
databaseName = "/var/lib/krb5kdc/principal";
adminServer = "kerberos.example.local";
supportedEnctypes = [ "aes256-cts-hmac-sha1-96" ];
};
};
};
services.kadmind.enable = true;
services.krb5 = {
enable = true;
libdefaults = {
default_realm = "EXAMPLE.LOCAL";
};
realms = {
"EXAMPLE.LOCAL" = {
kdc = [ "kerberos.example.local" ];
admin_server = "kerberos.example.local";
};
};
};
environment.etc."krb5kdc/kadm5.acl".text = "*/admin@EXAMPLE.LOCAL *";
sops.secrets."kdc/master_password" = { };
sops.secrets."kdc/admin_password" = { };
systemd.services.krb5-bootstrap = {
description = "Bootstrap KDC DB + principals";
wantedBy = [ "multi-user.target" ];
before = [ "krb5kdc.service" ];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
};
script = ''
set -e
DB="/var/lib/krb5kdc/principal"
if [ ! -f "$DB" ]; then
MASTER_PW=$(<${config.sops.secrets."kdc/master_password".path})
ADMIN_PW=$(<${config.sops.secrets."kdc/admin_password".path})
echo "Creating KDC database..."
echo "$MASTER_PW" | kdb5_util create -s -P "$MASTER_PW"
echo "$ADMIN_PW
$ADMIN_PW" | kadmin.local -q "addprinc root/admin"
kadmin.local -q "addprinc -randkey nfs/truenas.example.local"
kadmin.local -q "ktadd -k /etc/krb5kdc/nfs.keytab nfs/truenas.example.local"
fi
'';
};
environment.etc."krb5kdc/nfs.keytab".source = "/etc/krb5kdc/nfs.keytab";
}

11
hosts/kerby/krb5.nix Normal file
View file

@ -0,0 +1,11 @@
{ }:
{
services.krb5 = {
enable = true;
defaultRealm = "LOCAL.GWG313.XYZ";
realms."LOCAL.GWG313.XYZ" = {
kdc = [ "kerby.local.gwg313.xyz" ];
adminServer = "kerby.local.gwg313.xyz";
};
};
}

View file

@ -3,7 +3,6 @@
dynamicConfigOptions = { dynamicConfigOptions = {
http = { http = {
services = { services = {
music_zt.loadBalancer.servers = [ music_zt.loadBalancer.servers = [
{ {
url = "https://music.zerotier.gwg313.xyz"; url = "https://music.zerotier.gwg313.xyz";
@ -51,10 +50,33 @@
url = "https://git.zerotier.gwg313.xyz"; url = "https://git.zerotier.gwg313.xyz";
} }
]; ];
registry_zt.loadBalancer.servers = [
{
url = "https://registry.zerotier.gwg313.xyz";
}
];
ci_zt.loadBalancer.servers = [
{
url = "https://ci.zerotier.gwg313.xyz";
}
];
s3_zt.loadBalancer.servers = [
{
url = "https://s3.zerotier.gwg313.xyz";
}
];
s3_console_zt.loadBalancer.servers = [
{
url = "https://s3-console.zerotier.gwg313.xyz";
}
];
}; };
routers = { routers = {
music_zt = { music_zt = {
entryPoints = [ "websecure" ]; entryPoints = [ "websecure" ];
rule = "Host(`music.gwg313.xyz`)"; rule = "Host(`music.gwg313.xyz`)";
@ -118,9 +140,39 @@
middlewares = [ "headers" ]; middlewares = [ "headers" ];
}; };
}; ci_zt = {
}; entryPoints = [ "websecure" ];
}; rule = "Host(`ci.gwg313.xyz`)";
service = "ci_zt";
tls.certResolver = "le";
middlewares = [ "headers" ];
}; };
registry_zt = {
entryPoints = [ "websecure" ];
rule = "Host(`registry.gwg313.xyz`)";
service = "registry_zt";
tls.certResolver = "le";
middlewares = [ "headers" ];
};
s3_zt = {
entryPoints = [ "websecure" ];
rule = "Host(`s3.gwg313.xyz`)";
service = "s3_zt";
tls.certResolver = "le";
middlewares = [ "headers" ];
};
s3_console = {
entryPoints = [ "websecure" ];
rule = "Host(`s3-console.gwg313.xyz`)";
service = "s3_console_zt";
tls.certResolver = "le";
middlewares = [ "headers" ];
};
};
};
};
};
} }

View file

@ -1,11 +1,9 @@
# Traefik # Traefik
{ { config, ... }:
config,
...
}:
{ {
imports = [ imports = [
./routes.nix ./routes.nix
../../common/networking/hosts.nix
]; ];
sops.secrets.cf-api-token = { sops.secrets.cf-api-token = {
mode = "0440"; mode = "0440";

View file

@ -1,7 +1,4 @@
{ { inputs, ... }:
inputs,
...
}:
{ {
services.zerotierone = { services.zerotierone = {
joinNetworks = [ joinNetworks = [
@ -9,15 +6,4 @@
]; ];
enable = true; enable = true;
}; };
networking.extraHosts = ''
10.147.17.246 audiobooks.zerotier.gwg313.xyz
10.147.17.246 music.zerotier.gwg313.xyz
10.147.17.246 recipes.zerotier.gwg313.xyz
10.147.17.246 scholarsome.zerotier.gwg313.xyz
10.147.17.246 bookmarks.zerotier.gwg313.xyz
10.147.17.246 pastebin.zerotier.gwg313.xyz
10.147.17.246 snippets.zerotier.gwg313.xyz
10.147.17.246 git.zerotier.gwg313.xyz
'';
} }

View file

@ -6,7 +6,6 @@
dynamicConfigOptions = { dynamicConfigOptions = {
http = { http = {
routers = { routers = {
music = { music = {
entryPoints = [ "websecure" ]; entryPoints = [ "websecure" ];
rule = "Host(`music.gwg313.xyz`)"; rule = "Host(`music.gwg313.xyz`)";
@ -70,9 +69,39 @@
middlewares = [ "headers" ]; middlewares = [ "headers" ];
}; };
}; registry = {
}; entryPoints = [ "websecure" ];
}; rule = "Host(`registry.gwg313.xyz`)";
service = "registry_local";
tls.certResolver = "le";
middlewares = [ "headers" ];
}; };
ci = {
entryPoints = [ "websecure" ];
rule = "Host(`ci.gwg313.xyz`)";
service = "ci_local";
tls.certResolver = "le";
middlewares = [ "headers" ];
};
s3 = {
entryPoints = [ "websecure" ];
rule = "Host(`s3.gwg313.xyz`)";
service = "s3_local";
tls.certResolver = "le";
middlewares = [ "headers" ];
};
s3_console = {
entryPoints = [ "websecure" ];
rule = "Host(`s3-console.gwg313.xyz`)";
service = "s3_console_local";
tls.certResolver = "le";
middlewares = [ "headers" ];
};
};
};
};
};
} }

View file

@ -6,7 +6,6 @@
dynamicConfigOptions = { dynamicConfigOptions = {
http = { http = {
routers = { routers = {
music_zerotier = { music_zerotier = {
entryPoints = [ "websecure" ]; entryPoints = [ "websecure" ];
rule = "Host(`music.zerotier.gwg313.xyz`)"; rule = "Host(`music.zerotier.gwg313.xyz`)";
@ -69,9 +68,47 @@
middlewares = [ "headers" ]; middlewares = [ "headers" ];
}; };
}; git_zt = {
}; entryPoints = [ "websecure" ];
}; rule = "Host(`git.zerotier.gwg313.xyz`)";
service = "git_local";
tls.certResolver = "le";
middlewares = [ "headers" ];
}; };
ci_zt = {
entryPoints = [ "websecure" ];
rule = "Host(`ci.zerotier.gwg313.xyz`)";
service = "ci_local";
tls.certResolver = "le";
middlewares = [ "headers" ];
};
registry_zt = {
entryPoints = [ "websecure" ];
rule = "Host(`registry.zerotier.gwg313.xyz`)";
service = "registry_local";
tls.certResolver = "le";
middlewares = [ "headers" ];
};
s3_zt = {
entryPoints = [ "websecure" ];
rule = "Host(`s3.zerotier.gwg313.xyz`)";
service = "s3_local";
tls.certResolver = "le";
middlewares = [ "headers" ];
};
s3_console_zt = {
entryPoints = [ "websecure" ];
rule = "Host(`s3-console.zerotier.gwg313.xyz`)";
service = "s3_console_local";
tls.certResolver = "le";
middlewares = [ "headers" ];
};
};
};
};
};
} }

View file

@ -3,7 +3,6 @@
dynamicConfigOptions = { dynamicConfigOptions = {
http = { http = {
services = { services = {
argocd_local.loadBalancer.servers = [ argocd_local.loadBalancer.servers = [
{ {
url = "https://10.1.10.3:30007"; url = "https://10.1.10.3:30007";
@ -11,7 +10,7 @@
]; ];
music_local.loadBalancer.servers = [ music_local.loadBalancer.servers = [
{ {
url = "http://10.1.10.3:30033"; url = "https://music.gwg313.xyz";
} }
]; ];
@ -63,11 +62,34 @@
]; ];
git_local.loadBalancer.servers = [ git_local.loadBalancer.servers = [
{ {
url = "http://10.1.10.3:32221"; url = "https://git.gwg313.xyz";
}
];
registry_local.loadBalancer.servers = [
{
url = "https://registry.gwg313.xyz";
}
];
ci_local.loadBalancer.servers = [
{
url = "https://ci.gwg313.xyz";
}
];
s3_local.loadBalancer.servers = [
{
url = "https://s3.gwg313.xyz";
}
];
s3_console_local.loadBalancer.servers = [
{
url = "https://s3-console.gwg313.xyz";
} }
]; ];
}; };
}; };
}; };
}; };

View file

@ -1,13 +1,11 @@
# Traefik # Traefik
{ { config, ... }:
config,
...
}:
{ {
imports = [ imports = [
./routes_local.nix ./routes_local.nix
./routes_zerotier.nix ./routes_zerotier.nix
./routes.nix ./routes.nix
../../common/networking/hosts.nix
]; ];
sops.secrets.cf-api-token = { sops.secrets.cf-api-token = {
mode = "0440"; mode = "0440";

54
pkgs/ceserver/default.nix Normal file
View file

@ -0,0 +1,54 @@
{
stdenv,
glibc,
zlib,
fetchFromGitHub,
lib,
gnumake,
# Int conversion error in gcc 14
gcc13,
}:
stdenv.mkDerivation rec {
pname = "ceserver";
name = pname;
src = fetchFromGitHub {
owner = "cheat-engine";
repo = "cheat-engine";
rev = "e137317cbe9692c4dc61e6d2e89bf543b4d7301f";
hash = "sha256-kEpt4cspC5BR+03022cPnOpNLxAUbUpdEM+K9wcv1Mo=";
};
buildInputs = [
glibc
zlib
stdenv
];
nativeBuildInputs = [
gnumake
gcc13
];
buildPhase = ''
runHook preBuild
pushd Cheat\ Engine/ceserver/gcc
make
popd
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin
ls
cp Cheat\ Engine/ceserver/gcc/ceserver $out/bin/ceserver
runHook postInstall
'';
meta = {
license = lib.licenses.unfree;
description = "Cheat engine server";
mainProgram = "ceserver";
};
}

View file

@ -1,6 +1,8 @@
# Custom packages, that can be defined similarly to ones from nixpkgs # Custom packages, that can be defined similarly to ones from nixpkgs
# You can build them using 'nix build .#example' # You can build them using 'nix build .#example'
{pkgs, ...}: { { pkgs, ... }:
{
# example = pkgs.callPackage ./example { }; # example = pkgs.callPackage ./example { };
# sesh = pkgs.callPackage ./sesh {}; # sesh = pkgs.callPackage ./sesh {};
ceserver = pkgs.callPackage ./ceserver { };
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 MiB