1
0

feat: rewrite to more nixy flakes

This commit is contained in:
2026-03-10 17:41:28 +01:00
parent 2c8cf957ee
commit d41abb956a
36 changed files with 1610 additions and 779 deletions
+87 -92
View File
@@ -1,106 +1,101 @@
{
pkgs,
lib ? pkgs.lib,
lib,
env,
...
}:
let
mod = "Mod4";
wallpaper = pkgs.callPackage ../pkgs/wallpaper/default.nix { };
env = import /etc/nixos/.env.nix { inherit pkgs; };
displays = if env ? displays then env.displays else null;
in
{
enable = true;
xsession.windowManager.i3 = {
enable = true;
config = {
modifier = mod;
config = {
modifier = mod;
fonts = {
names = [ "Monaco" ];
size = 8.0;
};
fonts = {
names = [ "Monaco" ];
size = 8.0;
};
keybindings = lib.mkOptionDefault {
"${mod}+q" = "kill";
"${mod}+n" = "exec \"${
lib.concatStringsSep " " [
"${lib.getExe pkgs.rofi}"
"-show combi"
"-modes combi"
"-combi-modes drun,run"
"-combi-display-format {text}"
]
}\"";
"${mod}+Return" = "exec ${lib.getExe pkgs.kitty}";
"${mod}+Left" = "focus left";
"${mod}+Right" = "focus right";
"${mod}+Up" = "focus up";
"${mod}+Down" = "focus down";
"${mod}+Shift+Left" = "move left";
"${mod}+Shift+Right" = "move right";
"${mod}+Shift+Up" = "move up";
"${mod}+Shift+Down" = "move down";
"${mod}+Ctrl+Left" = "move workspace to output left";
"${mod}+Ctrl+Right" = "move workspace to output right";
"Print" = "exec ${lib.getExe pkgs.flameshot} gui";
};
};
extraConfig =
let
background = lib.concatStringsSep " " [
"exec --no-startup-id"
(lib.concatStringsSep " " [
(lib.getExe pkgs.xwinwrap)
"-g 3820x1080"
"-s"
"-b"
"-ni"
"-sp"
"-ov"
"-nf"
])
"--"
(lib.concatStringsSep " " [
(lib.getExe pkgs.mpv)
"${wallpaper}/wallpaper.mov"
"-wid WID"
"--loop"
"--no-audio"
"--no-osc"
"--no-input-default-bindings"
"--no-input-cursor"
"--gpu-api=vulkan"
"--vo=gpu-next"
"--framedrop=vo"
"--profile=low-latency"
"--hwdec=auto"
])
];
displays =
if (env ? displays) then
lib.concatStringsSep "\n" [
"workspace 1 output ${env.displays.primary}"
(if (env.displays ? secondary) then "workspace 2 output ${env.displays.secondary}" else "")
"exec i3-msg focus output ${env.displays.primary}"
(
if (env.displays ? xrandr) then
"exec \"${lib.getExe pkgs.xrandr} ${env.displays.xrandr}\""
else
""
)
keybindings = lib.mkOptionDefault {
"${mod}+q" = "kill";
"${mod}+n" = "exec \"${
lib.concatStringsSep " " [
"${lib.getExe pkgs.rofi}"
"-show combi"
"-modes combi"
"-combi-modes drun,run"
"-combi-display-format {text}"
]
else
"";
in
lib.concatStringsSep "\n" [
background
displays
];
}\"";
"${mod}+Return" = "exec ${lib.getExe pkgs.kitty}";
"${mod}+Left" = "focus left";
"${mod}+Right" = "focus right";
"${mod}+Up" = "focus up";
"${mod}+Down" = "focus down";
"${mod}+Shift+Left" = "move left";
"${mod}+Shift+Right" = "move right";
"${mod}+Shift+Up" = "move up";
"${mod}+Shift+Down" = "move down";
"${mod}+Ctrl+Left" = "move workspace to output left";
"${mod}+Ctrl+Right" = "move workspace to output right";
"Print" = "exec ${lib.getExe pkgs.flameshot} gui";
};
};
extraConfig =
let
background = lib.concatStringsSep " " [
"exec --no-startup-id"
(lib.concatStringsSep " " [
(lib.getExe pkgs.xwinwrap)
"-g 3820x1080"
"-s"
"-b"
"-ni"
"-sp"
"-ov"
"-nf"
])
"--"
(lib.concatStringsSep " " [
(lib.getExe pkgs.mpv)
"${pkgs.wallpaper}/wallpaper.mov"
"-wid WID"
"--loop"
"--no-audio"
"--no-osc"
"--no-input-default-bindings"
"--no-input-cursor"
"--gpu-api=vulkan"
"--vo=gpu-next"
"--framedrop=vo"
"--profile=low-latency"
"--hwdec=auto"
])
];
displayConf =
if displays != null then
lib.concatStringsSep "\n" [
"workspace 1 output ${displays.primary}"
(if (displays ? secondary) then "workspace 2 output ${displays.secondary}" else "")
"exec i3-msg focus output ${displays.primary}"
(if (displays ? xrandr) then "exec \"${lib.getExe pkgs.xrandr} ${displays.xrandr}\"" else "")
]
else
"";
in
lib.concatStringsSep "\n" [
background
displayConf
];
};
}
+56 -46
View File
@@ -1,49 +1,59 @@
{ pkgs, ... }:
{
enable = true;
font = {
package = pkgs.jetbrains-mono;
name = "JetBrains Mono";
size = 13;
pkgs,
lib,
...
}:
let
makeTheme =
attrs: builtins.concatStringsSep "\n" (lib.mapAttrsToList (k: v: "${k} ${toString v}") attrs);
in
{
programs.kitty = {
enable = true;
font = {
package = pkgs.jetbrains-mono;
name = "JetBrains Mono";
size = 13;
};
extraConfig = makeTheme {
foreground = "#f2f4f8";
background = "#161616";
selection_foreground = "#f2f4f8";
selection_background = "#2a2a2a";
cursor = "#f2f4f8";
cursor_text_color = "#161616";
url_color = "#25be6a";
active_border_color = "#78a9ff";
inactive_border_color = "#535353";
bell_border_color = "#3ddbd9";
active_tab_foreground = "#0c0c0c";
active_tab_background = "#78a9ff";
inactive_tab_foreground = "#6e6f70";
inactive_tab_background = "#2a2a2a";
color0 = "#282828";
color8 = "#484848";
color1 = "#ee5396";
color9 = "#f16da6";
color2 = "#25be6a";
color10 = "#46c880";
color3 = "#ebcb8b";
color11 = "#f0d399";
color4 = "#78a9ff";
color12 = "#8cb6ff";
color5 = "#be95ff";
color13 = "#c8a5ff";
color6 = "#33b1ff";
color14 = "#52bdff";
color7 = "#dfdfe0";
color15 = "#e4e4e5";
color16 = "#3ddbd9";
color17 = "#ff7eb6";
};
};
extraConfig = ''
foreground #f2f4f8
background #161616
selection_foreground #f2f4f8
selection_background #2a2a2a
cursor #f2f4f8
cursor_text_color #161616
url_color #25be6a
active_border_color #78a9ff
inactive_border_color #535353
bell_border_color #3ddbd9
active_tab_foreground #0c0c0c
active_tab_background #78a9ff
inactive_tab_foreground #6e6f70
inactive_tab_background #2a2a2a
color0 #282828
color8 #484848
color1 #ee5396
color9 #f16da6
color2 #25be6a
color10 #46c880
color3 #ebcb8b
color11 #f0d399
color4 #78a9ff
color12 #8cb6ff
color5 #be95ff
color13 #c8a5ff
color6 #33b1ff
color14 #52bdff
color7 #dfdfe0
color15 #e4e4e5
color16 #3ddbd9
color17 #ff7eb6
'';
}
+17 -2
View File
@@ -1,6 +1,21 @@
{ lib, ... }:
{
pkgs,
configs ? pkgs.configs,
...
}:
{
enable = true;
programs.neovim = {
enable = true;
defaultEditor = true;
extraConfig =
let
config = configs.neovim;
in
''
set runtimepath+=${config}
source ${config}/init.lua
'';
};
}
+4
View File
@@ -1,4 +1,7 @@
{ ... }:
{
programs.vesktop = {
enable = true;
settings = {
discordBranch = "stable";
@@ -313,4 +316,5 @@
WebContextMenus.enabled = true;
};
};
};
}