Compare commits

..

5 commits

Author SHA1 Message Date
Emmet
36eabc0203 Improved zed keybinds 2025-11-08 18:09:09 -06:00
Emmet
d6656137cb git change-commits helper script 2025-11-08 17:35:04 -06:00
Emmet
27889b597f Updated secrets again 2025-11-08 14:18:26 -06:00
Emmet
2b526b861f Updated secrets 2025-11-08 14:11:31 -06:00
Emmet
18c43a4259 Fixes for server kernel 2025-11-08 13:57:29 -06:00
5 changed files with 136 additions and 55 deletions

8
flake.lock generated
View file

@ -1086,11 +1086,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1760810038, "lastModified": 1762633087,
"narHash": "sha256-ZmrKFgVn/Ues34j+TRk2W7m8X6/tXVqtV19zE9apI9s=", "narHash": "sha256-eZcPkglvKESSzrtqLQoroIY9KIFZH5rsvWlK0ibZ8dc=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "56ac08a980247206d96f0efe289e6212f009f6b3", "rev": "ff344f9d922c5fda41c87d92fa0a22219099c045",
"revCount": 47, "revCount": 49,
"type": "git", "type": "git",
"url": "file:///etc/nixos.secrets" "url": "file:///etc/nixos.secrets"
}, },

View file

@ -9,7 +9,7 @@
# hardware # hardware
cachy.enable = true; cachy.enable = true;
cachy.variant = "server"; cachy.variant = "lts";
virtualization = { virtualization = {
docker.enable = true; docker.enable = true;
@ -54,8 +54,8 @@
networking.firewall.extraCommands = networking.firewall.extraCommands =
# ip ban ai crawlers # ip ban ai crawlers
let createDropRulesForIpAddress = address: let
'' createDropRulesForIpAddress = address: ''
iptables -A INPUT -s ${address} -j DROP iptables -A INPUT -s ${address} -j DROP
iptables -A OUTPUT -s ${address} -j DROP iptables -A OUTPUT -s ${address} -j DROP
iptables -A FORWARD -s ${address} -j DROP iptables -A FORWARD -s ${address} -j DROP

View file

@ -1,27 +1,44 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, modulesPath, ... }: {
config,
lib,
modulesPath,
...
}:
{ {
imports = imports = [
[ (modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
]; ];
services.fstrim.enable = true; services.fstrim.enable = true;
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "ums_realtek" "sd_mod" "sr_mod" ]; boot.initrd.availableKernelModules = [
"xhci_pci"
"ehci_pci"
"ahci"
"ums_realtek"
"sd_mod"
"sr_mod"
];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [
"kvm-intel"
"ip_tables"
"i6table_nat"
"wireguard"
];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/ea03d496-2769-485d-b5cb-de0b58cb698c"; device = "/dev/disk/by-uuid/ea03d496-2769-485d-b5cb-de0b58cb698c";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=@" ]; options = [ "subvol=@" ];
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/4F5E-11FB"; device = "/dev/disk/by-uuid/4F5E-11FB";
fsType = "vfat"; fsType = "vfat";
}; };

View file

