diff --git a/common/cli.nix b/common/cli.nix index 0715ed7..f23fb96 100644 --- a/common/cli.nix +++ b/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"; } diff --git a/common/editor-theme.nix b/common/editor-theme.nix deleted file mode 100644 index 8377070..0000000 --- a/common/editor-theme.nix +++ /dev/null @@ -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; -} diff --git a/common/editor.nix b/common/editor.nix index 5bb42dc..8e2a95c 100644 --- a/common/editor.nix +++ b/common/editor.nix @@ -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 diff --git a/common/nix/plugins.nix b/common/nix/plugins.nix index b1d91c5..a98596a 100644 --- a/common/nix/plugins.nix +++ b/common/nix/plugins.nix @@ -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}"; }; }; } diff --git a/common/nix/settings.nix b/common/nix/settings.nix index ec23e6e..1786090 100644 --- a/common/nix/settings.nix +++ b/common/nix/settings.nix @@ -23,11 +23,6 @@ system.nixos.tags = [ "fatcock-xxl" ]; - hjem = { - clobberByDefault = true; - linker = getFlakePkg' inputs.hjem "smfh"; - }; - environment.arbys = { enable = true; clobber = true; diff --git a/common/nix/substituters.nix b/common/nix/substituters.nix index f0d5d58..7dd92c5 100644 --- a/common/nix/substituters.nix +++ b/common/nix/substituters.nix @@ -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=" ]; diff --git a/common/rice/default.nix b/common/rice/default.nix index a6da9e6..de60225 100644 --- a/common/rice/default.nix +++ b/common/rice/default.nix @@ -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; + }; + }; } diff --git a/common/terminal.nix b/common/terminal.nix index dbb0099..0511fae 100644 --- a/common/terminal.nix +++ b/common/terminal.nix @@ -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 = { diff --git a/flake.lock b/flake.lock index 0aaeaa0..742ecf4 100644 --- a/flake.lock +++ b/flake.lock @@ -25,11 +25,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1772210137, - "narHash": "sha256-w5w8OAexQ8Ba62Yd/GG9xjvEp2U6G6ua3+ZCvSGcO7g=", + "lastModified": 1774023259, + "narHash": "sha256-08QDVfScqZOrBhNdm8VUy1nIBnNgsnUhf7vHKKVdelw=", "owner": "linyinfeng", "repo": "angrr", - "rev": "3ab5cecfb8a478e3012606396ab36e1b793609f6", + "rev": "9e327b2fa6e548ea9bebdabb667a09ce682aef0c", "type": "github" }, "original": { @@ -55,11 +55,11 @@ }, "bunker": { "locked": { - "lastModified": 1772253494, - "narHash": "sha256-qIVFT2H6YQbnFur0/aKkb2tbX6bppugdYVYZ3eMwzso=", + "lastModified": 1774155802, + "narHash": "sha256-W8QitI0AoI9CgRzNKoAwrGQTekhF45a0G9YeG3JLXck=", "owner": "amaanq", "repo": "bunker-patches", - "rev": "b5e79f6a3c6ccbbbe4065503b16e91a3c876ddef", + "rev": "1d6c5b0102797e6281e24311181781323b64c01d", "type": "github" }, "original": { @@ -144,21 +144,6 @@ } }, "flake-compat_2": { - "locked": { - "lastModified": 1733328505, - "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_3": { "flake": false, "locked": { "lastModified": 1767039857, @@ -182,11 +167,11 @@ ] }, "locked": { - "lastModified": 1769996383, - "narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=", + "lastModified": 1772408722, + "narHash": "sha256-rHuJtdcOjK7rAHpHphUb1iCvgkU3GpfvicLMwwnfMT0=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "57928607ea566b5db3ad13af0e57e921e6b12381", + "rev": "f20dc5d9b8027381c474144ecabc9034d6a839a3", "type": "github" }, "original": { @@ -196,24 +181,6 @@ } }, "flake-parts_2": { - "inputs": { - "nixpkgs-lib": "nixpkgs-lib" - }, - "locked": { - "lastModified": 1743550720, - "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "c621e8422220273271f52058f618c94e405bb0f5", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_3": { "inputs": { "nixpkgs-lib": [ "nix-rice", @@ -234,9 +201,9 @@ "type": "github" } }, - "flake-parts_4": { + "flake-parts_3": { "inputs": { - "nixpkgs-lib": "nixpkgs-lib_3" + "nixpkgs-lib": "nixpkgs-lib_2" }, "locked": { "lastModified": 1772408722, @@ -252,27 +219,9 @@ "type": "github" } }, - "flake-utils": { - "inputs": { - "systems": "systems_6" - }, - "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "git-hooks-nix": { "inputs": { - "flake-compat": "flake-compat_3", + "flake-compat": "flake-compat_2", "gitignore": "gitignore", "nixpkgs": [ "nix-rice", @@ -320,11 +269,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1772020767, - "narHash": "sha256-OxeMEMxRJ6dF3UGXVJoNRwxU/F1nOVbdcyX9n8S3Mxk=", + "lastModified": 1774471299, + "narHash": "sha256-2c5vpl2WUUvXR4VPMjzKnGxdnVfkjblmd06Le0s/pMI=", "owner": "amaanq", "repo": "helium-flake", - "rev": "9d3ef138f70b3540397320d25ead6aa96101371d", + "rev": "9dce150ececbf2996d356b96d90fe8468cca8871", "type": "github" }, "original": { @@ -333,84 +282,17 @@ "type": "github" } }, - "hjem": { - "inputs": { - "nix-darwin": "nix-darwin_2", - "nixpkgs": [ - "nixpkgs" - ], - "smfh": "smfh" - }, - "locked": { - "lastModified": 1771212460, - "narHash": "sha256-1RfmXbDIxgwP2/SrYSYd9zdArUaJEm6C3FXpdRlmeso=", - "owner": "feel-co", - "repo": "hjem", - "rev": "7f2880d705edf541955d98f56cb78f9507384423", - "type": "github" - }, - "original": { - "owner": "feel-co", - "repo": "hjem", - "type": "github" - } - }, - "hjem-rum": { - "inputs": { - "hjem": "hjem_2", - "ndg": "ndg", - "nixpkgs": [ - "nixpkgs" - ], - "treefmt-nix": "treefmt-nix_2" - }, - "locked": { - "lastModified": 1771501078, - "narHash": "sha256-Z2bux6QPs4lBzdiw5NdgPqk+BPF1H4lEu3C68ID7bYg=", - "owner": "snugnug", - "repo": "hjem-rum", - "rev": "57175e2f6ab7caf212dd985ef810ec1cd9abf755", - "type": "github" - }, - "original": { - "owner": "snugnug", - "repo": "hjem-rum", - "type": "github" - } - }, - "hjem_2": { - "inputs": { - "nixpkgs": [ - "hjem-rum", - "nixpkgs" - ], - "smfh": "smfh_2" - }, - "locked": { - "lastModified": 1756255328, - "narHash": "sha256-WJ70Dv+tJjIl7mMOqUgcdcz+RrujDRoeKptiU6oh1lI=", - "owner": "feel-co", - "repo": "hjem", - "rev": "2426d6ad20e767895e936ed0c9563cc4e2b6c96f", - "type": "github" - }, - "original": { - "owner": "feel-co", - "repo": "hjem", - "type": "github" - } - }, "hudcore": { "inputs": { "nix-systems": "nix-systems", - "nixpkgs": "nixpkgs_4" + "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1771203193, - "narHash": "sha256-4x61Pk3b78cifs5CA3M2VHJRpUEgktI8DeKuQ1ybbsw=", + "lastModified": 1774692528, + "narHash": "sha256-AI72zuAQBSYETn/dhN8qN8Hdts8PWnSDLEgAxMSZ+CU=", "ref": "refs/heads/main", - "rev": "588ff16cb8855e02c84fdbe32b577c6421f704d1", - "revCount": 2, + "rev": "6555d555797bf1960bd89e76a53e0240b6a93df9", + "revCount": 1, "type": "git", "url": "https://git.lobotomise.me/atagen/hudcore-plymouth" }, @@ -419,20 +301,24 @@ "url": "https://git.lobotomise.me/atagen/hudcore-plymouth" } }, - "jay-src": { - "flake": false, + "inshellah": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, "locked": { - "lastModified": 1772808967, - "narHash": "sha256-F4ZYChLfWymZhdUZIRuz1HNt2htm3vawAh9BY3yuWBU=", - "owner": "mahkoh", - "repo": "jay", - "rev": "893be823b6e215eea14bfc11f3025aa6dd1d6c70", - "type": "github" + "lastModified": 1774774137, + "narHash": "sha256-5HeZobkuaeqFmGKr1sh7mcpBi7qs4z5bpdPYyyRgmU0=", + "ref": "refs/heads/main", + "rev": "9dd1261a4602a20cc9c6e8a450493e909c20f585", + "revCount": 10, + "type": "git", + "url": "https://git.lobotomise.me/atagen/inshellah" }, "original": { - "owner": "mahkoh", - "repo": "jay", - "type": "github" + "type": "git", + "url": "https://git.lobotomise.me/atagen/inshellah" } }, "kitty-themes-src": { @@ -460,11 +346,11 @@ "unf": "unf" }, "locked": { - "lastModified": 1769663912, - "narHash": "sha256-2d5M0GNFksdr00OasiobVph2iIxc6qegoqyGGXP627Y=", + "lastModified": 1774349585, + "narHash": "sha256-bLWGWLCE1yn1/rMl/EvnJpjji3Rm+/uYvfqOk1Crbdg=", "ref": "refs/heads/master", - "rev": "0fc93545ce334099b8ced66c5eb8533273bc4cb8", - "revCount": 41, + "rev": "945892f51d84d2c77d8b831e4ce8afa33117419f", + "revCount": 43, "type": "git", "url": "https://git.lobotomise.me/atagen/meat" }, @@ -476,7 +362,7 @@ "naersk": { "inputs": { "fenix": "fenix", - "nixpkgs": "nixpkgs_8" + "nixpkgs": "nixpkgs_7" }, "locked": { "lastModified": 1768908532, @@ -494,35 +380,14 @@ }, "ndg": { "inputs": { - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_4" }, "locked": { - "lastModified": 1766342086, - "narHash": "sha256-vKuCSU8BCUxG8S2/EyOXrCbIQjmY07Jb5Cq3ehnLsnY=", + "lastModified": 1773478949, + "narHash": "sha256-8rMpSs2OWGaDlDFO5FS6Pf9WutHBXxM2omPr6hfKydI=", "owner": "feel-co", "repo": "ndg", - "rev": "696647a8f0ea1451c02de21b6bdf2a2c9f238d85", - "type": "github" - }, - "original": { - "owner": "feel-co", - "ref": "v2.5.1", - "repo": "ndg", - "type": "github" - } - }, - "ndg_2": { - "inputs": { - "flake-compat": "flake-compat_2", - "flake-parts": "flake-parts_2", - "nixpkgs": "nixpkgs_5" - }, - "locked": { - "lastModified": 1748103964, - "narHash": "sha256-aRFl6I3x1aKzeOBaD/OJHYv+OQ+qE+3FR9uKhIvfW+A=", - "owner": "feel-co", - "repo": "ndg", - "rev": "c556c4cbcba61474bf8a342a31a2d94cbefd8986", + "rev": "c3bc1541668e6f6632a7005c7e4963c0a5dedc7b", "type": "github" }, "original": { @@ -555,17 +420,17 @@ "inputs": { "niri-stable": "niri-stable", "niri-unstable": "niri-unstable", - "nixpkgs": "nixpkgs_7", + "nixpkgs": "nixpkgs_6", "nixpkgs-stable": "nixpkgs-stable", "xwayland-satellite-stable": "xwayland-satellite-stable", "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, "locked": { - "lastModified": 1772631301, - "narHash": "sha256-wAHeBX+aSiA+cAlWtwe5NisjMfrJq6WxrtT+CE7/tFM=", + "lastModified": 1774539534, + "narHash": "sha256-kRKybUNiXTivTZSUnqwXHCY4GRD3e+Nu+1Mb8jf2HCI=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "110e61e49828860499ead8bc539470f1261896ae", + "rev": "975e9c55001333df0ddab36d938372c14917998a", "type": "github" }, "original": { @@ -613,7 +478,7 @@ "nixpkgs": [ "nixpkgs" ], - "systems": "systems_4" + "systems": "systems_2" }, "locked": { "lastModified": 1772457471, @@ -632,11 +497,11 @@ "niri-unstable": { "flake": false, "locked": { - "lastModified": 1772207631, - "narHash": "sha256-Jkkg+KqshFO3CbTszVVpkKN2AOObYz+wMsM3ONo1z5g=", + "lastModified": 1773130184, + "narHash": "sha256-3bwx4WqCB06yfQIGB+OgIckOkEDyKxiTD5pOo4Xz2rI=", "owner": "YaLTeR", "repo": "niri", - "rev": "e708f546153f74acf33eb183b3b2992587a701e5", + "rev": "b07bde3ee82dd73115e6b949e4f3f63695da35ea", "type": "github" }, "original": { @@ -669,32 +534,11 @@ ] }, "locked": { - "lastModified": 1771992996, - "narHash": "sha256-Y/ijH/unOPxzUicbla6yT/14RJgubUWnY2I2A6Ast2Q=", + "lastModified": 1773000227, + "narHash": "sha256-zm3ftUQw0MPumYi91HovoGhgyZBlM4o3Zy0LhPNwzXE=", "owner": "nix-darwin", "repo": "nix-darwin", - "rev": "3bfa436c1975674ca465ce34586467be301ff509", - "type": "github" - }, - "original": { - "owner": "nix-darwin", - "repo": "nix-darwin", - "type": "github" - } - }, - "nix-darwin_2": { - "inputs": { - "nixpkgs": [ - "hjem", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1770922915, - "narHash": "sha256-6J/JoK9iL7sHvKJcGW2KId2agaKv1OGypsa7kN+ZBD4=", - "owner": "nix-darwin", - "repo": "nix-darwin", - "rev": "6c5a56295d2a24e43bcd8af838def1b9a95746b2", + "rev": "da529ac9e46f25ed5616fd634079a5f3c579135f", "type": "github" }, "original": { @@ -726,14 +570,14 @@ }, "nix-index-database": { "inputs": { - "nixpkgs": "nixpkgs_9" + "nixpkgs": "nixpkgs_8" }, "locked": { - "lastModified": 1772341813, - "narHash": "sha256-/PQ0ubBCMj/MVCWEI/XMStn55a8dIKsvztj4ZVLvUrQ=", + "lastModified": 1774156144, + "narHash": "sha256-gdYe9wTPl4ignDyXUl1LlICWj41+S0GB5lG1fKP17+A=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "a2051ff239ce2e8a0148fa7a152903d9a78e854f", + "rev": "55b588747fa3d7fc351a11831c4b874dab992862", "type": "github" }, "original": { @@ -744,12 +588,12 @@ }, "nix-rice": { "inputs": { - "flake-parts": "flake-parts_3", + "flake-parts": "flake-parts_2", "git-hooks-nix": "git-hooks-nix", "kitty-themes-src": "kitty-themes-src", - "nixpkgs": "nixpkgs_10", - "nixpkgs-lib": "nixpkgs-lib_2", - "systems": "systems_5" + "nixpkgs": "nixpkgs_9", + "nixpkgs-lib": "nixpkgs-lib", + "systems": "systems_3" }, "locked": { "lastModified": 1768817933, @@ -837,11 +681,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1771848320, - "narHash": "sha256-0MAd+0mun3K/Ns8JATeHT1sX28faLII5hVLq0L3BdZU=", + "lastModified": 1773821835, + "narHash": "sha256-TJ3lSQtW0E2JrznGVm8hOQGVpXjJyXY2guAxku2O9A4=", "owner": "nixos", "repo": "nixpkgs", - "rev": "2fc6539b481e1d2569f25f8799236694180c0993", + "rev": "b40629efe5d6ec48dd1efba650c797ddbd39ace0", "type": "github" }, "original": { @@ -852,21 +696,6 @@ } }, "nixpkgs-lib": { - "locked": { - "lastModified": 1743296961, - "narHash": "sha256-b1EdN3cULCqtorQ4QeWgLMrd5ZGOjLSLemfa00heasc=", - "owner": "nix-community", - "repo": "nixpkgs.lib", - "rev": "e4822aea2a6d1cdd36653c134cacfd64c97ff4fa", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixpkgs.lib", - "type": "github" - } - }, - "nixpkgs-lib_2": { "locked": { "lastModified": 1768699094, "narHash": "sha256-uapeGJTPPbmqjdo5zlrWFEIys1XIOQ66sKP3A5UNEOk=", @@ -881,7 +710,7 @@ "type": "github" } }, - "nixpkgs-lib_3": { + "nixpkgs-lib_2": { "locked": { "lastModified": 1772328832, "narHash": "sha256-e+/T/pmEkLP6BHhYjx6GmwP5ivonQQn0bJdH9YrRB+Q=", @@ -898,11 +727,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1772598333, - "narHash": "sha256-YaHht/C35INEX3DeJQNWjNaTcPjYmBwwjFJ2jdtr+5U=", + "lastModified": 1774388614, + "narHash": "sha256-tFwzTI0DdDzovdE9+Ras6CUss0yn8P9XV4Ja6RjA+nU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "fabb8c9deee281e50b1065002c9828f2cf7b2239", + "rev": "1073dad219cb244572b74da2b20c7fe39cb3fa9e", "type": "github" }, "original": { @@ -914,11 +743,11 @@ }, "nixpkgs-stable_2": { "locked": { - "lastModified": 1772598333, - "narHash": "sha256-YaHht/C35INEX3DeJQNWjNaTcPjYmBwwjFJ2jdtr+5U=", + "lastModified": 1774388614, + "narHash": "sha256-tFwzTI0DdDzovdE9+Ras6CUss0yn8P9XV4Ja6RjA+nU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "fabb8c9deee281e50b1065002c9828f2cf7b2239", + "rev": "1073dad219cb244572b74da2b20c7fe39cb3fa9e", "type": "github" }, "original": { @@ -930,35 +759,20 @@ }, "nixpkgs_10": { "locked": { - "lastModified": 1768810879, - "narHash": "sha256-6RrqzfHu3e4vvRaDRY0muyl/BkFzCEPfwXmYY8iRjSw=", - "owner": "nixos", + "lastModified": 1774597904, + "narHash": "sha256-3lqVgn9FTxmYypvNX7PL5m8U89jD2darWa+3RomXsok=", + "owner": "NixOS", "repo": "nixpkgs", - "rev": "0ef1c5b62bec8b182affa76ff079d80a2ba026ba", + "rev": "c2e2c66a1bc800d99cb85b54a9b7a0bdd06432c5", "type": "github" }, "original": { - "owner": "nixos", + "owner": "NixOS", "repo": "nixpkgs", "type": "github" } }, "nixpkgs_11": { - "locked": { - "lastModified": 1772671111, - "narHash": "sha256-ftGqh2Ps1bjPUxGPoCOua3nKHY96IyFPvPjWthafre0=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "9f8880d06df2c55d66df71495620ae1a51b68097", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_12": { "locked": { "lastModified": 1766309749, "narHash": "sha256-3xY8CZ4rSnQ0NqGhMKAy5vgC+2IVK0NoVEzDoOh4DA4=", @@ -974,7 +788,7 @@ "type": "github" } }, - "nixpkgs_13": { + "nixpkgs_12": { "locked": { "lastModified": 1769018530, "narHash": "sha256-MJ27Cy2NtBEV5tsK+YraYr2g851f3Fl1LpNHDzDX15c=", @@ -990,7 +804,7 @@ "type": "github" } }, - "nixpkgs_14": { + "nixpkgs_13": { "locked": { "lastModified": 1766651565, "narHash": "sha256-QEhk0eXgyIqTpJ/ehZKg9IKS7EtlWxF3N7DXy42zPfU=", @@ -1023,22 +837,6 @@ } }, "nixpkgs_3": { - "locked": { - "lastModified": 1766070988, - "narHash": "sha256-G/WVghka6c4bAzMhTwT2vjLccg/awmHkdKSd2JrycLc=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "c6245e83d836d0433170a16eb185cefe0572f8b8", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_4": { "locked": { "lastModified": 1746397377, "narHash": "sha256-5oLdRa3vWSRbuqPIFFmQBGGUqaYZBxX+GGtN9f/n4lU=", @@ -1054,29 +852,26 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_4": { "locked": { - "lastModified": 1745930157, - "narHash": "sha256-y3h3NLnzRSiUkYpnfvnS669zWZLoqqI6NprtLQ+5dck=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "46e634be05ce9dc6d4db8e664515ba10b78151ae", - "type": "github" + "lastModified": 1773282481, + "narHash": "sha256-oFe06TmOy8UUT1f7xMHqDpSYq2Fy1mkIsXZUvdnyfeY=", + "rev": "fe416aaedd397cacb33a610b33d60ff2b431b127", + "type": "tarball", + "url": "https://releases.nixos.org/nixos/unstable/nixos-26.05pre962285.fe416aaedd39/nixexprs.tar.xz?lastModified=1773282481&rev=fe416aaedd397cacb33a610b33d60ff2b431b127" }, "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" + "type": "tarball", + "url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz" } }, - "nixpkgs_6": { + "nixpkgs_5": { "locked": { - "lastModified": 1748217807, - "narHash": "sha256-P3u2PXxMlo49PutQLnk2PhI/imC69hFl1yY4aT5Nax8=", + "lastModified": 1774078191, + "narHash": "sha256-nyxxxW1/2ouu9dU0I02ul5pHrmUrE1JVFhfFlmYe3Lw=", "owner": "nixos", "repo": "nixpkgs", - "rev": "3108eaa516ae22c2360928589731a4f1581526ef", + "rev": "09061f748ee21f68a089cd5d91ec1859cd93d0be", "type": "github" }, "original": { @@ -1086,13 +881,13 @@ "type": "github" } }, - "nixpkgs_7": { + "nixpkgs_6": { "locked": { - "lastModified": 1772542754, - "narHash": "sha256-WGV2hy+VIeQsYXpsLjdr4GvHv5eECMISX1zKLTedhdg=", + "lastModified": 1774386573, + "narHash": "sha256-4hAV26quOxdC6iyG7kYaZcM3VOskcPUrdCQd/nx8obc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8c809a146a140c5c8806f13399592dbcb1bb5dc4", + "rev": "46db2e09e1d3f113a13c0d7b81e2f221c63b8ce9", "type": "github" }, "original": { @@ -1102,7 +897,7 @@ "type": "github" } }, - "nixpkgs_8": { + "nixpkgs_7": { "locked": { "lastModified": 1752077645, "narHash": "sha256-HM791ZQtXV93xtCY+ZxG1REzhQenSQO020cu6rHtAPk=", @@ -1118,13 +913,13 @@ "type": "github" } }, - "nixpkgs_9": { + "nixpkgs_8": { "locked": { - "lastModified": 1772198003, - "narHash": "sha256-I45esRSssFtJ8p/gLHUZ1OUaaTaVLluNkABkk6arQwE=", + "lastModified": 1773821835, + "narHash": "sha256-TJ3lSQtW0E2JrznGVm8hOQGVpXjJyXY2guAxku2O9A4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "dd9b079222d43e1943b6ebd802f04fd959dc8e61", + "rev": "b40629efe5d6ec48dd1efba650c797ddbd39ace0", "type": "github" }, "original": { @@ -1134,6 +929,21 @@ "type": "github" } }, + "nixpkgs_9": { + "locked": { + "lastModified": 1768810879, + "narHash": "sha256-6RrqzfHu3e4vvRaDRY0muyl/BkFzCEPfwXmYY8iRjSw=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "0ef1c5b62bec8b182affa76ff079d80a2ba026ba", + "type": "github" + }, + "original": { + "owner": "nixos", + "repo": "nixpkgs", + "type": "github" + } + }, "qstn": { "inputs": { "nixpkgs": [ @@ -1154,6 +964,26 @@ "url": "https://git.lobotomise.me/atagen/qstn" } }, + "qtengine": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1772766331, + "narHash": "sha256-aJ5ZdIX10nmhzMLjP6QMuFJHvljJD+xcojuKZjPkr70=", + "owner": "kossLAN", + "repo": "qtengine", + "rev": "abf8c1d3068dd10739b0671fa62f96c5347f276f", + "type": "github" + }, + "original": { + "owner": "kossLAN", + "repo": "qtengine", + "type": "github" + } + }, "root": { "inputs": { "__flake-compat": "__flake-compat", @@ -1162,10 +992,8 @@ "bunker": "bunker", "culr": "culr", "helium": "helium", - "hjem": "hjem", - "hjem-rum": "hjem-rum", "hudcore": "hudcore", - "jay-src": "jay-src", + "inshellah": "inshellah", "meat": "meat", "nil": "nil", "niri": "niri", @@ -1175,32 +1003,32 @@ "nix-rice": "nix-rice", "nix-scope-plugin": "nix-scope-plugin", "nix-shorturl-plugin": "nix-shorturl-plugin", - "nixpkgs": "nixpkgs_11", + "nixpkgs": "nixpkgs_10", "nixpkgs-stable": "nixpkgs-stable_2", "qstn": "qstn", + "qtengine": "qtengine", "run0-shim": "run0-shim", "stash": "stash", "stasis": "stasis", "tuigreet": "tuigreet", + "wry": "wry", "yoke": "yoke" } }, "run0-shim": { "inputs": { - "flake-utils": "flake-utils", "nix-github-actions": "nix-github-actions", "nixpkgs": [ "nixpkgs" ], - "rust-overlay": "rust-overlay_3", - "treefmt-nix": "treefmt-nix_3" + "treefmt-nix": "treefmt-nix_2" }, "locked": { - "lastModified": 1769894065, - "narHash": "sha256-u8hioiUsIxUsjHhgA59ADaYWKNf5PcFAlY6/T0G1JtE=", + "lastModified": 1774550565, + "narHash": "sha256-5MLZTT9UDFJeOrtp+VKEkWSwLsx0ZMHkuPlcLPFoxlE=", "owner": "lordgrimmauld", "repo": "run0-sudo-shim", - "rev": "8b2946a8c150766648ec89d5df780822b888775e", + "rev": "ef368ac5a90d0cc1977deae10f4cf7373c36786c", "type": "github" }, "original": { @@ -1226,130 +1054,17 @@ "type": "github" } }, - "rust-overlay": { - "inputs": { - "nixpkgs": [ - "hjem", - "smfh", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1771125043, - "narHash": "sha256-ldf/s49n6rOAxl7pYLJGGS1N/assoHkCOWdEdLyNZkc=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "4912f951a26dc8142b176be2c2ad834319dc06e8", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, - "rust-overlay_2": { - "inputs": { - "nixpkgs": [ - "hjem-rum", - "hjem", - "smfh", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1747622321, - "narHash": "sha256-W0dYIWgsUu6rvOJRtKLhKskkv0VhQhJYGNIq+gGUc8g=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "bd030fd9983f7fddf87be1c64aa3064c8afa24c4", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, - "rust-overlay_3": { - "inputs": { - "nixpkgs": [ - "run0-shim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1766371695, - "narHash": "sha256-W7CX9vy7H2Jj3E8NI4djHyF8iHSxKpb2c/7uNQ/vGFU=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "d81285ba8199b00dc31847258cae3c655b605e8c", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, - "smfh": { - "inputs": { - "nixpkgs": [ - "hjem", - "nixpkgs" - ], - "rust-overlay": "rust-overlay", - "systems": "systems_2" - }, - "locked": { - "lastModified": 1771208268, - "narHash": "sha256-6zMgOPzBbTSm8jzPqmGcotjvkN3HzxcnMM8pW64JpZQ=", - "owner": "feel-co", - "repo": "smfh", - "rev": "dd0a33fc9d1fe7c29da86225af4b4a47b1714839", - "type": "github" - }, - "original": { - "owner": "feel-co", - "repo": "smfh", - "type": "github" - } - }, - "smfh_2": { - "inputs": { - "nixpkgs": [ - "hjem-rum", - "hjem", - "nixpkgs" - ], - "rust-overlay": "rust-overlay_2", - "systems": "systems_3" - }, - "locked": { - "lastModified": 1749906619, - "narHash": "sha256-/9Ww10kYopxfCNNnNDwENTubs7Wzqlw+O6PJAHNOYQw=", - "owner": "feel-co", - "repo": "smfh", - "rev": "39f5c06153f63100376bc607b1465850b6df77fd", - "type": "github" - }, - "original": { - "owner": "feel-co", - "repo": "smfh", - "type": "github" - } - }, "stash": { "inputs": { "crane": "crane", - "nixpkgs": "nixpkgs_12" + "nixpkgs": "nixpkgs_11" }, "locked": { - "lastModified": 1772183710, - "narHash": "sha256-ojaPFnfWFRUi4Nc69T+ObdZ3Bxf62T3bv49qqV+wgHw=", + "lastModified": 1775243632, + "narHash": "sha256-aN31z1Pf0Aaz1r0PgtHFYBBM3QFDtnd7hiL7xGGpQLM=", "owner": "notashelf", "repo": "stash", - "rev": "181edcefb1fb38bbd1ca306e91ba493bcf4014d9", + "rev": "f139bda7b296e66998cc3077026cf18abfc9709d", "type": "github" }, "original": { @@ -1360,15 +1075,15 @@ }, "stasis": { "inputs": { - "flake-parts": "flake-parts_4", - "nixpkgs": "nixpkgs_13" + "flake-parts": "flake-parts_3", + "nixpkgs": "nixpkgs_12" }, "locked": { - "lastModified": 1772661948, - "narHash": "sha256-YNwi8tvrLkfmPd+4Sofk00Ev44qJReDTLV+VHpODy0U=", + "lastModified": 1774290684, + "narHash": "sha256-1EsUpXEqL1bV3M1QiLFieynYqVpQY+vkqB98R6M0pIk=", "owner": "saltnpepper97", "repo": "stasis", - "rev": "043880f89ec3f7def5c92d7a6f2e32967dd7a9f2", + "rev": "1375c3afd6941fa874a5666974feecdf6644e55f", "type": "github" }, "original": { @@ -1394,16 +1109,16 @@ }, "systems_2": { "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", "type": "github" }, "original": { "owner": "nix-systems", - "repo": "default", + "repo": "default-linux", "type": "github" } }, @@ -1437,51 +1152,6 @@ "type": "github" } }, - "systems_5": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_6": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_7": { - "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", - "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default-linux", - "type": "github" - } - }, "treefmt-nix": { "inputs": { "nixpkgs": [ @@ -1490,11 +1160,11 @@ ] }, "locked": { - "lastModified": 1770228511, - "narHash": "sha256-wQ6NJSuFqAEmIg2VMnLdCnUc0b7vslUohqqGGD+Fyxk=", + "lastModified": 1773297127, + "narHash": "sha256-6E/yhXP7Oy/NbXtf1ktzmU8SdVqJQ09HC/48ebEGBpk=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "337a4fe074be1042a35086f15481d763b8ddc0e7", + "rev": "71b125cd05fbfd78cab3e070b73544abe24c5016", "type": "github" }, "original": { @@ -1504,27 +1174,6 @@ } }, "treefmt-nix_2": { - "inputs": { - "nixpkgs": [ - "hjem-rum", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1746216483, - "narHash": "sha256-4h3s1L/kKqt3gMDcVfN8/4v2jqHrgLIe4qok4ApH5x4=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "29ec5026372e0dec56f890e50dbe4f45930320fd", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" - } - }, - "treefmt-nix_3": { "inputs": { "nixpkgs": [ "run0-shim", @@ -1532,11 +1181,11 @@ ] }, "locked": { - "lastModified": 1766000401, - "narHash": "sha256-+cqN4PJz9y0JQXfAK5J1drd0U05D5fcAGhzhfVrDlsI=", + "lastModified": 1773297127, + "narHash": "sha256-6E/yhXP7Oy/NbXtf1ktzmU8SdVqJQ09HC/48ebEGBpk=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "42d96e75aa56a3f70cab7e7dc4a32868db28e8fd", + "rev": "71b125cd05fbfd78cab3e070b73544abe24c5016", "type": "github" }, "original": { @@ -1547,33 +1196,34 @@ }, "tuigreet": { "inputs": { - "nixpkgs": "nixpkgs_14" + "nixpkgs": "nixpkgs_13" }, "locked": { - "lastModified": 1771455425, - "narHash": "sha256-vaiq9NaaXM4oNIXxcff3EXp3T2Mu3OLxFyFK+el4BZs=", + "lastModified": 1772641147, + "narHash": "sha256-ejqi9ujkralaPmvC3xY99NnhajNAyjPg3Nf72asKQno=", "owner": "notashelf", "repo": "tuigreet", - "rev": "b05e1c335cc79881b3c4822f8c8192c38efb2d80", + "rev": "fa44a85b65fb86984cb17de05208b46d1bd1b407", "type": "github" }, "original": { "owner": "notashelf", "repo": "tuigreet", + "rev": "fa44a85b65fb86984cb17de05208b46d1bd1b407", "type": "github" } }, "unf": { "inputs": { - "ndg": "ndg_2", - "nixpkgs": "nixpkgs_6" + "ndg": "ndg", + "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1748163740, - "narHash": "sha256-WOK9w5gtdpy4RefaiRtr6YqFaPxR0OrmI2PleZnn4O4=", + "lastModified": 1760178630, + "narHash": "sha256-oxRMTQtzIO1yFRhY++Ss8+ea1cTH40bD/+FAE+m5NFk=", "ref": "refs/heads/main", - "rev": "4d711e5002bd22adbe6d786560be0fde6cbcf81e", - "revCount": 1, + "rev": "8a6aa536039f1b207888b1369c5cabf0b131e07b", + "revCount": 5, "type": "git", "url": "https://git.atagen.co/atagen/unf" }, @@ -1582,6 +1232,26 @@ "url": "https://git.atagen.co/atagen/unf" } }, + "wry": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1775563304, + "narHash": "sha256-+2lylj1Aw6tFCH9w6Ua+jcYTAPU3Btx8giV0tySdIw4=", + "ref": "refs/heads/master", + "rev": "7aea0095e991a7b5b52e6109ee79a9deb8550d7b", + "revCount": 2084, + "type": "git", + "url": "ssh://git@git.kosslan.dev/wry/jay" + }, + "original": { + "type": "git", + "url": "ssh://git@git.kosslan.dev/wry/jay" + } + }, "xwayland-satellite-stable": { "flake": false, "locked": { @@ -1602,11 +1272,11 @@ "xwayland-satellite-unstable": { "flake": false, "locked": { - "lastModified": 1772429643, - "narHash": "sha256-M+bAeCCcjBnVk6w/4dIVvXvpJwOKnXjwi/lDbaN6Yws=", + "lastModified": 1773622265, + "narHash": "sha256-wToKwH7IgWdGLMSIWksEDs4eumR6UbbsuPQ42r0oTXQ=", "owner": "Supreeeme", "repo": "xwayland-satellite", - "rev": "10f985b84cdbcc3bbf35b3e7e43d1b2a84fa9ce2", + "rev": "a879e5e0896a326adc79c474bf457b8b99011027", "type": "github" }, "original": { @@ -1620,7 +1290,7 @@ "nixpkgs": [ "nixpkgs" ], - "systems": "systems_7" + "systems": "systems_4" }, "locked": { "lastModified": 1772106982, diff --git a/flake.nix b/flake.nix index d90c890..a28f94d 100644 --- a/flake.nix +++ b/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"; + }; }; diff --git a/graphical/apps-meta.nix b/graphical/apps-meta.nix index 9ee0599..8c8972d 100644 --- a/graphical/apps-meta.nix +++ b/graphical/apps-meta.nix @@ -9,5 +9,5 @@ type = lib.types.attrsOf lib.types.package; default = { }; }; - config.user.packages = getPkgs config.apps; + config.environment.systemPackages = getPkgs config.apps; } diff --git a/graphical/audio-control.nix b/graphical/audio-control.nix index 93f429b..e09e6cf 100644 --- a/graphical/audio-control.nix +++ b/graphical/audio-control.nix @@ -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"}"; } diff --git a/graphical/binds.nix b/graphical/binds.nix index bcf478b..4ad2f31 100644 --- a/graphical/binds.nix +++ b/graphical/binds.nix @@ -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"; diff --git a/graphical/boot.nix b/graphical/boot.nix index 05048c8..426f030 100644 --- a/graphical/boot.nix +++ b/graphical/boot.nix @@ -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; }; diff --git a/graphical/browser.nix b/graphical/browser.nix index 680ef68..809c439 100644 --- a/graphical/browser.nix +++ b/graphical/browser.nix @@ -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 ( diff --git a/graphical/chat.nix b/graphical/chat.nix index bcabadd..067e109 100644 --- a/graphical/chat.nix +++ b/graphical/chat.nix @@ -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"; diff --git a/graphical/desktop/jay.nix b/graphical/desktop/jay.nix deleted file mode 100644 index 3428a67..0000000 --- a/graphical/desktop/jay.nix +++ /dev/null @@ -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 - ''; - }; - }; -} diff --git a/graphical/desktop/quickshell/launcher/Launcher.qml b/graphical/desktop/quickshell/launcher/Launcher.qml index aa4b047..a7febf8 100644 --- a/graphical/desktop/quickshell/launcher/Launcher.qml +++ b/graphical/desktop/quickshell/launcher/Launcher.qml @@ -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; } diff --git a/graphical/desktop/quickshell/logout/Logout.qml b/graphical/desktop/quickshell/logout/Logout.qml index 0f268de..87338bf 100644 --- a/graphical/desktop/quickshell/logout/Logout.qml +++ b/graphical/desktop/quickshell/logout/Logout.qml @@ -136,7 +136,6 @@ Singleton { verticalCenter: parent.verticalCenter } width: parent.width / 3 * 2 - height: parent.height / 6 * 5 Repeater { model: topLevel.buttons.length Button { diff --git a/graphical/desktop/quickshell/noti/Noti.qml b/graphical/desktop/quickshell/noti/Noti.qml index 81127ff..5c7533b 100644 --- a/graphical/desktop/quickshell/noti/Noti.qml +++ b/graphical/desktop/quickshell/noti/Noti.qml @@ -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 + } + } + } } } } diff --git a/graphical/desktop/quickshell/noti/NotiCard.qml b/graphical/desktop/quickshell/noti/NotiCard.qml new file mode 100644 index 0000000..35bcf2c --- /dev/null +++ b/graphical/desktop/quickshell/noti/NotiCard.qml @@ -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() + } + } + } + } + } +} diff --git a/graphical/desktop/quickshell/osd/Osd.qml b/graphical/desktop/quickshell/osd/Osd.qml new file mode 100644 index 0000000..a87c7db --- /dev/null +++ b/graphical/desktop/quickshell/osd/Osd.qml @@ -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 } } + } + } + } + } + } + } +} diff --git a/graphical/desktop/quickshell/rice/Colours.qml b/graphical/desktop/quickshell/rice/Colours.qml deleted file mode 100644 index f0cd711..0000000 --- a/graphical/desktop/quickshell/rice/Colours.qml +++ /dev/null @@ -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", - - } -} diff --git a/graphical/desktop/quickshell/rice/Colours.qml b/graphical/desktop/quickshell/rice/Colours.qml new file mode 120000 index 0000000..22f5075 --- /dev/null +++ b/graphical/desktop/quickshell/rice/Colours.qml @@ -0,0 +1 @@ +/nix/store/bc2v8k5620k5p57ggrxy6i5w6pay9kis-Colours.qml \ No newline at end of file diff --git a/graphical/desktop/quickshell/shell.qml b/graphical/desktop/quickshell/shell.qml index 0140974..6f92dbf 100644 --- a/graphical/desktop/quickshell/shell.qml +++ b/graphical/desktop/quickshell/shell.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" } } + } diff --git a/graphical/desktop/shell.nix b/graphical/desktop/shell.nix index 2aa8888..1ce000d 100644 --- a/graphical/desktop/shell.nix +++ b/graphical/desktop/shell.nix @@ -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; + }; } diff --git a/graphical/desktop/wm.nix b/graphical/desktop/wm.nix index 12013cf..108860a 100644 --- a/graphical/desktop/wm.nix +++ b/graphical/desktop/wm.nix @@ -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" ]; diff --git a/graphical/desktop/wry.nix b/graphical/desktop/wry.nix new file mode 100644 index 0000000..92bc4cc --- /dev/null +++ b/graphical/desktop/wry.nix @@ -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 + ''; + }; + }; + }; +} diff --git a/graphical/dev.nix b/graphical/dev.nix index d5ab93c..9ea45d2 100644 --- a/graphical/dev.nix +++ b/graphical/dev.nix @@ -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 + ]; } diff --git a/graphical/documents.nix b/graphical/documents.nix index 0a50ede..2286e67 100644 --- a/graphical/documents.nix +++ b/graphical/documents.nix @@ -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; } diff --git a/graphical/kernel.nix b/graphical/kernel.nix index 04d787c..28ffb91 100644 --- a/graphical/kernel.nix +++ b/graphical/kernel.nix @@ -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"; }; - } diff --git a/graphical/llm.nix b/graphical/llm.nix index 2dfe01c..7e678a0 100644 --- a/graphical/llm.nix +++ b/graphical/llm.nix @@ -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 diff --git a/graphical/media.nix b/graphical/media.nix index 1bdb213..1a4a545 100644 --- a/graphical/media.nix +++ b/graphical/media.nix @@ -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; }) diff --git a/graphical/network.nix b/graphical/network.nix index 376eef6..5673794 100644 --- a/graphical/network.nix +++ b/graphical/network.nix @@ -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; diff --git a/graphical/password-manager.nix b/graphical/password-manager.nix index 5b3d10e..553e7b0 100644 --- a/graphical/password-manager.nix +++ b/graphical/password-manager.nix @@ -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; }; } diff --git a/graphical/platform-themes.nix b/graphical/platform-themes.nix index a9091dc..f2a3b06 100644 --- a/graphical/platform-themes.nix +++ b/graphical/platform-themes.nix @@ -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"; + }; + }; + } + ]; + }; } diff --git a/graphical/qt-color.template b/graphical/qt-color.template new file mode 100644 index 0000000..df87a11 --- /dev/null +++ b/graphical/qt-color.template @@ -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@ diff --git a/graphical/quick-services.nix b/graphical/quick-services.nix index 89862e3..a916997 100644 --- a/graphical/quick-services.nix +++ b/graphical/quick-services.nix @@ -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"; diff --git a/graphical/rice.nix b/graphical/rice.nix index 56cb013..abc353f 100644 --- a/graphical/rice.nix +++ b/graphical/rice.nix @@ -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 = { diff --git a/graphical/terminal.nix b/graphical/terminal.nix index 49e2c1c..eefd6ce 100644 --- a/graphical/terminal.nix +++ b/graphical/terminal.nix @@ -25,7 +25,7 @@ notify = true; visual = true; }; - colors = + colors-dark = let pal = config.rice.palette.shortHex; in diff --git a/hosts/adrift/kernel.nix b/hosts/adrift/kernel.nix new file mode 100644 index 0000000..856c5ff --- /dev/null +++ b/hosts/adrift/kernel.nix @@ -0,0 +1,4 @@ +{ pkgs, ... }: +{ + boot.kernelPackages = pkgs.linuxKernel.packages.linux_xanmod; +} diff --git a/hosts/adrift/media.nix b/hosts/adrift/media.nix index 2696a4b..ccd3644 100644 --- a/hosts/adrift/media.nix +++ b/hosts/adrift/media.nix @@ -4,5 +4,5 @@ # nixpkgs.config.permittedInsecurePackages = [ # "qtwebengine-5.15.19" # ]; - user.packages = [ pkgs.brightnessctl ]; + environment.systemPackages = [ pkgs.brightnessctl ]; } diff --git a/hosts/quiver/boot.nix b/hosts/quiver/boot.nix index 59bcc29..580d76c 100644 --- a/hosts/quiver/boot.nix +++ b/hosts/quiver/boot.nix @@ -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" diff --git a/hosts/quiver/extra-niri.nix b/hosts/quiver/extra-niri.nix index 917313c..b38370e 100644 --- a/hosts/quiver/extra-niri.nix +++ b/hosts/quiver/extra-niri.nix @@ -1,3 +1,3 @@ _: { - user.desktops.niri.config = builtins.readFile ./extra-niri.kdl; + niri.extraConfig = builtins.readFile ./extra-niri.kdl; } diff --git a/hosts/quiver/hw.nix b/hosts/quiver/hw.nix index 38e57be..e6b3340 100644 --- a/hosts/quiver/hw.nix +++ b/hosts/quiver/hw.nix @@ -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; diff --git a/hosts/quiver/input.nix b/hosts/quiver/input.nix index 9157535..407717c 100644 --- a/hosts/quiver/input.nix +++ b/hosts/quiver/input.nix @@ -14,8 +14,4 @@ in accelProfile = "flat"; accelSpeed = 0.0; }; - - quick.services = { - ckb-next.cmd = "${lib.getExe ckb-next} -c -b"; - }; } diff --git a/hosts/quiver/kernel.nix b/hosts/quiver/kernel.nix new file mode 100644 index 0000000..58554e8 --- /dev/null +++ b/hosts/quiver/kernel.nix @@ -0,0 +1,14 @@ +{ inputs, ... }: +{ + imports = [ + inputs.bunker.nixosModules.default + ]; + + bunker.kernel = { + enable = true; + cpuArch = "MZEN3"; + version = "6.19"; + hardened = false; + lto = "none"; + }; +} diff --git a/lib/create.nix b/lib/create.nix index 73880dc..eae2f9c 100644 --- a/lib/create.nix +++ b/lib/create.nix @@ -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); }