Compare commits
7 Commits
fix/waybar
...
5ee328cdf8
| Author | SHA1 | Date | |
|---|---|---|---|
| 5ee328cdf8 | |||
| 6532a822cd | |||
| 20a3990979 | |||
| b7ab518f58 | |||
| 3f1e34ef95 | |||
| d0abfc1625 | |||
| 031090e4ea |
@@ -30,6 +30,7 @@ in
|
|||||||
|
|
||||||
home-manager.users.${config.user.name}.programs.waybar = {
|
home-manager.users.${config.user.name}.programs.waybar = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
package = pkgs.alexion.waybar;
|
||||||
|
|
||||||
# A user service bound to graphical-session.target, which uwsm activates,
|
# A user service bound to graphical-session.target, which uwsm activates,
|
||||||
# so the bar comes up with the session and no compositor exec-once.
|
# so the bar comes up with the session and no compositor exec-once.
|
||||||
|
|||||||
@@ -7,6 +7,15 @@
|
|||||||
}:
|
}:
|
||||||
# PipeWire as the desktop audio server.
|
# PipeWire as the desktop audio server.
|
||||||
let
|
let
|
||||||
|
volumeKey = keys: command: {
|
||||||
|
inherit keys;
|
||||||
|
repeating = true;
|
||||||
|
action = {
|
||||||
|
kind = "exec";
|
||||||
|
command = "${lib.getExe' pkgs.swayosd "swayosd-client"} --output-volume ${command}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
mediaKey = keys: command: {
|
mediaKey = keys: command: {
|
||||||
inherit keys;
|
inherit keys;
|
||||||
locked = true;
|
locked = true;
|
||||||
@@ -30,6 +39,17 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
registry.keybind.${config.networking.hostName} = {
|
registry.keybind.${config.networking.hostName} = {
|
||||||
|
volume-up = volumeKey "XF86AudioRaiseVolume" "raise --max-volume 100";
|
||||||
|
volume-down = volumeKey "XF86AudioLowerVolume" "lower";
|
||||||
|
mute = {
|
||||||
|
keys = "XF86AudioMute";
|
||||||
|
locked = true;
|
||||||
|
action = {
|
||||||
|
kind = "exec";
|
||||||
|
command = "${lib.getExe' pkgs.swayosd "swayosd-client"} --output-volume mute-toggle";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
media-play = mediaKey "XF86AudioPlay" "play-pause";
|
media-play = mediaKey "XF86AudioPlay" "play-pause";
|
||||||
media-next = mediaKey "XF86AudioNext" "next";
|
media-next = mediaKey "XF86AudioNext" "next";
|
||||||
media-previous = mediaKey "XF86AudioPrev" "previous";
|
media-previous = mediaKey "XF86AudioPrev" "previous";
|
||||||
|
|||||||
@@ -5,39 +5,41 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
# SwayOSD: a transient on-screen popup for volume and brightness changes.
|
# SwayOSD: a transient on-screen popup for volume and brightness changes.
|
||||||
let
|
|
||||||
user = config.user.name;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
options.modules.desktop.utilities.osd.enable =
|
options.modules.desktop.utilities.osd.enable =
|
||||||
lib.mkEnableOption "the SwayOSD volume and brightness popup";
|
lib.mkEnableOption "the SwayOSD volume and brightness popup";
|
||||||
|
|
||||||
config = lib.mkIf config.modules.desktop.utilities.osd.enable {
|
config = lib.mkIf config.modules.desktop.utilities.osd.enable {
|
||||||
|
environment.systemPackages = [ pkgs.swayosd ];
|
||||||
|
|
||||||
|
# The udev rule chgrps each backlight's brightness node to `video` and adds
|
||||||
|
# group write, so the server dims the panel without root.
|
||||||
|
# Membership below grants the running session that access.
|
||||||
|
services.udev.packages = [ pkgs.swayosd ];
|
||||||
|
users.users.${config.user.name}.extraGroups = [ "video" ];
|
||||||
|
|
||||||
|
# The server draws the popups, so it runs for the whole graphical session.
|
||||||
|
# It binds to the target uwsm activates.
|
||||||
|
home-manager.users.${config.user.name}.systemd.user.services.swayosd = {
|
||||||
|
Unit = {
|
||||||
|
Description = "SwayOSD on-screen display server";
|
||||||
|
PartOf = [ "graphical-session.target" ];
|
||||||
|
After = [ "graphical-session.target" ];
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
ExecStart = lib.getExe' pkgs.swayosd "swayosd-server";
|
||||||
|
Restart = "on-failure";
|
||||||
|
};
|
||||||
|
Install.WantedBy = [ "graphical-session.target" ];
|
||||||
|
};
|
||||||
|
|
||||||
registry.keybind.${config.networking.hostName} = {
|
registry.keybind.${config.networking.hostName} = {
|
||||||
volume-up = {
|
|
||||||
keys = "XF86AudioRaiseVolume";
|
|
||||||
repeating = true;
|
|
||||||
action = {
|
|
||||||
kind = "exec";
|
|
||||||
command = "${pkgs.swayosd}/bin/swayosd-client --output-volume raise --max-volume 100";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
volume-down = {
|
|
||||||
keys = "XF86AudioLowerVolume";
|
|
||||||
repeating = true;
|
|
||||||
action = {
|
|
||||||
kind = "exec";
|
|
||||||
command = "${pkgs.swayosd}/bin/swayosd-client --output-volume lower";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
brightness-up = {
|
brightness-up = {
|
||||||
keys = "XF86MonBrightnessUp";
|
keys = "XF86MonBrightnessUp";
|
||||||
repeating = true;
|
repeating = true;
|
||||||
action = {
|
action = {
|
||||||
kind = "exec";
|
kind = "exec";
|
||||||
command = "${pkgs.swayosd}/bin/swayosd-client --brightness raise";
|
command = "${lib.getExe' pkgs.swayosd "swayosd-client"} --brightness raise";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -46,41 +48,9 @@ in
|
|||||||
repeating = true;
|
repeating = true;
|
||||||
action = {
|
action = {
|
||||||
kind = "exec";
|
kind = "exec";
|
||||||
command = "${pkgs.swayosd}/bin/swayosd-client --brightness lower";
|
command = "${lib.getExe' pkgs.swayosd "swayosd-client"} --brightness lower";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
mute = {
|
|
||||||
keys = "XF86AudioMute";
|
|
||||||
locked = true;
|
|
||||||
action = {
|
|
||||||
kind = "exec";
|
|
||||||
command = "${pkgs.swayosd}/bin/swayosd-client --output-volume mute-toggle";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.swayosd ];
|
|
||||||
|
|
||||||
# The udev rule chgrps each backlight's brightness node to `video` and adds
|
|
||||||
# group write, so the server dims the panel without root.
|
|
||||||
# Membership below grants the running session that access.
|
|
||||||
services.udev.packages = [ pkgs.swayosd ];
|
|
||||||
users.users.${user}.extraGroups = [ "video" ];
|
|
||||||
|
|
||||||
# The server draws the popups, so it runs for the whole graphical session.
|
|
||||||
# It binds to the target uwsm activates.
|
|
||||||
home-manager.users.${user}.systemd.user.services.swayosd = {
|
|
||||||
Unit = {
|
|
||||||
Description = "SwayOSD on-screen display server";
|
|
||||||
PartOf = [ "graphical-session.target" ];
|
|
||||||
After = [ "graphical-session.target" ];
|
|
||||||
};
|
|
||||||
Service = {
|
|
||||||
ExecStart = "${pkgs.swayosd}/bin/swayosd-server";
|
|
||||||
Restart = "on-failure";
|
|
||||||
};
|
|
||||||
Install.WantedBy = [ "graphical-session.target" ];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,13 +7,13 @@
|
|||||||
}:
|
}:
|
||||||
# Keybound screen recording: pick a region, then toggle a video-only capture.
|
# Keybound screen recording: pick a region, then toggle a video-only capture.
|
||||||
let
|
let
|
||||||
# A single key both starts and stops.
|
# A single key starts and stops recording.
|
||||||
# A running wf-recorder is stopped with SIGINT so it finalises the file.
|
# Waybar refreshes on state changes instead of polling.
|
||||||
# Otherwise slurp picks a region and wf-recorder runs in the foreground until
|
recordingToggle = pkgs.writeShellScript "screen-record-toggle" ''
|
||||||
# that stop arrives, so this instance lives for the whole recording and then
|
refresh_waybar() {
|
||||||
# reports it saved.
|
${lib.getExe' pkgs.procps "pkill"} -RTMIN+10 waybar >/dev/null 2>&1 || true
|
||||||
# No -a means no audio is captured.
|
}
|
||||||
toggle = pkgs.writeShellScript "screen-record-toggle" ''
|
|
||||||
if ${lib.getExe' pkgs.procps "pgrep"} -x wf-recorder >/dev/null; then
|
if ${lib.getExe' pkgs.procps "pgrep"} -x wf-recorder >/dev/null; then
|
||||||
${lib.getExe' pkgs.procps "pkill"} -INT -x wf-recorder
|
${lib.getExe' pkgs.procps "pkill"} -INT -x wf-recorder
|
||||||
exit 0
|
exit 0
|
||||||
@@ -25,12 +25,15 @@ let
|
|||||||
file="$dir/recording-$(${lib.getExe' pkgs.coreutils "date"} +%Y%m%d-%H%M%S).mp4"
|
file="$dir/recording-$(${lib.getExe' pkgs.coreutils "date"} +%Y%m%d-%H%M%S).mp4"
|
||||||
|
|
||||||
${lib.getExe' pkgs.libnotify "notify-send"} -a "Screen recording" "Recording started" "Region capture, no audio."
|
${lib.getExe' pkgs.libnotify "notify-send"} -a "Screen recording" "Recording started" "Region capture, no audio."
|
||||||
${lib.getExe pkgs.wf-recorder} -g "$region" -f "$file"
|
${lib.getExe pkgs.wf-recorder} -g "$region" -f "$file" &
|
||||||
|
recorder=$!
|
||||||
|
refresh_waybar
|
||||||
|
wait "$recorder" || true
|
||||||
|
refresh_waybar
|
||||||
${lib.getExe' pkgs.libnotify "notify-send"} -a "Screen recording" "Recording saved" "$file"
|
${lib.getExe' pkgs.libnotify "notify-send"} -a "Screen recording" "Recording saved" "$file"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Lit while a wf-recorder capture is running.
|
# Empty text collapses the widget when recording is idle.
|
||||||
# Empty text collapses the widget when idle, so it shows nothing until then.
|
|
||||||
recordingStatus = pkgs.writeShellScript "waybar-recording-status" ''
|
recordingStatus = pkgs.writeShellScript "waybar-recording-status" ''
|
||||||
if ${lib.getExe' pkgs.procps "pgrep"} -x wf-recorder >/dev/null; then
|
if ${lib.getExe' pkgs.procps "pgrep"} -x wf-recorder >/dev/null; then
|
||||||
printf '{"text":"${util.glyph "f03d"}","tooltip":"Recording","class":"recording"}\n'
|
printf '{"text":"${util.glyph "f03d"}","tooltip":"Recording","class":"recording"}\n'
|
||||||
@@ -48,7 +51,7 @@ in
|
|||||||
keys = "SUPER + SHIFT + R";
|
keys = "SUPER + SHIFT + R";
|
||||||
action = {
|
action = {
|
||||||
kind = "exec";
|
kind = "exec";
|
||||||
command = "${toggle}";
|
command = "${recordingToggle}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -57,7 +60,8 @@ in
|
|||||||
settings = {
|
settings = {
|
||||||
return-type = "json";
|
return-type = "json";
|
||||||
exec = "${recordingStatus}";
|
exec = "${recordingStatus}";
|
||||||
interval = 1;
|
interval = "once";
|
||||||
|
signal = 10;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -7,26 +7,26 @@
|
|||||||
# Keyboard-driven screenshots copy to the clipboard before Satty opens for
|
# Keyboard-driven screenshots copy to the clipboard before Satty opens for
|
||||||
# annotation. Satty copies annotated screenshots when it saves them.
|
# annotation. Satty copies annotated screenshots when it saves them.
|
||||||
let
|
let
|
||||||
user = config.user.name;
|
screenshotKey = keys: target: {
|
||||||
|
inherit keys;
|
||||||
grimblast = "${pkgs.grimblast}/bin/grimblast";
|
action = {
|
||||||
satty = "${pkgs.satty}/bin/satty";
|
kind = "exec";
|
||||||
tee = "${pkgs.coreutils}/bin/tee";
|
command = "${capture target}";
|
||||||
wl-copy = "${pkgs.wl-clipboard}/bin/wl-copy";
|
};
|
||||||
xdgUserDir = "${pkgs.xdg-user-dirs}/bin/xdg-user-dir";
|
};
|
||||||
|
|
||||||
# Copy the original screenshot before Satty opens.
|
# Copy the original screenshot before Satty opens.
|
||||||
# Satty copies and saves annotated screenshots when the user presses Enter.
|
# Satty copies and saves annotated screenshots when the user presses Enter.
|
||||||
capture =
|
capture =
|
||||||
target:
|
target:
|
||||||
pkgs.writeShellScript "screenshot-${target}" ''
|
pkgs.writeShellScript "screenshot-${target}" ''
|
||||||
dir="$(${xdgUserDir} PICTURES)/Screenshots"
|
dir="$(${lib.getExe' pkgs.xdg-user-dirs "xdg-user-dir"} PICTURES)/Screenshots"
|
||||||
mkdir -p "$dir"
|
${lib.getExe' pkgs.coreutils "mkdir"} -p "$dir"
|
||||||
${grimblast} save ${target} - \
|
${lib.getExe pkgs.grimblast} save ${target} - \
|
||||||
| ${tee} >(${wl-copy}) \
|
| ${lib.getExe' pkgs.coreutils "tee"} >(${lib.getExe' pkgs.wl-clipboard "wl-copy"}) \
|
||||||
| ${satty} --filename - \
|
| ${lib.getExe pkgs.satty} --filename - \
|
||||||
--output-filename "$dir/screenshot-%Y%m%d-%H%M%S.png" \
|
--output-filename "$dir/screenshot-%Y%m%d-%H%M%S.png" \
|
||||||
--copy-command ${wl-copy} \
|
--copy-command ${lib.getExe' pkgs.wl-clipboard "wl-copy"} \
|
||||||
--save-after-copy \
|
--save-after-copy \
|
||||||
--early-exit \
|
--early-exit \
|
||||||
--actions-on-enter save-to-clipboard
|
--actions-on-enter save-to-clipboard
|
||||||
@@ -37,33 +37,7 @@ in
|
|||||||
lib.mkEnableOption "screenshots via grimblast and satty";
|
lib.mkEnableOption "screenshots via grimblast and satty";
|
||||||
|
|
||||||
config = lib.mkIf config.modules.desktop.utilities.screenshot.enable {
|
config = lib.mkIf config.modules.desktop.utilities.screenshot.enable {
|
||||||
registry.keybind.${config.networking.hostName} = {
|
home-manager.users.${config.user.name} = {
|
||||||
screenshot-area = {
|
|
||||||
keys = "Print";
|
|
||||||
action = {
|
|
||||||
kind = "exec";
|
|
||||||
command = "${capture "area"}";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
screenshot-active = {
|
|
||||||
keys = "SHIFT + Print";
|
|
||||||
action = {
|
|
||||||
kind = "exec";
|
|
||||||
command = "${capture "active"}";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
screenshot-screen = {
|
|
||||||
keys = "CTRL + Print";
|
|
||||||
action = {
|
|
||||||
kind = "exec";
|
|
||||||
command = "${capture "screen"}";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
home-manager.users.${user} = {
|
|
||||||
# satty is a one-shot annotation surface, so float it rather than letting
|
# satty is a one-shot annotation surface, so float it rather than letting
|
||||||
# it claim a tile in the layout.
|
# it claim a tile in the layout.
|
||||||
wayland.windowManager.hyprland.settings.window_rule = [
|
wayland.windowManager.hyprland.settings.window_rule = [
|
||||||
@@ -72,7 +46,12 @@ in
|
|||||||
float = true;
|
float = true;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
registry.keybind.${config.networking.hostName} = {
|
||||||
|
screenshot-area = screenshotKey "Print" "area";
|
||||||
|
screenshot-active = screenshotKey "SHIFT + Print" "active";
|
||||||
|
screenshot-screen = screenshotKey "CTRL + Print" "screen";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,15 +6,13 @@
|
|||||||
}:
|
}:
|
||||||
# Nord theming for the graphical layer, driven from one base16 scheme by Stylix.
|
# Nord theming for the graphical layer, driven from one base16 scheme by Stylix.
|
||||||
let
|
let
|
||||||
|
|
||||||
# A single static Nord wallpaper, drawn as a vertical gradient across the
|
# A single static Nord wallpaper, drawn as a vertical gradient across the
|
||||||
# Polar Night shades so it needs no committed binary and no network fetch.
|
# Polar Night shades so it needs no committed binary and no network fetch.
|
||||||
wallpaper = pkgs.runCommand "nord-wallpaper.png" { } ''
|
wallpaper = pkgs.runCommand "nord-wallpaper.png" { } ''
|
||||||
${pkgs.imagemagick}/bin/magick \
|
${lib.getExe pkgs.imagemagick} \
|
||||||
-size 2560x1440 gradient:'#2E3440'-'#3B4252' \
|
-size 2560x1440 gradient:'#2E3440'-'#3B4252' \
|
||||||
"$out"
|
"$out"
|
||||||
'';
|
'';
|
||||||
user = config.user.name;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.modules.desktop.utilities.theming.enable =
|
options.modules.desktop.utilities.theming.enable =
|
||||||
@@ -58,12 +56,8 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
registry.env.${config.networking.hostName} = {
|
|
||||||
HYPRCURSOR_THEME = config.stylix.cursor.name;
|
|
||||||
HYPRCURSOR_SIZE = toString config.stylix.cursor.size;
|
|
||||||
};
|
|
||||||
|
|
||||||
home-manager.users.${user} = {
|
home-manager.users.${config.user.name} = {
|
||||||
# Stylix drives the cursor through home-manager's pointer-cursor config,
|
# Stylix drives the cursor through home-manager's pointer-cursor config,
|
||||||
# whose generation must be switched on explicitly.
|
# whose generation must be switched on explicitly.
|
||||||
home.pointerCursor.enable = true;
|
home.pointerCursor.enable = true;
|
||||||
@@ -72,5 +66,10 @@ in
|
|||||||
# base16 mapping Stylix would apply, so its target stays off.
|
# base16 mapping Stylix would apply, so its target stays off.
|
||||||
stylix.targets.nixvim.enable = false;
|
stylix.targets.nixvim.enable = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
registry.env.${config.networking.hostName} = {
|
||||||
|
HYPRCURSOR_THEME = config.stylix.cursor.name;
|
||||||
|
HYPRCURSOR_SIZE = toString config.stylix.cursor.size;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,27 @@
|
|||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
# Declares the XDG user directories, so a tool that queries them lands in a
|
# Declares XDG user directories, so tools that query them use predictable
|
||||||
# well-known folder a host can relocate from one place.
|
# folders a host can relocate from one place.
|
||||||
let
|
let
|
||||||
user = config.user.name;
|
homeDirectory = "/home/${config.user.name}";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.modules.desktop.utilities.userdirs.enable = lib.mkEnableOption "XDG user directories";
|
options.modules.desktop.utilities.userdirs.enable = lib.mkEnableOption "XDG user directories";
|
||||||
|
|
||||||
config = lib.mkIf config.modules.desktop.utilities.userdirs.enable {
|
config = lib.mkIf config.modules.desktop.utilities.userdirs.enable {
|
||||||
# Write ~/.config/user-dirs.dirs from the option defaults.
|
home-manager.users.${config.user.name}.xdg.userDirs = {
|
||||||
home-manager.users.${user}.xdg.userDirs.enable = true;
|
enable = true;
|
||||||
|
createDirectories = true;
|
||||||
|
setSessionVariables = true;
|
||||||
|
|
||||||
|
desktop = "${homeDirectory}/.ignoreme";
|
||||||
|
documents = "${homeDirectory}/docs";
|
||||||
|
download = "${homeDirectory}/dwn";
|
||||||
|
music = "${homeDirectory}/mus";
|
||||||
|
pictures = "${homeDirectory}/pic";
|
||||||
|
publicShare = "${homeDirectory}/.ignoreme";
|
||||||
|
templates = "${homeDirectory}/.ignoreme";
|
||||||
|
videos = "${homeDirectory}/vid";
|
||||||
|
projects = "${homeDirectory}/.ignoreme";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,18 +12,14 @@ let
|
|||||||
piDir = "${config.users.users.${user}.home}/.pi/agent";
|
piDir = "${config.users.users.${user}.home}/.pi/agent";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.modules.shell.pi = {
|
options.modules.shell.pi.enable =
|
||||||
enable = lib.mkEnableOption "Pi, a terminal coding agent, configured through home-manager";
|
lib.mkEnableOption "Pi, a terminal coding agent, configured through home-manager";
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.modules.shell.pi.enable {
|
config = lib.mkIf config.modules.shell.pi.enable {
|
||||||
home-manager.users.${user} = {
|
home-manager.users.${user} = {
|
||||||
programs.pi-coding-agent = {
|
programs.pi-coding-agent = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.pi-coding-agent.overrideAttrs {
|
package = pkgs.alexion.pi-coding-agent;
|
||||||
src = ../../../../../third_party/pi;
|
|
||||||
patches = [ ];
|
|
||||||
};
|
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
defaultProvider = "openai-codex";
|
defaultProvider = "openai-codex";
|
||||||
|
|||||||
@@ -33,7 +33,12 @@ let
|
|||||||
repositoryModules = modules;
|
repositoryModules = modules;
|
||||||
root = root + "/guests";
|
root = root + "/guests";
|
||||||
};
|
};
|
||||||
modules.imports = util.collectNixFiles (root + "/modules");
|
modules.imports = [
|
||||||
|
{
|
||||||
|
nixpkgs.overlays = [ self.overlays.custom ];
|
||||||
|
}
|
||||||
|
]
|
||||||
|
++ util.collectNixFiles (root + "/modules");
|
||||||
|
|
||||||
in
|
in
|
||||||
import ./hosts.nix {
|
import ./hosts.nix {
|
||||||
|
|||||||
@@ -6,6 +6,19 @@
|
|||||||
system,
|
system,
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
|
overlays.custom = final: _prev: {
|
||||||
|
alexion = import ./packages {
|
||||||
|
pkgs = final;
|
||||||
|
inherit root;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
packages.${system} =
|
||||||
|
(import inputs.nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
overlays = [ self.overlays.custom ];
|
||||||
|
}).alexion;
|
||||||
|
|
||||||
nixosConfigurations = import ../dotfiles {
|
nixosConfigurations = import ../dotfiles {
|
||||||
inherit
|
inherit
|
||||||
inputs
|
inputs
|
||||||
|
|||||||
8
src/flake/packages/default.nix
Normal file
8
src/flake/packages/default.nix
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{ pkgs, root }:
|
||||||
|
{
|
||||||
|
pi-coding-agent = pkgs.callPackage ./pi-coding-agent.nix {
|
||||||
|
inherit root;
|
||||||
|
};
|
||||||
|
|
||||||
|
waybar = pkgs.callPackage ./waybar.nix { };
|
||||||
|
}
|
||||||
8
src/flake/packages/pi-coding-agent.nix
Normal file
8
src/flake/packages/pi-coding-agent.nix
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
pi-coding-agent,
|
||||||
|
root,
|
||||||
|
}:
|
||||||
|
pi-coding-agent.overrideAttrs {
|
||||||
|
src = root + "/third_party/pi";
|
||||||
|
patches = [ ];
|
||||||
|
}
|
||||||
28
src/flake/packages/waybar.nix
Normal file
28
src/flake/packages/waybar.nix
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
fetchFromGitHub,
|
||||||
|
waybar,
|
||||||
|
}:
|
||||||
|
waybar.overrideAttrs {
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "Alexays";
|
||||||
|
repo = "Waybar";
|
||||||
|
rev = "05945748dccce28bf96d26d8f64a9e69a8dd49ba";
|
||||||
|
hash = "sha256-51R3mIt8cLNvh/X5qe9vOqeJCj0U9KRyemVE5y+OhiU=";
|
||||||
|
};
|
||||||
|
|
||||||
|
postUnpack =
|
||||||
|
let
|
||||||
|
libcava = fetchFromGitHub {
|
||||||
|
owner = "LukashonakV";
|
||||||
|
repo = "cava";
|
||||||
|
tag = "0.10.7";
|
||||||
|
hash = "sha256-zkyj1vBzHtoypX4Bxdh1Vmwh967DKKxN751v79hzmgQ=";
|
||||||
|
};
|
||||||
|
in
|
||||||
|
''
|
||||||
|
pushd "$sourceRoot"
|
||||||
|
cp -R --no-preserve=mode,ownership ${libcava} subprojects/cava-0.10.7
|
||||||
|
patchShebangs .
|
||||||
|
popd
|
||||||
|
'';
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user