This commit is contained in:
death916 2026-03-20 21:24:29 -07:00
commit ee882c5c48
10 changed files with 360 additions and 187 deletions

120
flake.lock generated
View file

@ -20,11 +20,11 @@
]
},
"locked": {
"lastModified": 1772292445,
"narHash": "sha256-4F1Q7U313TKUDDovCC96m/Za4wZcJ3yqtu4eSrj8lk8=",
"lastModified": 1773436376,
"narHash": "sha256-OUPRrprbgN27BXHuWkMAPSCfLLQ/uwpWghEfKYN2iAg=",
"owner": "hyprwm",
"repo": "aquamarine",
"rev": "1dbbba659c1cef0b0202ce92cadfe13bae550e8f",
"rev": "43f10d24391692bba3d762931ee35e7f17f8e8b8",
"type": "github"
},
"original": {
@ -215,11 +215,11 @@
"pre-commit-hooks": "pre-commit-hooks"
},
"locked": {
"lastModified": 1773099966,
"narHash": "sha256-CANkLs9Sw2pfZUtGssGTNKGAn0T0zhZmxoIinFhCbgE=",
"lastModified": 1773953926,
"narHash": "sha256-OG9ZNcnab3jaVQzIBxe5A9J/4rpaJ6LFDAlNd/odS3c=",
"owner": "flox",
"repo": "flox",
"rev": "dbf22b041d1c3e51bc8ecb5c749e74b85c57e575",
"rev": "cb4add836839808ef654b2537054d2b41c5eb72e",
"type": "github"
},
"original": {
@ -314,11 +314,11 @@
]
},
"locked": {
"lastModified": 1772985280,
"narHash": "sha256-FdrNykOoY9VStevU4zjSUdvsL9SzJTcXt4omdEDZDLk=",
"lastModified": 1773963144,
"narHash": "sha256-WzBOBfSay3GYilUfKaUa1Mbf8/jtuAiJIedx7fWuIX4=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "8f736f007139d7f70752657dff6a401a585d6cbc",
"rev": "a91b3ea73a765614d90360580b689c48102d1d33",
"type": "github"
},
"original": {
@ -344,11 +344,11 @@
]
},
"locked": {
"lastModified": 1753964049,
"narHash": "sha256-lIqabfBY7z/OANxHoPeIrDJrFyYy9jAM4GQLzZ2feCM=",
"lastModified": 1772461003,
"narHash": "sha256-pVICsV7FtcEeVwg5y/LFh3XFUkVJninm/P1j/JHzEbM=",
"owner": "hyprwm",
"repo": "hyprcursor",
"rev": "44e91d467bdad8dcf8bbd2ac7cf49972540980a5",
"rev": "b62396457b9cfe2ebf24fe05404b09d2a40f8ed7",
"type": "github"
},
"original": {
@ -373,11 +373,11 @@
]
},
"locked": {
"lastModified": 1770511807,
"narHash": "sha256-suKmSbSk34uPOJDTg/GbPrKEJutzK08vj0VoTvAFBCA=",
"lastModified": 1772461523,
"narHash": "sha256-mI6A51do+hEUzeJKk9YSWfVHdI/SEEIBi2tp5Whq5mI=",
"owner": "hyprwm",
"repo": "hyprgraphics",
"rev": "7c75487edd43a71b61adb01cae8326d277aab683",
"rev": "7d63c04b4a2dd5e59ef943b4b143f46e713df804",
"type": "github"
},
"original": {
@ -403,11 +403,11 @@
"xdph": "xdph"
},
"locked": {
"lastModified": 1773082851,
"narHash": "sha256-xeeeJ1gt4SoskgHW67PVX5p7cDlZFSyX5n4eUSPjxT8=",
"lastModified": 1773954292,
"narHash": "sha256-zU8GQuqxDkBKmb0tPv8YgcSeUgD+qJOirQtIXZ6cryE=",
"owner": "hyprwm",
"repo": "Hyprland",
"rev": "e32eeb1d454b029a24ca71f410896bf52839085d",
"rev": "b940b0d2c197841b0f648598ee782dbaf9e0a89b",
"type": "github"
},
"original": {
@ -449,11 +449,11 @@
]
},
"locked": {
"lastModified": 1767023960,
"narHash": "sha256-R2HgtVS1G3KSIKAQ77aOZ+Q0HituOmPgXW9nBNkpp3Q=",
"lastModified": 1772467975,
"narHash": "sha256-kipyuDBxrZq+beYpZqWzGvFWm4QbayW9agAvi94vDXY=",
"owner": "hyprwm",
"repo": "hyprland-guiutils",
"rev": "c2e906261142f5dd1ee0bfc44abba23e2754c660",
"rev": "5e1c6b9025aaf4d578f3eff7c0eb1f0c197a9507",
"type": "github"
},
"original": {
@ -474,11 +474,11 @@
]
},
"locked": {
"lastModified": 1765214753,
"narHash": "sha256-P9zdGXOzToJJgu5sVjv7oeOGPIIwrd9hAUAP3PsmBBs=",
"lastModified": 1772460177,
"narHash": "sha256-/6G/MsPvtn7bc4Y32pserBT/Z4SUUdBd4XYJpOEKVR4=",
"owner": "hyprwm",
"repo": "hyprland-protocols",
"rev": "3f3860b869014c00e8b9e0528c7b4ddc335c21ab",
"rev": "1cb6db5fd6bb8aee419f4457402fa18293ace917",
"type": "github"
},
"original": {
@ -503,11 +503,11 @@
]
},
"locked": {
"lastModified": 1771866172,
"narHash": "sha256-fYFoXhQLrm1rD8vSFKQBOEX4OGCuJdLt1amKfHd5GAw=",
"lastModified": 1772459629,
"narHash": "sha256-/iwvNUYShmmnwmz/czEUh6+0eF5vCMv0xtDW0STPIuM=",
"owner": "hyprwm",
"repo": "hyprlang",
"rev": "0b219224910e7642eb0ed49f0db5ec3d008e3e41",
"rev": "7615ee388de18239a4ab1400946f3d0e498a8186",
"type": "github"
},
"original": {
@ -555,11 +555,11 @@
]
},
"locked": {
"lastModified": 1764592794,
"narHash": "sha256-7CcO+wbTJ1L1NBQHierHzheQGPWwkIQug/w+fhTAVuU=",
"lastModified": 1772462885,
"narHash": "sha256-5pHXrQK9zasMnIo6yME6EOXmWGFMSnCITcfKshhKJ9I=",
"owner": "hyprwm",
"repo": "hyprtoolkit",
"rev": "5cfe0743f0e608e1462972303778d8a0859ee63e",
"rev": "9af245a69fa6b286b88ddfc340afd288e00a6998",
"type": "github"
},
"original": {
@ -580,11 +580,11 @@
]
},
"locked": {
"lastModified": 1771271487,
"narHash": "sha256-41gEiUS0Pyw3L/ge1l8MXn61cK14VAhgWB/JV8s/oNI=",
"lastModified": 1773436263,
"narHash": "sha256-n+2xFJngUkBqUJD5FsbVnYEHBTyDFSqtBIwQIGPXWWo=",
"owner": "hyprwm",
"repo": "hyprutils",
"rev": "340a792e3b3d482c4ae5f66d27a9096bdee6d76d",
"rev": "5e228db6821380a5875d5643176c5c46a47b8134",
"type": "github"
},
"original": {
@ -605,11 +605,11 @@
]
},
"locked": {
"lastModified": 1770501770,
"narHash": "sha256-NWRM6+YxTRv+bT9yvlhhJ2iLae1B1pNH3mAL5wi2rlQ=",
"lastModified": 1772459835,
"narHash": "sha256-978jRz/y/9TKmZb/qD4lEYHCQGHpEXGqy+8X2lFZsak=",
"owner": "hyprwm",
"repo": "hyprwayland-scanner",
"rev": "0bd8b6cde9ec27d48aad9e5b4deefb3746909d40",
"rev": "0a692d4a645165eebd65f109146b8861e3a925e7",
"type": "github"
},
"original": {
@ -634,11 +634,11 @@
]
},
"locked": {
"lastModified": 1771606233,
"narHash": "sha256-F3PLUqQ/TwgR70U+UeOqJnihJZ2EuunzojYC4g5xHr0=",
"lastModified": 1773074819,
"narHash": "sha256-qRqYnXiKoJLRTcfaRukn7EifmST2IVBUMZOeZMAc5UA=",
"owner": "hyprwm",
"repo": "hyprwire",
"rev": "06c7f1f8c4194786c8400653c4efc49dc14c0f3a",
"rev": "f68afd0e73687598cc2774804fedad76693046f0",
"type": "github"
},
"original": {
@ -665,11 +665,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1772963539,
"narHash": "sha256-9jVDGZnvCckTGdYT53d/EfznygLskyLQXYwJLKMPsZs=",
"lastModified": 1773821835,
"narHash": "sha256-TJ3lSQtW0E2JrznGVm8hOQGVpXjJyXY2guAxku2O9A4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9dcb002ca1690658be4a04645215baea8b95f31d",
"rev": "b40629efe5d6ec48dd1efba650c797ddbd39ace0",
"type": "github"
},
"original": {
@ -681,11 +681,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1772198003,
"narHash": "sha256-I45esRSssFtJ8p/gLHUZ1OUaaTaVLluNkABkk6arQwE=",
"lastModified": 1773389992,
"narHash": "sha256-wvfdLLWJ2I9oEpDd9PfMA8osfIZicoQ5MT1jIwNs9Tk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "dd9b079222d43e1943b6ebd802f04fd959dc8e61",
"rev": "c06b4ae3d6599a672a6210b7021d699c351eebda",
"type": "github"
},
"original": {
@ -697,11 +697,11 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1772822230,
"narHash": "sha256-yf3iYLGbGVlIthlQIk5/4/EQDZNNEmuqKZkQssMljuw=",
"lastModified": 1773814637,
"narHash": "sha256-GNU+ooRmrHLfjlMsKdn0prEKVa0faVanm0jrgu1J/gY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "71caefce12ba78d84fe618cf61644dce01cf3a96",
"rev": "fea3b367d61c1a6592bc47c72f40a9f3e6a53e96",
"type": "github"
},
"original": {
@ -769,11 +769,11 @@
]
},
"locked": {
"lastModified": 1772024342,
"narHash": "sha256-+eXlIc4/7dE6EcPs9a2DaSY3fTA9AE526hGqkNID3Wg=",
"lastModified": 1772893680,
"narHash": "sha256-JDqZMgxUTCq85ObSaFw0HhE+lvdOre1lx9iI6vYyOEs=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "6e34e97ed9788b17796ee43ccdbaf871a5c2b476",
"rev": "8baab586afc9c9b57645a734c820e4ac0a604af9",
"type": "github"
},
"original": {
@ -817,11 +817,11 @@
]
},
"locked": {
"lastModified": 1773025773,
"narHash": "sha256-Wik8+xApNfldpUFjPmJkPdg0RrvUPSWGIZis+A/0N1w=",
"lastModified": 1773975983,
"narHash": "sha256-zrRVwdfhDdohANqEhzY/ydeza6EXEi8AG6cyMRNYT9Q=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "3c06fdbbd36ff60386a1e590ee0cd52dcd1892bf",
"rev": "cc80954a95f6f356c303ed9f08d0b63ca86216ac",
"type": "github"
},
"original": {
@ -851,11 +851,11 @@
"tinted-zed": "tinted-zed"
},
"locked": {
"lastModified": 1771788390,
"narHash": "sha256-RzBpBwn93GWxLjacTte+ngwwg0L/BVOg4G/sSIeK3Rw=",
"lastModified": 1773790548,
"narHash": "sha256-6lI+ZM1yWL4cNRT39s8AUC+kwq237PZCrWc1ubLOwqc=",
"owner": "nix-community",
"repo": "stylix",
"rev": "ebb238f14d6f930068be4718472da3105fd5d3bf",
"rev": "e8ffdddd42062ebc90178db9d013aa38c20b7b2f",
"type": "github"
},
"original": {
@ -1004,11 +1004,11 @@
]
},
"locked": {
"lastModified": 1761431178,
"narHash": "sha256-xzjC1CV3+wpUQKNF+GnadnkeGUCJX+vgaWIZsnz9tzI=",
"lastModified": 1772669058,
"narHash": "sha256-XhnY0aRuDo5LT8pmJVPofPOgO2hAR7T+XRoaQxtNPzQ=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "4b8801228ff958d028f588f0c2b911dbf32297f9",
"rev": "906d0ac159803a7df2dc1f948df9327670380f69",
"type": "github"
},
"original": {

View file

@ -41,6 +41,10 @@
filters.ignore = [
"emmeka"
"justache"
"rosmi"
"ampera"
"ayecee"
"mrfb"
];
# sasl.plain = {
# username = "death916";
@ -61,6 +65,10 @@
filters.ignore = [
"emmeka"
"justache"
"rosmi"
"ampera"
"ayecee"
"mrfb"
];
};
@ -75,6 +83,7 @@
font.size = 16;
buffer = {
server_messages = {
join = {
smart = 30;
@ -100,6 +109,10 @@
prompt_before_open = true;
};
channel.nicklist.width = 100;
channel.typing = {
share = true;
show = true;
};
scroll_position_on_open = "newest";
chathistory.infinite_scroll = true;
};

View file

@ -1,6 +1,7 @@
# ~/nixconfig/home-manager/home.nix.new
{
config,
osConfig,
pkgs,
unstablePkgs,
lib,
@ -109,6 +110,8 @@ in
unstablePkgs.qwen-code
unstablePkgs.tauon
discord
poweralertd
senpai
];
programs.ghostty = {
@ -212,6 +215,11 @@ in
package = pkgs.emacs;
};
programs.firefox.enable = true;
stylix.targets.firefox.profileNames = lib.mkIf (osConfig.networking.hostName == "death-pc") [
"6mb9fjvv.default"
];
programs.alacritty = {
enable = true;
settings = {
@ -246,7 +254,7 @@ in
functions = {
nh-push = {
body = ''
/home/death916/Documents/nix-config/scripts/nh-push $argv
bash ~/Documents/nix*config/scripts/nh-push $argv
'';
description = "Wrapper for nh that runs git pull and git push on success";
};
@ -269,7 +277,7 @@ in
homelab = "tailscale ssh homelab";
urldecode = "python3 -c 'import sys, urllib.parse as ul; print(ul.unquote_plus(sys.stdin.read()))'";
urlencode = "python3 -c 'import sys, urllib.parse as ul; print(ul.quote_plus(sys.stdin.read()))'";
nh-push = "/home/death916/Documents/nix-config/scripts/nh-push";
nh-push = "bash ~/Documents/nix*config/scripts/nh-push";
l = "eza -alh --icons";
};
};

View file

@ -47,6 +47,7 @@
"systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
"swww init &"
"waybar &"
"poweralertd &"
# Stylix will manage the wallpaper
# "swww img /home/death916/Pictures/wallpapers/jameswebb1.jpg &"
"dunst &"

View file

@ -125,6 +125,10 @@
};
"battery" = {
states = {
warning = 30;
critical = 15;
};
format = "{icon} {capacity}%";
format-charging = " {capacity}%";
format-plugged = " {capacity}%";
@ -139,116 +143,15 @@
};
};
};
# style = '' # Managed by stylix
# @define-color rosewater #f5e0dc;
# @define-color flamingo #f2cdcd;
# @define-color pink #f5c2e7;
# @define-color mauve #cba6f7;
# @define-color red #f38ba8;
# @define-color maroon #eba0ac;
# @define-color peach #fab387;
# @define-color yellow #f9e2af;
# @define-color green #a6e3a1;
# @define-color teal #94e2d5;
# @define-color sky #89dceb;
# @define-color sapphire #74c7ec;
# @define-color blue #89b4fa;
# @define-color lavender #b4befe;
style = ''
#workspaces {
font-size: 18px;
}
# @define-color text #cdd6f4;
# @define-color subtext1 #bac2de;
# @define-color subtext0 #a6adc8;
# @define-color overlay2 #9399b2;
# @define-color overlay1 #7f849c;
# @define-color overlay0 #6c7086;
# @define-color surface2 #585b70;
# @define-color surface1 #45475a;
# @define-color surface0 #313244;
# @define-color base #1e1e2e;
# @define-color mantle #181825;
# @define-color crust #11111b;
# * {
# font-family: "JetBrainsMono Nerd Font", FontAwesome, Roboto, Helvetica, Arial, sans-serif;
# font-size: 13px;
# }
# window#waybar {
# background-color: rgba(17, 17, 27, 0.5);
# color: @text;
# }
# #workspaces button {
# padding: 0 5px;
# background-color: transparent;
# color: @overlay1;
# border-radius: 0;
# }
# #workspaces button.active {
# color: @lavender;
# border-bottom: 2px solid @lavender;
# }
# #workspaces button:hover {
# background-color: @surface0;
# }
# #clock, #battery, #cpu, #memory, #network, #pulseaudio, #tray, #window {
# padding: 0 10px;
# margin: 3px 4px;
# border-radius: 8px;
# background-color: @mantle;
# }
# #clock {
# background-color: @crust;
# color: @text;
# }
# #mpris {
# background-color: @crust;
# color: @text;
# }
# #battery {
# background-color: @crust;
# color: @text;
# }
# #battery.charging, #battery.plugged {
# background-color: @green;
# }
# #cpu {
# background-color: @crust;
# color: @text;
# }
# #memory {
# background-color: @crust;
# color: @text;
# }
# #network {
# background-color: @crust;
# color: @text;
# }
# #pulseaudio {
# background-color: @crust;
# color: @text;
# }
# #pulseaudio.muted {
# background-color: @surface1;
# }
# #custom-wttrbar {
# background-color: @crust;
# color: @text;
# }
# '';
#workspaces button {
padding: 0 8px;
}
'';
};
home.packages = with pkgs; [

View file

@ -0,0 +1,204 @@
{
config,
pkgs,
lib,
...
}:
let
piefedAppSrc = pkgs.fetchFromGitea {
domain = "codeberg.org";
owner = "rimu";
repo = "pyfedi";
rev = "v1.5.x"; # Replace with target release branch (e.g., v1.5.x or main)
hash = lib.fakeHash;
};
pythonEnv = pkgs.python3.withPackages (
ps: with ps; [
flask
gunicorn
celery
psycopg2
redis
requests
python-dotenv
authlib
beautifulsoup4
pillow
flask-migrate
flask-sqlalchemy
]
);
piefedImage = pkgs.dockerTools.buildLayeredImage {
name = "piefed";
tag = "nix-latest";
contents = [
pythonEnv
pkgs.bash
pkgs.coreutils
pkgs.findutils
pkgs.curl
];
extraCommands = ''
mkdir -p app
cp -r ${piefedAppSrc}/* app/
chmod -R +w app/ # Ensure app directory is writable for setup scripts
'';
config = {
Cmd = [
"${pythonEnv}/bin/gunicorn"
"-w"
"4"
"-b"
"0.0.0.0:5000"
"pyfedi:app"
];
WorkingDir = "/app";
Env = [
"FLASK_APP=pyfedi.py"
"PYTHONUNBUFFERED=1"
];
};
};
in
{
virtualisation.oci-containers.backend = "docker";
systemd.tmpfiles.rules = [
"d /var/lib/piefed 0755 root root -"
"d /var/lib/piefed/pgdata 0700 root root -"
"d /var/lib/piefed/redis 0700 root root -"
"d /var/lib/piefed/media 0755 root root -"
"d /var/lib/piefed/logs 0755 root root -"
"d /var/lib/piefed/tmp 0755 root root -"
];
systemd.services.docker-network-piefed = {
description = "Create Docker Network for PieFed";
after = [
"network.target"
"docker.service"
];
requires = [ "docker.service" ];
wantedBy = [ "multi-user.target" ];
serviceConfig.Type = "oneshot";
script = ''
${pkgs.docker}/bin/docker network inspect piefed-net >/dev/null 2>&1 || \
${pkgs.docker}/bin/docker network create piefed-net
'';
};
virtualisation.oci-containers.containers = {
piefed-db = {
image = "postgres:15-alpine";
environmentFiles = [ "/var/lib/piefed/.env.docker" ]; # SECRETS LOADED HERE
volumes = [ "/var/lib/piefed/pgdata:/var/lib/postgresql/data" ];
extraOptions = [ "--network=piefed-net" ];
};
piefed-redis = {
image = "redis:7-alpine";
volumes = [ "/var/lib/piefed/redis:/data" ];
extraOptions = [ "--network=piefed-net" ];
};
piefed-web = {
image = "piefed:nix-latest";
imageFile = piefedImage; # Nix auto-loads the tarball into Docker!
ports = [ "8030:5000" ];
environmentFiles = [ "/var/lib/piefed/.env.docker" ]; # SECRETS LOADED HERE
volumes = [
"/var/lib/piefed/media:/app/media"
"/var/lib/piefed/logs:/app/logs"
"/var/lib/piefed/tmp:/app/tmp"
];
dependsOn = [
"piefed-db"
"piefed-redis"
];
extraOptions = [ "--network=piefed-net" ];
};
piefed-worker = {
image = "piefed:nix-latest";
cmd = [
"${pythonEnv}/bin/celery"
"-A"
"pyfedi.celery"
"worker"
"-l"
"info"
];
environmentFiles = [ "/var/lib/piefed/.env.docker" ];
volumes = [
"/var/lib/piefed/media:/app/media"
"/var/lib/piefed/logs:/app/logs"
"/var/lib/piefed/tmp:/app/tmp"
];
dependsOn = [
"piefed-db"
"piefed-redis"
];
extraOptions = [ "--network=piefed-net" ];
};
};
systemd.services."docker-piefed-db".requires = [ "docker-network-piefed.service" ];
systemd.services."docker-piefed-redis".requires = [ "docker-network-piefed.service" ];
systemd.services."docker-piefed-web".requires = [ "docker-network-piefed.service" ];
systemd.services."docker-piefed-worker".requires = [ "docker-network-piefed.service" ];
systemd.services.piefed-daily = {
script = "${pkgs.docker}/bin/docker exec piefed-web bash -c 'cd /app && ./daily.sh'";
serviceConfig.Type = "oneshot";
};
systemd.timers.piefed-daily = {
wantedBy = [ "timers.target" ];
timerConfig = {
OnCalendar = "*-*-* 02:05:00";
Persistent = true;
};
};
systemd.services.piefed-orphan-files = {
script = "${pkgs.docker}/bin/docker exec piefed-web bash -c 'cd /app && ./remove_orphan_files.sh'";
serviceConfig.Type = "oneshot";
};
systemd.timers.piefed-orphan-files = {
wantedBy = [ "timers.target" ];
timerConfig = {
OnCalendar = "Mon *-*-* 04:05:00";
Persistent = true;
};
};
systemd.services.piefed-email-notifs = {
script = "${pkgs.docker}/bin/docker exec piefed-web bash -c 'cd /app && ./email_notifs.sh'";
serviceConfig.Type = "oneshot";
};
systemd.timers.piefed-email-notifs = {
wantedBy = [ "timers.target" ];
timerConfig = {
OnCalendar = "*-*-* 00/6:01:00";
Persistent = true;
};
};
systemd.services.piefed-send-queue = {
script = "${pkgs.docker}/bin/docker exec piefed-web bash -c 'cd /app && ./send_queue.sh'";
serviceConfig.Type = "oneshot";
};
systemd.timers.piefed-send-queue = {
wantedBy = [ "timers.target" ];
timerConfig = {
OnCalendar = "*:0/5";
Persistent = true;
};
};
}

View file

@ -34,20 +34,53 @@
soft-wrap = {
enable = true;
};
lsp = {
display-inlay-hints = true;
};
};
};
languages.language = [
{
name = "nix";
auto-format = true;
formatter.command = lib.getExe pkgs.nixfmt-rfc-style;
}
{
name = "python";
language-servers = [ "pylsp" ];
auto-format = true;
}
];
languages = {
language-server = {
rust-analyzer = {
config = {
inlayHints = {
# bindingModeHints = { enable = true; };
# chainingHints = { enable = true; };
closingBraceHints = {
enable = true;
};
closureReturnTypeHints = {
enable = true;
};
lifetimeElisionHints = {
enable = true;
};
parameterHints = {
enable = true;
};
# reborrowHints = { enable = true; };
};
};
};
};
language = [
{
name = "nix";
auto-format = true;
formatter.command = lib.getExe pkgs.nixfmt-rfc-style;
}
{
name = "python";
language-servers = [ "pylsp" ];
auto-format = true;
}
{
name = "rust";
language-servers = [ "rust-analyzer" ];
auto-format = true;
}
];
};
themes = {
autumn_night_transparent = {
"inherits" = "autumn_night";

View file

@ -72,6 +72,7 @@
nil
nixfmt
nixd
pkgs.heroic # Using stable to avoid electron-unwrapped-39 build failure in unstable
];
services.snapper.configs.nix = {
@ -118,7 +119,7 @@
enable = true;
clean.enable = true;
clean.extraArgs = "--keep-since 7d --keep 10";
flake = "/home/death916/Documents/nix-config/";
flake = "/home/death916/Documents/nixconfig";
};
services.fprintd.enable = false;
programs.direnv.enable = true;

View file

@ -60,6 +60,8 @@
};
};
services.upower.enable = true;
system.stateVersion = "24.11";
stylix.image = "/home/death916/Documents/nix-config/home-manager/wallpaper.jpg";

View file

@ -8,7 +8,7 @@ set -e
# Determine the absolute path of the directory containing this script.
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
# The repository root is one level above the scripts directory.
REPO_ROOT="$SCRIPT_DIR/.."
REPO_ROOT=$(realpath "$SCRIPT_DIR/..")
# --- Git Operations ---
echo "Pulling latest changes from git..."
@ -25,8 +25,16 @@ fi
# --- NixOS Build ---
echo "Building NixOS configuration..."
# Use --flake to specify the flake path.
nh os switch ".#$@"
# If an argument is provided, use it as the hostname with -H.
# Otherwise, resolve the current hostname and use it.
if [ -z "$1" ]; then
CURRENT_HOSTNAME=$(hostname)
echo "Running: nh os switch \"$REPO_ROOT\" -H \"$CURRENT_HOSTNAME\""
nh os switch "$REPO_ROOT" -H "$CURRENT_HOSTNAME"
else
echo "Running: nh os switch \"$REPO_ROOT\" -H \"$@\""
nh os switch "$REPO_ROOT" -H "$@"
fi
# --- Git Push on Success ---
echo "NixOS rebuild successful. Pushing to remote..."