Compare commits
19 Commits
25.11
...
0f76939983
| Author | SHA1 | Date | |
|---|---|---|---|
| 0f76939983 | |||
| a1da2f5cc1 | |||
| 175da48170 | |||
| ac956ef48c | |||
| 0c1190f39c | |||
| 00f05d1bb2 | |||
| 4e6c6ab81d | |||
| 04e1a8563c | |||
| 7278dc8306 | |||
| 066eea2999 | |||
| 80633142fb | |||
| 3029e3d9a8 | |||
| 3483e26bce | |||
| b3add6ddf8 | |||
| 89994e3fc8 | |||
| 0e9671a45f | |||
| f4078970b2 | |||
| bc42c4dc77 | |||
| 585f9ef5c7 |
54
flake.lock
generated
54
flake.lock
generated
@@ -3,11 +3,11 @@
|
|||||||
"flake-compat": {
|
"flake-compat": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1761588595,
|
"lastModified": 1765121682,
|
||||||
"narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=",
|
"narHash": "sha256-4VBOP18BFeiPkyhy9o4ssBNQEvfvv1kXkasAYd0+rrA=",
|
||||||
"owner": "edolstra",
|
"owner": "edolstra",
|
||||||
"repo": "flake-compat",
|
"repo": "flake-compat",
|
||||||
"rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5",
|
"rev": "65f23138d8d09a92e30f1e5c87611b23ef451bf3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -43,11 +43,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1764866045,
|
"lastModified": 1766292113,
|
||||||
"narHash": "sha256-0GsEtXV9OquDQ1VclQfP16cU5VZh7NEVIOjSH4UaJuM=",
|
"narHash": "sha256-sWTtmkQujRpjWYCnZc8LWdDiCzrRlSBPrGovkZpLkBI=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "f63d0fe9d81d36e5fc95497217a72e02b8b7bcab",
|
"rev": "fdec8815a86db36f42fc9c8cb2931cd8485f5aed",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -64,11 +64,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1764872372,
|
"lastModified": 1766282146,
|
||||||
"narHash": "sha256-uZuXRz9CzeCHsRbc2MQvKomwoX6GcFC5BUMEk3ouSFU=",
|
"narHash": "sha256-0V/nKU93KdYGi+5LB/MVo355obBJw/2z9b2xS3bPJxY=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "05a56dbf24f195c62286e3273a2671d3b4904b00",
|
"rev": "61fcc9de76b88e55578eb5d79fc80f2b236df707",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -86,11 +86,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1764746434,
|
"lastModified": 1766225187,
|
||||||
"narHash": "sha256-6ymFuw+Z1C90ezf8H0BP3c2JFZhJYwMq31px2StwWHU=",
|
"narHash": "sha256-6hcaU8qtmixsaEUbjPiOFd5aJPZxAIBokl5d7dkab3k=",
|
||||||
"owner": "Jovian-Experiments",
|
"owner": "Jovian-Experiments",
|
||||||
"repo": "Jovian-NixOS",
|
"repo": "Jovian-NixOS",
|
||||||
"rev": "b4c0b604148adacf119b89824ed26df8926ce42c",
|
"rev": "bb53a85db9210204a98f771f10f1f5b4e06ccb2d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -106,11 +106,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1764161084,
|
"lastModified": 1765066094,
|
||||||
"narHash": "sha256-HN84sByg9FhJnojkGGDSrcjcbeioFWoNXfuyYfJ1kBE=",
|
"narHash": "sha256-0YSU35gfRFJzx/lTGgOt6ubP8K6LeW0vaywzNNqxkl4=",
|
||||||
"owner": "nix-darwin",
|
"owner": "nix-darwin",
|
||||||
"repo": "nix-darwin",
|
"repo": "nix-darwin",
|
||||||
"rev": "e95de00a471d07435e0527ff4db092c84998698e",
|
"rev": "688427b1aab9afb478ca07989dc754fa543e03d5",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -148,11 +148,11 @@
|
|||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1764730608,
|
"lastModified": 1765841014,
|
||||||
"narHash": "sha256-FxKIa3OCSRVC23qrk7VT68vExUcmSruJ8OobVlSWOxc=",
|
"narHash": "sha256-55V0AJ36V5Egh4kMhWtDh117eE3GOjwq5LhwxDn9eHg=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NixOS-WSL",
|
"repo": "NixOS-WSL",
|
||||||
"rev": "10124c58674360765adcb38c9a8b081fb72904e4",
|
"rev": "be4af8042e7a61fa12fda58fe9a3b3babdefe17b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -164,11 +164,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1764517877,
|
"lastModified": 1765472234,
|
||||||
"narHash": "sha256-pp3uT4hHijIC8JUK5MEqeAWmParJrgBVzHLNfJDZxg4=",
|
"narHash": "sha256-9VvC20PJPsleGMewwcWYKGzDIyjckEz8uWmT0vCDYK0=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "2d293cbfa5a793b4c50d17c05ef9e385b90edf6c",
|
"rev": "2fbfb1d73d239d2402a8fe03963e37aab15abe8b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -180,11 +180,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1764667669,
|
"lastModified": 1766070988,
|
||||||
"narHash": "sha256-7WUCZfmqLAssbDqwg9cUDAXrSoXN79eEEq17qhTNM/Y=",
|
"narHash": "sha256-G/WVghka6c4bAzMhTwT2vjLccg/awmHkdKSd2JrycLc=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "418468ac9527e799809c900eda37cbff999199b6",
|
"rev": "c6245e83d836d0433170a16eb185cefe0572f8b8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -196,11 +196,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1764677808,
|
"lastModified": 1766201043,
|
||||||
"narHash": "sha256-H3lC7knbXOBrHI9hITQ7modLuX20mYJVhZORL5ioms0=",
|
"narHash": "sha256-eplAP+rorKKd0gNjV3rA6+0WMzb1X1i16F5m5pASnjA=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "1aab89277eb2d87823d5b69bae631a2496cff57a",
|
"rev": "b3aad468604d3e488d627c0b43984eb60e75e782",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
(final: prev: {
|
(final: prev: {
|
||||||
unstable = import nixpkgs-unstable {
|
unstable = import nixpkgs-unstable {
|
||||||
system = prev.system;
|
system = prev.stdenv.hostPlatform.system;
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
};
|
};
|
||||||
custom = prev.callPackage ./packages {};
|
custom = prev.callPackage ./packages {};
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
(final: prev: {
|
(final: prev: {
|
||||||
unstable = import nixpkgs-unstable {
|
unstable = import nixpkgs-unstable {
|
||||||
system = prev.system;
|
system = prev.stdenv.hostPlatform.system;
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
};
|
};
|
||||||
custom = prev.callPackage ./packages {};
|
custom = prev.callPackage ./packages {};
|
||||||
@@ -107,7 +107,7 @@
|
|||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
(final: prev: {
|
(final: prev: {
|
||||||
unstable = import nixpkgs-unstable {
|
unstable = import nixpkgs-unstable {
|
||||||
system = prev.system;
|
system = prev.stdenv.hostPlatform.system;
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
overlays = [
|
overlays = [
|
||||||
# Override claude-code in unstable to use our custom GCS-based build
|
# Override claude-code in unstable to use our custom GCS-based build
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
# Enable all desktop roles for full-featured experience
|
# Enable all desktop roles for full-featured experience
|
||||||
home.roles = {
|
home.roles = {
|
||||||
|
"3d-printing".enable = true;
|
||||||
base.enable = true;
|
base.enable = true;
|
||||||
desktop.enable = true;
|
desktop.enable = true;
|
||||||
office.enable = true;
|
office.enable = true;
|
||||||
|
|||||||
22
home/roles/3d-printing/default.nix
Normal file
22
home/roles/3d-printing/default.nix
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.home.roles."3d-printing";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.home.roles."3d-printing" = {
|
||||||
|
enable = mkEnableOption "Enable 3D printing applications and tools";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
# 3D Slicing Software
|
||||||
|
orca-slicer # G-code generator for 3D printers (Bambu, Prusa, Voron, etc.)
|
||||||
|
|
||||||
|
# 3D Modeling Software
|
||||||
|
openscad-unstable # 3D parametric model compiler (nightly build)
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -298,7 +298,7 @@ in
|
|||||||
gaps = {
|
gaps = {
|
||||||
outer = {
|
outer = {
|
||||||
top = 0;
|
top = 0;
|
||||||
bottom = 40;
|
bottom = 38;
|
||||||
left = 0;
|
left = 0;
|
||||||
right = 0;
|
right = 0;
|
||||||
};
|
};
|
||||||
@@ -337,8 +337,8 @@ in
|
|||||||
FOCUSED=0xff285577
|
FOCUSED=0xff285577
|
||||||
|
|
||||||
# Background colors matching i3blocks bar
|
# Background colors matching i3blocks bar
|
||||||
BAR_BG=0xcc000000 # Semi-transparent black
|
BAR_BG=0xff333333 # Dark gray
|
||||||
ITEM_BG=0xff333333 # Dark gray for inactive items
|
ITEM_BG=0xff333333 # Dark gray matching bar
|
||||||
|
|
||||||
# Text colors
|
# Text colors
|
||||||
TEXT=0xffffffff # White text
|
TEXT=0xffffffff # White text
|
||||||
@@ -351,29 +351,32 @@ in
|
|||||||
# Configure the bar appearance
|
# Configure the bar appearance
|
||||||
${pkgs.sketchybar}/bin/sketchybar --bar \
|
${pkgs.sketchybar}/bin/sketchybar --bar \
|
||||||
position=bottom \
|
position=bottom \
|
||||||
height=32 \
|
height=30 \
|
||||||
color=$BAR_BG \
|
color=$BAR_BG \
|
||||||
border_width=0 \
|
border_width=0 \
|
||||||
corner_radius=0 \
|
corner_radius=0 \
|
||||||
padding_left=10 \
|
padding_left=10 \
|
||||||
padding_right=10
|
padding_right=10 \
|
||||||
|
shadow=off \
|
||||||
|
topmost=on \
|
||||||
|
sticky=on
|
||||||
|
|
||||||
# Set default properties for all items
|
# Set default properties for all items
|
||||||
# Using monospace font to match waybar's Fira Code styling
|
# Using monospace font to match waybar's Fira Code styling
|
||||||
${pkgs.sketchybar}/bin/sketchybar --default \
|
${pkgs.sketchybar}/bin/sketchybar --default \
|
||||||
updates=when_shown \
|
updates=when_shown \
|
||||||
icon.font="SF Mono:Regular:13.0" \
|
icon.font="Fira Code:Regular:13.0" \
|
||||||
icon.color=$TEXT \
|
icon.color=$TEXT \
|
||||||
icon.padding_left=4 \
|
icon.padding_left=4 \
|
||||||
icon.padding_right=4 \
|
icon.padding_right=4 \
|
||||||
label.font="SF Mono:Regular:13.0" \
|
label.font="Fira Code:Regular:13.0" \
|
||||||
label.color=$TEXT \
|
label.color=$TEXT \
|
||||||
label.padding_left=4 \
|
label.padding_left=4 \
|
||||||
label.padding_right=4 \
|
label.padding_right=4 \
|
||||||
padding_left=4 \
|
padding_left=4 \
|
||||||
padding_right=4 \
|
padding_right=4 \
|
||||||
background.corner_radius=5 \
|
background.corner_radius=0 \
|
||||||
background.height=24
|
background.height=30
|
||||||
|
|
||||||
# Register aerospace workspace change event
|
# Register aerospace workspace change event
|
||||||
${pkgs.sketchybar}/bin/sketchybar --add event aerospace_workspace_change
|
${pkgs.sketchybar}/bin/sketchybar --add event aerospace_workspace_change
|
||||||
@@ -390,11 +393,12 @@ in
|
|||||||
${pkgs.sketchybar}/bin/sketchybar --add item space.$sid left \
|
${pkgs.sketchybar}/bin/sketchybar --add item space.$sid left \
|
||||||
--subscribe space.$sid aerospace_workspace_change \
|
--subscribe space.$sid aerospace_workspace_change \
|
||||||
--set space.$sid \
|
--set space.$sid \
|
||||||
|
drawing=on \
|
||||||
update_freq=2 \
|
update_freq=2 \
|
||||||
width=32 \
|
width=32 \
|
||||||
background.color=$ITEM_BG \
|
background.color=$ITEM_BG \
|
||||||
background.corner_radius=5 \
|
background.corner_radius=0 \
|
||||||
background.height=20 \
|
background.height=30 \
|
||||||
background.drawing=on \
|
background.drawing=on \
|
||||||
icon="$display" \
|
icon="$display" \
|
||||||
icon.padding_left=13 \
|
icon.padding_left=13 \
|
||||||
@@ -405,15 +409,6 @@ in
|
|||||||
script="$PLUGIN_DIR/aerospace.sh $sid"
|
script="$PLUGIN_DIR/aerospace.sh $sid"
|
||||||
done
|
done
|
||||||
|
|
||||||
# Separator after workspaces
|
|
||||||
${pkgs.sketchybar}/bin/sketchybar --add item separator_left left \
|
|
||||||
--set separator_left \
|
|
||||||
icon="" \
|
|
||||||
label="" \
|
|
||||||
background.drawing=off \
|
|
||||||
padding_left=10 \
|
|
||||||
padding_right=10
|
|
||||||
|
|
||||||
# System monitoring modules (right side)
|
# System monitoring modules (right side)
|
||||||
# Note: Items added to 'right' appear in reverse order (last added = leftmost)
|
# Note: Items added to 'right' appear in reverse order (last added = leftmost)
|
||||||
# Adding in reverse to get: disk | cpu | memory | battery | volume | calendar
|
# Adding in reverse to get: disk | cpu | memory | battery | volume | calendar
|
||||||
@@ -425,14 +420,6 @@ in
|
|||||||
background.drawing=on \
|
background.drawing=on \
|
||||||
script="$PLUGIN_DIR/calendar.sh"
|
script="$PLUGIN_DIR/calendar.sh"
|
||||||
|
|
||||||
${pkgs.sketchybar}/bin/sketchybar --add item separator_media right \
|
|
||||||
--set separator_media \
|
|
||||||
icon="|" \
|
|
||||||
label="" \
|
|
||||||
background.drawing=off \
|
|
||||||
padding_left=5 \
|
|
||||||
padding_right=5
|
|
||||||
|
|
||||||
${pkgs.sketchybar}/bin/sketchybar --add item volume right \
|
${pkgs.sketchybar}/bin/sketchybar --add item volume right \
|
||||||
--set volume \
|
--set volume \
|
||||||
background.color=$ITEM_BG \
|
background.color=$ITEM_BG \
|
||||||
@@ -448,14 +435,6 @@ in
|
|||||||
script="$PLUGIN_DIR/battery.sh" \
|
script="$PLUGIN_DIR/battery.sh" \
|
||||||
--subscribe battery system_woke power_source_change
|
--subscribe battery system_woke power_source_change
|
||||||
|
|
||||||
${pkgs.sketchybar}/bin/sketchybar --add item separator_sys right \
|
|
||||||
--set separator_sys \
|
|
||||||
icon="|" \
|
|
||||||
label="" \
|
|
||||||
background.drawing=off \
|
|
||||||
padding_left=5 \
|
|
||||||
padding_right=5
|
|
||||||
|
|
||||||
${pkgs.sketchybar}/bin/sketchybar --add item memory right \
|
${pkgs.sketchybar}/bin/sketchybar --add item memory right \
|
||||||
--set memory \
|
--set memory \
|
||||||
update_freq=5 \
|
update_freq=5 \
|
||||||
@@ -528,8 +507,15 @@ in
|
|||||||
# Get list of empty workspaces
|
# Get list of empty workspaces
|
||||||
EMPTY_WORKSPACES=$(${pkgs.aerospace}/bin/aerospace list-workspaces --monitor all --empty)
|
EMPTY_WORKSPACES=$(${pkgs.aerospace}/bin/aerospace list-workspaces --monitor all --empty)
|
||||||
|
|
||||||
# Clean up the workspace number parameter
|
# Get workspace number - from $1 if provided (event-triggered), otherwise extract from $NAME (routine update)
|
||||||
WORKSPACE_NUM=$(echo "$1" | tr -d ' \n\r')
|
# $NAME is always available (e.g., "space.1", "space.2", etc.)
|
||||||
|
# $1 is only available when called via event trigger with positional argument
|
||||||
|
if [ -n "$1" ]; then
|
||||||
|
WORKSPACE_NUM=$(echo "$1" | tr -d ' \n\r')
|
||||||
|
else
|
||||||
|
# Extract number from item name: "space.1" -> "1", "space.10" -> "10"
|
||||||
|
WORKSPACE_NUM=$(echo "$NAME" | sed 's/space\.//')
|
||||||
|
fi
|
||||||
|
|
||||||
# Check if workspace has windows (is NOT empty)
|
# Check if workspace has windows (is NOT empty)
|
||||||
IS_EMPTY=false
|
IS_EMPTY=false
|
||||||
@@ -543,37 +529,55 @@ in
|
|||||||
IS_FOCUSED=true
|
IS_FOCUSED=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Determine display value (workspace 10 displays as "0")
|
||||||
|
if [ "$WORKSPACE_NUM" = "10" ]; then
|
||||||
|
DISPLAY="0"
|
||||||
|
else
|
||||||
|
DISPLAY="$WORKSPACE_NUM"
|
||||||
|
fi
|
||||||
|
|
||||||
# Determine visibility and styling
|
# Determine visibility and styling
|
||||||
# Always show focused workspace (even if empty) with fixed width
|
# Always show focused workspace (even if empty) with fixed width
|
||||||
# Hide non-focused empty workspaces by setting width to 0 (collapsed)
|
# Hide non-focused empty workspaces by setting width to 0 (collapsed)
|
||||||
# Show non-focused non-empty workspaces with fixed width and inactive styling
|
# Show non-focused non-empty workspaces with fixed width and inactive styling
|
||||||
|
|
||||||
if [ "$IS_FOCUSED" = "true" ]; then
|
if [ "$IS_FOCUSED" = "true" ]; then
|
||||||
# Focused workspace - always show with focused styling
|
# Focused workspace - always show with focused styling and bold font
|
||||||
${pkgs.sketchybar}/bin/sketchybar --set space.$WORKSPACE_NUM \
|
${pkgs.sketchybar}/bin/sketchybar --set space.$WORKSPACE_NUM \
|
||||||
drawing=on \
|
drawing=on \
|
||||||
|
icon="$DISPLAY" \
|
||||||
width=32 \
|
width=32 \
|
||||||
icon.padding_left=13 \
|
icon.padding_left=13 \
|
||||||
icon.padding_right=11 \
|
icon.padding_right=11 \
|
||||||
icon.align=center \
|
icon.align=center \
|
||||||
background.color=$FOCUSED_COLOR \
|
background.color=$FOCUSED_COLOR \
|
||||||
background.drawing=on \
|
background.drawing=on \
|
||||||
icon.color=$TEXT
|
icon.color=$TEXT \
|
||||||
|
icon.font="Fira Code:Bold:13.0"
|
||||||
elif [ "$IS_EMPTY" = "true" ]; then
|
elif [ "$IS_EMPTY" = "true" ]; then
|
||||||
# Empty workspace (not focused) - hide by turning off drawing
|
# Empty workspace (not focused) - hide by collapsing width and clearing content
|
||||||
${pkgs.sketchybar}/bin/sketchybar --set space.$WORKSPACE_NUM \
|
# Using width=0 with drawing=on so updates=when_shown continues to run the script
|
||||||
drawing=off
|
|
||||||
else
|
|
||||||
# Non-empty workspace (not focused) - show with inactive styling
|
|
||||||
${pkgs.sketchybar}/bin/sketchybar --set space.$WORKSPACE_NUM \
|
${pkgs.sketchybar}/bin/sketchybar --set space.$WORKSPACE_NUM \
|
||||||
drawing=on \
|
drawing=on \
|
||||||
|
icon="" \
|
||||||
|
label="" \
|
||||||
|
width=0 \
|
||||||
|
icon.padding_left=0 \
|
||||||
|
icon.padding_right=0 \
|
||||||
|
background.drawing=off
|
||||||
|
else
|
||||||
|
# Non-empty workspace (not focused) - show with inactive styling and white text
|
||||||
|
${pkgs.sketchybar}/bin/sketchybar --set space.$WORKSPACE_NUM \
|
||||||
|
drawing=on \
|
||||||
|
icon="$DISPLAY" \
|
||||||
width=32 \
|
width=32 \
|
||||||
icon.padding_left=13 \
|
icon.padding_left=13 \
|
||||||
icon.padding_right=11 \
|
icon.padding_right=11 \
|
||||||
icon.align=center \
|
icon.align=center \
|
||||||
background.color=$ITEM_BG \
|
background.color=$ITEM_BG \
|
||||||
background.drawing=on \
|
background.drawing=on \
|
||||||
icon.color=$GRAY
|
icon.color=$TEXT \
|
||||||
|
icon.font="Fira Code:Regular:13.0"
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
@@ -595,21 +599,28 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
# SketchyBar memory monitoring plugin
|
# SketchyBar memory monitoring plugin
|
||||||
|
# Shows actual memory pressure (excludes file cache/inactive pages)
|
||||||
home.file.".config/sketchybar/plugins/memory.sh" = mkIf cfg.sketchybar.enable {
|
home.file.".config/sketchybar/plugins/memory.sh" = mkIf cfg.sketchybar.enable {
|
||||||
executable = true;
|
executable = true;
|
||||||
text = ''
|
text = ''
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
MEMORY_STATS=$(vm_stat)
|
# Use awk for all arithmetic to avoid bash integer overflow on large RAM systems
|
||||||
PAGES_FREE=$(echo "$MEMORY_STATS" | grep "Pages free" | awk '{print $3}' | tr -d '.')
|
# Memory pressure = Anonymous (app memory) + Wired + Compressor RAM
|
||||||
PAGES_ACTIVE=$(echo "$MEMORY_STATS" | grep "Pages active" | awk '{print $3}' | tr -d '.')
|
# - Anonymous pages: app-allocated memory (heap, stack) - matches Activity Monitor's "App Memory"
|
||||||
PAGES_INACTIVE=$(echo "$MEMORY_STATS" | grep "Pages inactive" | awk '{print $3}' | tr -d '.')
|
# - Wired: kernel/system memory that can't be paged out
|
||||||
PAGES_WIRED=$(echo "$MEMORY_STATS" | grep "Pages wired down" | awk '{print $4}' | tr -d '.')
|
# - Pages occupied by compressor: actual RAM used by compressor (NOT "stored in compressor")
|
||||||
PAGES_COMPRESSED=$(echo "$MEMORY_STATS" | grep "Pages stored in compressor" | awk '{print $5}' | tr -d '.')
|
TOTAL_RAM=$(sysctl -n hw.memsize)
|
||||||
|
MEMORY_PERCENT=$(vm_stat | awk -v total_ram="$TOTAL_RAM" '
|
||||||
TOTAL_PAGES=$((PAGES_FREE + PAGES_ACTIVE + PAGES_INACTIVE + PAGES_WIRED + PAGES_COMPRESSED))
|
/page size of/ { page_size = $8 }
|
||||||
USED_PAGES=$((PAGES_ACTIVE + PAGES_INACTIVE + PAGES_WIRED + PAGES_COMPRESSED))
|
/Anonymous pages/ { anon = $3 + 0 }
|
||||||
MEMORY_PERCENT=$((USED_PAGES * 100 / TOTAL_PAGES))
|
/Pages wired/ { wired = $4 + 0 }
|
||||||
|
/Pages occupied by compressor/ { compressor = $5 + 0 }
|
||||||
|
END {
|
||||||
|
used = (anon + wired + compressor) * page_size
|
||||||
|
printf "%.0f", used / total_ram * 100
|
||||||
|
}
|
||||||
|
')
|
||||||
|
|
||||||
${pkgs.sketchybar}/bin/sketchybar --set $NAME label="$MEMORY_PERCENT%"
|
${pkgs.sketchybar}/bin/sketchybar --set $NAME label="$MEMORY_PERCENT%"
|
||||||
'';
|
'';
|
||||||
|
|||||||
@@ -4,4 +4,8 @@
|
|||||||
imports = [
|
imports = [
|
||||||
../aerospace
|
../aerospace
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Override to use -d instead of --delete-older-than on Darwin due to launchd bug
|
||||||
|
# https://github.com/nix-community/home-manager/issues/7211
|
||||||
|
nix.gc.options = "-d";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,6 +24,17 @@ in
|
|||||||
tree
|
tree
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Automatic garbage collection for user profile (home-manager generations).
|
||||||
|
# This complements system-level gc which only cleans system generations.
|
||||||
|
# - Linux: Uses --delete-older-than to keep 10-day rollback window
|
||||||
|
# - Darwin: Overridden to use -d in base-darwin role to avoid launchd bug
|
||||||
|
# (https://github.com/nix-community/home-manager/issues/7211)
|
||||||
|
nix.gc = {
|
||||||
|
automatic = true;
|
||||||
|
randomizedDelaySec = mkIf pkgs.stdenv.isLinux "14m";
|
||||||
|
options = lib.mkDefault "--delete-older-than 10d";
|
||||||
|
};
|
||||||
|
|
||||||
# Essential programs everyone needs
|
# Essential programs everyone needs
|
||||||
programs.bash = {
|
programs.bash = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -41,9 +52,9 @@ in
|
|||||||
|
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
userName = "John Ogle";
|
settings = {
|
||||||
userEmail = "john@ogle.fyi";
|
user.name = "John Ogle";
|
||||||
extraConfig = {
|
user.email = "john@ogle.fyi";
|
||||||
safe.directory = "/etc/nixos";
|
safe.directory = "/etc/nixos";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -58,8 +69,11 @@ in
|
|||||||
|
|
||||||
programs.ssh = {
|
programs.ssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
addKeysToAgent = "yes";
|
enableDefaultConfig = false;
|
||||||
matchBlocks = {
|
matchBlocks = {
|
||||||
|
"*" = {
|
||||||
|
addKeysToAgent = "yes";
|
||||||
|
};
|
||||||
"nucdeb1" = {
|
"nucdeb1" = {
|
||||||
hostname = "nucdeb1.oglehome";
|
hostname = "nucdeb1.oglehome";
|
||||||
user = "root";
|
user = "root";
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
# Platform-specific roles are imported via base-linux or base-darwin
|
# Platform-specific roles are imported via base-linux or base-darwin
|
||||||
# in each home configuration file
|
# in each home configuration file
|
||||||
imports = [
|
imports = [
|
||||||
|
./3d-printing
|
||||||
./base
|
./base
|
||||||
./communication
|
./communication
|
||||||
./desktop
|
./desktop
|
||||||
|
|||||||
@@ -343,7 +343,7 @@ in {
|
|||||||
|
|
||||||
modules-left = [ "sway/workspaces" "sway/mode" ];
|
modules-left = [ "sway/workspaces" "sway/mode" ];
|
||||||
modules-center = [ ];
|
modules-center = [ ];
|
||||||
modules-right = [ "disk" "cpu" "memory" "pulseaudio" "backlight" "network" "battery" "tray" "clock" ];
|
modules-right = [ "disk" "cpu" "memory" "pulseaudio" "custom/backlight-ddc" "backlight" "network" "battery" "tray" "clock" ];
|
||||||
|
|
||||||
"sway/workspaces" = {
|
"sway/workspaces" = {
|
||||||
disable-scroll = true;
|
disable-scroll = true;
|
||||||
@@ -400,6 +400,23 @@ in {
|
|||||||
tooltip = false;
|
tooltip = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
"custom/backlight-ddc" = {
|
||||||
|
exec = pkgs.writeShellScript "waybar-backlight-ddc" ''
|
||||||
|
if command -v ddcutil &>/dev/null; then
|
||||||
|
# Display current brightness
|
||||||
|
brightness=$(ddcutil getvcp 10 --brief 2>/dev/null | awk '{print $4}')
|
||||||
|
if [ -n "$brightness" ]; then
|
||||||
|
echo "☀️ $brightness%"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
interval = 5;
|
||||||
|
format = "{}";
|
||||||
|
on-scroll-up = "ddcutil setvcp 10 + 5 2>/dev/null &";
|
||||||
|
on-scroll-down = "ddcutil setvcp 10 - 5 2>/dev/null &";
|
||||||
|
tooltip = false;
|
||||||
|
};
|
||||||
|
|
||||||
"network" = {
|
"network" = {
|
||||||
format-wifi = "📶 {essid} ({signalStrength}%)";
|
format-wifi = "📶 {essid} ({signalStrength}%)";
|
||||||
format-ethernet = "🔌 {ipaddr}";
|
format-ethernet = "🔌 {ipaddr}";
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ with lib;
|
|||||||
enable = true;
|
enable = true;
|
||||||
autologin = true;
|
autologin = true;
|
||||||
wayland = true;
|
wayland = true;
|
||||||
|
jellyfinScaleFactor = 2.5;
|
||||||
};
|
};
|
||||||
users.enable = true;
|
users.enable = true;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -14,6 +14,11 @@ in
|
|||||||
wayland = mkOption {
|
wayland = mkOption {
|
||||||
default = true;
|
default = true;
|
||||||
};
|
};
|
||||||
|
jellyfinScaleFactor = mkOption {
|
||||||
|
type = types.nullOr types.float;
|
||||||
|
default = null;
|
||||||
|
description = "Scale factor for Jellyfin Media Player UI (e.g., 1.5 for 150% scaling)";
|
||||||
|
};
|
||||||
appLauncherServer = {
|
appLauncherServer = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
@@ -37,6 +42,28 @@ in
|
|||||||
steam-library
|
steam-library
|
||||||
youtube
|
youtube
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
jellyfinMediaPlayerPkg =
|
||||||
|
if cfg.jellyfinScaleFactor != null
|
||||||
|
then pkgs.symlinkJoin {
|
||||||
|
name = "jellyfin-media-player-scaled";
|
||||||
|
paths = [ pkgs.jellyfin-media-player ];
|
||||||
|
nativeBuildInputs = [ pkgs.makeWrapper ];
|
||||||
|
postBuild = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
rm -f $out/bin/jellyfin-desktop
|
||||||
|
makeWrapper ${pkgs.jellyfin-media-player}/bin/jellyfin-desktop $out/bin/jellyfin-desktop \
|
||||||
|
--add-flags "--tv --scale-factor ${toString cfg.jellyfinScaleFactor}"
|
||||||
|
|
||||||
|
# Update .desktop file to include scale factor and TV mode arguments
|
||||||
|
mkdir -p $out/share/applications
|
||||||
|
rm -f $out/share/applications/org.jellyfin.JellyfinDesktop.desktop
|
||||||
|
substitute ${pkgs.jellyfin-media-player}/share/applications/org.jellyfin.JellyfinDesktop.desktop \
|
||||||
|
$out/share/applications/org.jellyfin.JellyfinDesktop.desktop \
|
||||||
|
--replace-fail "Exec=jellyfin-desktop" "Exec=jellyfin-desktop --tv --scale-factor ${toString cfg.jellyfinScaleFactor}"
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
else pkgs.jellyfin-media-player;
|
||||||
in mkIf cfg.enable
|
in mkIf cfg.enable
|
||||||
{
|
{
|
||||||
users.extraUsers.kodi = {
|
users.extraUsers.kodi = {
|
||||||
@@ -50,11 +77,18 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
jellyfinMediaPlayerPkg
|
||||||
kodiPkg
|
kodiPkg
|
||||||
wget
|
wget
|
||||||
firefox
|
firefox
|
||||||
] ++ optional cfg.appLauncherServer.enable pkgs.custom.app-launcher-server;
|
] ++ optional cfg.appLauncherServer.enable pkgs.custom.app-launcher-server;
|
||||||
|
|
||||||
|
nixpkgs.config.permittedInsecurePackages = lib.warn
|
||||||
|
"Allowing insecure package qtwebengine-5.15.19 as a jellyfin-media-player dependency. Remove this once jellyfin is updated to use qt6"
|
||||||
|
[
|
||||||
|
"qtwebengine-5.15.19"
|
||||||
|
];
|
||||||
|
|
||||||
programs.kdeconnect.enable = true;
|
programs.kdeconnect.enable = true;
|
||||||
|
|
||||||
systemd.user.services = mkIf cfg.appLauncherServer.enable {
|
systemd.user.services = mkIf cfg.appLauncherServer.enable {
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ in
|
|||||||
users.users.johno = {
|
users.users.johno = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "John Ogle";
|
description = "John Ogle";
|
||||||
extraGroups = [ "wheel" "networkmanager" "audio" "video" ] ++ cfg.extraGroups;
|
extraGroups = [ "wheel" "networkmanager" "audio" "video" "i2c" ] ++ cfg.extraGroups;
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.eli = mkIf cfg.kids {
|
users.users.eli = mkIf cfg.kids {
|
||||||
|
|||||||
Reference in New Issue
Block a user