current state of things

This commit is contained in:
atagen 2025-06-18 01:06:36 +10:00
parent 63fbd6d499
commit b8d157ab6f
85 changed files with 895 additions and 6014 deletions

View file

@ -5,16 +5,18 @@
# ../programs/zsh.nix
# ../programs/xresources.nix
../programs/helix.nix
../programs/atuin.nix
];
home.packages = with pkgs; [
btop
bat
ripgrep
fd
lazygit
zoxide
zellij
ouch
# ../programs/atuin.nix
];
home.packages = builtins.attrValues {
inherit (pkgs)
btop
bat
ripgrep
fd
lazygit
zoxide
zellij
ouch
;
};
}

View file

@ -1,151 +0,0 @@
{
lib,
...
}:
let
inherit (lib) range mapAttrsToList;
inherit (builtins) toString;
workspaceRange = range 1 6;
makeWorkspaceBinding =
modifiers: action:
map (i: {
inherit modifiers;
key = toString i;
action = {
type = action;
data = i;
};
}) workspaceRange;
focusWsBindings = makeWorkspaceBinding [ "Super" ] "Workspace";
moveWsBindings = makeWorkspaceBinding [ "Super" "Shift" ] "SendToWorkspace";
hjkl = {
"h" = "Left";
"j" = "Down";
"k" = "Up";
"l" = "Right";
# "i" = "In";
# "u" = "Out";
};
makeDirBinding =
modifiers: action:
mapAttrsToList (key: dir: {
inherit key modifiers;
action = {
type = action;
data = dir;
};
}) hjkl;
focusBindings = makeDirBinding [ "Super" ] "Focus";
moveBindings = makeDirBinding [ "Super" "Shift" ] "Move";
winManagementBindings = focusWsBindings ++ moveWsBindings ++ focusBindings ++ moveBindings;
binding = key: modifiers: action: {
inherit key modifiers action;
};
spawnBinding = key: modifiers: app: {
inherit key modifiers;
action = {
type = "Spawn";
data = app;
};
};
systemBinding = key: modifiers: action: {
inherit key modifiers;
action = {
type = "System";
data = action;
};
};
in
{
imports = [
../util/cosmic.nix
];
config.cosmic = {
enable = true;
defaultKeybindings = false;
keybindings = winManagementBindings ++ [
# System bindings appear broken?
(binding "q" [ "Super" "Shift" ] "Close")
(binding "w" [ "Super" ] "ToggleStacking")
(binding "s" [ "Super" ] "ToggleOrientation")
(binding "space" [ "Super" ] "ToggleWindowFloating")
(binding "space" [ "Super" "Shift" ] "Maximize")
(binding "minus" [ "Super" ] "Minimize")
(binding "r" [ "Super" ] {
type = "Resizing";
data = "Outwards";
})
(binding "r" [ "Super" "Shift" ] {
type = "Resizing";
data = "Inwards";
})
(binding "tab" [ "Super" ] "NextOutput")
(binding "tab" [ "Super" "Shift" ] "MoveToNextOutput")
(binding "grave" [ "Super" ] "PreviousOutput")
(binding "grave" [ "Super" "Shift" ] "MoveToPreviousOutput")
(spawnBinding "equal" [ "Super" ] "keepassxc")
(systemBinding "f" [ "Super" ] "WebBrowser")
# my mime handling is fucked
# (systemBinding "e" ["Super"] "HomeFolder")
# (systemBinding "return" ["Super"] "Terminal")
(spawnBinding "return" [ "Super" ] "kitty")
# (systemBinding "s" ["Super" "Shift"] "Screenshot")
(systemBinding null [ "Super" ] "Launcher")
(systemBinding "d" [ "Super" ] "AppLibrary")
(systemBinding "XF86AudioRaiseVolume" [ ] "VolumeRaise")
(systemBinding "XF86AudioLowerVolume" [ ] "VolumeLower")
(systemBinding "XF86AudioMute" [ ] "Mute")
(spawnBinding "XF86AudioNext" [ ] "playerctl next")
(spawnBinding "XF86AudioPrev" [ ] "playerctl previous")
(spawnBinding "XF86AudioPlay" [ ] "playerctl play-pause")
(spawnBinding "XF86AudioStop" [ ] "playerctl stop")
(systemBinding "XF86MonBrightnessUp" [ ] "BrightnessUp")
(systemBinding "XF86MonBrightnessDown" [ ] "BrightnessDown")
(spawnBinding "e" [ "Super" "Shift" ] "wlogout")
# old, pre-System bindings
# (binding "q" ["Super" "Shift"] "Close")
# (binding "w" ["Super"] "ToggleStacking")
# (binding "s" ["Super"] "ToggleOrientation")
# (binding "space" ["Super"] "ToggleWindowFloating")
# (binding "space" ["Super" "Shift"] "Maximize")
# (binding "minus" ["Super"] "Minimize")
# (binding "r" ["Super"] {
# type = "Resizing";
# data = "Outwards";
# })
# (binding "r" ["Super" "Shift"] {
# type = "Resizing";
# data = "Inwards";
# })
# (binding "tab" ["Super"] "NextOutput")
# (binding "tab" ["Super" "Shift"] "MoveToNextOutput")
# (binding "grave" ["Super"] "PreviousOutput")
# (binding "grave" ["Super" "Shift"] "MoveToPreviousOutput")
# (spawnBinding "f" ["Super"] "firefox")
(spawnBinding "e" [ "Super" ] "nautilus")
# (spawnBinding "equal" ["Super"] "keepassxc")
# (spawnBinding "return" ["Super"] "kitty")
(spawnBinding "s" [ "Super" "Shift" ] "cosmic-screenshot")
# (spawnBinding null ["Super"] "cosmic-launcher")
# (spawnBinding "d" ["Super"] "cosmic-app-library")
# (spawnBinding "XF86AudioRaiseVolume" [] "amixer sset Master 5%+")
# (spawnBinding "XF86AudioLowerVolume" [] "amixer sset Master 5%-")
# (spawnBinding "XF86AudioMute" [] "amixer sset Master toggle")
# (spawnBinding "XF86AudioNext" [] "playerctl next")
# (spawnBinding "XF86AudioPrev" [] "playerctl previous")
# (spawnBinding "XF86AudioPlay" [] "playerctl play-pause")
# (spawnBinding "XF86AudioStop" [] "playerctl stop")
# (
# spawnBinding "XF86MonBrightnessUp" []
# "busctl --user call com.system76.CosmicSettingsDaemon /com/system76/CosmicSettingsDaemon com.system76.CosmicSettingsDaemon IncreaseDisplayBrightness"
# )
# (
# spawnBinding "XF86MonBrightnessDown" []
# "busctl --user call com.system76.CosmicSettingsDaemon /com/system76/CosmicSettingsDaemon com.system76.CosmicSettingsDaemon DecreaseDisplayBrightness"
# )
# (spawnBinding "e" ["Super" "Shift"] "wlogout")
];
};
}

