Compare commits

...

18 Commits

Author SHA1 Message Date
89b6380859 move ssh out to its own file and add zsh 2025-10-15 22:58:39 -05:00
26401360d8 add other homes update paths 2025-10-15 21:35:24 -05:00
f72a26d827 add xdg 2025-10-15 21:27:34 -05:00
9fabb9143e restructure home manager 2025-10-15 20:48:38 -05:00
cc23884880 fixed the relase info 2025-10-15 20:31:37 -05:00
989ae8a432 fix 2025-10-15 20:29:27 -05:00
9d38741068 add nix release 2025-10-15 20:28:16 -05:00
aebc51cc2e fix formatting on service list 2025-10-15 20:25:06 -05:00
b868f691d8 add masks to shares 2025-10-15 19:23:38 -05:00
40077f3c6c add nfs-utils 2025-10-15 18:27:43 -05:00
dd5c53a979 powertop 2025-10-15 12:07:44 -05:00
dbf4ce2834 add power management 2025-10-15 11:20:14 -05:00
c55e813b52 fix motd auto run 2025-10-15 08:44:17 -05:00
9934e12985 fix motd run on login instead of print 2025-10-15 08:42:39 -05:00
d2cbb8dc81 print motd 2025-10-15 08:38:05 -05:00
da7c4fe652 add seaches to nix pkgs and options as well as hm options to glance search 2025-10-15 08:34:28 -05:00
ce3b8bf27a fr this time deadass on god for on it all 2025-10-14 23:48:54 -05:00
cee4da2a1d indents lol 2025-10-14 23:48:00 -05:00
16 changed files with 664 additions and 96 deletions

328
flake.lock generated
View File

@@ -1,5 +1,93 @@
{
"nodes": {
"autoaspm": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1759050207,
"narHash": "sha256-WnEKYqj0xs92DZscGVMmLytHOQlUWg3ZtZRdgCoTgQw=",
"owner": "notthebee",
"repo": "AutoASPM",
"rev": "0c73e0ed98e7bb3f6854bab9505e79a7f61654bd",
"type": "github"
},
"original": {
"owner": "notthebee",
"repo": "AutoASPM",
"type": "github"
}
},
"base16": {
"inputs": {
"fromYaml": "fromYaml"
},
"locked": {
"lastModified": 1755819240,
"narHash": "sha256-qcMhnL7aGAuFuutH4rq9fvAhCpJWVHLcHVZLtPctPlo=",
"owner": "SenchoPens",
"repo": "base16.nix",
"rev": "75ed5e5e3fce37df22e49125181fa37899c3ccd6",
"type": "github"
},
"original": {
"owner": "SenchoPens",
"repo": "base16.nix",
"type": "github"
}
},
"base16-fish": {
"flake": false,
"locked": {
"lastModified": 1754405784,
"narHash": "sha256-l9xHIy+85FN+bEo6yquq2IjD1rSg9fjfjpyGP1W8YXo=",
"owner": "tomyun",
"repo": "base16-fish",
"rev": "23ae20a0093dca0d7b39d76ba2401af0ccf9c561",
"type": "github"
},
"original": {
"owner": "tomyun",
"repo": "base16-fish",
"rev": "23ae20a0093dca0d7b39d76ba2401af0ccf9c561",
"type": "github"
}
},
"base16-helix": {
"flake": false,
"locked": {
"lastModified": 1752979451,
"narHash": "sha256-0CQM+FkYy0fOO/sMGhOoNL80ftsAzYCg9VhIrodqusM=",
"owner": "tinted-theming",
"repo": "base16-helix",
"rev": "27cf1e66e50abc622fb76a3019012dc07c678fac",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-helix",
"type": "github"
}
},
"base16-vim": {
"flake": false,
"locked": {
"lastModified": 1732806396,
"narHash": "sha256-e0bpPySdJf0F68Ndanwm+KWHgQiZ0s7liLhvJSWDNsA=",
"owner": "tinted-theming",
"repo": "base16-vim",
"rev": "577fe8125d74ff456cf942c733a85d769afe58b7",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-vim",
"rev": "577fe8125d74ff456cf942c733a85d769afe58b7",
"type": "github"
}
},
"copyparty": {
"inputs": {
"flake-utils": "flake-utils",
@@ -19,6 +107,22 @@
"type": "github"
}
},
"firefox-gnome-theme": {
"flake": false,
"locked": {
"lastModified": 1758112371,
"narHash": "sha256-lizRM2pj6PHrR25yimjyFn04OS4wcdbc38DCdBVa2rk=",
"owner": "rafaelmardojai",
"repo": "firefox-gnome-theme",
"rev": "0909cfe4a2af8d358ad13b20246a350e14c2473d",
"type": "github"
},
"original": {
"owner": "rafaelmardojai",
"repo": "firefox-gnome-theme",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
@@ -56,6 +160,27 @@
"type": "github"
}
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": [
"stylix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1756770412,
"narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "4524271976b625a4a605beefd893f270620fd751",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": {
"locked": {
"lastModified": 1678901627,
@@ -71,6 +196,39 @@
"type": "github"
}
},
"fromYaml": {
"flake": false,
"locked": {
"lastModified": 1731966426,
"narHash": "sha256-lq95WydhbUTWig/JpqiB7oViTcHFP8Lv41IGtayokA8=",
"owner": "SenchoPens",
"repo": "fromYaml",
"rev": "106af9e2f715e2d828df706c386a685698f3223b",
"type": "github"
},
"original": {
"owner": "SenchoPens",
"repo": "fromYaml",
"type": "github"
}
},
"gnome-shell": {
"flake": false,
"locked": {
"lastModified": 1748186689,
"narHash": "sha256-UaD7Y9f8iuLBMGHXeJlRu6U1Ggw5B9JnkFs3enZlap0=",
"owner": "GNOME",
"repo": "gnome-shell",
"rev": "8c88f917db0f1f0d80fa55206c863d3746fa18d0",
"type": "github"
},
"original": {
"owner": "GNOME",
"ref": "48.2",
"repo": "gnome-shell",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@@ -152,38 +310,66 @@
"type": "indirect"
}
},
"nur": {
"inputs": {
"flake-parts": [
"stylix",
"flake-parts"
],
"nixpkgs": [
"stylix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1758998580,
"narHash": "sha256-VLx0z396gDCGSiowLMFz5XRO/XuNV+4EnDYjdJhHvUk=",
"owner": "nix-community",
"repo": "NUR",
"rev": "ba8d9c98f5f4630bcb0e815ab456afd90c930728",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "NUR",
"type": "github"
}
},
"nvf": {
"inputs": {
"flake-compat": "flake-compat",
"flake-parts": "flake-parts",
"mnw": "mnw",
"nixpkgs": [
"nixpkgs-unstable"
"nixpkgs"
],
"systems": "systems"
},
"locked": {
"lastModified": 1760153667,
"narHash": "sha256-F7KmXT/Izse6Q6CkD5GCImoGPaDJxl03Kd7eD+eY/bU=",
"owner": "NotAShelf",
"lastModified": 1760374571,
"narHash": "sha256-M2lAawtTe+ASWhcHTiTxtI3ROic8bsNLNN3RvJ2ghew=",
"owner": "notashelf",
"repo": "nvf",
"rev": "9df9d51fd9fc8f9a8fc377f984ea3b7ae796172d",
"rev": "3e48f13c3ce8372d00be2e27f313f2ed8da5bc82",
"type": "github"
},
"original": {
"owner": "NotAShelf",
"owner": "notashelf",
"ref": "v0.8",
"repo": "nvf",
"type": "github"
}
},
"root": {
"inputs": {
"autoaspm": "autoaspm",
"copyparty": "copyparty",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs_2",
"nixpkgs-unstable": "nixpkgs-unstable",
"nvf": "nvf",
"sops-nix": "sops-nix",
"stylix": "stylix",
"vpn-confinement": "vpn-confinement"
}
},
@@ -207,6 +393,40 @@
"type": "github"
}
},
"stylix": {
"inputs": {
"base16": "base16",
"base16-fish": "base16-fish",
"base16-helix": "base16-helix",
"base16-vim": "base16-vim",
"firefox-gnome-theme": "firefox-gnome-theme",
"flake-parts": "flake-parts_2",
"gnome-shell": "gnome-shell",
"nixpkgs": [
"nixpkgs"
],
"nur": "nur",
"systems": "systems_2",
"tinted-foot": "tinted-foot",
"tinted-kitty": "tinted-kitty",
"tinted-schemes": "tinted-schemes",
"tinted-tmux": "tinted-tmux",
"tinted-zed": "tinted-zed"
},
"locked": {
"lastModified": 1760472212,
"narHash": "sha256-4C3I/ssFsq8EgaUmZP0xv5V7RV0oCHgL/Rx+MUkuE+E=",
"owner": "nix-community",
"repo": "stylix",
"rev": "8d008296a1b3be9b57ad570f7acea00dd2fc92db",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "stylix",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
@@ -222,6 +442,102 @@
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"tinted-foot": {
"flake": false,
"locked": {
"lastModified": 1726913040,
"narHash": "sha256-+eDZPkw7efMNUf3/Pv0EmsidqdwNJ1TaOum6k7lngDQ=",
"owner": "tinted-theming",
"repo": "tinted-foot",
"rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "tinted-foot",
"rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4",
"type": "github"
}
},
"tinted-kitty": {
"flake": false,
"locked": {
"lastModified": 1735730497,
"narHash": "sha256-4KtB+FiUzIeK/4aHCKce3V9HwRvYaxX+F1edUrfgzb8=",
"owner": "tinted-theming",
"repo": "tinted-kitty",
"rev": "de6f888497f2c6b2279361bfc790f164bfd0f3fa",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "tinted-kitty",
"type": "github"
}
},
"tinted-schemes": {
"flake": false,
"locked": {
"lastModified": 1757716333,
"narHash": "sha256-d4km8W7w2zCUEmPAPUoLk1NlYrGODuVa3P7St+UrqkM=",
"owner": "tinted-theming",
"repo": "schemes",
"rev": "317a5e10c35825a6c905d912e480dfe8e71c7559",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "schemes",
"type": "github"
}
},
"tinted-tmux": {
"flake": false,
"locked": {
"lastModified": 1757811970,
"narHash": "sha256-n5ZJgmzGZXOD9pZdAl1OnBu3PIqD+X3vEBUGbTi4JiI=",
"owner": "tinted-theming",
"repo": "tinted-tmux",
"rev": "d217ba31c846006e9e0ae70775b0ee0f00aa6b1e",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "tinted-tmux",
"type": "github"
}
},
"tinted-zed": {
"flake": false,
"locked": {
"lastModified": 1757811247,
"narHash": "sha256-4EFOUyLj85NRL3OacHoLGEo0wjiRJzfsXtR4CZWAn6w=",
"owner": "tinted-theming",
"repo": "base16-zed",
"rev": "824fe0aacf82b3c26690d14e8d2cedd56e18404e",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-zed",
"type": "github"
}
},
"vpn-confinement": {
"locked": {
"lastModified": 1759956062,

View File

@@ -18,8 +18,16 @@
url = "github:Maroka-chan/VPN-Confinement";
};
nvf = {
url = "github:NotAShelf/nvf";
inputs.nixpkgs.follows = "nixpkgs-unstable";
url = "github:notashelf/nvf/v0.8";
inputs.nixpkgs.follows = "nixpkgs";
};
autoaspm = {
url = "github:notthebee/AutoASPM";
inputs.nixpkgs.follows = "nixpkgs";
};
stylix = {
url = "github:nix-community/stylix";
inputs.nixpkgs.follows = "nixpkgs";
};
copyparty.url = "github:9001/copyparty";
};
@@ -40,8 +48,7 @@
specialArgs = { inherit inputs stable_pkgs unstable_pkgs; };
modules = [
./hosts/snowbelle/configuration.nix
inputs.home-manager.nixosModules.default
inputs.vpn-confinement.nixosModules.default
inputs.home-manager.nixosModules.default
];
};
vaniville = nixpkgs.lib.nixosSystem {

View File

@@ -5,19 +5,27 @@
inputs,
...
}: {
imports = [
inputs.autoaspm.nixosModules.default
];
# base system package install list
environment.systemPackages = with pkgs; [
wget
curl
rsync
git
vim
lf
age
fzf
btop
neofetch
usbutils
pciutils
python3
vim
lf
btop
powertop
];
# set timezone
@@ -26,8 +34,13 @@
# allow proprietary packages
nixpkgs.config.allowUnfree = true;
# power management
services.autoaspm.enable = true;
powerManagement.powertop.enable = true;
# enable flakes
nix.settings.experimental-features = ["nix-command" "flakes"];
users.defaultUserShell = pkgs.zsh;
# passwordless rebuild
security.sudo.extraRules = [

View File

@@ -19,7 +19,7 @@ in
system = {
ssh.enable = true;
backups.enable = true;
backups.repo = "/holocron/archive/devices/snowbelle";
backups.repo = "/holocron/archives/servers/snowbelle";
sops.enable = true;
podman.enable = true;
syncthing.enable = true;

View File

@@ -13,18 +13,24 @@ let
browseable = true;
writable = true;
guestOk = false;
"create mask" = "0775";
"directory mask" = "0775";
};
users = {
path = "/holocron/users";
browseable = true;
writable = true;
guestOk = false;
"create mask" = "0660";
"directory mask" = "0770";
};
media = {
path = "/holocron/media";
browseable = true;
writable = true;
guestOk = false;
"create mask" = "0775";
"directory mask" = "0775";
};
};
in {

View File

@@ -27,6 +27,9 @@ in {
autoScrub.interval = "weekly";
};
# install userspace tools for acl's
environment.systemPackages = with pkgs; [ nfs-utils ];
fileSystems."/holocron" = {
device = "holocron";
fsType = "zfs";

View File

@@ -186,20 +186,35 @@ in
new-tab = true;
bangs = [
{
title = "YouTube";
title = "youtube";
shortcut = "!y";
url = "https://www.youtube.com/results?search_query={QUERY}";
}
{
title = "Google";
title = "google";
shortcut = "!g";
url = "https://www.google.com/search?q={QUERY}";
}
{
title = "Github";
title = "github";
shortcut = "!gh";
url = "https://github.com/search?q={QUERY}&type=repositories";
}
{
title = "nixos options";
shortcut = "!no";
url = "https://search.nixos.org/options?channel=25.05&query={QUERY}";
}
{
title = "nixos packages";
shortcut = "!np";
url = "https://search.nixos.org/packages?channel=25.05&query={QUERY}";
}
{
title = "home-manager options";
shortcut = "!hm";
url = "https://home-manager-options.extranix.com/?query={QUERY}&release=release-25.05";
}
];
}
{

View File

@@ -38,6 +38,7 @@ in {
up_hours=$((uptime/60/60%24))
up_mins=$((uptime/60%60))
up_secs=$((uptime%60))
nixos_version=$(nixos-version | sed -E 's/^([0-9]{2}\.[0-9]{2}).*\(([^)]+)\)$/\1 (\2)/')
cpu_usage=$(top -bn1 | grep "Cpu(s)" | awk '{print 100 - $8 "%"}')
mem_total=$(grep MemTotal /proc/meminfo | awk '{print $2}')
mem_avail=$(grep MemAvailable /proc/meminfo | awk '{print $2}')
@@ -63,12 +64,12 @@ in {
if systemctl list-units --type=service --all | grep -q "${service}"; then
status=$(systemctl is-active ${service} 2>/dev/null)
if [ "$status" = "active" ]; then
printf "%-26s%s\n" "''${active}${service}''${reset}" "running"
printf "%-32s%s\n" " ''${active}[${service}]''${reset}" "running"
else
printf "%-26s%s\n" "''${active}${service}''${reset}" "not running"
printf "%-32s%s\n" " ''${active}[${service}]''${reset}" "not running"
fi
else
printf "%-26s%s\n" "''${active}${service}''${reset}" "not found"
printf "%-32s%s\n" " ''${active}[${service}]''${reset}" "not found"
fi
'')
motd_list)}
@@ -80,9 +81,9 @@ in {
for service in velocity smp superflat bento; do
status=$(systemctl is-active $service 2>/dev/null)
if [ "$status" = "active" ]; then
printf "%-26s%s\n" "''${active}$service''${reset}" "running"
printf "%-32s%s\n" " ''${active}[$service]''${reset}" "running"
else
printf "%-26s%s\n" "''${active}$service''${reset}" "not running"
printf "%-32s%s\n" " ''${active}[$service]''${reset}" "not running"
fi
done
echo
@@ -90,8 +91,16 @@ in {
environment.etc."motd".mode = "0755";
programs.bash.interactiveShellInit = ''
programs.zsh.interactiveShellInit = ''
/etc/motd
'';
#environment.loginShellInit = ''
# if [ -x /etc/motd ]; then
# /etc/motd
# else
# cat /etc/motd
# fi
#'';
};
}

View File

@@ -1,9 +1,14 @@
{ pkgs, config, lib, ... }:
let
cfg = config.system.vpn-confinement;
in
{
pkgs,
config,
lib,
inputs,
...
}: let
cfg = config.system.vpn-confinement;
in {
imports = [inputs.vpn-confinement.nixosModules.default];
options.system.vpn-confinement = {
enable = lib.mkEnableOption "enables vpn-confinement";
@@ -16,7 +21,6 @@ in
};
config = lib.mkIf cfg.enable {
# Define VPN network namespace
vpnNamespaces.wgmex = {
enable = true;
@@ -25,17 +29,25 @@ in
"10.0.0.0/8"
];
portMappings = [
{ from = 7103; to = 7103; }
{
from = 7103;
to = 7103;
}
];
openVPNPorts = [
{
port = 51820;
protocol = "both";
}
];
openVPNPorts = [{
port = 51820;
protocol = "both";
}];
};
# secrets only if VPN is enabled
sops.secrets = {
"vpncon_mex_config" = { owner = "root"; group = "root"; };
"vpncon_mex_config" = {
owner = "root";
group = "root";
};
};
};
};
}

View File

@@ -21,7 +21,7 @@
];
};
};
groups.blake = { gid = 1000; };
groups.blake = {gid = 1000;};
};
# define home-manager user
@@ -37,5 +37,4 @@
nix.settings.trusted-users = ["blake"];
programs.zsh.enable = true;
}

