wry, many thing
This commit is contained in:
parent
6e62eccfba
commit
848ed62c5d
47 changed files with 1598 additions and 1201 deletions
130
common/cli.nix
130
common/cli.nix
|
|
@ -1,26 +1,140 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
getPkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
pal = config.rice.palette.hex;
|
||||
ui = config.rice.roles pal;
|
||||
|
||||
wrap =
|
||||
name: pkg: args:
|
||||
pkgs.symlinkJoin {
|
||||
inherit name;
|
||||
paths = [ pkg ];
|
||||
nativeBuildInputs = [ pkgs.makeWrapper ];
|
||||
postBuild = "wrapProgram $out/bin/${name} ${args}";
|
||||
};
|
||||
|
||||
wrapXdg =
|
||||
name: pkg: configDir:
|
||||
wrap name pkg ''--set XDG_CONFIG_HOME "${configDir}"'';
|
||||
|
||||
lazygitConfig = pkgs.writeText "lazygit-config.yml" ''
|
||||
gui:
|
||||
theme:
|
||||
activeBorderColor:
|
||||
- "${ui.highlight}"
|
||||
- bold
|
||||
inactiveBorderColor:
|
||||
- "${ui.muted}"
|
||||
searchingActiveBorderColor:
|
||||
- "${ui.accent}"
|
||||
- bold
|
||||
optionsTextColor:
|
||||
- "${ui.primary}"
|
||||
selectedLineBgColor:
|
||||
- "${ui.surface}"
|
||||
selectedRangeBgColor:
|
||||
- "${ui.surface}"
|
||||
cherryPickedCommitBgColor:
|
||||
- "${ui.accent}"
|
||||
cherryPickedCommitFgColor:
|
||||
- "${ui.bg}"
|
||||
unstagedChangesColor:
|
||||
- "${ui.error}"
|
||||
defaultFgColor:
|
||||
- "${ui.fg}"
|
||||
'';
|
||||
|
||||
zellijConfig = pkgs.writeTextDir "zellij-config.kdl" ''
|
||||
themes {
|
||||
nix-rice {
|
||||
fg "${ui.fg}"
|
||||
bg "${ui.surface}"
|
||||
black "${pal.normal.black}"
|
||||
red "${pal.normal.red}"
|
||||
green "${pal.normal.green}"
|
||||
yellow "${pal.normal.yellow}"
|
||||
blue "${pal.normal.blue}"
|
||||
magenta "${pal.normal.magenta}"
|
||||
cyan "${pal.normal.cyan}"
|
||||
white "${pal.normal.white}"
|
||||
orange "${ui.highlight}"
|
||||
}
|
||||
}
|
||||
theme "nix-rice"
|
||||
'';
|
||||
|
||||
btopConfig = pkgs.writeText "btop.conf" ''
|
||||
color_theme = "nix-rice"
|
||||
'';
|
||||
btopThemeDir = pkgs.runCommand "btop-themes" { } ''
|
||||
mkdir -p $out
|
||||
cp ${pkgs.writeText "nix-rice.theme" ''
|
||||
theme[main_bg]="${ui.bg}"
|
||||
theme[main_fg]="${ui.fg}"
|
||||
theme[title]="${ui.fg}"
|
||||
theme[hi_fg]="${ui.accent}"
|
||||
theme[selected_bg]="${ui.surface}"
|
||||
theme[selected_fg]="${ui.fg}"
|
||||
theme[inactive_fg]="${ui.muted}"
|
||||
theme[graph_text]="${ui.fg}"
|
||||
theme[meter_bg]="${ui.overlay}"
|
||||
theme[proc_misc]="${ui.primary}"
|
||||
theme[cpu_box]="${ui.primary}"
|
||||
theme[mem_box]="${ui.accent}"
|
||||
theme[net_box]="${pal.normal.green}"
|
||||
theme[proc_box]="${pal.normal.magenta}"
|
||||
theme[div_line]="${ui.overlay}"
|
||||
theme[temp_start]="${pal.normal.green}"
|
||||
theme[temp_mid]="${ui.highlight}"
|
||||
theme[temp_end]="${ui.error}"
|
||||
theme[cpu_start]="${ui.primary}"
|
||||
theme[cpu_mid]="${ui.accent}"
|
||||
theme[cpu_end]="${ui.highlight}"
|
||||
theme[free_start]="${pal.normal.green}"
|
||||
theme[free_mid]="${ui.accent}"
|
||||
theme[free_end]="${ui.primary}"
|
||||
theme[cached_start]="${ui.primary}"
|
||||
theme[cached_mid]="${ui.accent}"
|
||||
theme[cached_end]="${pal.normal.green}"
|
||||
theme[available_start]="${pal.normal.green}"
|
||||
theme[available_mid]="${ui.accent}"
|
||||
theme[available_end]="${ui.highlight}"
|
||||
theme[used_start]="${ui.highlight}"
|
||||
theme[used_mid]="${ui.error}"
|
||||
theme[used_end]="${pal.bright.red}"
|
||||
theme[download_start]="${pal.normal.green}"
|
||||
theme[download_mid]="${ui.accent}"
|
||||
theme[download_end]="${ui.primary}"
|
||||
theme[upload_start]="${ui.highlight}"
|
||||
theme[upload_mid]="${pal.bright.red}"
|
||||
theme[upload_end]="${ui.error}"
|
||||
theme[process_start]="${ui.primary}"
|
||||
theme[process_mid]="${ui.accent}"
|
||||
theme[process_end]="${pal.normal.green}"
|
||||
''} $out/nix-rice.theme
|
||||
'';
|
||||
in
|
||||
{
|
||||
environment.systemPackages = getPkgs {
|
||||
inherit (pkgs)
|
||||
curl
|
||||
eza
|
||||
git
|
||||
btop
|
||||
bat
|
||||
ripgrep
|
||||
fd
|
||||
ouch
|
||||
btop
|
||||
bat
|
||||
;
|
||||
lazygit = wrap "lazygit" pkgs.lazygit ''--add-flags "--use-config-file=${lazygitConfig}"'';
|
||||
zellij = wrap "zellij" pkgs.zellij ''--add-flags "--config-dir ${zellijConfig}"'';
|
||||
# btop = wrap "btop" pkgs.btop ''--add-flags "--config ${btopConfig} --themes-dir ${btopThemeDir}"'';
|
||||
};
|
||||
|
||||
user.packages = getPkgs {
|
||||
inherit (pkgs)
|
||||
lazygit
|
||||
zellij
|
||||
;
|
||||
};
|
||||
environment.variables.BAT_THEME = "ansi";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,180 +0,0 @@
|
|||
{
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with config.rice.palette.hex;
|
||||
scope "user.programs.helix.themes.nix-rice" {
|
||||
"attribute" = bright.cyan;
|
||||
"keyword" = {
|
||||
fg = normal.red;
|
||||
};
|
||||
"keyword.directive" = normal.red;
|
||||
"namespace" = bright.cyan;
|
||||
"punctuation" = bright.yellow;
|
||||
"punctuation.delimiter" = bright.yellow;
|
||||
"operator" = bright.magenta;
|
||||
"special" = normal.magenta;
|
||||
"variable.other.member" = bright.blue;
|
||||
"variable" = util.fg;
|
||||
"variable.builtin" = bright.yellow;
|
||||
"variable.parameter" = bright.white;
|
||||
"type" = normal.yellow;
|
||||
"type.builtin" = normal.yellow;
|
||||
"constructor" = {
|
||||
fg = bright.magenta;
|
||||
modifiers = [ "bold" ];
|
||||
};
|
||||
"function" = {
|
||||
fg = normal.green;
|
||||
modifiers = [ "bold" ];
|
||||
};
|
||||
"function.macro" = bright.cyan;
|
||||
"function.builtin" = normal.yellow;
|
||||
"tag" = normal.red;
|
||||
"comment" = {
|
||||
fg = normal.magenta;
|
||||
modifiers = [ "italic" ];
|
||||
};
|
||||
"constant" = {
|
||||
fg = bright.magenta;
|
||||
};
|
||||
"constant.builtin" = {
|
||||
fg = bright.magenta;
|
||||
modifiers = [ "bold" ];
|
||||
};
|
||||
"string" = normal.green;
|
||||
"constant.numeric" = bright.magenta;
|
||||
"constant.character.escape" = {
|
||||
fg = bright.white;
|
||||
modifiers = [ "bold" ];
|
||||
};
|
||||
"label" = bright.cyan;
|
||||
"module" = bright.cyan;
|
||||
"diff.plus" = bright.green;
|
||||
"diff.delta" = bright.yellow;
|
||||
"diff.minus" = bright.red;
|
||||
"warning" = bright.yellow;
|
||||
"error" = bright.red;
|
||||
"info" = bright.cyan;
|
||||
"hint" = bright.blue;
|
||||
"ui.background" = {
|
||||
inherit (util) bg;
|
||||
};
|
||||
"ui.linenr" = {
|
||||
fg = normal.cyan;
|
||||
};
|
||||
"ui.linenr.selected" = {
|
||||
fg = normal.yellow;
|
||||
modifiers = [ "bold" ];
|
||||
};
|
||||
"ui.cursorline" = {
|
||||
bg = normal.black;
|
||||
};
|
||||
"ui.statusline" = {
|
||||
inherit (util) fg;
|
||||
bg = bright.black;
|
||||
};
|
||||
"ui.statusline.normal" = {
|
||||
inherit (util) fg;
|
||||
bg = bright.black;
|
||||
};
|
||||
"ui.statusline.insert" = {
|
||||
inherit (util) fg;
|
||||
bg = normal.blue;
|
||||
};
|
||||
"ui.statusline.select" = {
|
||||
inherit (util) fg;
|
||||
bg = bright.yellow;
|
||||
};
|
||||
"ui.statusline.inactive" = {
|
||||
fg = normal.white;
|
||||
bg = normal.black;
|
||||
};
|
||||
"ui.popup" = {
|
||||
bg = normal.black;
|
||||
};
|
||||
"ui.window" = {
|
||||
bg = normal.black;
|
||||
};
|
||||
"ui.help" = {
|
||||
bg = normal.black;
|
||||
inherit (util) fg;
|
||||
};
|
||||
"ui.text" = {
|
||||
inherit (util) fg;
|
||||
};
|
||||
"ui.text.focus" = {
|
||||
inherit (util) fg;
|
||||
};
|
||||
"ui.selection" = {
|
||||
# modifiers = ["reversed"];
|
||||
bg = bright.yellow;
|
||||
};
|
||||
"ui.selection.primary" = {
|
||||
modifiers = [ "reversed" ];
|
||||
};
|
||||
# "ui.selection.primary" = { bg = bright.cyan; };
|
||||
"ui.cursor.primary" = {
|
||||
bg = normal.white;
|
||||
fg = normal.black;
|
||||
};
|
||||
"ui.cursor.match" = {
|
||||
bg = bright.cyan;
|
||||
};
|
||||
"ui.menu" = {
|
||||
inherit (util) fg;
|
||||
bg = bright.black;
|
||||
};
|
||||
"ui.menu.selected" = {
|
||||
fg = bright.black;
|
||||
bg = bright.blue;
|
||||
modifiers = [ "bold" ];
|
||||
};
|
||||
"ui.virtual.whitespace" = bright.black;
|
||||
"ui.virtual.ruler" = {
|
||||
bg = normal.black;
|
||||
};
|
||||
"ui.virtual.inlay-hint" = {
|
||||
fg = normal.magenta;
|
||||
};
|
||||
"diagnostic.warning" = {
|
||||
underline = {
|
||||
color = bright.yellow;
|
||||
style = "curl";
|
||||
};
|
||||
};
|
||||
"diagnostic.error" = {
|
||||
underline = {
|
||||
color = bright.red;
|
||||
style = "curl";
|
||||
};
|
||||
};
|
||||
"diagnostic.info" = {
|
||||
underline = {
|
||||
color = bright.cyan;
|
||||
style = "curl";
|
||||
};
|
||||
};
|
||||
"diagnostic.hint" = {
|
||||
underline = {
|
||||
color = bright.blue;
|
||||
style = "curl";
|
||||
};
|
||||
};
|
||||
"markup.heading" = bright.cyan;
|
||||
"markup.bold" = {
|
||||
modifiers = [ "bold" ];
|
||||
};
|
||||
"markup.italic" = {
|
||||
modifiers = [ "italic" ];
|
||||
};
|
||||
"markup.strikethrough" = {
|
||||
modifiers = [ "crossed_out" ];
|
||||
};
|
||||
"markup.link.url" = {
|
||||
fg = bright.green;
|
||||
modifiers = [ "underlined" ];
|
||||
};
|
||||
"markup.link.text" = bright.red;
|
||||
"markup.raw" = bright.red;
|
||||
}
|
||||
|
|
@ -1,12 +1,16 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
(scope "apps.editor" <| pkgs.helix)
|
||||
// scope "user.programs.helix" {
|
||||
enable = true;
|
||||
settings = {
|
||||
let
|
||||
toml = (pkgs.formats.toml { }).generate;
|
||||
|
||||
pal = config.rice.palette.hex;
|
||||
ui = config.rice.roles pal;
|
||||
|
||||
helixConfig = toml "config.toml" {
|
||||
theme = "nix-rice";
|
||||
editor = {
|
||||
bufferline = "multiple";
|
||||
|
|
@ -28,7 +32,7 @@
|
|||
};
|
||||
};
|
||||
|
||||
languages = {
|
||||
helixLanguages = toml "languages.toml" {
|
||||
language = [
|
||||
{
|
||||
name = "rust";
|
||||
|
|
@ -64,4 +68,204 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
helixTheme = toml "nix-rice.toml" {
|
||||
# === Syntax (palette) ===
|
||||
"attribute" = pal.bright.cyan;
|
||||
"keyword" = {
|
||||
fg = pal.normal.red;
|
||||
};
|
||||
"keyword.directive" = pal.normal.red;
|
||||
"namespace" = pal.bright.cyan;
|
||||
"punctuation" = pal.bright.yellow;
|
||||
"punctuation.delimiter" = pal.bright.yellow;
|
||||
"operator" = pal.bright.magenta;
|
||||
"special" = pal.normal.magenta;
|
||||
"variable.other.member" = pal.bright.blue;
|
||||
"variable" = pal.util.fg;
|
||||
"variable.builtin" = pal.bright.yellow;
|
||||
"variable.parameter" = pal.bright.white;
|
||||
"type" = pal.normal.yellow;
|
||||
"type.builtin" = pal.normal.yellow;
|
||||
"constructor" = {
|
||||
fg = pal.bright.magenta;
|
||||
modifiers = [ "bold" ];
|
||||
};
|
||||
"function" = {
|
||||
fg = pal.normal.green;
|
||||
modifiers = [ "bold" ];
|
||||
};
|
||||
"function.macro" = pal.bright.cyan;
|
||||
"function.builtin" = pal.normal.yellow;
|
||||
"tag" = pal.normal.red;
|
||||
"comment" = {
|
||||
fg = pal.normal.magenta;
|
||||
modifiers = [ "italic" ];
|
||||
};
|
||||
"constant" = {
|
||||
fg = pal.bright.magenta;
|
||||
};
|
||||
"constant.builtin" = {
|
||||
fg = pal.bright.magenta;
|
||||
modifiers = [ "bold" ];
|
||||
};
|
||||
"string" = pal.normal.green;
|
||||
"constant.numeric" = pal.bright.magenta;
|
||||
"constant.character.escape" = {
|
||||
fg = pal.bright.white;
|
||||
modifiers = [ "bold" ];
|
||||
};
|
||||
"label" = pal.bright.cyan;
|
||||
"module" = pal.bright.cyan;
|
||||
|
||||
# === Markup (palette) ===
|
||||
"markup.heading" = pal.bright.cyan;
|
||||
"markup.bold" = {
|
||||
modifiers = [ "bold" ];
|
||||
};
|
||||
"markup.italic" = {
|
||||
modifiers = [ "italic" ];
|
||||
};
|
||||
"markup.strikethrough" = {
|
||||
modifiers = [ "crossed_out" ];
|
||||
};
|
||||
"markup.link.url" = {
|
||||
fg = pal.bright.green;
|
||||
modifiers = [ "underlined" ];
|
||||
};
|
||||
"markup.link.text" = pal.bright.red;
|
||||
"markup.raw" = pal.bright.red;
|
||||
|
||||
# === Diff / diagnostics (roles) ===
|
||||
"diff.plus" = ui.added;
|
||||
"diff.delta" = ui.changed;
|
||||
"diff.minus" = ui.removed;
|
||||
"warning" = ui.warning;
|
||||
"error" = ui.error;
|
||||
"info" = ui.info;
|
||||
"hint" = ui.hint;
|
||||
"diagnostic.warning" = {
|
||||
underline = {
|
||||
color = ui.warning;
|
||||
style = "curl";
|
||||
};
|
||||
};
|
||||
"diagnostic.error" = {
|
||||
underline = {
|
||||
color = ui.error;
|
||||
style = "curl";
|
||||
};
|
||||
};
|
||||
"diagnostic.info" = {
|
||||
underline = {
|
||||
color = ui.info;
|
||||
style = "curl";
|
||||
};
|
||||
};
|
||||
"diagnostic.hint" = {
|
||||
underline = {
|
||||
color = ui.hint;
|
||||
style = "curl";
|
||||
};
|
||||
};
|
||||
|
||||
# === UI (roles) ===
|
||||
"ui.background" = {
|
||||
bg = ui.bg;
|
||||
};
|
||||
"ui.text" = {
|
||||
fg = ui.fg;
|
||||
};
|
||||
"ui.text.focus" = {
|
||||
fg = ui.fg;
|
||||
};
|
||||
"ui.linenr" = {
|
||||
fg = pal.normal.cyan;
|
||||
};
|
||||
"ui.linenr.selected" = {
|
||||
fg = pal.normal.yellow;
|
||||
modifiers = [ "bold" ];
|
||||
};
|
||||
"ui.cursorline" = {
|
||||
bg = ui.surface;
|
||||
};
|
||||
"ui.statusline" = {
|
||||
fg = ui.fg;
|
||||
bg = ui.overlay;
|
||||
};
|
||||
"ui.statusline.normal" = {
|
||||
fg = ui.fg;
|
||||
bg = ui.overlay;
|
||||
};
|
||||
"ui.statusline.insert" = {
|
||||
fg = ui.fg;
|
||||
bg = ui.primary;
|
||||
};
|
||||
"ui.statusline.select" = {
|
||||
fg = ui.fg;
|
||||
bg = ui.highlight;
|
||||
};
|
||||
"ui.statusline.inactive" = {
|
||||
fg = ui.muted;
|
||||
bg = ui.surface;
|
||||
};
|
||||
"ui.popup" = {
|
||||
bg = ui.surface;
|
||||
};
|
||||
"ui.window" = {
|
||||
bg = ui.surface;
|
||||
};
|
||||
"ui.help" = {
|
||||
bg = ui.surface;
|
||||
fg = ui.fg;
|
||||
};
|
||||
"ui.selection" = {
|
||||
bg = ui.highlight;
|
||||
};
|
||||
"ui.selection.primary" = {
|
||||
modifiers = [ "reversed" ];
|
||||
};
|
||||
"ui.cursor.primary" = {
|
||||
bg = ui.muted;
|
||||
fg = ui.surface;
|
||||
};
|
||||
"ui.cursor.match" = {
|
||||
bg = ui.accent;
|
||||
};
|
||||
"ui.menu" = {
|
||||
fg = ui.fg;
|
||||
bg = ui.overlay;
|
||||
};
|
||||
"ui.menu.selected" = {
|
||||
fg = ui.overlay;
|
||||
bg = ui.secondary;
|
||||
modifiers = [ "bold" ];
|
||||
};
|
||||
"ui.virtual.whitespace" = ui.overlay;
|
||||
"ui.virtual.ruler" = {
|
||||
bg = ui.surface;
|
||||
};
|
||||
"ui.virtual.inlay-hint" = {
|
||||
fg = pal.normal.magenta;
|
||||
};
|
||||
};
|
||||
|
||||
helixConfigDir = pkgs.runCommand "helix-xdg" { } ''
|
||||
mkdir -p $out/helix/themes
|
||||
cp ${helixConfig} $out/helix/config.toml
|
||||
cp ${helixLanguages} $out/helix/languages.toml
|
||||
cp ${helixTheme} $out/helix/themes/nix-rice.toml
|
||||
'';
|
||||
|
||||
helixWrapped = pkgs.symlinkJoin {
|
||||
name = "helix";
|
||||
paths = [ pkgs.helix ];
|
||||
nativeBuildInputs = [ pkgs.makeWrapper ];
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/hx \
|
||||
--set XDG_CONFIG_HOME "${helixConfigDir}"
|
||||
'';
|
||||
meta.mainProgram = "hx";
|
||||
};
|
||||
in
|
||||
scope "apps.editor" <| helixWrapped
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
schemes = {
|
||||
atagen = "git+https://git.lobotomise.me/atagen/{path}";
|
||||
amaan = "github:amaanq/{path}";
|
||||
kosslan = "git+ssh://git@git.kosslan.dev/{path}";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,11 +23,6 @@
|
|||
|
||||
system.nixos.tags = [ "fatcock-xxl" ];
|
||||
|
||||
hjem = {
|
||||
clobberByDefault = true;
|
||||
linker = getFlakePkg' inputs.hjem "smfh";
|
||||
};
|
||||
|
||||
environment.arbys = {
|
||||
enable = true;
|
||||
clobber = true;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ scope "nix.settings" {
|
|||
# "https://cache.atagen.co"
|
||||
# "https://cache.privatevoid.net"
|
||||
"https://cache.flox.dev"
|
||||
"https://cache.amaanq.com"
|
||||
# "https://cache.amaanq.com"
|
||||
"https://cache.nixos-cuda.org"
|
||||
"https://niri.cachix.org"
|
||||
];
|
||||
|
|
@ -20,7 +20,7 @@ scope "nix.settings" {
|
|||
# "cache.atagen.co:SOUkNQxuu/eQ7FcI8nlUe7FpV27e7YjQlDQdn8HTUnw="
|
||||
# "cache.privatevoid.net:SErQ8bvNWANeAvtsOESUwVYr2VJynfuc9JRwlzTTkVg="
|
||||
"flox-cache-public-1:7F4OyH7ZCnFhcze3fJdfyXYLQw/aV7GEed86nQ7IsOs="
|
||||
"cache.amaanq.com:H0iXsEEFsvUNtWb5v9V8Kss+L4F/tnXwDHXcY+xbmKk="
|
||||
# "cache.amaanq.com:H0iXsEEFsvUNtWb5v9V8Kss+L4F/tnXwDHXcY+xbmKk="
|
||||
"cache.nixos-cuda.org:74DUi4Ye579gUqzH4ziL9IyiJBlDpMRn9MBN8oNan9M="
|
||||
"niri.cachix.org-1:Wv0OmO7PsuocRKzfDoJ3mulSl7Z6oezYhGhR+3W2964="
|
||||
];
|
||||
|
|
|
|||
|
|
@ -13,12 +13,16 @@ let
|
|||
theme = kitty-themes.parseTheme ./pal.conf;
|
||||
in
|
||||
{
|
||||
|
||||
options.rice = lib.mkOption {
|
||||
description = "ricing related variables";
|
||||
default = { };
|
||||
type = lib.types.attrsOf lib.types.anything;
|
||||
};
|
||||
|
||||
config.rice = rec {
|
||||
|
||||
# first, map straight colours
|
||||
palette = theme // {
|
||||
normal = {
|
||||
black = theme.color0;
|
||||
|
|
@ -51,5 +55,36 @@ in
|
|||
hex = toRGBHex palette;
|
||||
shortHex = toRGBShortHex palette;
|
||||
};
|
||||
|
||||
# then map colours to roles
|
||||
# these are general UI roles — not code-syntax tokens.
|
||||
# editors and shells should use palette directly for syntax.
|
||||
roles = p: {
|
||||
# base
|
||||
fg = p.util.fg;
|
||||
bg = p.util.bg;
|
||||
surface = p.normal.black; # panels, popups, recessed areas
|
||||
overlay = p.bright.black; # menus, statuslines, elevated UI
|
||||
muted = p.normal.white; # secondary text, inactive borders
|
||||
|
||||
# emphasis
|
||||
primary = p.normal.red; # main interactive accent
|
||||
secondary = p.bright.blue; # secondary interactive accent
|
||||
accent = p.bright.magenta; # highlights, matches
|
||||
highlight = p.bright.yellow; # selection, active borders, branding
|
||||
|
||||
# state
|
||||
success = p.bright.green;
|
||||
warning = p.normal.yellow;
|
||||
error = p.bright.red;
|
||||
info = p.bright.cyan;
|
||||
hint = p.bright.blue;
|
||||
|
||||
# diff
|
||||
added = p.normal.green;
|
||||
changed = p.bright.yellow;
|
||||
removed = p.normal.red;
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,13 +1,89 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
# inputs,
|
||||
inputs,
|
||||
# getFlakePkg',
|
||||
config,
|
||||
mainUser,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (pkgs) nushell;
|
||||
cfg = config.programs.inshellah;
|
||||
nushellWrapped = pkgs.symlinkJoin {
|
||||
name = "nushell";
|
||||
paths = [ nushell ];
|
||||
nativeBuildInputs = [ pkgs.makeWrapper ];
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/nu \
|
||||
--add-flags "--config ${nuConfig}"
|
||||
'';
|
||||
passthru = nushell.passthru or { } // {
|
||||
shellPath = "/bin/nu";
|
||||
};
|
||||
};
|
||||
theme =
|
||||
let
|
||||
pal = config.rice.palette.hex;
|
||||
ui = config.rice.roles pal;
|
||||
in
|
||||
''
|
||||
let theme = {
|
||||
separator: "${pal.bright.yellow}"
|
||||
leading_trailing_space_bg: "${ui.highlight}"
|
||||
|
||||
header: "${pal.normal.yellow}"
|
||||
empty: "${ui.muted}"
|
||||
|
||||
bool: "${pal.bright.magenta}"
|
||||
int: "${pal.bright.magenta}"
|
||||
filesize: "${pal.bright.magenta}"
|
||||
duration: "${pal.bright.magenta}"
|
||||
date: "${pal.bright.cyan}"
|
||||
range: "${pal.bright.magenta}"
|
||||
|
||||
float: "${pal.bright.magenta}"
|
||||
string: "${pal.normal.green}"
|
||||
nothing: "${ui.muted}"
|
||||
binary: "${pal.bright.magenta}"
|
||||
|
||||
cell-path: "${pal.bright.blue}"
|
||||
row_index: "${pal.bright.blue}"
|
||||
record: "${pal.bright.cyan}"
|
||||
|
||||
list: "${pal.bright.cyan}"
|
||||
block: "${pal.bright.cyan}"
|
||||
|
||||
hints: "${ui.hint}"
|
||||
search_result: "${ui.highlight}"
|
||||
|
||||
shape_and: "${pal.normal.red}"
|
||||
shape_binary: "${pal.bright.magenta}"
|
||||
shape_block: "${pal.bright.cyan}"
|
||||
shape_bool: "${pal.bright.magenta}"
|
||||
shape_custom: "${ui.accent}"
|
||||
shape_datetime: "${pal.bright.cyan}"
|
||||
shape_external: "${pal.normal.green}"
|
||||
shape_externalarg: "${pal.normal.green}"
|
||||
shape_filepath: "${pal.normal.green}"
|
||||
shape_flag: "${ui.accent}"
|
||||
shape_float: "${pal.bright.magenta}"
|
||||
shape_globpattern: "${pal.normal.green}"
|
||||
shape_int: "${pal.bright.magenta}"
|
||||
shape_internalcall: "${pal.normal.green}"
|
||||
shape_list: "${pal.bright.cyan}"
|
||||
shape_literal: "${pal.bright.magenta}"
|
||||
shape_operator: "${pal.bright.magenta}"
|
||||
shape_option: "${ui.accent}"
|
||||
shape_range: "${pal.bright.magenta}"
|
||||
shape_record: "${pal.bright.cyan}"
|
||||
shape_string: "${pal.normal.green}"
|
||||
shape_variable: "${pal.bright.blue}"
|
||||
};
|
||||
|
||||
|
||||
$env.config = ($env.config | upsert color_config $theme)
|
||||
'';
|
||||
prompt = ''
|
||||
do --env {
|
||||
def prompt-header [
|
||||
|
|
@ -118,6 +194,7 @@ let
|
|||
}
|
||||
}
|
||||
'';
|
||||
|
||||
aliases = {
|
||||
"l" = "ls";
|
||||
"la" = "ls -a";
|
||||
|
|
@ -135,7 +212,9 @@ let
|
|||
"fg" = "job unfreeze";
|
||||
"jobs" = "job list";
|
||||
};
|
||||
|
||||
nuScriptsPath = "${pkgs.nu_scripts}/share/nu_scripts";
|
||||
|
||||
nuConfig = pkgs.writeText "config.nu" ''
|
||||
use std/config *
|
||||
|
||||
|
|
@ -153,6 +232,8 @@ let
|
|||
|
||||
$env.config.buffer_editor = "${lib.getExe config.apps.editor}"
|
||||
|
||||
# aliases
|
||||
#
|
||||
def fresh [] {
|
||||
clear
|
||||
${./rice/header.sh}
|
||||
|
|
@ -164,21 +245,34 @@ let
|
|||
git push --force
|
||||
}
|
||||
|
||||
# direnv
|
||||
|
||||
# Initialize the PWD hook as an empty list if it doesn't exist
|
||||
$env.config.hooks.env_change.PWD = $env.config.hooks.env_change.PWD? | default []
|
||||
|
||||
$env.config.hooks.env_change.PWD ++= [{||
|
||||
if (which direnv | is-empty) {
|
||||
# If direnv isn't installed, do nothing
|
||||
return
|
||||
}
|
||||
|
||||
direnv export json | from json | default {} | load-env
|
||||
# If direnv changes the PATH, it will become a string and we need to re-convert it to a list
|
||||
$env.PATH = do (env-conversions).path.from_string $env.PATH
|
||||
}]
|
||||
# direnv
|
||||
$env.config = ($env.config? | default {})
|
||||
$env.config.hooks = ($env.config.hooks? | default {})
|
||||
$env.config.hooks.pre_prompt = (
|
||||
$env.config.hooks.pre_prompt?
|
||||
| default []
|
||||
| append {||
|
||||
${pkgs.direnv}/bin/direnv export json
|
||||
| from json --strict
|
||||
| default {}
|
||||
| items {|key, value|
|
||||
let value = do (
|
||||
{
|
||||
"PATH": {
|
||||
from_string: {|s| $s | split row (char esep) | path expand --no-symlink }
|
||||
to_string: {|v| $v | path expand --no-symlink | str join (char esep) }
|
||||
}
|
||||
}
|
||||
| merge ($env.ENV_CONVERSIONS? | default {})
|
||||
| get ([[value, optional, insensitive]; [$key, true, true] [from_string, true, false]] | into cell-path)
|
||||
| if ($in | is-empty) { {|x| $x} } else { $in }
|
||||
) $value
|
||||
return [ $key $value ]
|
||||
}
|
||||
| into record
|
||||
| load-env
|
||||
}
|
||||
)
|
||||
|
||||
# $cmd doesn't carry its args ?
|
||||
# $env.config.hooks.command_not_found = { |cmd| , $cmd; echo }
|
||||
|
|
@ -187,71 +281,12 @@ let
|
|||
$env.config.edit_mode = "vi";
|
||||
$env.config.completions.algorithm = "fuzzy";
|
||||
|
||||
# TODO
|
||||
$env.config.color_config = {
|
||||
# separator default
|
||||
# header green_bold
|
||||
# empty blue
|
||||
# bool light_cyan
|
||||
# int default
|
||||
# filesize cyan
|
||||
# duration default
|
||||
# datetime purple
|
||||
# range default
|
||||
# float default
|
||||
# string default
|
||||
# nothing default
|
||||
# binary default
|
||||
# cell-path default
|
||||
# row_index green_bold
|
||||
# record default
|
||||
# list default
|
||||
# block default
|
||||
# hints dark_gray
|
||||
# search_result bg red
|
||||
# fg white
|
||||
# shape_binary purple_bold
|
||||
# shape_block blue_bold
|
||||
# shape_bool light_cyan
|
||||
# shape_closure green_bold
|
||||
# shape_custom green
|
||||
# shape_datetime cyan_bold
|
||||
# shape_directory cyan
|
||||
# shape_external cyan
|
||||
# shape_externalarg green_bold
|
||||
# shape_external_resolved light_yellow_bold
|
||||
# shape_filepath cyan
|
||||
# shape_flag blue_bold
|
||||
# shape_float purple_bold
|
||||
# shape_garbage fg white
|
||||
# bg red
|
||||
# attr b
|
||||
# shape_glob_interpolation cyan_bold
|
||||
# shape_globpattern cyan_bold
|
||||
# shape_int purple_bold
|
||||
# shape_internalcall cyan_bold
|
||||
# shape_keyword cyan_bold
|
||||
# shape_list cyan_bold
|
||||
# shape_literal blue
|
||||
# shape_match_pattern green
|
||||
# shape_matching_brackets attr u
|
||||
# shape_nothing light_cyan
|
||||
# shape_operator yellow
|
||||
# shape_pipe purple_bold
|
||||
# shape_range yellow_bold
|
||||
# shape_record cyan_bold
|
||||
# shape_redirection purple_bold
|
||||
# shape_signature green_bold
|
||||
# shape_string green
|
||||
# shape_string_interpolation cyan_bold
|
||||
# shape_table blue_bold
|
||||
# shape_variable purple
|
||||
# shape_vardecl purple
|
||||
# shape_raw_string light_purple
|
||||
}
|
||||
|
||||
${prompt}
|
||||
|
||||
${cfg.snippet}
|
||||
|
||||
${theme}
|
||||
|
||||
$env.config.show_banner = false
|
||||
|
||||
fresh
|
||||
|
|
@ -260,19 +295,24 @@ let
|
|||
in
|
||||
{
|
||||
|
||||
user.xdg.config.files."nushell/config.nu".source = nuConfig;
|
||||
imports = [ inputs.inshellah.nixosModules.default ];
|
||||
programs.inshellah = {
|
||||
enable = true;
|
||||
helpOnlyCommands = [ "nh" ];
|
||||
};
|
||||
|
||||
programs.command-not-found.enable = false;
|
||||
programs.zoxide.enable = true;
|
||||
|
||||
environment.shellAliases = {
|
||||
};
|
||||
environment.systemPackages = [
|
||||
nushell
|
||||
nushellWrapped
|
||||
];
|
||||
environment.shells = [
|
||||
nushell
|
||||
nushellWrapped
|
||||
];
|
||||
users.defaultUserShell = nushell;
|
||||
users.defaultUserShell = nushellWrapped;
|
||||
console.font = "Lat2-Terminus16";
|
||||
|
||||
environment.variables = {
|
||||
|
|
|
|||
728
flake.lock
generated
728
flake.lock
generated
File diff suppressed because it is too large
Load diff
31
flake.nix
31
flake.nix
|
|
@ -21,16 +21,6 @@
|
|||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
hjem = {
|
||||
url = "github:feel-co/hjem";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
hjem-rum = {
|
||||
url = "github:snugnug/hjem-rum";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
hudcore.url = "atagen:hudcore-plymouth";
|
||||
niri.url = "github:sodiboo/niri-flake";
|
||||
|
||||
|
|
@ -87,13 +77,24 @@
|
|||
};
|
||||
|
||||
stash.url = "github:notashelf/stash";
|
||||
|
||||
jay-src = {
|
||||
url = "github:mahkoh/jay";
|
||||
flake = false;
|
||||
wry = {
|
||||
url = "kosslan:wry/jay";
|
||||
# url = "path:/home/bolt/code/wry";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
tuigreet.url = "github:notashelf/tuigreet";
|
||||
tuigreet.url = "github:notashelf/tuigreet/fa44a85b65fb86984cb17de05208b46d1bd1b407";
|
||||
|
||||
inshellah = {
|
||||
# url = "path:/home/bolt/code/inshellah";
|
||||
url = "atagen:inshellah";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
qtengine = {
|
||||
url = "github:kossLAN/qtengine";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -9,5 +9,5 @@
|
|||
type = lib.types.attrsOf lib.types.package;
|
||||
default = { };
|
||||
};
|
||||
config.user.packages = getPkgs config.apps;
|
||||
config.environment.systemPackages = getPkgs config.apps;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,6 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
apps = {
|
||||
volumeOSD = pkgs.avizo;
|
||||
inherit (pkgs) playerctl;
|
||||
};
|
||||
quick.services."avizo-service".cmd = "${lib.getExe' pkgs.avizo "avizo-service"}";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ let
|
|||
);
|
||||
getApp = app: lib.singleton (lib.getExe config.apps.${app});
|
||||
in
|
||||
scope "user.desktops.niri.binds"
|
||||
scope "niri.binds"
|
||||
<| mergeAttrsList [
|
||||
{
|
||||
"Mod+Grave".action = "focus-monitor-next";
|
||||
|
|
@ -79,46 +79,15 @@ scope "user.desktops.niri.binds"
|
|||
"Mod+Shift+S".action = "screenshot";
|
||||
"Mod+R".action = "switch-preset-column-width";
|
||||
"Mod+Shift+R".action = "maximize-column";
|
||||
"XF86AudioLowerVolume".spawn = [
|
||||
"volumectl"
|
||||
"-u"
|
||||
"down"
|
||||
];
|
||||
"XF86AudioMute".spawn = [
|
||||
"volumectl"
|
||||
"toggle-mute"
|
||||
];
|
||||
"XF86AudioNext".spawn = [
|
||||
"playerctl"
|
||||
"next"
|
||||
];
|
||||
"XF86AudioPlay".spawn = [
|
||||
"playerctl"
|
||||
"play-pause"
|
||||
];
|
||||
"XF86AudioPrev".spawn = [
|
||||
"playerctl"
|
||||
"previous"
|
||||
];
|
||||
"XF86AudioRaiseVolume".spawn = [
|
||||
"volumectl"
|
||||
"-u"
|
||||
"up"
|
||||
];
|
||||
"XF86AudioStop".spawn = [
|
||||
"playerctl"
|
||||
"stop"
|
||||
];
|
||||
"XF86MonBrightnessUp".spawn = [
|
||||
"brightnessctl"
|
||||
"s"
|
||||
"5%+"
|
||||
];
|
||||
"XF86MonBrightnessDown".spawn = [
|
||||
"brightnessctl"
|
||||
"s"
|
||||
"5%-"
|
||||
];
|
||||
"XF86AudioLowerVolume".spawn = ["qs" "ipc" "call" "osd" "volumeDown"];
|
||||
"XF86AudioMute".spawn = ["qs" "ipc" "call" "osd" "toggleMute"];
|
||||
"XF86AudioNext".spawn = ["playerctl" "next"];
|
||||
"XF86AudioPlay".spawn = ["playerctl" "play-pause"];
|
||||
"XF86AudioPrev".spawn = ["playerctl" "previous"];
|
||||
"XF86AudioRaiseVolume".spawn = ["qs" "ipc" "call" "osd" "volumeUp"];
|
||||
"XF86AudioStop".spawn = ["playerctl" "stop"];
|
||||
"XF86MonBrightnessUp".spawn = ["qs" "ipc" "call" "osd" "brightnessUp"];
|
||||
"XF86MonBrightnessDown".spawn = ["qs" "ipc" "call" "osd" "brightnessDown"];
|
||||
"Mod+Space".action = "switch-focus-between-floating-and-tiling";
|
||||
"Mod+Shift+Space".action = "toggle-window-floating";
|
||||
"Mod+Ctrl+Space".action = "fullscreen-window";
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ scope "boot" {
|
|||
style =
|
||||
let
|
||||
pal = config.rice.palette.shortHex;
|
||||
ui = config.rice.roles pal;
|
||||
in
|
||||
{
|
||||
wallpapers = [ config.rice.bg.src ];
|
||||
|
|
@ -29,18 +30,17 @@ scope "boot" {
|
|||
brightPalette = getPal pal.bright;
|
||||
marginGradient = 0;
|
||||
margin = 256;
|
||||
foreground = pal.util.fg;
|
||||
background = "20" + pal.util.bg;
|
||||
brightForeground = pal.bright.yellow;
|
||||
brightBackground = pal.util.bg;
|
||||
foreground = ui.fg;
|
||||
background = "20" + ui.bg;
|
||||
brightForeground = ui.highlight;
|
||||
brightBackground = ui.bg;
|
||||
};
|
||||
backdrop = pal.util.bg;
|
||||
backdrop = ui.bg;
|
||||
};
|
||||
maxGenerations = 5;
|
||||
};
|
||||
plymouth = {
|
||||
enable = true;
|
||||
# theme still needs fixing
|
||||
inherit (config.rice.plymouth) theme themePackages font;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -7,10 +7,6 @@
|
|||
}:
|
||||
let
|
||||
extensions = {
|
||||
adnauseam = {
|
||||
id = "dlkmkipjfgcmnfckfdflcemkhlfbeiak";
|
||||
updateUrl = "https://gist.githubusercontent.com/amaanq/791db15b547cf00d27c99e784bbe0459/raw/adnauseam-updates.xml";
|
||||
};
|
||||
bypass-paywalls = {
|
||||
id = "lkbebcjgcmobigpeffafkodonchffocl";
|
||||
updateUrl = "https://gitflic.ru/project/magnolia1234/bpc_updates/blob/raw?file=updates.xml";
|
||||
|
|
@ -19,6 +15,7 @@ let
|
|||
id = "jfcaohdhgnfchhifdffmldmodkmndfjp";
|
||||
updateUrl = "https://github.com/amaanq/Vencord/releases/latest/download/updates.xml";
|
||||
};
|
||||
startpage.id = "fgmjlmbojbkmdpofahffgcpkhkngfpef";
|
||||
bitwarden.id = "nngceckbapebfimnlniiiahkandclblb";
|
||||
clearurls.id = "lckanjgmijmafbedllaakclkaicjfmnk";
|
||||
dark-reader.id = "eimadpbcbfnmbkopoojfekhnkhdbieeh";
|
||||
|
|
@ -27,8 +24,6 @@ let
|
|||
refined-github.id = "hlepfoohegkhhmjieoechaddaejaokhf";
|
||||
sponsorblock.id = "mnjggcdmjocbbbhaepdhchncahnbgone";
|
||||
vimium-c.id = "hfjbmagddngcpeloejdejnfgbamkjaeg";
|
||||
web-archives.id = "hkligngkgcpcolhcnkgccglchdafcnao";
|
||||
url-rewriter.id = "khncccgpokiedblbaahpfchghohlahje";
|
||||
# webrtc-leak-shield.id = "bppamachkoflopbagkdoflbgfjflfnfl";
|
||||
};
|
||||
extensionStrings = map (
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
in
|
||||
{
|
||||
cinny = {
|
||||
name = "Cinny";
|
||||
name = "Matrix";
|
||||
url = "https://chat.lobotomise.me";
|
||||
icon = papirusIcon "in.cinny.Cinny";
|
||||
description = "Cinny, a Matrix client";
|
||||
|
|
@ -23,6 +23,11 @@
|
|||
icon = papirusIcon "facebook-facebook.com.svg";
|
||||
description = "Facebook Messenger";
|
||||
};
|
||||
mastodon = {
|
||||
name = "Mastodon";
|
||||
url = "https://trvke.social/app";
|
||||
description = "Mastodon";
|
||||
};
|
||||
};
|
||||
xdg.mime.defaultApplications = {
|
||||
"x-scheme-handler/matrix" = "Cinny-webapp.desktop";
|
||||
|
|
|
|||
|
|
@ -1,74 +0,0 @@
|
|||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
lib,
|
||||
getFlakePkg,
|
||||
...
|
||||
}:
|
||||
let
|
||||
jay = pkgs.jay.overrideAttrs (prev: {
|
||||
version = "unstable-slay-${toString inputs.jay-src.lastModified}";
|
||||
src = inputs.jay-src;
|
||||
cargoDeps = pkgs.rustPlatform.importCargoLock {
|
||||
lockFile = "${inputs.jay-src}/Cargo.lock";
|
||||
};
|
||||
patches = [
|
||||
./patches/0001-add-configurable-gap-between-tiled-windows.patch
|
||||
./patches/0002-add-position-and-size-animations-for-tiled-windows.patch
|
||||
./patches/0003-add-window-border-frames-when-gaps-are-enabled.patch
|
||||
./patches/0004-add-sequential-animation-mode-for-tiled-windows.patch
|
||||
./patches/0005-add-cursor-follows-focus-setting.patch
|
||||
./patches/0006-add-toggle-focus-between-floating-and-tiled-layers.patch
|
||||
./patches/0007-add-open-close-animations-for-tiled-windows.patch
|
||||
./patches/0008-add-directional-focus-navigation-for-floating-window.patch
|
||||
];
|
||||
});
|
||||
|
||||
jay-session = pkgs.writeShellScript "jay-session" ''
|
||||
systemctl --user import-environment
|
||||
dbus-update-activation-environment --all
|
||||
systemctl --user start jay-session-bridge.service &
|
||||
exec ${lib.getExe jay} run
|
||||
'';
|
||||
in
|
||||
{
|
||||
environment.systemPackages = [ jay ];
|
||||
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings.default_session.command = "${lib.getExe (getFlakePkg inputs.tuigreet)} --sessions /etc/greetd/wayland-sessions --remember-session";
|
||||
};
|
||||
|
||||
environment.etc."greetd/wayland-sessions/jay.desktop".text = ''
|
||||
[Desktop Entry]
|
||||
Name=Jay
|
||||
Comment=A Wayland compositor written in Rust
|
||||
Exec=${jay-session}
|
||||
Type=Application
|
||||
DesktopNames=jay
|
||||
'';
|
||||
|
||||
# bridge service to activate graphical-session.target for direct-launched jay.
|
||||
# waits for jay IPC readiness before pulling in the target.
|
||||
systemd.user.services.jay-session-bridge = {
|
||||
unitConfig = {
|
||||
Description = "Activate graphical-session.target for direct-launched jay";
|
||||
BindsTo = [ "graphical-session.target" ];
|
||||
Before = [ "graphical-session.target" ];
|
||||
Wants = [ "graphical-session-pre.target" ];
|
||||
After = [ "graphical-session-pre.target" ];
|
||||
};
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
# Jay's IPC goes through the Wayland socket (unlike niri's separate IPC socket),
|
||||
# so we can't use a jay subcommand without WAYLAND_DISPLAY already set.
|
||||
# Wait for Jay to create its wayland socket in XDG_RUNTIME_DIR instead.
|
||||
ExecStart = pkgs.writeShellScript "jay-ready" ''
|
||||
until find "$XDG_RUNTIME_DIR" -maxdepth 1 -name "wayland-*" ! -name "*.lock" -type s | grep -q .; do
|
||||
sleep 0.1
|
||||
done
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -182,6 +182,11 @@ Singleton {
|
|||
id: clickableEntry
|
||||
required property DesktopEntry modelData
|
||||
onClicked: {
|
||||
// console.log(modelData.command);
|
||||
// Quickshell.execDetached({
|
||||
// command: ["systemd-run", "--slice-inherit", "--user", "-t", "-G"].concat(modelData.command),
|
||||
// workingDirectory: modelData.workingDirectory
|
||||
// });
|
||||
modelData.execute();
|
||||
launcherData.open = false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -136,7 +136,6 @@ Singleton {
|
|||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
width: parent.width / 3 * 2
|
||||
height: parent.height / 6 * 5
|
||||
Repeater {
|
||||
model: topLevel.buttons.length
|
||||
Button {
|
||||
|
|
|
|||
|
|
@ -1,18 +1,56 @@
|
|||
pragma Singleton
|
||||
|
||||
import Quickshell
|
||||
import Quickshell.Wayland
|
||||
import Quickshell.Services.Notifications
|
||||
import QtQuick
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
|
||||
NotificationServer {
|
||||
id: notifications
|
||||
id: server
|
||||
actionsSupported: true
|
||||
bodyHyperlinksSupported: true
|
||||
// bodyImagesSupported: true
|
||||
bodyMarkupSupported: true
|
||||
imageSupported: true
|
||||
imageSupported: true
|
||||
onNotification: noti => {
|
||||
|
||||
noti.tracked = true
|
||||
}
|
||||
}
|
||||
|
||||
LazyLoader {
|
||||
active: server.trackedNotifications.values.length > 0
|
||||
|
||||
WlrLayershell {
|
||||
anchors {
|
||||
top: true
|
||||
right: true
|
||||
}
|
||||
implicitWidth: 344
|
||||
implicitHeight: notiColumn.implicitHeight + 24
|
||||
color: "transparent"
|
||||
layer: WlrLayer.Overlay
|
||||
namespace: "shell:noti"
|
||||
exclusionMode: ExclusionMode.Ignore
|
||||
|
||||
Column {
|
||||
id: notiColumn
|
||||
anchors {
|
||||
top: parent.top
|
||||
right: parent.right
|
||||
topMargin: 12
|
||||
rightMargin: 12
|
||||
}
|
||||
spacing: 8
|
||||
width: 320
|
||||
|
||||
Repeater {
|
||||
model: server.trackedNotifications
|
||||
NotiCard {
|
||||
required property var modelData
|
||||
notification: modelData
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
142
graphical/desktop/quickshell/noti/NotiCard.qml
Normal file
142
graphical/desktop/quickshell/noti/NotiCard.qml
Normal file
|
|
@ -0,0 +1,142 @@
|
|||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import Quickshell.Services.Notifications
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
required property var notification
|
||||
|
||||
width: 320
|
||||
implicitHeight: card.implicitHeight * heightScale
|
||||
|
||||
property string borderColor: {
|
||||
switch (notification.urgency) {
|
||||
case NotificationUrgency.Critical: return "#C46056"
|
||||
case NotificationUrgency.Low: return "#8CC4C9"
|
||||
default: return "#FFAB5B"
|
||||
}
|
||||
}
|
||||
|
||||
// --- slide-in/out ---
|
||||
property real slideProgress: 0.0
|
||||
opacity: slideProgress
|
||||
transform: Translate { x: (1.0 - root.slideProgress) * 32 }
|
||||
|
||||
Behavior on slideProgress {
|
||||
NumberAnimation { duration: 300; easing.type: Easing.InOutExpo }
|
||||
}
|
||||
|
||||
// --- height collapse (after slide-out, before model removal) ---
|
||||
property real heightScale: 1.0
|
||||
|
||||
Behavior on heightScale {
|
||||
NumberAnimation { duration: 200; easing.type: Easing.InOutExpo }
|
||||
}
|
||||
|
||||
property bool dismissing: false
|
||||
|
||||
function beginDismiss() {
|
||||
if (root.dismissing) return
|
||||
root.dismissing = true
|
||||
root.slideProgress = 0.0
|
||||
collapseTimer.start()
|
||||
}
|
||||
|
||||
// wait for slide-out, then collapse height
|
||||
Timer {
|
||||
id: collapseTimer
|
||||
interval: 310
|
||||
onTriggered: {
|
||||
root.heightScale = 0.0
|
||||
removeTimer.start()
|
||||
}
|
||||
}
|
||||
|
||||
// wait for height collapse, then remove from model
|
||||
Timer {
|
||||
id: removeTimer
|
||||
interval: 210
|
||||
onTriggered: root.notification.dismiss()
|
||||
}
|
||||
|
||||
Component.onCompleted: root.slideProgress = 1.0
|
||||
|
||||
// auto-dismiss
|
||||
Timer {
|
||||
id: dismissTimer
|
||||
interval: notification.expireTimeout > 0 ? notification.expireTimeout : 5000
|
||||
running: !(notification.urgency === NotificationUrgency.Critical && notification.expireTimeout <= 0)
|
||||
repeat: false
|
||||
onTriggered: root.beginDismiss()
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: card
|
||||
width: parent.width
|
||||
implicitHeight: content.implicitHeight + 32
|
||||
color: "#1B2021"
|
||||
border.color: root.borderColor
|
||||
border.width: 2
|
||||
// sharp on the screen-edge diagonal (top-right), rounded on the inner diagonal
|
||||
topRightRadius: 0
|
||||
bottomLeftRadius: 0
|
||||
topLeftRadius: 10
|
||||
bottomRightRadius: 10
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: root.beginDismiss()
|
||||
}
|
||||
|
||||
Column {
|
||||
id: content
|
||||
anchors {
|
||||
fill: parent
|
||||
margins: 16
|
||||
}
|
||||
spacing: 6
|
||||
|
||||
Text {
|
||||
text: notification.summary
|
||||
color: "#CECBCA"
|
||||
font { family: "MS W98 UI"; pointSize: 12; bold: true }
|
||||
width: parent.width
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
Text {
|
||||
text: notification.body
|
||||
visible: notification.body !== ""
|
||||
color: "#CECBCA"
|
||||
font { family: "MS W98 UI"; pointSize: 12 }
|
||||
width: parent.width
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
|
||||
Row {
|
||||
spacing: 6
|
||||
visible: notification.actions.length > 0
|
||||
topPadding: 4
|
||||
|
||||
Repeater {
|
||||
model: notification.actions
|
||||
Button {
|
||||
required property var modelData
|
||||
text: modelData.text
|
||||
font { family: "MS W98 UI"; pointSize: 11 }
|
||||
palette.buttonText: "#FFAB5B"
|
||||
background: Rectangle {
|
||||
color: parent.hovered ? "#FFAB5B" : "#272A2A"
|
||||
border.color: "#FFAB5B"
|
||||
border.width: 2
|
||||
radius: 6
|
||||
Behavior on color { ColorAnimation { duration: 150 } }
|
||||
}
|
||||
onClicked: modelData.invoke()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
163
graphical/desktop/quickshell/osd/Osd.qml
Normal file
163
graphical/desktop/quickshell/osd/Osd.qml
Normal file
|
|
@ -0,0 +1,163 @@
|
|||
import Quickshell
|
||||
import Quickshell.Wayland
|
||||
import Quickshell.Io
|
||||
import QtQuick
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
|
||||
property real value: 0.0
|
||||
property string mode: "volume"
|
||||
property bool muted: false
|
||||
property bool shown: false
|
||||
|
||||
property real showProgress: root.shown ? 1.0 : 0.0
|
||||
Behavior on showProgress {
|
||||
NumberAnimation { duration: 200; easing.type: Easing.InOutExpo }
|
||||
}
|
||||
|
||||
function show(newMode, newValue, newMuted) {
|
||||
mode = newMode
|
||||
value = Math.max(0.0, Math.min(1.0, newValue))
|
||||
muted = newMuted
|
||||
shown = true
|
||||
hideTimer.restart()
|
||||
}
|
||||
|
||||
function parseVolume(line) {
|
||||
let parts = line.trim().split(/\s+/)
|
||||
let vol = parseFloat(parts[1])
|
||||
if (isNaN(vol)) return
|
||||
root.show("volume", vol, line.includes("[MUTED]"))
|
||||
}
|
||||
|
||||
function parseBrightness(line) {
|
||||
let parts = line.trim().split(/\s+/)
|
||||
let cur = parseInt(parts[0])
|
||||
let max = parseInt(parts[1])
|
||||
if (isNaN(cur) || isNaN(max) || max === 0) return
|
||||
root.show("brightness", cur / max, false)
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: hideTimer
|
||||
interval: 1500
|
||||
repeat: false
|
||||
onTriggered: root.shown = false
|
||||
}
|
||||
|
||||
IpcHandler {
|
||||
target: "osd"
|
||||
function volumeUp(): void { volumeUpCmd.running = true }
|
||||
function volumeDown(): void { volumeDownCmd.running = true }
|
||||
function toggleMute(): void { toggleMuteCmd.running = true }
|
||||
function brightnessUp(): void { brightnessUpCmd.running = true }
|
||||
function brightnessDown(): void { brightnessDownCmd.running = true }
|
||||
}
|
||||
|
||||
Process {
|
||||
id: volumeUpCmd
|
||||
command: ["sh", "-c", "wpctl set-volume -l 1.0 @DEFAULT_SINK@ 5%+ && wpctl get-volume @DEFAULT_SINK@"]
|
||||
stdout: SplitParser { onRead: line => root.parseVolume(line) }
|
||||
}
|
||||
Process {
|
||||
id: volumeDownCmd
|
||||
command: ["sh", "-c", "wpctl set-volume @DEFAULT_SINK@ 5%- && wpctl get-volume @DEFAULT_SINK@"]
|
||||
stdout: SplitParser { onRead: line => root.parseVolume(line) }
|
||||
}
|
||||
Process {
|
||||
id: toggleMuteCmd
|
||||
command: ["sh", "-c", "wpctl set-mute @DEFAULT_SINK@ toggle && wpctl get-volume @DEFAULT_SINK@"]
|
||||
stdout: SplitParser { onRead: line => root.parseVolume(line) }
|
||||
}
|
||||
Process {
|
||||
id: brightnessUpCmd
|
||||
command: ["sh", "-c", "brightnessctl s 5%+ > /dev/null; printf '%s %s' \"$(brightnessctl g)\" \"$(brightnessctl m)\""]
|
||||
stdout: SplitParser { onRead: line => root.parseBrightness(line) }
|
||||
}
|
||||
Process {
|
||||
id: brightnessDownCmd
|
||||
command: ["sh", "-c", "brightnessctl s 5%- > /dev/null; printf '%s %s' \"$(brightnessctl g)\" \"$(brightnessctl m)\""]
|
||||
stdout: SplitParser { onRead: line => root.parseBrightness(line) }
|
||||
}
|
||||
|
||||
WlrLayershell {
|
||||
anchors { bottom: true; left: true; right: true }
|
||||
implicitHeight: 90
|
||||
color: "transparent"
|
||||
visible: root.showProgress > 0
|
||||
layer: WlrLayer.Overlay
|
||||
namespace: "shell:osd"
|
||||
exclusionMode: ExclusionMode.Ignore
|
||||
|
||||
Item {
|
||||
id: osdItem
|
||||
anchors.centerIn: parent
|
||||
width: 260
|
||||
height: osdCard.implicitHeight
|
||||
|
||||
opacity: root.showProgress
|
||||
transform: Translate { y: (1.0 - root.showProgress) * 10 }
|
||||
|
||||
Rectangle {
|
||||
id: osdCard
|
||||
width: parent.width
|
||||
implicitHeight: osdContent.implicitHeight + 24
|
||||
color: "#1B2021"
|
||||
border.color: root.muted ? "#C46056" : "#FFAB5B"
|
||||
border.width: 2
|
||||
topLeftRadius: 0
|
||||
bottomRightRadius: 0
|
||||
topRightRadius: 10
|
||||
bottomLeftRadius: 10
|
||||
|
||||
Behavior on border.color {
|
||||
ColorAnimation { duration: 150 }
|
||||
}
|
||||
|
||||
Column {
|
||||
id: osdContent
|
||||
anchors { fill: parent; margins: 12 }
|
||||
spacing: 8
|
||||
|
||||
Item {
|
||||
width: parent.width
|
||||
height: modeLabel.height
|
||||
|
||||
Text {
|
||||
id: modeLabel
|
||||
anchors.left: parent.left
|
||||
text: root.muted ? "Muted" : (root.mode === "brightness" ? "Brightness" : "Volume")
|
||||
color: "#CECBCA"
|
||||
font { family: "MS W98 UI"; pointSize: 12 }
|
||||
}
|
||||
|
||||
Text {
|
||||
anchors.right: parent.right
|
||||
text: Math.round(root.value * 100) + "%"
|
||||
color: root.muted ? "#C46056" : "#FFAB5B"
|
||||
font { family: "MS W98 UI"; pointSize: 12 }
|
||||
Behavior on color { ColorAnimation { duration: 150 } }
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
width: parent.width
|
||||
height: 6
|
||||
color: "#272A2A"
|
||||
radius: 3
|
||||
|
||||
Rectangle {
|
||||
width: parent.width * root.value
|
||||
height: parent.height
|
||||
color: root.muted ? "#C46056" : "#FFAB5B"
|
||||
radius: 3
|
||||
Behavior on width { NumberAnimation { duration: 80; easing.type: Easing.OutCubic } }
|
||||
Behavior on color { ColorAnimation { duration: 150 } }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
pragma Singleton
|
||||
import Quickshell
|
||||
|
||||
Singleton {
|
||||
property var c: {
|
||||
"bg": "#1b2021",
|
||||
"fg": "#cecbca",
|
||||
|
||||
"black": "#272a2a",
|
||||
"black_b": "#202e2f",
|
||||
|
||||
"red": "#c43325",
|
||||
"red_b": "#c46056",
|
||||
|
||||
"green": "#8cc992",
|
||||
"green_b": "#c2dab0",
|
||||
|
||||
"yellow": "#ffb852",
|
||||
"yellow_b": "#ffab5b",
|
||||
|
||||
"blue": "#5299ff",
|
||||
"blue_b": "#92beff",
|
||||
|
||||
"magenta": "#645ac9",
|
||||
"magenta_b": "#928cc9",
|
||||
|
||||
"cyan": "#5abfc9",
|
||||
"cyan_b": "#8cc4c9",
|
||||
|
||||
"white": "#b0c2da",
|
||||
"white_b": "#caccce",
|
||||
|
||||
}
|
||||
}
|
||||
1
graphical/desktop/quickshell/rice/Colours.qml
Symbolic link
1
graphical/desktop/quickshell/rice/Colours.qml
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
/nix/store/bc2v8k5620k5p57ggrxy6i5w6pay9kis-Colours.qml
|
||||
|
|
@ -4,8 +4,10 @@ import "launcher" as Launcher
|
|||
import "logout" as Logout
|
||||
// singletons
|
||||
import "title"
|
||||
import "tags"
|
||||
import "tags"
|
||||
import "rice"
|
||||
import "noti" as Noti
|
||||
import "osd" as Osd
|
||||
|
||||
import Quickshell
|
||||
import Quickshell.Wayland
|
||||
|
|
@ -244,6 +246,9 @@ ShellRoot {
|
|||
// }//invisible rect
|
||||
// }
|
||||
|
||||
Noti.Noti {}
|
||||
Osd.Osd {}
|
||||
|
||||
// pops up on current monitor
|
||||
Launcher.Launcher {
|
||||
width: 190
|
||||
|
|
@ -273,4 +278,5 @@ ShellRoot {
|
|||
command: "systemctl reboot"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,10 +9,25 @@
|
|||
}:
|
||||
let
|
||||
inherit (lib) getExe;
|
||||
shotta =
|
||||
let
|
||||
grim = lib.getExe pkgs.grim;
|
||||
slurp = lib.getExe pkgs.slurp;
|
||||
wl-copy = lib.getExe' pkgs.wl-clipboard-rs "wl-copy";
|
||||
wl-paste = lib.getExe' pkgs.wl-clipboard-rs "wl-paste";
|
||||
in
|
||||
pkgs.writeScriptBin "shotta" ''
|
||||
#! /usr/bin/env nu
|
||||
let savePath = $"~/screenshots/(date now | format date "%Y-%m-%d-%H-%M-%S").png" | path expand
|
||||
${grim} -g $"(${slurp})" -c - | ${wl-copy}
|
||||
${wl-paste} o> $savePath
|
||||
'';
|
||||
|
||||
ui = config.rice.roles config.rice.palette.hex;
|
||||
in
|
||||
{
|
||||
user.packages = getPkgs {
|
||||
# quickshell stuff
|
||||
environment.systemPackages = getPkgs {
|
||||
inherit shotta;
|
||||
inherit (pkgs.kdePackages) qtbase qtdeclarative;
|
||||
inherit (pkgs) wl-clipboard quickshell;
|
||||
};
|
||||
|
|
@ -23,7 +38,6 @@ in
|
|||
];
|
||||
services.stasis = {
|
||||
enable = false;
|
||||
extraPathPackages = [ (config.programs.niri.package) ];
|
||||
extraConfig = ''
|
||||
default:
|
||||
dpms_off:
|
||||
|
|
@ -43,40 +57,55 @@ in
|
|||
excludedApps = [ "Bitwarden" ];
|
||||
};
|
||||
|
||||
quick.services = {
|
||||
noti.cmd = "${getExe pkgs.swaynotificationcenter}";
|
||||
shell = {
|
||||
cmd = "${getExe pkgs.quickshell}";
|
||||
restart = true;
|
||||
};
|
||||
# pwManager.cmd = "${getExe config.apps.passwordManager}";
|
||||
# music = "${getExe config.apps.streamPlayer}";
|
||||
};
|
||||
|
||||
# user.systemd.services.music = {
|
||||
# environment.PATH = lib.mkForce "/run/current-system/sw/bin:/run/current-system/sw/sbin:/etc/profiles/per-user/${mainUser}/bin:/etc/profiles/per-user/${mainUser}/sbin";
|
||||
# unitConfig = {
|
||||
# Description = "airdrome";
|
||||
# Requires = [
|
||||
# "graphical-session.target"
|
||||
# ];
|
||||
# After = [
|
||||
# "graphical-session.target"
|
||||
# "niri.target"
|
||||
# ];
|
||||
# PartOf = [ "graphical-session.target" ];
|
||||
# };
|
||||
# serviceConfig = {
|
||||
# ExecStart = "${getExe config.apps.streamPlayer}";
|
||||
# Type = "forking";
|
||||
# };
|
||||
# wantedBy = [ "graphical-session.target" ];
|
||||
|
||||
# };
|
||||
|
||||
environment.files."/home/${mainUser}/.config/quickshell" = {
|
||||
source = "/home/${mainUser}/.nix/graphical/desktop/quickshell";
|
||||
uid = 1000;
|
||||
gid = 100;
|
||||
};
|
||||
|
||||
# generate Colours.qml from palette into the source tree via arbys
|
||||
environment.files."/home/${mainUser}/.nix/graphical/desktop/quickshell/rice/Colours.qml" =
|
||||
let
|
||||
pal = config.rice.palette.hex;
|
||||
in
|
||||
{
|
||||
source = pkgs.writeText "Colours.qml" ''
|
||||
pragma Singleton
|
||||
import Quickshell
|
||||
|
||||
Singleton {
|
||||
property var c: {
|
||||
"bg": "${ui.bg}",
|
||||
"fg": "${ui.fg}",
|
||||
|
||||
"black": "${pal.normal.black}",
|
||||
"black_b": "${pal.bright.black}",
|
||||
|
||||
"red": "${pal.normal.red}",
|
||||
"red_b": "${pal.bright.red}",
|
||||
|
||||
"green": "${pal.normal.green}",
|
||||
"green_b": "${pal.bright.green}",
|
||||
|
||||
"yellow": "${pal.normal.yellow}",
|
||||
"yellow_b": "${pal.bright.yellow}",
|
||||
|
||||
"blue": "${pal.normal.blue}",
|
||||
"blue_b": "${pal.bright.blue}",
|
||||
|
||||
"magenta": "${pal.normal.magenta}",
|
||||
"magenta_b": "${pal.bright.magenta}",
|
||||
|
||||
"cyan": "${pal.normal.cyan}",
|
||||
"cyan_b": "${pal.bright.cyan}",
|
||||
|
||||
"white": "${pal.normal.white}",
|
||||
"white_b": "${pal.bright.white}",
|
||||
|
||||
}
|
||||
}
|
||||
'';
|
||||
uid = 1000;
|
||||
gid = 100;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,9 +8,59 @@
|
|||
}:
|
||||
let
|
||||
inherit (config) rice;
|
||||
inherit (inputs.niri.lib.kdl) leaf node flag serialize;
|
||||
niri = getFlakePkg' inputs.niri "niri-unstable";
|
||||
xwayland-satellite = getFlakePkg' inputs.niri "xwayland-satellite-unstable";
|
||||
|
||||
ui = rice.roles rice.palette.shortHex;
|
||||
|
||||
# serialize binds attrset to KDL
|
||||
serializeBind = key: bind:
|
||||
if bind ? action then
|
||||
leaf key { action = bind.action; }
|
||||
else if bind ? spawn then
|
||||
leaf key bind.spawn
|
||||
else
|
||||
flag key;
|
||||
|
||||
bindsKdl = serialize.nodes [
|
||||
(node "binds" [] (
|
||||
lib.mapAttrsToList serializeBind config.niri.binds
|
||||
))
|
||||
];
|
||||
|
||||
niriConfig =
|
||||
let
|
||||
template = builtins.readFile ./niri.kdl;
|
||||
baseConfig =
|
||||
with rice;
|
||||
lib.replaceStrings
|
||||
[
|
||||
"%CURSOR%"
|
||||
"%ROUNDING%"
|
||||
"%GAPS%"
|
||||
"%BORDER%"
|
||||
"%ACTIVE%"
|
||||
"%INACTIVE%"
|
||||
"%SATELLITE%"
|
||||
]
|
||||
[
|
||||
cursor.name
|
||||
(toString borders.rounding)
|
||||
(toString borders.gaps)
|
||||
(toString borders.thickness)
|
||||
ui.highlight
|
||||
ui.muted
|
||||
(lib.getExe xwayland-satellite)
|
||||
]
|
||||
template;
|
||||
in
|
||||
baseConfig + "\n" + bindsKdl + "\n" + config.niri.extraConfig;
|
||||
|
||||
niriConfigFile = pkgs.writeText "niri-config.kdl" niriConfig;
|
||||
|
||||
niri-session-direct = pkgs.writeShellScript "niri-session-direct" ''
|
||||
export NIRI_CONFIG="${niriConfigFile}"
|
||||
systemctl --user import-environment
|
||||
dbus-update-activation-environment --all
|
||||
systemctl --user start niri-session-bridge.service &
|
||||
|
|
@ -24,43 +74,25 @@ in
|
|||
inputs.niri-s76.nixosModules.default
|
||||
];
|
||||
|
||||
user.desktops.niri = {
|
||||
enable = true;
|
||||
config =
|
||||
let
|
||||
template = builtins.readFile ./niri.kdl;
|
||||
baseConfig =
|
||||
with rice;
|
||||
lib.replaceStrings
|
||||
[
|
||||
"%CURSOR%"
|
||||
"%ROUNDING%"
|
||||
"%GAPS%"
|
||||
"%BORDER%"
|
||||
"%ACTIVE%"
|
||||
"%INACTIVE%"
|
||||
"%SATELLITE%"
|
||||
]
|
||||
[
|
||||
cursor.name
|
||||
(toString borders.rounding)
|
||||
(toString borders.gaps)
|
||||
(toString borders.thickness)
|
||||
palette.shortHex.bright.yellow
|
||||
palette.shortHex.normal.white
|
||||
(lib.getExe xwayland-satellite)
|
||||
]
|
||||
template;
|
||||
in
|
||||
baseConfig;
|
||||
options.niri = {
|
||||
binds = lib.mkOption {
|
||||
type = lib.types.attrsOf lib.types.anything;
|
||||
default = { };
|
||||
description = "Niri keybindings";
|
||||
};
|
||||
extraConfig = lib.mkOption {
|
||||
type = lib.types.lines;
|
||||
default = "";
|
||||
description = "Extra KDL config appended to niri config";
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
config.environment.systemPackages = [
|
||||
niri
|
||||
xwayland-satellite
|
||||
];
|
||||
|
||||
environment.etc."greetd/wayland-sessions/niri.desktop".text = ''
|
||||
config.environment.etc."greetd/wayland-sessions/niri.desktop".text = ''
|
||||
[Desktop Entry]
|
||||
Name=Niri
|
||||
Comment=A scrollable-tiling Wayland compositor
|
||||
|
|
@ -69,12 +101,12 @@ in
|
|||
DesktopNames=niri
|
||||
'';
|
||||
|
||||
programs.niri = {
|
||||
config.programs.niri = {
|
||||
enable = true;
|
||||
package = niri;
|
||||
};
|
||||
|
||||
services.niri-tag = {
|
||||
config.services.niri-tag = {
|
||||
enable = true;
|
||||
prepopulate = 10;
|
||||
strict = true;
|
||||
|
|
@ -84,16 +116,16 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
services.niri-s76-bridge.enable = true;
|
||||
config.services.niri-s76-bridge.enable = true;
|
||||
|
||||
# niri runs directly from greetd (not as a user service),
|
||||
# so that it stays inside the logind session scope for proper polkit/dbus access.
|
||||
systemd.user.services.niri.wantedBy = lib.mkForce [ ];
|
||||
systemd.user.services.niri.enable = lib.mkForce false;
|
||||
config.systemd.user.services.niri.wantedBy = lib.mkForce [ ];
|
||||
config.systemd.user.services.niri.enable = lib.mkForce false;
|
||||
|
||||
# bridge service to activate graphical-session.target for the direct-launched niri.
|
||||
# waits for niri IPC readiness before pulling in the target.
|
||||
systemd.user.services.niri-session-bridge = {
|
||||
config.systemd.user.services.niri-session-bridge = {
|
||||
unitConfig = {
|
||||
Description = "Activate graphical-session.target for direct-launched niri";
|
||||
BindsTo = [ "graphical-session.target" ];
|
||||
|
|
|
|||
64
graphical/desktop/wry.nix
Normal file
64
graphical/desktop/wry.nix
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
lib,
|
||||
getFlakePkg,
|
||||
...
|
||||
}:
|
||||
let
|
||||
wry = getFlakePkg inputs.wry;
|
||||
wry-session = pkgs.writeShellScript "wry-session" ''
|
||||
systemctl --user import-environment
|
||||
dbus-update-activation-environment --all
|
||||
systemctl --user start wry-session-bridge.service &
|
||||
exec ${lib.getExe wry} run
|
||||
'';
|
||||
in
|
||||
{
|
||||
options.programs.wry = {
|
||||
package = lib.mkOption {
|
||||
type = lib.types.package;
|
||||
default = wry;
|
||||
};
|
||||
};
|
||||
config = {
|
||||
environment.systemPackages = [ wry ];
|
||||
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings.default_session.command = "${lib.getExe (getFlakePkg inputs.tuigreet)} --sessions /etc/greetd/wayland-sessions --remember-session";
|
||||
};
|
||||
|
||||
environment.etc."greetd/wayland-sessions/wry.desktop".text = ''
|
||||
[Desktop Entry]
|
||||
Name=wry
|
||||
Exec=${wry-session}
|
||||
Type=Application
|
||||
DesktopNames=wry
|
||||
'';
|
||||
|
||||
# bridge service to activate graphical-session.target for direct-launched wry.
|
||||
# waits for wry IPC readiness before pulling in the target.
|
||||
systemd.user.services.wry-session-bridge = {
|
||||
unitConfig = {
|
||||
Description = "Activate graphical-session.target for direct-launched wry";
|
||||
BindsTo = [ "graphical-session.target" ];
|
||||
Before = [ "graphical-session.target" ];
|
||||
Wants = [ "graphical-session-pre.target" ];
|
||||
After = [ "graphical-session-pre.target" ];
|
||||
};
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
# wry's IPC goes through the Wayland socket,
|
||||
# so we can't use a wry subcommand without WAYLAND_DISPLAY already set.
|
||||
# Wait for wry to create its wayland socket in XDG_RUNTIME_DIR instead.
|
||||
ExecStart = pkgs.writeShellScript "wry-ready" ''
|
||||
until find "$XDG_RUNTIME_DIR" -maxdepth 1 -name "wayland-*" ! -name "*.lock" -type s | grep -q .; do
|
||||
sleep 0.1
|
||||
done
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -2,33 +2,32 @@
|
|||
pkgs,
|
||||
...
|
||||
}:
|
||||
scope "user" {
|
||||
programs = {
|
||||
direnv.enable = true;
|
||||
{
|
||||
programs.direnv.enable = true;
|
||||
|
||||
git = {
|
||||
enable = true;
|
||||
settings = {
|
||||
user = {
|
||||
name = "atagen";
|
||||
email = "boss@atagen.co";
|
||||
};
|
||||
init = {
|
||||
defaultBranch = "main";
|
||||
};
|
||||
url = {
|
||||
"https://github.com/".insteadOf = "github:";
|
||||
"https://git.lobotomise.me/atagen/".insteadOf = "atagen:";
|
||||
"https://codeberg.org/".insteadOf = "codeberg:";
|
||||
};
|
||||
credential.helper = "rbw";
|
||||
programs.git = {
|
||||
enable = true;
|
||||
config = {
|
||||
user = {
|
||||
name = "atagen";
|
||||
email = "boss@atagen.co";
|
||||
};
|
||||
integrations = {
|
||||
difftastic.enable = true;
|
||||
init = {
|
||||
defaultBranch = "main";
|
||||
};
|
||||
url = {
|
||||
"https://github.com/".insteadOf = "github:";
|
||||
"https://git.lobotomise.me/atagen/".insteadOf = "atagen:";
|
||||
"https://codeberg.org/".insteadOf = "codeberg:";
|
||||
"ssh://git@git.kosslan.dev/".insteadOf = "kosslan:";
|
||||
};
|
||||
credential.helper = "rbw";
|
||||
diff.external = "${pkgs.difftastic}/bin/difft";
|
||||
};
|
||||
};
|
||||
|
||||
packages = [ pkgs.jujutsu ];
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.jujutsu
|
||||
pkgs.difftastic
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,13 +1,65 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
ui = config.rice.roles config.rice.palette.hex;
|
||||
zathuraConfigDir = pkgs.runCommand "zathura-config" { } ''
|
||||
mkdir -p $out
|
||||
cp ${pkgs.writeText "zathurarc" ''
|
||||
set recolor true
|
||||
set recolor-darkcolor "${ui.fg}"
|
||||
set recolor-lightcolor "${ui.bg}"
|
||||
|
||||
set default-fg "${ui.fg}"
|
||||
set default-bg "${ui.bg}"
|
||||
|
||||
set statusbar-fg "${ui.fg}"
|
||||
set statusbar-bg "${ui.overlay}"
|
||||
|
||||
set inputbar-fg "${ui.fg}"
|
||||
set inputbar-bg "${ui.surface}"
|
||||
|
||||
set notification-fg "${ui.fg}"
|
||||
set notification-bg "${ui.surface}"
|
||||
set notification-error-fg "${ui.error}"
|
||||
set notification-error-bg "${ui.surface}"
|
||||
set notification-warning-fg "${ui.warning}"
|
||||
set notification-warning-bg "${ui.surface}"
|
||||
|
||||
set highlight-color "${ui.highlight}"
|
||||
set highlight-active-color "${ui.accent}"
|
||||
|
||||
set completion-fg "${ui.fg}"
|
||||
set completion-bg "${ui.surface}"
|
||||
set completion-group-fg "${ui.muted}"
|
||||
set completion-group-bg "${ui.surface}"
|
||||
set completion-highlight-fg "${ui.overlay}"
|
||||
set completion-highlight-bg "${ui.secondary}"
|
||||
|
||||
set index-fg "${ui.fg}"
|
||||
set index-bg "${ui.bg}"
|
||||
set index-active-fg "${ui.overlay}"
|
||||
set index-active-bg "${ui.secondary}"
|
||||
''} $out/zathurarc
|
||||
'';
|
||||
zathuraWrapped = pkgs.symlinkJoin {
|
||||
name = "zathura";
|
||||
paths = [ pkgs.zathura ];
|
||||
nativeBuildInputs = [ pkgs.makeWrapper ];
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/zathura \
|
||||
--add-flags "--config-dir=${zathuraConfigDir}"
|
||||
'';
|
||||
};
|
||||
in
|
||||
with pkgs;
|
||||
scope "apps" {
|
||||
officeSuite = libreoffice;
|
||||
mailClient = thunderbird;
|
||||
noteTaking = obsidian;
|
||||
ebookReader = foliate;
|
||||
pdfReader = zathura;
|
||||
pdfReader = zathuraWrapped;
|
||||
calculator = mate-calc;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,23 +1,9 @@
|
|||
{ inputs, ... }:
|
||||
{ ... }:
|
||||
{
|
||||
|
||||
imports = [
|
||||
inputs.bunker.nixosModules.default
|
||||
];
|
||||
|
||||
services.system76-scheduler.enable = true;
|
||||
|
||||
bunker.kernel = {
|
||||
enable = true;
|
||||
cpuArch = "MZEN3";
|
||||
version = "6.19";
|
||||
hardened = false;
|
||||
lto = "none";
|
||||
};
|
||||
|
||||
services.scx = {
|
||||
enable = true;
|
||||
scheduler = "scx_bpfland";
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ let
|
|||
suffix ? null,
|
||||
}:
|
||||
let
|
||||
version = "2.1.62";
|
||||
version = "2.1.81";
|
||||
runtimeDeps = lib.makeBinPath clodTools;
|
||||
|
||||
patchScript = pkgs.writeScript "patch-claude-src" ''
|
||||
|
|
@ -136,14 +136,9 @@ let
|
|||
exec "$BIN" "$@"
|
||||
'';
|
||||
claude-code = mkClod { };
|
||||
claude-koss = mkClod {
|
||||
suffix = "koss";
|
||||
confDir = ".clod-koss";
|
||||
};
|
||||
in
|
||||
(scope "apps" {
|
||||
"slop" = claude-code;
|
||||
"temp-slop" = claude-koss;
|
||||
})
|
||||
// {
|
||||
# required for loader
|
||||
|
|
|
|||
|
|
@ -3,11 +3,30 @@
|
|||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
ui = config.rice.roles config.rice.palette.hex;
|
||||
imvConfig = pkgs.writeText "imv-config" ''
|
||||
[options]
|
||||
background=${ui.bg}
|
||||
overlay_font=${config.rice.fonts.sans.name}:${toString config.rice.fonts.sans.size}
|
||||
overlay_text_color=${ui.fg}
|
||||
overlay_background_color=${ui.surface}
|
||||
'';
|
||||
imvWrapped = pkgs.symlinkJoin {
|
||||
name = "imv";
|
||||
paths = [ pkgs.imv ];
|
||||
nativeBuildInputs = [ pkgs.makeWrapper ];
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/imv \
|
||||
--set imv_config "${imvConfig}"
|
||||
'';
|
||||
};
|
||||
in
|
||||
with pkgs;
|
||||
(scope "apps" {
|
||||
videoPlayer = mpv;
|
||||
imageViewer = imv;
|
||||
musicPlayer = resonance;
|
||||
imageViewer = imvWrapped;
|
||||
musicPlayer = strawberry;
|
||||
streamPlayer = config.programs.pwas.airdrome.package;
|
||||
soulSeek = nicotine-plus;
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,12 +1,31 @@
|
|||
_: {
|
||||
networking = {
|
||||
# dhcpcd.extraConfig = "nohook resolv.conf";
|
||||
dhcpcd.extraConfig = "nohook resolv.conf";
|
||||
nameservers = [
|
||||
"103.1.206.179"
|
||||
"168.138.8.38"
|
||||
"168.138.12.137"
|
||||
];
|
||||
};
|
||||
networking.networkmanager = {
|
||||
enable = true;
|
||||
# this should be moved to desktop profile ig
|
||||
ensureProfiles.profiles."Wired connection 1" = {
|
||||
connection = {
|
||||
type = "802-3-ethernet";
|
||||
id = "home lan";
|
||||
interface-name = "enp3s0";
|
||||
};
|
||||
ipv4 = {
|
||||
method = "auto";
|
||||
ignore-auto-dns = true;
|
||||
};
|
||||
ipv6 = {
|
||||
method = "auto";
|
||||
ignore-auto-dns = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# services.unbound = {
|
||||
# enable = true;
|
||||
|
|
|
|||
|
|
@ -1,19 +1,30 @@
|
|||
{ pkgs, lib, ... }:
|
||||
{
|
||||
user.xdg.config.files."rbw/config.json" = {
|
||||
generator = lib.generators.toJSON { };
|
||||
value = {
|
||||
email = "boss@atagen.co";
|
||||
pinentry = lib.getExe pkgs.pinentry-gtk2; # TODO this is fugly
|
||||
base_url = "https://vault.lobotomise.me";
|
||||
};
|
||||
let
|
||||
rbwConfigDir = pkgs.runCommand "rbw-xdg" { } ''
|
||||
mkdir -p $out/rbw
|
||||
cp ${
|
||||
(pkgs.formats.json { }).generate "rbw-config.json" {
|
||||
email = "boss@atagen.co";
|
||||
pinentry = lib.getExe pkgs.pinentry-qt;
|
||||
base_url = "https://vault.lobotomise.me";
|
||||
}
|
||||
} $out/rbw/config.json
|
||||
'';
|
||||
rbwWrapped = pkgs.symlinkJoin {
|
||||
name = "rbw";
|
||||
paths = [ pkgs.rbw ];
|
||||
nativeBuildInputs = [ pkgs.makeWrapper ];
|
||||
postBuild = ''
|
||||
for bin in $out/bin/rbw $out/bin/rbw-agent; do
|
||||
[ -f "$bin" ] && wrapProgram "$bin" \
|
||||
--set XDG_CONFIG_HOME "${rbwConfigDir}"
|
||||
done
|
||||
'';
|
||||
};
|
||||
|
||||
# nixpkgs.config.permittedInsecurePackages = [
|
||||
# "electron-36.9.5"
|
||||
# ];
|
||||
in
|
||||
{
|
||||
apps = with pkgs; {
|
||||
passwordManager = bitwarden-desktop;
|
||||
passwordCli = rbw;
|
||||
passwordCli = rbwWrapped;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,31 +1,83 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
user.packages = [
|
||||
pkgs.gtk-engine-murrine
|
||||
];
|
||||
|
||||
qt = {
|
||||
enable = true;
|
||||
# style = "adwaita-dark";
|
||||
# platformTheme = "gnome"; # broken in unstable ?
|
||||
};
|
||||
|
||||
user.misc.gtk =
|
||||
pkgs,
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [ inputs.qtengine.nixosModules.default ];
|
||||
environment.systemPackages =
|
||||
let
|
||||
inherit (config) rice;
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
packages = [
|
||||
rice.gtk-theme.package
|
||||
rice.fonts.sans.package
|
||||
rice.icons.package
|
||||
];
|
||||
settings = {
|
||||
application-prefer-dark-theme = true;
|
||||
font-name = "${rice.fonts.sans.name} ${builtins.toString rice.fonts.sans.size}";
|
||||
theme-name = rice.gtk-theme.name;
|
||||
icon-theme-name = rice.icons.name;
|
||||
(with pkgs.kdePackages; [
|
||||
pkgs.gtk-engine-murrine
|
||||
breeze
|
||||
breeze.qt5
|
||||
])
|
||||
++ [
|
||||
rice.gtk-theme.package
|
||||
rice.fonts.sans.package
|
||||
rice.icons.package
|
||||
];
|
||||
|
||||
programs.qtengine = {
|
||||
enable = true;
|
||||
|
||||
config = {
|
||||
theme = {
|
||||
colorScheme =
|
||||
let ui = config.rice.roles config.rice.palette.hex; in
|
||||
pkgs.runCommand "theme.colors" { } ''
|
||||
sed \
|
||||
-e "s|@bg@|${ui.bg}|g" \
|
||||
-e "s|@fg@|${ui.fg}|g" \
|
||||
-e "s|@surface@|${ui.surface}|g" \
|
||||
-e "s|@overlay@|${ui.overlay}|g" \
|
||||
-e "s|@selection@|${ui.highlight}|g" \
|
||||
-e "s|@accent@|${ui.accent}|g" \
|
||||
-e "s|@error@|${ui.error}|g" \
|
||||
-e "s|@warning@|${ui.warning}|g" \
|
||||
-e "s|@success@|${ui.success}|g" \
|
||||
${./qt-color.template} \
|
||||
> $out
|
||||
'';
|
||||
iconTheme = config.rice.icons.name;
|
||||
style = "breeze";
|
||||
font = with config.rice.fonts.sans; {
|
||||
family = name;
|
||||
size = size;
|
||||
weight = -1;
|
||||
};
|
||||
fontFixed = with config.rice.fonts.monospace; {
|
||||
family = name;
|
||||
size = size;
|
||||
};
|
||||
};
|
||||
|
||||
misc = {
|
||||
singleClickActivate = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.dconf = {
|
||||
enable = true;
|
||||
profiles.user.databases = [
|
||||
{
|
||||
settings =
|
||||
let
|
||||
inherit (config) rice;
|
||||
in
|
||||
{
|
||||
"org/gnome/desktop/interface" = {
|
||||
gtk-theme = rice.gtk-theme.name;
|
||||
icon-theme = rice.icons.name;
|
||||
font-name = "${rice.fonts.sans.name} ${builtins.toString rice.fonts.sans.size}";
|
||||
color-scheme = "prefer-dark";
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
44
graphical/qt-color.template
Normal file
44
graphical/qt-color.template
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
[General]
|
||||
Name=SemanticTheme
|
||||
|
||||
[Colors:Window]
|
||||
BackgroundNormal=@bg@
|
||||
ForegroundNormal=@fg@
|
||||
|
||||
[Colors:View]
|
||||
BackgroundNormal=@bg@
|
||||
ForegroundNormal=@fg@
|
||||
SelectionBackground=@selection@
|
||||
SelectionForeground=@bg@
|
||||
|
||||
[Colors:Button]
|
||||
BackgroundNormal=@surface@
|
||||
ForegroundNormal=@fg@
|
||||
|
||||
[Colors:Selection]
|
||||
BackgroundNormal=@selection@
|
||||
ForegroundNormal=@bg@
|
||||
|
||||
[Colors:Tooltip]
|
||||
BackgroundNormal=@overlay@
|
||||
ForegroundNormal=@fg@
|
||||
|
||||
[Colors:Complementary]
|
||||
BackgroundNormal=@overlay@
|
||||
ForegroundNormal=@fg@
|
||||
|
||||
[Colors:Header]
|
||||
BackgroundNormal=@surface@
|
||||
ForegroundNormal=@fg@
|
||||
|
||||
[Colors:Accent]
|
||||
ForegroundNormal=@accent@
|
||||
|
||||
[Colors:Negative]
|
||||
ForegroundNormal=@error@
|
||||
|
||||
[Colors:Neutral]
|
||||
ForegroundNormal=@warning@
|
||||
|
||||
[Colors:Positive]
|
||||
ForegroundNormal=@success@
|
||||
|
|
@ -38,8 +38,7 @@ scope "options.quick" {
|
|||
default = { };
|
||||
};
|
||||
}
|
||||
// scope "config.user.systemd" {
|
||||
enable = true;
|
||||
// scope "config.systemd.user" {
|
||||
services =
|
||||
builtins.mapAttrs (name: opts: {
|
||||
environment.PATH = lib.mkForce "/run/current-system/sw/bin:/run/current-system/sw/sbin:/etc/profiles/per-user/${mainUser}/bin:/etc/profiles/per-user/${mainUser}/sbin";
|
||||
|
|
|
|||
|
|
@ -7,16 +7,18 @@
|
|||
...
|
||||
}:
|
||||
{
|
||||
environment.sessionVariables.XCURSOR_THEME = config.rice.cursor.name;
|
||||
environment = {
|
||||
sessionVariables.XCURSOR_THEME = config.rice.cursor.name;
|
||||
|
||||
user.packages =
|
||||
let
|
||||
inherit (config.rice) icons cursor;
|
||||
in
|
||||
icons.pkgs
|
||||
++ [
|
||||
cursor.package
|
||||
];
|
||||
systemPackages =
|
||||
let
|
||||
inherit (config.rice) icons cursor;
|
||||
in
|
||||
icons.pkgs
|
||||
++ [
|
||||
cursor.package
|
||||
];
|
||||
};
|
||||
|
||||
rice = {
|
||||
|
||||
|
|
@ -34,7 +36,10 @@
|
|||
|
||||
gtk-theme = {
|
||||
name = "nix-rice";
|
||||
package = localPkgs.gtk-theme.override { palette = config.rice.palette.shortHex; };
|
||||
package = localPkgs.gtk-theme.override {
|
||||
palette = config.rice.palette.shortHex;
|
||||
# roles = config.rice.roles config.rice.palette.shortHex;
|
||||
};
|
||||
};
|
||||
|
||||
borders = {
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
notify = true;
|
||||
visual = true;
|
||||
};
|
||||
colors =
|
||||
colors-dark =
|
||||
let
|
||||
pal = config.rice.palette.shortHex;
|
||||
in
|
||||
|
|
|
|||
4
hosts/adrift/kernel.nix
Normal file
4
hosts/adrift/kernel.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
boot.kernelPackages = pkgs.linuxKernel.packages.linux_xanmod;
|
||||
}
|
||||
|
|
@ -4,5 +4,5 @@
|
|||
# nixpkgs.config.permittedInsecurePackages = [
|
||||
# "qtwebengine-5.15.19"
|
||||
# ];
|
||||
user.packages = [ pkgs.brightnessctl ];
|
||||
environment.systemPackages = [ pkgs.brightnessctl ];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,11 @@
|
|||
scope "boot" {
|
||||
|
||||
initrd.availableKernelModules = [
|
||||
"nvidia_drm"
|
||||
"nvidia_modeset"
|
||||
"nvidia_uvm"
|
||||
"nvidia"
|
||||
"video"
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"usbcore"
|
||||
|
|
@ -18,7 +23,7 @@ scope "boot" {
|
|||
consoleLogLevel = 0;
|
||||
kernelParams = [
|
||||
"mitigations=off"
|
||||
"preempt=full"
|
||||
"preempt=lazy"
|
||||
"quiet"
|
||||
"loglevel=3"
|
||||
"systemd.show_status=off"
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
_: {
|
||||
user.desktops.niri.config = builtins.readFile ./extra-niri.kdl;
|
||||
niri.extraConfig = builtins.readFile ./extra-niri.kdl;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@
|
|||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
nixpkgs.config.cudaSupport = true;
|
||||
|
||||
hardware.display.outputs."DP-2".mode = "2560x1440@120e";
|
||||
|
||||
hardware.nvidia = {
|
||||
package = config.boot.kernelPackages.nvidiaPackages.production;
|
||||
modesetting.enable = true;
|
||||
|
|
|
|||
|
|
@ -14,8 +14,4 @@ in
|
|||
accelProfile = "flat";
|
||||
accelSpeed = 0.0;
|
||||
};
|
||||
|
||||
quick.services = {
|
||||
ckb-next.cmd = "${lib.getExe ckb-next} -c -b";
|
||||
};
|
||||
}
|
||||
|
|
|
|||
14
hosts/quiver/kernel.nix
Normal file
14
hosts/quiver/kernel.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{ inputs, ... }:
|
||||
{
|
||||
imports = [
|
||||
inputs.bunker.nixosModules.default
|
||||
];
|
||||
|
||||
bunker.kernel = {
|
||||
enable = true;
|
||||
cpuArch = "MZEN3";
|
||||
version = "6.19";
|
||||
hardened = false;
|
||||
lto = "none";
|
||||
};
|
||||
}
|
||||
|
|
@ -27,25 +27,6 @@ in
|
|||
modules = [
|
||||
{ nixpkgs.hostPlatform.system = info.system; }
|
||||
inputs.arbys.nixosModules.arbys
|
||||
inputs.hjem.nixosModules.hjem
|
||||
(
|
||||
{ ... }:
|
||||
scope "hjem" {
|
||||
users.${info.username}.enable = true;
|
||||
extraModules = [
|
||||
inputs.hjem-rum.hjemModules.hjem-rum
|
||||
]
|
||||
# alias base hjem options to `rum` so we can alias them all together after
|
||||
++ (map (f: lib.mkAliasOptionModule [ "rum" f ] [ f ]) [
|
||||
"packages"
|
||||
"files"
|
||||
"xdg"
|
||||
"systemd"
|
||||
]);
|
||||
}
|
||||
)
|
||||
# alias hjem-rum options to `user`
|
||||
(lib.mkAliasOptionModule [ "user" ] [ "hjem" "users" info.username "rum" ])
|
||||
]
|
||||
++ (recursivelyImport info.imports);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue