Compare commits
18 Commits
929ecd64b0
...
f873a626a9
Author | SHA1 | Date | |
---|---|---|---|
f873a626a9 | |||
e32525eb0f | |||
00ea956f6a | |||
6f9f670e8e | |||
56a9bf3270 | |||
f6c529400a | |||
89fb45d61f | |||
0b78f3aa91 | |||
7533a9a2f3 | |||
e2471a64ed | |||
ef25eaf5a4 | |||
81094efac3 | |||
d205b28f4f | |||
51f82ed57a | |||
335362ea57 | |||
4a80288d99 | |||
33211f4378 | |||
39ff370014 |
26
flake.nix
26
flake.nix
@@ -6,28 +6,24 @@
|
||||
nixpkgs-unstable,
|
||||
home-manager,
|
||||
...
|
||||
}: {
|
||||
}: let
|
||||
specials = {
|
||||
inherit inputs;
|
||||
pkgs-unstable = import nixpkgs-unstable {
|
||||
system = "x86_64-linux";
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
};
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
wildfire = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
pkgs-unstable = import nixpkgs-unstable {
|
||||
system = "x86_64-linux";
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
};
|
||||
specialArgs = specials;
|
||||
modules = [
|
||||
./hosts/wildfire/configuration.nix
|
||||
];
|
||||
};
|
||||
hurricane = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
pkgs-unstable = import nixpkgs-unstable {
|
||||
system = "x86_64-linux";
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
};
|
||||
specialArgs = specials;
|
||||
modules = [
|
||||
./hosts/hurricane/configuration.nix
|
||||
];
|
||||
|
@@ -37,6 +37,7 @@
|
||||
prismlauncher
|
||||
davinci-resolve
|
||||
ardour
|
||||
btop-rocm
|
||||
];
|
||||
|
||||
# host-specific Systemd services
|
||||
|
@@ -2,6 +2,6 @@
|
||||
# Home Manager Hyprland monitors
|
||||
wayland.windowManager.hyprland.extraConfig = ''
|
||||
monitor = DP-3, 2560x1440@143.97, 1920x-360, auto;
|
||||
monitor = HDMI-A-1, 1920x1080@60, 0x0, auto;
|
||||
monitor = HDMI-A-1, 1920x1080@59.94, 0x0, auto;
|
||||
'';
|
||||
}
|
||||
|
@@ -2,6 +2,7 @@
|
||||
# This module contains the base settings that every system should have
|
||||
{
|
||||
pkgs,
|
||||
pkgs-unstable,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
@@ -20,6 +21,10 @@
|
||||
# Use system packages instead of separate user packages (saves space)
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
# Pass unstable packages to home-manager modules
|
||||
extraSpecialArgs = {
|
||||
pkgs-unstable = pkgs-unstable;
|
||||
};
|
||||
# User-specific Home Manager configurations
|
||||
users.schulze.imports = [
|
||||
./home/hyprland.nix # Hyprland window manager user config
|
||||
@@ -29,6 +34,7 @@
|
||||
./home/ghostty.nix # Ghostty config
|
||||
./home/gtk.nix # GTK theme
|
||||
./home/nextcloud.nix # Nextcloud autostart
|
||||
./home/code-cursor.nix # Cursor config
|
||||
];
|
||||
};
|
||||
|
||||
|
@@ -39,38 +39,38 @@
|
||||
|
||||
gruvbox-rgb = {
|
||||
# Backgrounds
|
||||
bg0 = "40, 40, 40";
|
||||
bg0_h = "29, 32, 33";
|
||||
bg0_s = "50, 48, 47";
|
||||
bg1 = "60, 56, 54";
|
||||
bg2 = "80, 73, 69";
|
||||
bg3 = "102, 92, 84";
|
||||
bg4 = "124, 111, 100";
|
||||
bg0 = "40,40,40";
|
||||
bg0_h = "29,32,33";
|
||||
bg0_s = "50,48,47";
|
||||
bg1 = "60,56,54";
|
||||
bg2 = "80,73,69";
|
||||
bg3 = "102,92,84";
|
||||
bg4 = "124,111,100";
|
||||
|
||||
# Foregrounds
|
||||
fg0 = "251, 241, 199";
|
||||
fg1 = "235, 219, 178";
|
||||
fg2 = "213, 196, 161";
|
||||
fg3 = "189, 174, 147";
|
||||
fg4 = "168, 153, 132";
|
||||
fg0 = "251,241,199";
|
||||
fg1 = "235,219,178";
|
||||
fg2 = "213,196,161";
|
||||
fg3 = "189,174,147";
|
||||
fg4 = "168,153,132";
|
||||
|
||||
# Normal colors
|
||||
red = "204, 36, 29";
|
||||
green = "152, 151, 26";
|
||||
yellow = "215, 153, 33";
|
||||
blue = "69, 133, 136";
|
||||
purple = "177, 98, 134";
|
||||
aqua = "104, 157, 106";
|
||||
orange = "214, 93, 14";
|
||||
gray = "146, 131, 116";
|
||||
red = "204,36,29";
|
||||
green = "152,151,26";
|
||||
yellow = "215,153,33";
|
||||
blue = "69,133,136";
|
||||
purple = "177,98,134";
|
||||
aqua = "104,157,106";
|
||||
orange = "214,93,14";
|
||||
gray = "146,131,116";
|
||||
|
||||
# Bright colors
|
||||
bright_red = "251, 73, 52";
|
||||
bright_green = "184, 187, 38";
|
||||
bright_yellow = "250, 189, 47";
|
||||
bright_blue = "131, 165, 152";
|
||||
bright_purple = "211, 134, 155";
|
||||
bright_aqua = "142, 192, 124";
|
||||
bright_orange = "254, 128, 25";
|
||||
bright_green = "184,187,38";
|
||||
bright_yellow = "250,189,47";
|
||||
bright_blue = "131,165,152";
|
||||
bright_purple = "211,134,155";
|
||||
bright_aqua = "142,192,124";
|
||||
bright_orange = "254,128,25";
|
||||
};
|
||||
}
|
||||
|
9
modules/home/btop.nix
Normal file
9
modules/home/btop.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
programs.btop = {
|
||||
enable = true;
|
||||
settings = {
|
||||
color_theme = "gruvbox_dark_v2";
|
||||
theme_background = false;
|
||||
};
|
||||
};
|
||||
}
|
65
modules/home/code-cursor.nix
Normal file
65
modules/home/code-cursor.nix
Normal file
@@ -0,0 +1,65 @@
|
||||
{
|
||||
pkgs,
|
||||
pkgs-unstable,
|
||||
...
|
||||
}: {
|
||||
# Cursor configuration
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
package = pkgs-unstable.code-cursor;
|
||||
profiles.default.enableUpdateCheck = false;
|
||||
profiles.default.enableExtensionUpdateCheck = false;
|
||||
profiles.default.extensions = with pkgs.vscode-extensions; [
|
||||
ms-python.python # Python language
|
||||
ms-python.vscode-pylance # Python LS
|
||||
ms-python.black-formatter # Python formatter
|
||||
|
||||
dbaeumer.vscode-eslint # ESLint JS
|
||||
esbenp.prettier-vscode # Prettier code formatting
|
||||
bradlc.vscode-tailwindcss # Tailwind IntelliSense
|
||||
unifiedjs.vscode-mdx # MDX language
|
||||
|
||||
waderyan.gitblame # Git blame
|
||||
|
||||
jdinhlife.gruvbox # Gruvbox theme
|
||||
vscode-icons-team.vscode-icons # Icons
|
||||
|
||||
golang.go # Go language
|
||||
budparr.language-hugo-vscode # HUGO language
|
||||
bungcip.better-toml # TOML
|
||||
|
||||
jnoortheen.nix-ide # Nix language
|
||||
|
||||
redhat.vscode-yaml # YAML
|
||||
ms-vscode.hexeditor # Hex editor
|
||||
# Manually install these (not available as nixpkgs)
|
||||
# pgourlain.erlang # Erlang language # not available
|
||||
# csstools.postcss # PostCSS language # not available
|
||||
];
|
||||
profiles.default.userSettings = {
|
||||
"terminal.external.linuxExec" = "ghostty";
|
||||
"terminal.explorerKind" = "external";
|
||||
"terminal.integrated.rescaleOverlappingGlyphs" = false;
|
||||
"terminal.integrated.fontFamily" = "'Symbols Nerd Font Mono'";
|
||||
"files.autoSave" = "onFocusChange";
|
||||
"editor.fontFamily" = "'Intel One Mono', 'Droid Sans Mono', 'monospace', monospace";
|
||||
"editor.tabSize" = 2;
|
||||
"editor.wordWrap" = "on";
|
||||
"workbench.colorTheme" = "Gruvbox Dark Medium";
|
||||
"workbench.iconTheme" = "vscode-icons";
|
||||
"editor.defaultFormatter" = "esbenp.prettier-vscode";
|
||||
"editor.fontLigatures" = "'ss01'";
|
||||
"editor.formatOnSave" = true;
|
||||
"prettier.printWidth" = 120;
|
||||
"prettier.proseWrap" = "always";
|
||||
"vsicons.dontShowNewVersionMessage" = true;
|
||||
"editor.minimap.enabled" = true;
|
||||
"cursor.cpp.enablePartialAccepts" = true;
|
||||
"cursor.diffs.useCharacterLevelDiffs" = true;
|
||||
"nix.enableLanguageServer" = true;
|
||||
"[nix]" = {
|
||||
"editor.defaultFormatter" = "jnoortheen.nix-ide";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@@ -5,7 +5,7 @@
|
||||
settings = {
|
||||
"font-family" = "Intel One Mono";
|
||||
"theme" = "GruvboxDark";
|
||||
"background-opacity" = 0.4;
|
||||
"background-opacity" = 0.6;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@@ -1,4 +1,6 @@
|
||||
{
|
||||
let
|
||||
colors = import ../gruvbox-theme.nix;
|
||||
in {
|
||||
# Hyprland settings
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
@@ -21,14 +23,14 @@
|
||||
"$mod" = "SUPER";
|
||||
"$terminal" = "ghostty";
|
||||
"$filemanager" = "nautilus";
|
||||
"$menu" = "rofi -show drun";
|
||||
"$menu" = "rofi -show-icons -show drun";
|
||||
|
||||
general = {
|
||||
gaps_in = 4;
|
||||
gaps_out = 4;
|
||||
gaps_in = 5;
|
||||
gaps_out = 15;
|
||||
border_size = 1;
|
||||
"col.active_border" = "rgba(fe8019ff) rgba(cc241dff) 45deg";
|
||||
"col.inactive_border" = "rgba(7c6f64aa)";
|
||||
"col.active_border" = "rgba(${colors.gruvbox-rgb.bright_orange},1.0) rgba(${colors.gruvbox-rgb.red},1.0) 45deg";
|
||||
"col.inactive_border" = "rgba(${colors.gruvbox-rgb.bg4},0.66)";
|
||||
layout = "dwindle";
|
||||
allow_tearing = false;
|
||||
};
|
||||
@@ -60,8 +62,21 @@
|
||||
dwindle = {
|
||||
pseudotile = true;
|
||||
preserve_split = true;
|
||||
smart_split = true;
|
||||
};
|
||||
|
||||
# Window rules
|
||||
windowrulev2 = [
|
||||
# Nice transparency for some apps
|
||||
"opacity 0.9,class:^(cursor)$"
|
||||
"opacity 0.9,class:^(firefox)$"
|
||||
"opacity 0.9,class:^(GitKraken)$"
|
||||
"opacity 0.9,class:^(obsidian)$"
|
||||
|
||||
# Keep Rofi focused
|
||||
"stayfocused, class:^(Rofi)$"
|
||||
];
|
||||
|
||||
# Bindings
|
||||
bind =
|
||||
[
|
||||
|
@@ -1,12 +1,137 @@
|
||||
{
|
||||
{config, ...}: let
|
||||
colors = import ../gruvbox-theme.nix;
|
||||
in {
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
theme = "gruvbox-dark";
|
||||
font = "Intel One Mono";
|
||||
modes = [
|
||||
"drun"
|
||||
"window"
|
||||
];
|
||||
terminal = "\${pkgs.ghostty}/bin/ghostty";
|
||||
terminal = "ghostty";
|
||||
font = "Intel One Mono 14";
|
||||
location = "center";
|
||||
theme = let
|
||||
inherit (config.lib.formats.rasi) mkLiteral;
|
||||
in {
|
||||
"*" = {
|
||||
margin = 0;
|
||||
padding = 0;
|
||||
spacing = 0;
|
||||
|
||||
bg0 = mkLiteral "${colors.gruvbox.bg0}9A";
|
||||
bg1 = mkLiteral "${colors.gruvbox.bg1}";
|
||||
bg2 = mkLiteral "${colors.gruvbox.bg2}9A";
|
||||
bg3 = mkLiteral "${colors.gruvbox.bg3}9A";
|
||||
|
||||
fg0 = mkLiteral "${colors.gruvbox.fg0}";
|
||||
fg1 = mkLiteral "${colors.gruvbox.fg1}";
|
||||
fg2 = mkLiteral "${colors.gruvbox.fg2}";
|
||||
fg3 = mkLiteral "${colors.gruvbox.fg3}";
|
||||
|
||||
blue = mkLiteral "${colors.gruvbox.blue}";
|
||||
orange = mkLiteral "${colors.gruvbox.orange}";
|
||||
brightOrange = mkLiteral "${colors.gruvbox.bright_orange}";
|
||||
brightBlue = mkLiteral "${colors.gruvbox.bright_blue}9A";
|
||||
red = mkLiteral "${colors.gruvbox.red}";
|
||||
|
||||
background-color = mkLiteral "transparent";
|
||||
text-color = mkLiteral "@fg0";
|
||||
};
|
||||
|
||||
"window" = {
|
||||
background-color = mkLiteral "@bg0";
|
||||
#transparency = mkLiteral "'real'";
|
||||
|
||||
width = mkLiteral "480";
|
||||
border-radius = mkLiteral "8px";
|
||||
border = mkLiteral "1px";
|
||||
border-color = mkLiteral "@red";
|
||||
};
|
||||
|
||||
"mainbox" = {
|
||||
padding = mkLiteral "12px";
|
||||
#children = mkLiteral "[inputbar, listview]";
|
||||
};
|
||||
|
||||
"inputbar" = {
|
||||
background-color = mkLiteral "@bg1";
|
||||
border-color = mkLiteral "@orange";
|
||||
|
||||
border = mkLiteral "2px";
|
||||
border-radius = mkLiteral "4px";
|
||||
|
||||
padding = mkLiteral "8px 16px";
|
||||
spacing = mkLiteral "8px";
|
||||
children = mkLiteral "[prompt, entry]";
|
||||
};
|
||||
|
||||
"prompt" = {
|
||||
text-color = mkLiteral "@brightOrange";
|
||||
};
|
||||
|
||||
"entry" = {
|
||||
placeholder = "Search";
|
||||
placeholder-color = mkLiteral "@fg3";
|
||||
};
|
||||
|
||||
"message" = {
|
||||
margin = mkLiteral "12px 0 0";
|
||||
border-radius = mkLiteral "4px";
|
||||
border-color = mkLiteral "@bg2";
|
||||
background-color = mkLiteral "@bg2";
|
||||
};
|
||||
|
||||
"textbox" = {
|
||||
padding = mkLiteral "8px 24px";
|
||||
};
|
||||
|
||||
"listview" = {
|
||||
background-color = mkLiteral "transparent";
|
||||
margin = mkLiteral "12px 0 0";
|
||||
lines = 10;
|
||||
columns = 1;
|
||||
};
|
||||
|
||||
"element" = {
|
||||
padding = mkLiteral "8px 16px";
|
||||
spacing = mkLiteral "8px";
|
||||
border-radius = mkLiteral "4px";
|
||||
#spacing = mkLiteral "8px";
|
||||
};
|
||||
|
||||
"element normal active" = {
|
||||
text-color = mkLiteral "@bg3";
|
||||
};
|
||||
|
||||
"element alternate active" = {
|
||||
text-color = mkLiteral "@bg3";
|
||||
};
|
||||
|
||||
"element selected normal, element selected active" = {
|
||||
background-color = mkLiteral "@brightBlue";
|
||||
border = mkLiteral "2px";
|
||||
border-color = mkLiteral "@blue";
|
||||
};
|
||||
|
||||
"element-icon" = {
|
||||
size = mkLiteral "1em";
|
||||
vertical-align = mkLiteral "0.5";
|
||||
};
|
||||
|
||||
"element-text" = {
|
||||
text-color = mkLiteral "inherit";
|
||||
#padding = mkLiteral "10px";
|
||||
};
|
||||
|
||||
"element selected" = {
|
||||
#text-color = mkLiteral "@bg1";
|
||||
#border-color = mkLiteral "@orange";
|
||||
};
|
||||
|
||||
"element-text.selected" = {
|
||||
#background-color = mkLiteral "@orange-alt";
|
||||
#text-color = mkLiteral "@orange";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@@ -77,15 +77,19 @@ in {
|
||||
];
|
||||
|
||||
programs = {
|
||||
# CLI tools
|
||||
command-not-found = {
|
||||
enable = true;
|
||||
dbPath = "/run/current-system/sw/bin/sqlite3";
|
||||
};
|
||||
# CLI
|
||||
|
||||
# Zoxide for quick directory navigation
|
||||
zoxide = {
|
||||
enable = true;
|
||||
flags = ["--cmd cd"];
|
||||
};
|
||||
|
||||
# Friendly shell
|
||||
fish = {
|
||||
enable = true;
|
||||
interactiveShellInit = ''
|
||||
@@ -104,13 +108,23 @@ in {
|
||||
"rm" = "rm -v";
|
||||
};
|
||||
};
|
||||
|
||||
# Starship shell prompt
|
||||
starship = {
|
||||
enable = true;
|
||||
transientPrompt.enable = true;
|
||||
presets = ["nerd-font-symbols" "gruvbox-rainbow"];
|
||||
settings = {
|
||||
add_newline = false;
|
||||
};
|
||||
};
|
||||
# Direnv for automatic environment loading
|
||||
direnv = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
};
|
||||
|
||||
# Vim editor
|
||||
vim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
|
@@ -2,6 +2,13 @@
|
||||
|
||||
set -e
|
||||
|
||||
# Days of nix generations to keep
|
||||
KEEP_DAYS=60
|
||||
# extra buffer before we trigger a GC
|
||||
BUFFER_DAYS=30
|
||||
# minimum number of generations to keep
|
||||
KEEP_MIN=5
|
||||
|
||||
# Check for force flag
|
||||
FORCE_REBUILD=false
|
||||
if [[ "$1" == "-f" || "$1" == "--force" ]]; then
|
||||
@@ -61,7 +68,17 @@ current=$(nixos-rebuild list-generations | grep current)
|
||||
# Commit all changes witih the generation metadata
|
||||
git commit -am "$NIXOS_HOST: $current"
|
||||
|
||||
# Clean up old generations older than 180 days
|
||||
sudo nix-collect-garbage --delete-older-than 180d &>logs/nixos-gc.log || (cat logs/nixos-gc.log | grep --color error && exit 1)
|
||||
# Clean up old generations if conditions are met
|
||||
gens=$(nixos-rebuild list-generations | tail -n +2)
|
||||
# If there are less than KEEP_MIN generations, exit
|
||||
(( $(wc -l <<<"$gens") <= KEEP_MIN )) && exit 0
|
||||
|
||||
# Get the oldest generation
|
||||
old=$(awk 'END{print $2" "$3}' <<<"$gens")
|
||||
# Calculate the age of the oldest generation in days
|
||||
age=$(( ( $(date +%s) - $(date -d "$old" +%s) )/86400 ))
|
||||
# If the age is greater than KEEP_DAYS+BUFFER_DAYS, delete the oldest generation
|
||||
(( age > KEEP_DAYS+BUFFER_DAYS )) || exit 0
|
||||
sudo nix-collect-garbage --delete-older-than ${KEEP_DAYS}d &>logs/nixos-gc.log || (cat logs/nixos-gc.log | grep --color error && exit 1)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user