View File

@@ -0,0 +1,8 @@
{
pkgs,
config,
...
}: {
}

View File

@@ -0,0 +1,28 @@
{
pkgs,
config,
...
}: {
programs.ssh = {
enable = true;
matchBlocks = {
"git.blakedheld.xyz" = {
user = "gitea";
identityFile = "~/.ssh/id_snowbelle";
};
"git.snowbelle.lan" = {
user = "gitea";
identityFile = "~/.ssh/id_snowbelle";
};
"bebe" = {
hostname = "10.10.0.1";
user = "root";
identityFile = "~/.ssh/id_snowbelle";
};
};
};
# import sshkeys from keyring
home.file.".ssh/id_snowbelle".source = config.lib.file.mkOutOfStoreSymlink /home/blake/.nix/.keyring/ssh/id_snowbelle;
home.file.".ssh/id_snowbelle.pub".source = config.lib.file.mkOutOfStoreSymlink /home/blake/.nix/.keyring/ssh/id_snowbelle.pub;
}

View File

@@ -0,0 +1,11 @@
{
pkgs,
config,
lib,
inputs,
...
}:
{
imports = [inputs.stylix.homeManagerModules.default];
}

View File

@@ -0,0 +1,35 @@
{
pkgs,
config,
...
}: {
home.packages = with pkgs; [xdg-ninja];
xdg = {
enable = true;
configHome = "${config.home.homeDirectory}/.config";
cacheHome = "${config.home.homeDirectory}/.cache";
dataHome = "${config.home.homeDirectory}/.local/share";
stateHome = "${config.home.homeDirectory}/.local/state";
userDirs = {
enable = true;
# writes ~/.config/user-dirs.dirs
desktop = "${config.home.homeDirectory}/desktop";
download = "${config.home.homeDirectory}/downloads";
documents = "${config.home.homeDirectory}/documents";
pictures = "${config.home.homeDirectory}/pictures";
videos = "${config.home.homeDirectory}/videos";
music = "${config.home.homeDirectory}/music";
publicShare = "${config.home.homeDirectory}/public";
templates = "${config.home.homeDirectory}/templates";
};
};
# misc env variables to get things out of ~ (<3 xdg-ninja)
home.sessionVariables = {
GOPATH="$XDG_DATA_HOME/go";
_JAVA_OPTIONS="-Djava.util.prefs.userRoot=""$XDG_CONFIG_HOME""/java";
};
}