@ -1,8 +1,16 @@
{ config, lib, pkgs, pkgs-stable, osConfig, ... }: {
config,
lib,
pkgs,
pkgs-stable,
osConfig,
...
}:
let let
cfg = config.userSettings.git; cfg = config.userSettings.git;
in { in
{
options = { options = {
userSettings.git = { userSettings.git = {
enable = lib.mkEnableOption "Enable git"; enable = lib.mkEnableOption "Enable git";
@ -10,15 +18,25 @@ in {
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
home.packages = [ pkgs.git pkgs-stable.openssh ]; home.packages = [
pkgs.git
pkgs.git-extras
pkgs.git-filter-repo
pkgs-stable.openssh
];
programs.git.enable = true; programs.git.enable = true;
programs.git.userName = config.userSettings.name; programs.git.userName = config.userSettings.name;
programs.git.userEmail = config.userSettings.email; programs.git.userEmail = config.userSettings.email;
programs.git.aliases = {
change-commits = ''!f() { VAR=$1; OLD=$2; NEW=$3; shift 3; FILTER_BRANCH_SQUELCH_WARNING=1 git filter-branch --env-filter "if [[ \"$`echo $VAR`\" = '$OLD' ]]; then export $VAR='$NEW'; fi" $@; }; f'';
};
programs.git.extraConfig = { programs.git.extraConfig = {
init.defaultBranch = "main"; init.defaultBranch = "main";
safe.directory = [ osConfig.systemSettings.dotfilesDir safe.directory = [
osConfig.systemSettings.dotfilesDir
osConfig.systemSettings.secretsFlakeDir osConfig.systemSettings.secretsFlakeDir
(config.home.homeDirectory + "/.cache/nix/tarball-cache") ]; (config.home.homeDirectory + "/.cache/nix/tarball-cache")
];
}; };
programs.git.lfs.enable = true; programs.git.lfs.enable = true;
services.ssh-agent.enable = true; services.ssh-agent.enable = true;

View file

@ -1,8 +1,14 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let let
cfg = config.userSettings.zed; cfg = config.userSettings.zed;
in { in
{
options = { options = {
userSettings.zed = { userSettings.zed = {
enable = lib.mkEnableOption "Enable zed editor"; enable = lib.mkEnableOption "Enable zed editor";
@ -138,21 +144,61 @@ in {
"space b n" = "panel::NextPanelTab"; "space b n" = "panel::NextPanelTab";
"space b i" = "tab_switcher::ToggleAll"; "space b i" = "tab_switcher::ToggleAll";
"ctrl-i" = "tab_switcher::ToggleAll"; "ctrl-i" = "tab_switcher::ToggleAll";
"alt-p" = [ "tab_switcher::Toggle" { "select_last" = true; }];
"alt-n" = "tab_switcher::Toggle";
"alt-z" = "terminal_panel::Toggle"; "alt-z" = "terminal_panel::Toggle";
"alt-d" = "debug_panel::ToggleFocus"; "alt-d" = "debug_panel::ToggleFocus";
}; };
} }
{
context = "OutlinePanel";
bindings = {
"ctrl-h" = "workspace::ActivatePaneLeft";
"ctrl-l" = "workspace::ActivatePaneRight";
"ctrl-j" = "workspace::ActivatePaneDown";
"ctrl-k" = "workspace::ActivatePaneUp";
};
}
{
context = "OutlinePanel && not_editing";
bindings = {
"q" = "workspace::ToggleLeftDock";
};
}
{
context = "ProjectPanel";
bindings = {
"ctrl-h" = "workspace::ActivatePaneLeft";
"ctrl-l" = "workspace::ActivatePaneRight";
"ctrl-j" = "workspace::ActivatePaneDown";
"ctrl-k" = "workspace::ActivatePaneUp";
};
}
{
context = "ProjectPanel && not_editing";
bindings = {
"tab" = "project_panel::OpenPermanent";
"q" = "workspace::ToggleLeftDock";
"r" = "project_panel::Rename";
"D" = "project_panel::Delete";
};
}
{ {
context = "Terminal"; context = "Terminal";
bindings = { bindings = {
"ctrl-space w d" = "pane::CloseAllItems";
"ctrl-space b d" = "pane::CloseActiveItem";
"ctrl-space b p" = "panel::PreviousPanelTab";
"ctrl-space b n" = "panel::NextPanelTab";
"ctrl-space b i" = "tab_switcher::ToggleAll";
"ctrl-w" = "pane::CloseActiveItem"; "ctrl-w" = "pane::CloseActiveItem";
"alt-z" = "terminal_panel::Toggle"; "alt-z" = "terminal_panel::Toggle";
"alt-d" = "debug_panel::ToggleFocus"; "alt-d" = "debug_panel::ToggleFocus";
"ctrl-i" = "tab_switcher::ToggleAll"; "ctrl-i" = "tab_switcher::ToggleAll";
"alt-p" = [ "tab_switcher::Toggle" { "select_last" = true; }]; "alt-p" = [
"alt-n" = "tab_switcher::Toggle"; "tab_switcher::Toggle"
{ "select_last" = true; }
];
"ctrl-p" = null;
"ctrl-n" = null;
}; };
} }
{ {