View file

@ -1,7 +1,6 @@
{ pkgs, ... }:
{
imports = [
./cosmic.nix
./media-players.nix
./webapps.nix
./documents.nix
@ -10,10 +9,12 @@
../programs/firefox.nix
../programs/wlogout.nix
];
home.packages = with pkgs; [
file-roller
nautilus
thunderbird
keepassxc
];
home.packages = builtins.attrValues {
inherit (pkgs)
file-roller
nautilus
thunderbird
keepassxc
;
};
}

View file

@ -3,9 +3,9 @@ let
get = builtins.attrValues;
in
{
imports = [
../programs/vscode.nix
];
# imports = [
# ../programs/vscode.nix
# ];
home.packages = get {
inherit (pkgs)
@ -66,7 +66,7 @@ in
programs.git = {
enable = true;
userName = "atagen";
userEmail = "atagen@boss.co";
userEmail = "boss@atagen.co";
extraConfig = {
credential.helper = "keepassxc";
};

View file

@ -1,6 +1,6 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
libreoffice
home.packages = [
pkgs.libreoffice
];
}

View file

@ -1,102 +0,0 @@
{
pkgs,
lib,
inputs,
...
}:
let
inherit (pkgs) rice;
palette = pkgs.lib.nix-rice.palette.toRGBShortHex rice.palette;
in
{
programs.hyprlock = {
# enable = true;
};
services.hypridle = {
# enable = true;
};
services.hyprpaper = {
# enable = true;
};
wayland.windowManager.hyprland = {
enable = true;
package = inputs.hyprland.packages.x86_64-linux.hyprland;
systemd = {
enable = true;
variables = [ "--all" ];
};
settings = {
"$mainMod" = "SUPER";
general =
let
inherit (rice.borders) thickness;
inherit (palette) normal;
in
{
inherit (rice.borders) gaps_in gaps_out;
border_size = thickness;
layout = "dwindle";
"col.inactive_border" = "rgb(${normal.black})";
"col.active_border" = "rgb(${normal.yellow})";
"col.nogroup_border" = "rgb(${normal.black})";
"col.nogroup_border_active" = "rgb(${normal.yellow})";
snap.enabled = true;
};
cursor = {
no_hardware_cursors = true;
};
decoration = {
inherit (rice.borders) rounding;
blur.enabled = false;
shadow.enabled = false;
};
# input.numlock_by_default = true;
# groups = let
# inherit (palette) normal;
# in {
# "col.border_active" = "rgb(${normal.red})";
# "col.border_inactive" = "rgb(${normal.black})";
# "col.border_locked_active" = "rgb(${normal.red})";
# "col.border_locked_inactive" = "rgb(${normal.black})";
# };
misc = {
disable_hyprland_logo = true;
disable_splash_rendering = true;
vrr = 0;
mouse_move_enables_dpms = true;
key_press_enables_dpms = true;
layers_hog_keyboard_focus = true;
background_color = "rgb(${palette.normal.black})";
};
dwindle = {
pseudotile = true;
force_split = 2;
preserve_split = true;
};
monitor = [
"DP-1, 2560x1440@165, 1080x0, 1"
"HDMI-A-2, 1920x1080@60, auto-left, 1"
"Unknown-1, disable"
];
bind =
let
makeDirBind =
bind: extraMods:
lib.mapAttrsToList (key: dir: "$mainMod${extraMods}, ${key}, ${bind}, ${dir}") {
h = "l";
j = "d";
k = "u";
l = "r";
};
in
[
"$mainMod, Return, exec, ${lib.getExe pkgs.kitty}"
]
++ makeDirBind "movefocus" ""
++ makeDirBind "movewindow" "+SHIFT";
};
};
}

View file

@ -1,11 +1,13 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
mpv
imv
strawberry
resonance
zathura
playerctl
];
home.packages = builtins.attrValues {
inherit (pkgs)
mpv
imv
strawberry
resonance
zathura
playerctl
;
};
}