View File

@@ -3,19 +3,140 @@
config,
...
}: {
# just using the normal lfrc
programs.lf = {
enable = false;
# export some defaults
home.sessionVariables = {
EDITOR = "nvim";
PAGER = "less";
};
# install it to userspace
home.packages = with pkgs; [lf ctpv trashy];
programs.zsh = {
enable = true;
dotDir = ".config/zsh";
autocd = true;
# link configs
xdg.configFile."lf/lfrc" = {
source = config.lib.file.mkOutOfStoreSymlink "/home/blake/.nix/users/blake/dots/lf/lfrc";
};
xdg.configFile."ctpv/config" = {
source = config.lib.file.mkOutOfStoreSymlink "/home/blake/.nix/users/blake/dots/lf/ctpv_config";
enableCompletion = true;
autosuggestion = {
enable = true;
highlight = "fg=#ff00ff,bg=cyan,bold,underline";
};
syntaxHighlighting = {
enable = true;
highlighters = ["main" "brackets" "pattern" "regexp" "cursor" "root"];
styles = {
"default" = "none";
"unknown-token" = "fg=yellow,bold";
"reserved-word" = "fg=blue,bold";
"alias" = "fg=magenta";
"suffix-alias" = "fg=magenta";
"builtin" = "fg=cyan";
"function" = "fg=cyan";
"command" = "fg=white,bold";
"precommand" = "fg=cyan,underline";
"commandseparator" = "fg=white";
"hashed-command" = "fg=blue";
"path" = "fg=white,underline";
"globbing" = "fg=magenta";
"history-expansion" = "fg=yellow";
"single-hyphen-option" = "fg=blue";
"double-hyphen-option" = "fg=blue";
"back-quoted-argument" = "fg=yellow";
"single-quoted-argument" = "fg=white";
"double-quoted-argument" = "fg=white";
"dollar-double-quoted-argument" = "fg=cyan";
"back-double-quoted-argument" = "fg=cyan";
};
};
history = {
size = 10000;
save = 10000;
share = true;
append = true;
extended = true;
path = "$XDG_STATE_HOME/zsh/history";
};
shellAilses = {
# --- zsh ---
cfz = "nvim $HOME/.config/zsh/.zshrc";
src = "source $HOME/.config/zsh/.zshrc";
# --- config editing ---
cfh = "nvim $HOME/.config/hypr/hyprland.conf";
cfl = "nvim $HOME/.config/lf/lfrc";
# --- navigation ---
ls = "ls --color=auto --group-directories-first";
ll = "ls -lh --color=auto --group-directories-first";
la = "ls -Alh --color=auto --group-directories-first";
".." = "cd ..";
"..." = "cd ../..";
fs = "du -h | sort -h";
ds = "du -hs";
# --- shortcuts ---
vswap = "cd ~/.local/state/nvim/swap";
rswap = "rm ~/.local/state/nvim/swap/*";
v = "nvim";
sv = "sudo nvim";
vim = "nvim";
# --- safety ---
cp = "cp -iv";
mv = "mv -iv";
rm = "rm -Iv";
# --- colors ---
grep = "grep --color=auto";
fgrep = "fgrep --color=auto";
egrep = "egrep --color=auto";
# --- scripts ---
rebuild = "sh ~/.nix/bin/rebuild.sh";
perms = "sudo sh ~/.nix/bin/perms.sh";
bb = "sudo sh ~/.nix/bin/backup_browse.sh";
# --- git ---
status = "git status";
add = "git add";
commit = "git commit -am";
push = "git push";
pull = "git pull";
dotfiles = "/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME";
dtf = "/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME";
# --- systemd ---
stat = "sudo systemctl status";
restart = "sudo systemctl restart";
start = "sudo systemctl start";
stop = "sudo systemctl stop";
jou = "sudo journalctl -xeu";
live = "sudo journalctl -o short-iso -n 50 -fu";
# --- system ---
peace = "systemctl poweroff";
love = "systemctl reboot";
lock = "loginctl lock-session";
};
initContent = ''
# the prompt
PS1='%F{0}%K{126}%B[%n@%m]%b%k%f:%F{015}%B[%~]%b%f%F{015}%S$%s%f '
# lf changes working dir on exit
alias lf='lfcd'
lfcd () {cd "$(command lf -print-last-dir "$@")"}
'';
# zplug = {
# enable = true;
# zplugHome = "$XDG_STATE_HOME/zsh/zplug";
# plugins = [
# {name = "zsh-users/zsh-syntax-highlighting";}
# ];
# };
};
}

View File

@@ -8,7 +8,10 @@
imports = [
./dots/neovim
./dots/lf
./dots/zsh
./dots/ssh
./dots/git
./dots/xdg
];
# general config
@@ -27,59 +30,41 @@
];
# setup zsh
home.sessionVariables.ZDOTDIR = "$HOME/.config/zsh";
programs.zsh = {
enable = true;
# dotDir = ".config/zsh";
};
# link dotfiles
xdg.configFile."zsh" = {
source = config.lib.file.mkOutOfStoreSymlink "/home/blake/.nix/users/blake/dotfiles/zsh";
recursive = true;
};
#home.sessionVariables.ZDOTDIR = "$HOME/.config/zsh";
#programs.zsh = {
# enable = true;
# # dotDir = ".config/zsh";
#};
## link dotfiles
#xdg.configFile."zsh" = {
# source = config.lib.file.mkOutOfStoreSymlink "/home/blake/.nix/users/blake/dotfiles/zsh";
# recursive = true;
#};
programs.gpg = {
enable = true;
};
services.gpg-agent = {
enable = true;
enableSshSupport = true;
#pinentry.package = pkgs.pinentry-qt;
#pinentry.program = "pinentry-qt";
};
#home.packages with pkgs; = [pinentry-qt pinentry_mac];
programs.ssh = {
enable = true;
matchBlocks = {
"git.blakedheld.xyz" = {
user = "gitea";
identityFile = "~/.ssh/id_snowbelle";
};
"git.snowbelle.lan" = {
user = "gitea";
identityFile = "~/.ssh/id_snowbelle";
};
"dockers" = {
hostname = "10.10.0.30";
user = "blake";
identityFile = "~/.ssh/id_snowbelle";
};
};
};
# import sshkeys from keyring
home.file.".ssh/id_snowbelle".source = config.lib.file.mkOutOfStoreSymlink /home/blake/.nix/.keyring/ssh/id_snowbelle;
home.file.".ssh/id_snowbelle.pub".source = config.lib.file.mkOutOfStoreSymlink /home/blake/.nix/.keyring/ssh/id_snowbelle.pub;
# # manage secrets with sops
# sops.secrets = {
# "id_snowbelle" = {
# owner = "blake";
# group = "blake";
# mode = "0600";
# path = "/home/blake/.ssh/id_snowbelle";
# };
# "id_snowbelle.pub" = {
# owner = "blake";
# group = "blake";
# mode = "644";
# path = "/home/blake/.ssh/id_snowbelle.pub";
# };
# # manage secrets with sops
# sops.secrets = {
# "id_snowbelle" = {
# owner = "blake";
# group = "blake";
# mode = "0600";
# path = "/home/blake/.ssh/id_snowbelle";
# };
# "id_snowbelle.pub" = {
# owner = "blake";
# group = "blake";
# mode = "644";
# path = "/home/blake/.ssh/id_snowbelle.pub";
# };
# };
}