View file

@ -4,23 +4,22 @@
config,
nix-rice,
rice,
inputs,
...
}:
let
services =
let
inherit (pkgs) swaynotificationcenter sway-audio-idle-inhibit;
inherit (pkgs) swaynotificationcenter;
in
[
swaynotificationcenter
sway-audio-idle-inhibit
];
errata =
let
inherit (pkgs) sirula avizo playerctl;
inherit (pkgs) avizo playerctl;
in
[
sirula
avizo
playerctl
];
@ -30,9 +29,10 @@ let
swayidle
swaybg
systemd
niri-unstable
avizo
;
inherit (inputs.niri.packages.x86_64-linux) niri-unstable;
in
[
{
@ -104,7 +104,13 @@ in
);
in
{
"Mod+D".action.spawn = "sirula";
"Mod+D".action.spawn = [
"qs"
"ipc"
"call"
"launch"
"toggle"
];
"Mod+F".action.spawn = "firefox";
"Mod+E".action.spawn = "nautilus";
"Mod+Return".action.spawn = "kitty";
@ -185,7 +191,7 @@ in
];
focus-ring =
let
pal = nix-rice.palette.toRgbHex rice.palette;
pal = rice.palette.hex;
in
{
active = {
@ -198,75 +204,64 @@ in
};
prefer-no-csd = true;
hotkey-overlay.skip-at-startup = true;
};
programs.ironbar = {
enable = true;
systemd = true;
config = {
monitors."DP-1" = {
position = "top";
height = 16;
start = [
window-rules =
let
v = 10.0;
in
[
{
type = "music";
player_type = "mpris";
geometry-corner-radius = {
bottom-left = v;
bottom-right = 0.0;
top-left = 0.0;
top-right = v;
};
clip-to-geometry = true;
}
];
center = [
{
type = "focused";
icon_size = 16;
truncate = "middle";
}
];
end = [
{ type = "clock"; }
{ type = "tray"; }
];
};
};
};
systemd.user.services.ironbar = {
# programs.ironbar = {
# enable = true;
# systemd = true;
# config = {
# monitors."DP-1" = {
# position = "top";
# height = 16;
# start = [
# {
# type = "music";
# player_type = "mpris";
# }
# ];
# center = [
# {
# type = "focused";
# icon_size = 16;
# truncate = "middle";
# }
# ];
# end = [
# { type = "clock"; }
# { type = "tray"; }
# ];
# };
# };
# };
systemd.user.services.quickshell = {
Unit.PartOf = [ "graphical-session.target" ];
Unit.After = [
"graphical-session.target"
"niri.service"
];
Install.WantedBy = [ "graphical-session.target" ];
Service = {
ExecStart = "${lib.getExe' (inputs.quickshell.packages.${pkgs.system}.default.override {
withHyprland = false;
withI3 = false;
}) "qs"}";
};
};
xdg.configFile = {
"sirula/config.toml".text = ''
exclusive = false
icon_size = 24
lines = 2
anchor_left = false
anchor_right = true
anchor_bottom = false
anchor_top = false
width = 320
height = 720
command_prefix = ":"
frequent_first = true
recent_first = true
term_command = "kitty {}"
'';
"sirula/style.css".text =
let
pal = nix-rice.palette.toRgbHex rice.palette;
in
''
#root-box {
background-color: ${pal.normal.black};
color: ${pal.normal.yellow};
font-family: '${rice.fonts.sans.name}';
}
/* what's the name of the highlighted search text?
color: ${pal.normal.white};
*/
'';
};
}