diff --git a/common/auth.nix b/common/auth.nix new file mode 100644 index 0000000..db97c36 --- /dev/null +++ b/common/auth.nix @@ -0,0 +1,41 @@ +{ + lib, + inputs, + getFlakePkg, + ... +}: +{ + environment.shellAliases = { + #make run0 use aliases + run0 = "run0 --background='' "; + s = "run0"; + }; + services.dbus.implementation = "broker"; + security = { + sudo.enable = false; + polkit = { + enable = true; + extraConfig = '' + polkit.addRule(function(action, subject) { + if (action.id == "org.freedesktop.policykit.exec") { + return polkit.Result.AUTH_ADMIN_KEEP; + } + }); + + polkit.addRule(function(action, subject) { + if (action.id.indexOf("org.freedesktop.systemd1.") == 0) { + return polkit.Result.AUTH_ADMIN_KEEP; + } + }); + ''; + }; + }; + environment.etc."polkit-1/polkitd.conf".text = '' + [Polkitd] + ExpirationSeconds=60 + ''; + imports = [ inputs.run0-shim.nixosModules.default ]; + environment.systemPackages = [ (getFlakePkg inputs.run0-shim) ]; + security.soteria.enable = true; + systemd.user.services.niri-flake-polkit = lib.mkForce { }; +} diff --git a/common/binfmts.nix b/common/binfmts.nix index 640b65e..116225e 100644 --- a/common/binfmts.nix +++ b/common/binfmts.nix @@ -1 +1 @@ -{ inputs, ... }: scope "imports" <| [ inputs.qstn.nixosModules.default ] +{ inputs, scope, ... }: scope "imports" <| [ inputs.qstn.nixosModules.default ] diff --git a/common/editor-theme.nix b/common/editor-theme.nix index 8377070..e6f4c8e 100644 --- a/common/editor-theme.nix +++ b/common/editor-theme.nix @@ -1,5 +1,6 @@ { config, + scope, ... }: with config.rice.palette.hex; diff --git a/common/editor.nix b/common/editor.nix index 5bb42dc..3119aa3 100644 --- a/common/editor.nix +++ b/common/editor.nix @@ -1,11 +1,12 @@ { - pkgs, - lib, + inputs, + scope, + getFlakePkg, ... }: -(scope "apps.editor" <| pkgs.helix) -// scope "user.programs.helix" { +scope "user.programs.helix" { enable = true; + # package = getFlakePkg inputs.helix; settings = { theme = "nix-rice"; editor = { @@ -13,9 +14,9 @@ cursorline = true; true-color = true; cursor-shape = { - insert = "block"; + insert = "bar"; normal = "block"; - select = "block"; + select = "underline"; }; statusline.left = [ "mode" diff --git a/common/nix/nixpkgs.nix b/common/nix/nixpkgs.nix index 6fecf22..4506b9a 100644 --- a/common/nix/nixpkgs.nix +++ b/common/nix/nixpkgs.nix @@ -1,6 +1,7 @@ { inputs, lib, + scope, ... }: scope "nixpkgs" { diff --git a/common/nix/plugins.nix b/common/nix/plugins.nix deleted file mode 100644 index b1d91c5..0000000 --- a/common/nix/plugins.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ - inputs, - getFlakePkg, - ... -}: -{ - nix.settings.plugin-files = [ - "${getFlakePkg inputs.nix-scope-plugin}/lib/nix/plugins/libnix-scope-plugin.so" - ]; - imports = [ inputs.nix-shorturl-plugin.nixosModules.default ]; - nix.shorturls = { - enable = true; - schemes = { - atagen = "git+https://git.lobotomise.me/atagen/{path}"; - amaan = "github:amaanq/{path}"; - }; - }; -} diff --git a/common/nix/settings.nix b/common/nix/settings.nix index ec23e6e..5b1902d 100644 --- a/common/nix/settings.nix +++ b/common/nix/settings.nix @@ -17,6 +17,7 @@ extraOptions = '' keep-outputs = true keep-derivations = true + allow-import-from-derivation = false ''; optimise.automatic = true; }; diff --git a/common/nix/substituters.nix b/common/nix/substituters.nix index 9ccde0e..28b2139 100644 --- a/common/nix/substituters.nix +++ b/common/nix/substituters.nix @@ -1,4 +1,5 @@ { + scope, ... }: scope "nix.settings" { @@ -10,7 +11,6 @@ scope "nix.settings" { # "https://cache.privatevoid.net" "https://cache.flox.dev" "https://cache.amaanq.com" - "https://cache.nixos-cuda.org" ]; trusted-public-keys = [ "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" @@ -19,7 +19,6 @@ 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.nixos-cuda.org:74DUi4Ye579gUqzH4ziL9IyiJBlDpMRn9MBN8oNan9M=" + "cache.amaanq.com:3qm0ZOxlHr7UQqj0G3MKlAn1votV9/3KjHGU2GQ9rEM=" ]; } diff --git a/common/nix/tools.nix b/common/nix/tools.nix index 776148a..e9c269c 100644 --- a/common/nix/tools.nix +++ b/common/nix/tools.nix @@ -1,15 +1,19 @@ { pkgs, inputs, + getPkgs, getFlakePkg, ... }: { - environment.systemPackages = [ - pkgs.nixfmt - (getFlakePkg inputs.yoke) - (getFlakePkg inputs.nil) - ]; + environment.systemPackages = + getPkgs { + inherit (pkgs) + nixfmt + nil + ; + } + ++ [ (getFlakePkg inputs.yoke) ]; imports = [ inputs.nix-index-database.nixosModules.nix-index ]; diff --git a/common/security.nix b/common/security.nix deleted file mode 100644 index ea76c0d..0000000 --- a/common/security.nix +++ /dev/null @@ -1,51 +0,0 @@ -{ - lib, - inputs, - getFlakePkg, - ... -}: -{ - imports = [ - inputs.run0-shim.nixosModules.default - inputs.yoke.nixosModules.default - ]; - environment.shellAliases = { - #make run0 use aliases - run0 = "run0 --background='' "; - s = "run0"; - }; - services.dbus.implementation = "broker"; - security = { - sudo.enable = false; - polkit = { - enable = true; - extraConfig = '' - polkit.addRule(function(action, subject) { - if (action.id == "org.freedesktop.policykit.exec" || - action.id.indexOf("org.freedesktop.systemd1.") == 0) { - return polkit.Result.AUTH_ADMIN_KEEP; - } - }); - ''; - }; - }; - environment.systemPackages = [ (getFlakePkg inputs.run0-shim) ]; - security.soteria.enable = true; - systemd.user.services.polkit-soteria = { - after = [ "dbus.socket" ]; - requires = [ "dbus.socket" ]; - serviceConfig = { - Environment = [ - "DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%U/bus" - ]; - # RestartSec = 3; - }; - unitConfig = { - StartLimitIntervalSec = 30; - StartLimitBurst = 5; - }; - }; - # niri-flake is death - systemd.user.services.niri-flake-polkit = lib.mkForce { }; - services.gnome.gnome-keyring.enable = lib.mkForce false; -} diff --git a/common/systemd.nix b/common/systemd.nix index 67a768a..eeb770e 100644 --- a/common/systemd.nix +++ b/common/systemd.nix @@ -1,4 +1,4 @@ -{ ... }: +{ scope, ... }: scope "systemd" { services."user@".serviceConfig.Delegate = "memory pids cpu cpuset"; user.extraConfig = "LogLevel=debug"; diff --git a/common/terminal.nix b/common/terminal.nix index ce1c828..80c68fb 100644 --- a/common/terminal.nix +++ b/common/terminal.nix @@ -1,298 +1,78 @@ { lib, pkgs, - # inputs, - # getFlakePkg', - config, + inputs, + getFlakePkg', ... }: let - inherit (pkgs) nushell; - # init = - # let - # comma = lib.getExe' (getFlakePkg' inputs.nix-index-database "comma-with-db") "comma"; - # in - # '' - # function fish_greeting - # ${./rice/header.sh} - # echo "" - # end - # function fish_title - # set -q argv[1]; or set argv fish - # echo (fish_prompt_pwd_dir_length=100 prompt_pwd): $argv; - # end - # function fish_command_not_found - # ${comma} $argv - # end - # ''; - prompt = '' - do --env { - def prompt-header [ - --left-char: string - ]: nothing -> string { - let code = $env.LAST_EXIT_CODE - - let jj_workspace_root = try { - jj workspace root err>| ignore - } catch { - "" - } - - let hostname = if ($env.SSH_CONNECTION? | is-not-empty) { - let hostname = try { - hostname - } catch { - "remote" - } - - $"(ansi light_green_bold)@($hostname)(ansi reset) " - } else { - "" - } - - # https://github.com/nushell/nushell/issues/16205 - # - # Case insensitive filesystems strike again! - let pwd = pwd | path expand - - let body = if ($jj_workspace_root | is-not-empty) { - let subpath = $pwd | path relative-to $jj_workspace_root - let subpath = if ($subpath | is-not-empty) { - $"(ansi magenta_bold) → (ansi reset)(ansi blue)($subpath)" - } - - $"($hostname)(ansi light_yellow_bold)($jj_workspace_root | path basename)($subpath)(ansi reset)" - } else { - let pwd = if ($pwd | str starts-with $env.HOME) { - "~" | path join ($pwd | path relative-to $env.HOME) - } else { - $pwd - } - - $"($hostname)(ansi cyan)($pwd)(ansi reset)" - } - - let command_duration = ($env.CMD_DURATION_MS | into int) * 1ms - let command_duration = if $command_duration <= 2sec { - "" - } else { - $"┫(ansi light_magenta_bold)($command_duration)(ansi light_yellow_bold)┣━" - } - - let exit_code = if $code == 0 { - "" - } else { - $"┫(ansi light_red_bold)($code)(ansi light_yellow_bold)┣━" - } - - let middle = if $command_duration == "" and $exit_code == "" { - "━" - } else { - "" - } - - $"(ansi light_yellow_bold)($left_char)($exit_code)($middle)($command_duration)(ansi reset) ($body)(char newline)" - } - - $env.PROMPT_INDICATOR = $"(ansi light_yellow_bold)┃(ansi reset) " - $env.PROMPT_INDICATOR_VI_NORMAL = $env.PROMPT_INDICATOR - $env.PROMPT_INDICATOR_VI_INSERT = $env.PROMPT_INDICATOR - $env.PROMPT_MULTILINE_INDICATOR = $env.PROMPT_INDICATOR - $env.PROMPT_COMMAND = {|| - prompt-header --left-char "┏" - } - $env.PROMPT_COMMAND_RIGHT = {|| - let jj_status = try { - jj --quiet --color always --ignore-working-copy log --no-graph --revisions @ --template ' - separate( - " ", - if(empty, label("empty", "(empty)")), - coalesce( - surround( - "\"", - "\"", - if( - description.first_line().substr(0, 24).starts_with(description.first_line()), - description.first_line().substr(0, 24), - description.first_line().substr(0, 23) ++ "…" - ) - ), - label(if(empty, "empty"), description_placeholder) - ), - bookmarks.join(", "), - change_id.shortest(), - commit_id.shortest(), - if(conflict, label("conflict", "(conflict)")), - if(divergent, label("divergent prefix", "(divergent)")), - if(hidden, label("hidden prefix", "(hidden)")), - ) - ' err>| ignore - } catch { - "" - } - - $jj_status - } - } - ''; - aliases = { - "l" = "ls"; - "la" = "ls -a"; - "gco" = "git checkout"; - "gcb" = "git checkout -b"; - "gp" = "git push"; - "gpf" = "git push --force"; - "gl" = "git pull"; - "ga" = "git add"; - "gcam" = "git commit -am"; - "gcl" = "git clone"; - "gcd" = "git clone --depth 1"; - "lg" = "lazygit"; - ":q" = "exit"; - "fg" = "job unfreeze"; - "jobs" = "job list"; - }; - nuScriptsPath = "${pkgs.nu_scripts}/share/nu_scripts"; - nuConfig = pkgs.writeText "config.nu" '' - use std/config * - - ${lib.mapAttrsToList (n: v: "alias ${n} = ${v}") aliases |> lib.concatStringsSep "\n"} - $env.NU_LIB_DIRS = ( $env.NU_LIB_DIRS | append "${nuScriptsPath}") - - use ${nuScriptsPath}/modules/capture-foreign-env - source ${nuScriptsPath}/modules/formats/from-env.nu - - let nixos_env = ('source /etc/set-environment' | capture-foreign-env --shell bash) - if ($nixos_env | describe | str starts-with "record") { $nixos_env | load-env } - - source ${(pkgs.runCommand "zoxide.nu" { } ''${pkgs.zoxide}/bin/zoxide init nushell >> "$out"'')} - - - $env.config.buffer_editor = "${lib.getExe config.apps.editor}" - - def fresh [] { - clear - ${./rice/header.sh} - echo - } - - def gap [] { - git commit -a --amend --no-edit - 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 - }] - - # $cmd doesn't carry its args ? - # $env.config.hooks.command_not_found = { |cmd| , $cmd; echo } - - $env.config.table.mode = "none"; - $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} - - $env.config.show_banner = false - - fresh - - ''; + inherit (pkgs) fish nushell; in { - - user.xdg.config.files."nushell/config.nu".source = nuConfig; + imports = [ + inputs.culr.nixosModules.culr + ]; + programs.culr = { + enable = true; + pattern = "rainbow-split"; + }; + programs.fish = { + enable = true; + shellAbbrs = { + "gco" = "git checkout"; + "gcb" = "git checkout -b"; + "gp" = "git push"; + "gpf" = "git push --force"; + "gap" = "git commit -a --amend --no-edit && git push --force"; + "gl" = "git pull"; + "ga" = "git add"; + "gcam" = "git commit -am"; + "gcl" = "git clone"; + "gcd" = "git clone --depth 1"; + ":q" = "exit"; + }; + shellAliases = { + "l" = "eza -lg --icons=always --colour=always $argv | culr"; + "la" = "eza -lg --icons=always --colour=always $argv | culr"; + "p" = "ps $argv | culr"; + "mnt" = "mount | culr"; + "fresh" = "clear; ${./rice/header.sh}; echo"; + }; + interactiveShellInit = + let + comma = lib.getExe' (getFlakePkg' inputs.nix-index-database "comma-with-db") "comma"; + in + '' + function fish_greeting + ${./rice/header.sh} + echo "" + end + function fish_title + set -q argv[1]; or set argv fish + echo (fish_prompt_pwd_dir_length=100 prompt_pwd): $argv; + end + function fish_command_not_found + ${comma} $argv + end + ''; + }; programs.command-not-found.enable = false; - programs.zoxide.enable = true; - - environment.shellAliases = { + programs.zoxide = { + enable = true; + enableFishIntegration = true; }; environment.systemPackages = [ + fish nushell ]; environment.shells = [ + fish nushell ]; - users.defaultUserShell = nushell; + users.defaultUserShell = fish; console.font = "Lat2-Terminus16"; - environment.variables = { + environment.sessionVariables = { EDITOR = "hx"; }; diff --git a/flake.lock b/flake.lock index 31101de..df06467 100644 --- a/flake.lock +++ b/flake.lock @@ -25,11 +25,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1771605131, - "narHash": "sha256-9K3F2PSorw7cvqotXRLzz9wE29XfioMCtliFclkL/hM=", + "lastModified": 1771000778, + "narHash": "sha256-Co3VdFeXl7abbNGEHEkjS9raX6P3yhigu162Mg6DV14=", "owner": "linyinfeng", "repo": "angrr", - "rev": "11fee1e3089bdbc0fb144366bc62ee8a95d4628f", + "rev": "6bea47aa18c2fb33aa9a363e452c037228893453", "type": "github" }, "original": { @@ -55,11 +55,11 @@ }, "bunker": { "locked": { - "lastModified": 1772004723, - "narHash": "sha256-sTAQT6QejSY5PSJuoCRtPBAGo/wgWzglgaFqtHvv9KQ=", + "lastModified": 1771074280, + "narHash": "sha256-rLxr0/0BpGzVUxdnieSMicdDq6gUy013cxr+f7Y6xGc=", "owner": "amaanq", "repo": "bunker-patches", - "rev": "4f77ba4e6b2579290514dcdcbbb5577b64b027cb", + "rev": "f6d6745428c97a4ab4ae4055619c8bb1efffd12e", "type": "github" }, "original": { @@ -68,26 +68,9 @@ "type": "github" } }, - "crane": { - "locked": { - "lastModified": 1766194365, - "narHash": "sha256-4AFsUZ0kl6MXSm4BaQgItD0VGlEKR3iq7gIaL7TjBvc=", - "owner": "ipetkov", - "repo": "crane", - "rev": "7d8ec2c71771937ab99790b45e6d9b93d15d9379", - "type": "github" - }, - "original": { - "owner": "ipetkov", - "repo": "crane", - "type": "github" - } - }, "culr": { "inputs": { - "nixpkgs": [ - "nixpkgs" - ], + "nixpkgs": "nixpkgs_2", "systems": "systems" }, "locked": { @@ -315,21 +298,22 @@ "type": "github" } }, - "helium": { + "helix": { "inputs": { - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs_3", + "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1771320802, - "narHash": "sha256-fVwjjcxivStYGSLOYJxtEISKXv/8/TxZI4EB+wqPBpc=", - "owner": "amaanq", - "repo": "helium-flake", - "rev": "e8c651bc6b16925b1f5ede3ca2e206f22d0eb96c", + "lastModified": 1771001199, + "narHash": "sha256-q/ZyGZIfALlPW3AxZMjfsT01daTU232JGNVkQ/eiFsE=", + "owner": "helix-editor", + "repo": "helix", + "rev": "d12a48a51e2409e876a18baf3cae1e838a9dddc3", "type": "github" }, "original": { - "owner": "amaanq", - "repo": "helium-flake", + "owner": "helix-editor", + "repo": "helix", "type": "github" } }, @@ -342,11 +326,11 @@ "smfh": "smfh" }, "locked": { - "lastModified": 1771212460, - "narHash": "sha256-1RfmXbDIxgwP2/SrYSYd9zdArUaJEm6C3FXpdRlmeso=", + "lastModified": 1769053318, + "narHash": "sha256-cKETEBrseo7Iz+bOzflwy1xTpDuUj3QaLA+P49yJw8k=", "owner": "feel-co", "repo": "hjem", - "rev": "7f2880d705edf541955d98f56cb78f9507384423", + "rev": "9d0c8d4b44f661910595b07e6480557644c1431c", "type": "github" }, "original": { @@ -365,11 +349,11 @@ "treefmt-nix": "treefmt-nix_2" }, "locked": { - "lastModified": 1771501078, - "narHash": "sha256-Z2bux6QPs4lBzdiw5NdgPqk+BPF1H4lEu3C68ID7bYg=", + "lastModified": 1766394058, + "narHash": "sha256-P+59TbVusYqdx2Jt2liwvQ+hslUzU6M1ezRDy6c66Tc=", "owner": "snugnug", "repo": "hjem-rum", - "rev": "57175e2f6ab7caf212dd985ef810ec1cd9abf755", + "rev": "edac54b7d57ad72cc4b124da2f44e7b2e584f3c6", "type": "github" }, "original": { @@ -400,25 +384,6 @@ "type": "github" } }, - "hudcore": { - "inputs": { - "nix-systems": "nix-systems", - "nixpkgs": "nixpkgs_4" - }, - "locked": { - "lastModified": 1771203193, - "narHash": "sha256-4x61Pk3b78cifs5CA3M2VHJRpUEgktI8DeKuQ1ybbsw=", - "ref": "refs/heads/main", - "rev": "588ff16cb8855e02c84fdbe32b577c6421f704d1", - "revCount": 2, - "type": "git", - "url": "https://git.lobotomise.me/atagen/hudcore-plymouth" - }, - "original": { - "type": "git", - "url": "https://git.lobotomise.me/atagen/hudcore-plymouth" - } - }, "kitty-themes-src": { "flake": false, "locked": { @@ -437,10 +402,8 @@ }, "meat": { "inputs": { - "nix-systems": "nix-systems_2", - "nixpkgs": [ - "nixpkgs" - ], + "nix-systems": "nix-systems", + "nixpkgs": "nixpkgs_5", "unf": "unf" }, "locked": { @@ -460,7 +423,7 @@ "naersk": { "inputs": { "fenix": "fenix", - "nixpkgs": "nixpkgs_8" + "nixpkgs": "nixpkgs_9" }, "locked": { "lastModified": 1768908532, @@ -478,7 +441,7 @@ }, "ndg": { "inputs": { - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_4" }, "locked": { "lastModified": 1766342086, @@ -499,7 +462,7 @@ "inputs": { "flake-compat": "flake-compat_2", "flake-parts": "flake-parts_2", - "nixpkgs": "nixpkgs_5" + "nixpkgs": "nixpkgs_6" }, "locked": { "lastModified": 1748103964, @@ -515,41 +478,21 @@ "type": "github" } }, - "nil": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1772014815, - "narHash": "sha256-er96DK9KxsSU2RE3jCvZNquvby8YzMBEygPuznZvnn8=", - "owner": "atagen", - "repo": "nil", - "rev": "f5dc3f3239f64904d901a537bd88bafe5735aa0a", - "type": "github" - }, - "original": { - "owner": "atagen", - "repo": "nil", - "type": "github" - } - }, "niri": { "inputs": { "niri-stable": "niri-stable", "niri-unstable": "niri-unstable", - "nixpkgs": "nixpkgs_7", + "nixpkgs": "nixpkgs_8", "nixpkgs-stable": "nixpkgs-stable", "xwayland-satellite-stable": "xwayland-satellite-stable", "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, "locked": { - "lastModified": 1771940378, - "narHash": "sha256-qe5t8E8uK5eSgPTxtfcde3VO8fnIr/Tu+hn72FDry/E=", + "lastModified": 1771099995, + "narHash": "sha256-d9jSUIJa5MX+Y7+OMB6FgeHxS2YHT88IUl7HA5hK8FU=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "f8899e60a1425d21a03a05ac2c069a85398039b5", + "rev": "3f765c47870861fafe4c6ed2e631c052aa1e1660", "type": "github" }, "original": { @@ -594,17 +537,15 @@ "inputs": { "naersk": "naersk", "niri": "niri_2", - "nixpkgs": [ - "nixpkgs" - ], + "nixpkgs": "nixpkgs_10", "systems": "systems_4" }, "locked": { - "lastModified": 1772457471, - "narHash": "sha256-y5KsYbzC3MLKr+2M1792jxs3//uV8x9kG+G0LA7cycg=", + "lastModified": 1769059921, + "narHash": "sha256-/crneSsO81LVDzRMRDezpxu55a9Wxjl2HUlofB9HzKs=", "ref": "refs/heads/main", - "rev": "785619920b8ae1dd147da795cc7e703c3367c34a", - "revCount": 44, + "rev": "30662edfe8bac80b356324e642a188f505429d80", + "revCount": 41, "type": "git", "url": "https://git.lobotomise.me/atagen/niri-tag" }, @@ -616,11 +557,11 @@ "niri-unstable": { "flake": false, "locked": { - "lastModified": 1771849386, - "narHash": "sha256-CFvjBjS2LxbBMR3Lu6wZhME6ck3CXyKUufRoJA5tlmw=", + "lastModified": 1771048216, + "narHash": "sha256-g7HP0MMezWKT3R+3uQzUe3BJ68YMRZjmhNMzKTR3Sus=", "owner": "YaLTeR", "repo": "niri", - "rev": "2dc6f4482c4eeed75ea8b133d89cad8658d38429", + "rev": "8e3e93b6240dc9dbc702f0b44f20177c2ce737cf", "type": "github" }, "original": { @@ -653,11 +594,11 @@ ] }, "locked": { - "lastModified": 1771520882, - "narHash": "sha256-9SeTZ4Pwr730YfT7V8Azb8GFbwk1ZwiQDAwft3qAD+o=", + "lastModified": 1770922915, + "narHash": "sha256-6J/JoK9iL7sHvKJcGW2KId2agaKv1OGypsa7kN+ZBD4=", "owner": "nix-darwin", "repo": "nix-darwin", - "rev": "6a7fdcd5839ec8b135821179eea3b58092171bcf", + "rev": "6c5a56295d2a24e43bcd8af838def1b9a95746b2", "type": "github" }, "original": { @@ -674,11 +615,11 @@ ] }, "locked": { - "lastModified": 1770922915, - "narHash": "sha256-6J/JoK9iL7sHvKJcGW2KId2agaKv1OGypsa7kN+ZBD4=", + "lastModified": 1765065051, + "narHash": "sha256-b7W9WsvyMOkUScNxbzS45KEJp0iiqRPyJ1I3JBE+oEE=", "owner": "nix-darwin", "repo": "nix-darwin", - "rev": "6c5a56295d2a24e43bcd8af838def1b9a95746b2", + "rev": "7e22bf538aa3e0937effcb1cee73d5f1bcc26f79", "type": "github" }, "original": { @@ -710,14 +651,14 @@ }, "nix-index-database": { "inputs": { - "nixpkgs": "nixpkgs_9" + "nixpkgs": "nixpkgs_11" }, "locked": { - "lastModified": 1771734689, - "narHash": "sha256-/phvMgr1yutyAMjKnZlxkVplzxHiz60i4rc+gKzpwhg=", + "lastModified": 1770315571, + "narHash": "sha256-hy0gcAgAcxrnSWKGuNO+Ob0x6jQ2xkR6hoaR0qJBHYs=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "8f590b832326ab9699444f3a48240595954a4b10", + "rev": "2684bb8080a6f2ca5f9d494de5ef875bc1c4ecdb", "type": "github" }, "original": { @@ -731,7 +672,7 @@ "flake-parts": "flake-parts_3", "git-hooks-nix": "git-hooks-nix", "kitty-themes-src": "kitty-themes-src", - "nixpkgs": "nixpkgs_10", + "nixpkgs": "nixpkgs_12", "nixpkgs-lib": "nixpkgs-lib_2", "systems": "systems_5" }, @@ -749,46 +690,6 @@ "type": "github" } }, - "nix-scope-plugin": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1772011628, - "narHash": "sha256-rhpsfs+/9zVr3HVqniwHyRSr92ga4J4mczFdHr1PN4s=", - "ref": "refs/heads/main", - "rev": "0e5218513ec92ee751e7a0dc854082106b77473c", - "revCount": 1, - "type": "git", - "url": "https://git.lobotomise.me/atagen/nix-scope-plugin" - }, - "original": { - "type": "git", - "url": "https://git.lobotomise.me/atagen/nix-scope-plugin" - } - }, - "nix-shorturl-plugin": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1771986085, - "narHash": "sha256-M7koECMnoi+7eI0yGj+Rxiu9gC/hdbJtwUR0AyTuFsY=", - "ref": "refs/heads/main", - "rev": "807c3b0094963bb78198643b62b78e2a0c916230", - "revCount": 1, - "type": "git", - "url": "https://git.lobotomise.me/atagen/nix-shorturl-plugin" - }, - "original": { - "type": "git", - "url": "https://git.lobotomise.me/atagen/nix-shorturl-plugin" - } - }, "nix-systems": { "locked": { "lastModified": 1689347949, @@ -804,28 +705,13 @@ "type": "github" } }, - "nix-systems_2": { - "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" - } - }, "nixpkgs": { "locked": { - "lastModified": 1771369470, - "narHash": "sha256-0NBlEBKkN3lufyvFegY4TYv5mCNHbi5OmBDrzihbBMQ=", + "lastModified": 1770841267, + "narHash": "sha256-9xejG0KoqsoKEGp2kVbXRlEYtFFcDTHjidiuX8hGO44=", "owner": "nixos", "repo": "nixpkgs", - "rev": "0182a361324364ae3f436a63005877674cf45efb", + "rev": "ec7c70d12ce2fc37cb92aff673dcdca89d187bae", "type": "github" }, "original": { @@ -882,11 +768,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1771903837, - "narHash": "sha256-sdaqdnsQCv3iifzxwB22tUwN/fSHoN7j2myFW5EIkGk=", + "lastModified": 1771043024, + "narHash": "sha256-O1XDr7EWbRp+kHrNNgLWgIrB0/US5wvw9K6RERWAj6I=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e764fc9a405871f1f6ca3d1394fb422e0a0c3951", + "rev": "3aadb7ca9eac2891d52a9dec199d9580a6e2bf44", "type": "github" }, "original": { @@ -898,11 +784,11 @@ }, "nixpkgs-stable_2": { "locked": { - "lastModified": 1771903837, - "narHash": "sha256-sdaqdnsQCv3iifzxwB22tUwN/fSHoN7j2myFW5EIkGk=", + "lastModified": 1771043024, + "narHash": "sha256-O1XDr7EWbRp+kHrNNgLWgIrB0/US5wvw9K6RERWAj6I=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e764fc9a405871f1f6ca3d1394fb422e0a0c3951", + "rev": "3aadb7ca9eac2891d52a9dec199d9580a6e2bf44", "type": "github" }, "original": { @@ -913,6 +799,38 @@ } }, "nixpkgs_10": { + "locked": { + "lastModified": 1768875095, + "narHash": "sha256-dYP3DjiL7oIiiq3H65tGIXXIT1Waiadmv93JS0sS+8A=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "ed142ab1b3a092c4d149245d0c4126a5d7ea00b0", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_11": { + "locked": { + "lastModified": 1770197578, + "narHash": "sha256-AYqlWrX09+HvGs8zM6ebZ1pwUqjkfpnv8mewYwAo+iM=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "00c21e4c93d963c50d4c0c89bfa84ed6e0694df2", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_12": { "locked": { "lastModified": 1768810879, "narHash": "sha256-6RrqzfHu3e4vvRaDRY0muyl/BkFzCEPfwXmYY8iRjSw=", @@ -927,28 +845,13 @@ "type": "github" } }, - "nixpkgs_11": { + "nixpkgs_13": { "locked": { - "lastModified": 1772016756, - "narHash": "sha256-noRPhcPF6zI2Wc3khn2Uo01AMmLO7CLFRcgSN1CQXSg=", + "lastModified": 1771008912, + "narHash": "sha256-gf2AmWVTs8lEq7z/3ZAsgnZDhWIckkb+ZnAo5RzSxJg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "154d55d78649878684bc797cec119e66cceed8b5", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_12": { - "locked": { - "lastModified": 1766309749, - "narHash": "sha256-3xY8CZ4rSnQ0NqGhMKAy5vgC+2IVK0NoVEzDoOh4DA4=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "a6531044f6d0bef691ea18d4d4ce44d0daa6e816", + "rev": "a82ccc39b39b621151d6732718e3e250109076fa", "type": "github" }, "original": { @@ -958,7 +861,7 @@ "type": "github" } }, - "nixpkgs_13": { + "nixpkgs_14": { "locked": { "lastModified": 1769018530, "narHash": "sha256-MJ27Cy2NtBEV5tsK+YraYr2g851f3Fl1LpNHDzDX15c=", @@ -974,13 +877,45 @@ "type": "github" } }, - "nixpkgs_2": { + "nixpkgs_15": { "locked": { - "lastModified": 1770562336, - "narHash": "sha256-ub1gpAONMFsT/GU2hV6ZWJjur8rJ6kKxdm9IlCT0j84=", + "lastModified": 1761656231, + "narHash": "sha256-EiED5k6gXTWoAIS8yQqi5mAX6ojnzpHwAQTS3ykeYMg=", "owner": "nixos", "repo": "nixpkgs", - "rev": "d6c71932130818840fc8fe9509cf50be8c64634f", + "rev": "e99366c665bdd53b7b500ccdc5226675cfc51f45", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1733935885, + "narHash": "sha256-xyiHLs6KJ1fxeGmcCxKjJE4yJknVJxbC8Y/ZRYyC8WE=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "5a48e3c2e435e95103d56590188cfed7b70e108c", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1759381078, + "narHash": "sha256-gTrEEp5gEspIcCOx9PD8kMaF1iEmfBcTbO0Jag2QhQs=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "7df7ff7d8e00218376575f0acdcc5d66741351ee", "type": "github" }, "original": { @@ -990,7 +925,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { "lastModified": 1766070988, "narHash": "sha256-G/WVghka6c4bAzMhTwT2vjLccg/awmHkdKSd2JrycLc=", @@ -1006,39 +941,7 @@ "type": "github" } }, - "nixpkgs_4": { - "locked": { - "lastModified": 1746397377, - "narHash": "sha256-5oLdRa3vWSRbuqPIFFmQBGGUqaYZBxX+GGtN9f/n4lU=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "ed30f8aba41605e3ab46421e3dcb4510ec560ff8", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nixpkgs_5": { - "locked": { - "lastModified": 1745930157, - "narHash": "sha256-y3h3NLnzRSiUkYpnfvnS669zWZLoqqI6NprtLQ+5dck=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "46e634be05ce9dc6d4db8e664515ba10b78151ae", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_6": { "locked": { "lastModified": 1748217807, "narHash": "sha256-P3u2PXxMlo49PutQLnk2PhI/imC69hFl1yY4aT5Nax8=", @@ -1054,13 +957,13 @@ "type": "github" } }, - "nixpkgs_7": { + "nixpkgs_6": { "locked": { - "lastModified": 1771848320, - "narHash": "sha256-0MAd+0mun3K/Ns8JATeHT1sX28faLII5hVLq0L3BdZU=", + "lastModified": 1745930157, + "narHash": "sha256-y3h3NLnzRSiUkYpnfvnS669zWZLoqqI6NprtLQ+5dck=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "2fc6539b481e1d2569f25f8799236694180c0993", + "rev": "46e634be05ce9dc6d4db8e664515ba10b78151ae", "type": "github" }, "original": { @@ -1070,7 +973,39 @@ "type": "github" } }, + "nixpkgs_7": { + "locked": { + "lastModified": 1748217807, + "narHash": "sha256-P3u2PXxMlo49PutQLnk2PhI/imC69hFl1yY4aT5Nax8=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "3108eaa516ae22c2360928589731a4f1581526ef", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs_8": { + "locked": { + "lastModified": 1771008912, + "narHash": "sha256-gf2AmWVTs8lEq7z/3ZAsgnZDhWIckkb+ZnAo5RzSxJg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "a82ccc39b39b621151d6732718e3e250109076fa", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_9": { "locked": { "lastModified": 1752077645, "narHash": "sha256-HM791ZQtXV93xtCY+ZxG1REzhQenSQO020cu6rHtAPk=", @@ -1086,22 +1021,6 @@ "type": "github" } }, - "nixpkgs_9": { - "locked": { - "lastModified": 1771369470, - "narHash": "sha256-0NBlEBKkN3lufyvFegY4TYv5mCNHbi5OmBDrzihbBMQ=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "0182a361324364ae3f436a63005877674cf45efb", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "qstn": { "inputs": { "nixpkgs": [ @@ -1129,24 +1048,19 @@ "arbys": "arbys", "bunker": "bunker", "culr": "culr", - "helium": "helium", + "helix": "helix", "hjem": "hjem", "hjem-rum": "hjem-rum", - "hudcore": "hudcore", "meat": "meat", - "nil": "nil", "niri": "niri", "niri-s76": "niri-s76", "niri-tag": "niri-tag", "nix-index-database": "nix-index-database", "nix-rice": "nix-rice", - "nix-scope-plugin": "nix-scope-plugin", - "nix-shorturl-plugin": "nix-shorturl-plugin", - "nixpkgs": "nixpkgs_11", + "nixpkgs": "nixpkgs_13", "nixpkgs-stable": "nixpkgs-stable_2", "qstn": "qstn", "run0-shim": "run0-shim", - "stash": "stash", "stasis": "stasis", "yoke": "yoke" } @@ -1158,7 +1072,7 @@ "nixpkgs": [ "nixpkgs" ], - "rust-overlay": "rust-overlay_3", + "rust-overlay": "rust-overlay_4", "treefmt-nix": "treefmt-nix_3" }, "locked": { @@ -1195,17 +1109,16 @@ "rust-overlay": { "inputs": { "nixpkgs": [ - "hjem", - "smfh", + "helix", "nixpkgs" ] }, "locked": { - "lastModified": 1771125043, - "narHash": "sha256-ldf/s49n6rOAxl7pYLJGGS1N/assoHkCOWdEdLyNZkc=", + "lastModified": 1759631821, + "narHash": "sha256-V8A1L0FaU/aSXZ1QNJScxC12uP4hANeRBgI4YdhHeRM=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "4912f951a26dc8142b176be2c2ad834319dc06e8", + "rev": "1d7cbdaad90f8a5255a89a6eddd8af24dc89cafe", "type": "github" }, "original": { @@ -1215,6 +1128,28 @@ } }, "rust-overlay_2": { + "inputs": { + "nixpkgs": [ + "hjem", + "smfh", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1763347184, + "narHash": "sha256-6QH8hpCYJxifvyHEYg+Da0BotUn03BwLIvYo3JAxuqQ=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "08895cce80433978d5bfd668efa41c5e24578cbd", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "rust-overlay_3": { "inputs": { "nixpkgs": [ "hjem-rum", @@ -1237,7 +1172,7 @@ "type": "github" } }, - "rust-overlay_3": { + "rust-overlay_4": { "inputs": { "nixpkgs": [ "run0-shim", @@ -1264,15 +1199,15 @@ "hjem", "nixpkgs" ], - "rust-overlay": "rust-overlay", + "rust-overlay": "rust-overlay_2", "systems": "systems_2" }, "locked": { - "lastModified": 1771208268, - "narHash": "sha256-6zMgOPzBbTSm8jzPqmGcotjvkN3HzxcnMM8pW64JpZQ=", + "lastModified": 1763430012, + "narHash": "sha256-06G7pXUdpMnUqR0JWWvV7sA8oNGOZU1cSLqQS1GMf7Y=", "owner": "feel-co", "repo": "smfh", - "rev": "dd0a33fc9d1fe7c29da86225af4b4a47b1714839", + "rev": "eddda76e3dd4c6deaea5f819f174fc16dbe70f90", "type": "github" }, "original": { @@ -1288,7 +1223,7 @@ "hjem", "nixpkgs" ], - "rust-overlay": "rust-overlay_2", + "rust-overlay": "rust-overlay_3", "systems": "systems_3" }, "locked": { @@ -1305,36 +1240,17 @@ "type": "github" } }, - "stash": { - "inputs": { - "crane": "crane", - "nixpkgs": "nixpkgs_12" - }, - "locked": { - "lastModified": 1772183710, - "narHash": "sha256-ojaPFnfWFRUi4Nc69T+ObdZ3Bxf62T3bv49qqV+wgHw=", - "owner": "notashelf", - "repo": "stash", - "rev": "181edcefb1fb38bbd1ca306e91ba493bcf4014d9", - "type": "github" - }, - "original": { - "owner": "notashelf", - "repo": "stash", - "type": "github" - } - }, "stasis": { "inputs": { "flake-parts": "flake-parts_4", - "nixpkgs": "nixpkgs_13" + "nixpkgs": "nixpkgs_14" }, "locked": { - "lastModified": 1772174212, - "narHash": "sha256-Rq3JnZAYzysIPdcVVM/ctKBARPGxKzzae2owVwqNPt8=", + "lastModified": 1770955222, + "narHash": "sha256-XK7e2x1Q5xxyofswmrqc7pz7WA0EmrT5aWnaHaFy5hg=", "owner": "saltnpepper97", "repo": "stasis", - "rev": "6ce1a1391e1157457a588701b8ca21e3d72fd7f1", + "rev": "02086d0f96871e75444a0f202703380a46aa5b61", "type": "github" }, "original": { @@ -1514,7 +1430,7 @@ "unf": { "inputs": { "ndg": "ndg_2", - "nixpkgs": "nixpkgs_6" + "nixpkgs": "nixpkgs_7" }, "locked": { "lastModified": 1748163740, @@ -1550,11 +1466,11 @@ "xwayland-satellite-unstable": { "flake": false, "locked": { - "lastModified": 1771787042, - "narHash": "sha256-7bM6Y4KldhKnfopSALF8XALxcX7ehkomXH9sPl4MXp0=", + "lastModified": 1770583271, + "narHash": "sha256-Q75S8cEqJoZ92s1y4zArvk2U1ayAy2E4SaF7gbNXkYQ=", "owner": "Supreeeme", "repo": "xwayland-satellite", - "rev": "33c344fee50504089a447a8fef5878cf4f6215fc", + "rev": "86f5bd5d867ad6e120935dfe825f6b903ebbeddd", "type": "github" }, "original": { @@ -1565,17 +1481,15 @@ }, "yoke": { "inputs": { - "nixpkgs": [ - "nixpkgs" - ], + "nixpkgs": "nixpkgs_15", "systems": "systems_7" }, "locked": { - "lastModified": 1772106982, - "narHash": "sha256-XyHN0Wl9dxknzsAR8c/Ce3BjtqbNhv11xIRG0KeEvm4=", + "lastModified": 1769664021, + "narHash": "sha256-6B99PvFbUW5ca0ucvpI6eWF2wSAUts/5LPZUQvErEkg=", "ref": "refs/heads/main", - "rev": "bf06ab5fe821bfa033c290f49949b8adffbef56e", - "revCount": 12, + "rev": "c53377a5046f70493ac268aedb5824add94c4ba1", + "revCount": 11, "type": "git", "url": "https://git.lobotomise.me/atagen/yoke" }, diff --git a/flake.nix b/flake.nix index e306cc3..90d9cf9 100644 --- a/flake.nix +++ b/flake.nix @@ -4,22 +4,18 @@ outputs = _: { }; inputs = { - nixpkgs.url = "github:NixOS/nixpkgs"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-25.11"; + helix.url = "github:helix-editor/helix"; + nix-index-database.url = "github:Mic92/nix-index-database"; nix-rice.url = "github:bertof/nix-rice"; - meat = { - url = "atagen:meat"; - inputs.nixpkgs.follows = "nixpkgs"; - }; + meat.url = "git+https://git.lobotomise.me/atagen/meat"; - culr = { - url = "atagen:culr"; - inputs.nixpkgs.follows = "nixpkgs"; - }; + culr.url = "git+https://git.lobotomise.me/atagen/culr"; niri.url = "github:sodiboo/niri-flake"; @@ -33,18 +29,15 @@ inputs.nixpkgs.follows = "nixpkgs"; }; - hudcore.url = "atagen:hudcore-plymouth"; - niri-tag = { - url = "atagen:niri-tag"; - inputs.nixpkgs.follows = "nixpkgs"; - }; + # hudcore.url = "git+https://git.lobotomise.me/atagen/hudcore-plymouth.git"; + + niri-tag.url = "git+https://git.lobotomise.me/atagen/niri-tag"; angrr.url = "github:linyinfeng/angrr"; - arbys.url = "atagen:arbys"; - + arbys.url = "git+https://git.lobotomise.me/atagen/arbys"; qstn = { - url = "atagen:qstn"; + url = "git+https://git.lobotomise.me/atagen/qstn"; inputs.nixpkgs.follows = "nixpkgs"; }; @@ -53,40 +46,18 @@ flake = false; }; - yoke = { - url = "atagen:yoke"; - inputs.nixpkgs.follows = "nixpkgs"; - }; + yoke.url = "git+https://git.lobotomise.me/atagen/yoke"; run0-shim = { url = "github:lordgrimmauld/run0-sudo-shim"; inputs.nixpkgs.follows = "nixpkgs"; }; - bunker.url = "amaan:bunker-patches"; + bunker.url = "github:amaanq/bunker-patches"; stasis.url = "github:saltnpepper97/stasis"; - niri-s76.url = "atagen:niri-s76-bridge"; - - helium.url = "amaan:helium-flake"; - - nil = { - url = "github:atagen/nil"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - nix-scope-plugin = { - url = "atagen:nix-scope-plugin"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - nix-shorturl-plugin = { - url = "atagen:nix-shorturl-plugin"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - stash.url = "github:notashelf/stash"; + niri-s76.url = "git+https://git.lobotomise.me/atagen/niri-s76-bridge"; }; diff --git a/graphical/binds.nix b/graphical/binds.nix index bcf478b..6d41925 100644 --- a/graphical/binds.nix +++ b/graphical/binds.nix @@ -1,6 +1,7 @@ { lib, config, + scope, ... }: let @@ -53,11 +54,21 @@ scope "user.desktops.niri.binds" "toggle-tag" "99" ]; + "Mod+Shift+Minus".spawn = [ + "tagctl" + "toggle" + "99" + ]; "Mod+Equal".spawn = [ "tagctl" "toggle-tag" "101" ]; + "Mod+Shift+Equal".spawn = [ + "tagctl" + "toggle" + "101" + ]; "Mod+D".spawn = [ "qs" "ipc" @@ -75,6 +86,7 @@ scope "user.desktops.niri.binds" "logout" "toggle" ]; + # "Mod+Equal".spawn = (getAppName "passwordManager"); # niri-tag needs proper scratchpads smh "Mod+Shift+Q".action = "close-window"; "Mod+Shift+S".action = "screenshot"; "Mod+R".action = "switch-preset-column-width"; diff --git a/graphical/boot.nix b/graphical/boot.nix index 05048c8..0571183 100644 --- a/graphical/boot.nix +++ b/graphical/boot.nix @@ -1,5 +1,6 @@ { config, + scope, machineName, mainUser, ... diff --git a/graphical/browser.nix b/graphical/browser.nix index c8d0e7f..47ecff6 100644 --- a/graphical/browser.nix +++ b/graphical/browser.nix @@ -1,60 +1,94 @@ { lib, pkgs, - inputs, - getFlakePkg, + scope, ... }: 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"; - }; - vencord = { - id = "jfcaohdhgnfchhifdffmldmodkmndfjp"; - updateUrl = "https://github.com/amaanq/Vencord/releases/latest/download/updates.xml"; - }; - bitwarden.id = "nngceckbapebfimnlniiiahkandclblb"; - clearurls.id = "lckanjgmijmafbedllaakclkaicjfmnk"; - dark-reader.id = "eimadpbcbfnmbkopoojfekhnkhdbieeh"; - i-still-dont-care-about-cookies.id = "edibdbjcniadpccecjdfdjjppcpchdlm"; - fastforward.id = "icallnadddjmdinamnolclfjanhfoafe"; - refined-github.id = "hlepfoohegkhhmjieoechaddaejaokhf"; - sponsorblock.id = "mnjggcdmjocbbbhaepdhchncahnbgone"; - vimium-c.id = "hfjbmagddngcpeloejdejnfgbamkjaeg"; - web-archives.id = "hkligngkgcpcolhcnkgccglchdafcnao"; - # webrtc-leak-shield.id = "bppamachkoflopbagkdoflbgfjflfnfl"; - }; - extensionStrings = map ( - key: - let - ext = extensions.${key}; - url = ext.updateUrl or "https://services.helium.imput.net/ext"; - in - "${ext.id};${url}" - ) (builtins.attrNames extensions); -in -(scope "apps.browser" <| getFlakePkg inputs.helium) -// scope "programs.chromium" { - enable = true; - extensions = extensionStrings; - extraOpts = { - PrivacySandboxFingerprintingProtectionEnabled = true; - PrivacySandboxIpProtectionEnabled = true; - # Explicitly allow our extensions - ExtensionInstallAllowlist = map (entry: entry.value.id) (lib.attrsToList extensions); - # Allow extensions from Helium proxy and self-hosted sources - ExtensionInstallSources = [ - "https://services.helium.imput.net/*" # Helium proxy - "https://rednoise.org/*" # AdNauseam manifest - "https://github.com/*" # AdNauseam CRX host - "https://*.githubusercontent.com/*" # GitHub release assets - "https://gitflic.ru/*" # Bypass Paywalls + officialAddon = name: { + install_url = lib.strings.concatStrings [ + "https://addons.mozilla.org/firefox/downloads/latest/" + name + "/latest.xpi" ]; + installation_mode = "force_installed"; }; + lock-false = { + Value = false; + Status = "locked"; + }; + lock-true = { + Value = true; + Status = "locked"; + }; +in +scope "programs.firefox" { + enable = true; + + policies = { + DisableTelemetry = true; + DisableFirefoxStudies = true; + EnableTrackingProtection = { + Value = true; + Locked = true; + Cryptomining = true; + Fingerprinting = true; + }; + DisablePocket = true; + DisableFirefoxAccounts = true; + DisableAccounts = true; + DisableFirefoxScreenshots = true; + DisableAppUpdate = true; + DisablePrivateBrowsing = true; + DontCheckDefaultBrowser = true; + + OverrideFirstRunPage = ""; + OverridePostUpdatePage = ""; + DisplayBookmarksToolbar = "newtab"; # alternatives: "always" or "newtab" + DisplayMenuBar = "default-off"; # alternatives: "always", "never" or "default-on" + SearchBar = "unified"; # alternative: "separate" + + ExtensionSettings = { + "*".installation_mode = "blocked"; # blocks all addons except the ones specified below + "uBlock0@raymondhill.net" = officialAddon "ublock-origin"; + "addon@darkreader.org" = officialAddon "darkreader"; + "vimium-c@gdh1995.cn" = officialAddon "vimium-c"; + "{b86e4813-687a-43e6-ab65-0bde4ab75758}" = officialAddon "localcdn-fork-of-decentraleyes"; + "jid1-5Fs7iTLscUaZBgwr@jetpack" = officialAddon "happy-bonobo-disable-webrtc"; + "{446900e4-71c2-419f-a6a7-df9c091e268b}" = officialAddon "bitwarden-password-mananger"; + }; + + Preferences = { + "extensions.pocket.enabled" = lock-false; + "extensions.screenshots.disabled" = lock-true; + "browser.topsites.contile.enabled" = lock-false; + "browser.formfill.enable" = lock-false; + "browser.search.suggest.enabled" = lock-false; + "browser.search.suggest.enabled.private" = lock-false; + "browser.urlbar.suggest.searches" = lock-false; + "browser.urlbar.showSearchSuggestionsFirst" = lock-false; + "browser.newtabpage.activity-stream.feeds.section.topstories" = lock-false; + "browser.newtabpage.activity-stream.feeds.snippets" = lock-false; + "browser.newtabpage.activity-stream.section.highlights.includePocket" = lock-false; + "browser.newtabpage.activity-stream.section.highlights.includeBookmarks" = lock-false; + "browser.newtabpage.activity-stream.section.highlights.includeDownloads" = lock-false; + "browser.newtabpage.activity-stream.section.highlights.includeVisited" = lock-false; + "browser.newtabpage.activity-stream.showSponsored" = lock-false; + "browser.newtabpage.activity-stream.system.showSponsored" = lock-false; + "browser.newtabpage.activity-stream.showSponsoredTopSites" = lock-false; + }; + }; + + # profiles.default = { + # id = 0; + # name = "Default"; + # settings = { + # "browser.startup.homepage" = "about:blank"; + # "browser.shell.didSkipDefaultBrowserCheckOnFirstRun" = true; + # "browser.policies.applied" = true; + # "widget.use-xdg-desktop-portal.file-picker" = 1; + # "widget.use-xdg-desktop-portal.mime-handler" = 1; + # }; + # }; } +// (scope "apps.browser" <| pkgs.firefox) diff --git a/graphical/chat.nix b/graphical/chat.nix index bcabadd..bac991c 100644 --- a/graphical/chat.nix +++ b/graphical/chat.nix @@ -1,30 +1,18 @@ -{ pkgs, ... }: +{ config, pkgs, ... }: { - programs.pwas = - let - papirusIcon = app: "${pkgs.papirus-icon-theme}/share/icons/Papirus-Dark/16x16/apps/${app}.svg"; - in - { - cinny = { - name = "Cinny"; - url = "https://chat.lobotomise.me"; - icon = papirusIcon "in.cinny.Cinny"; - description = "Cinny, a Matrix client"; - }; - discord = { - name = "Discord"; - url = "https://discord.com/app"; - icon = papirusIcon "discord"; - description = "Discord Web"; - }; - fb-messenger = { - name = "FB Messenger"; - url = "https://m.me"; - icon = papirusIcon "facebook-facebook.com.svg"; - description = "Facebook Messenger"; - }; - }; - xdg.mime.defaultApplications = { - "x-scheme-handler/matrix" = "Cinny-webapp.desktop"; - }; + user.packages = [ pkgs.element-desktop ]; + # hm.programs.firefox.webapps = { + # "Microsoft-Teams" = { + # url = "https://teams.microsoft.com"; + # extraSettings = config.hm.programs.firefox.profiles.default.settings; + # name = "Microsoft Teams"; + # icon = ../assets/ms_teams.png; + # }; + # "Facebook-Messenger" = { + # url = "https://www.messenger.com"; + # extraSettings = config.hm.programs.firefox.profiles.default.settings; + # name = "Facebook Messenger"; + # icon = ../assets/fb_msg.png; + # }; + # }; } diff --git a/graphical/desktop/niri.kdl b/graphical/desktop/niri.kdl index ae7d653..1a3f066 100644 --- a/graphical/desktop/niri.kdl +++ b/graphical/desktop/niri.kdl @@ -53,14 +53,3 @@ window-rule { clip-to-geometry true } xwayland-satellite { path "%SATELLITE%"; } -spawn-at-startup "systemctl" "--user" "start" "startup-sound.service" -window-rule { - match app-id="Bitwarden" - open-floating true - default-column-width { proportion 0.2; } -} -window-rule { - match app-id="chrome-listen.lobotomise.me__-Default" - open-floating true - default-column-width { proportion 0.2; } -} diff --git a/graphical/desktop/quickshell/shell.qml b/graphical/desktop/quickshell/shell.qml index 3410a0f..f70eda6 100644 --- a/graphical/desktop/quickshell/shell.qml +++ b/graphical/desktop/quickshell/shell.qml @@ -4,12 +4,13 @@ import "launcher" as Launcher import "logout" as Logout // singletons import "title" -import "tags" +import "tags" import "rice" import Quickshell import Quickshell.Wayland import QtQuick +import QtQuick.Controls ShellRoot { @@ -17,10 +18,9 @@ ShellRoot { Variants { model: Quickshell.screens Scope { - id: screenScope property var modelData PanelWindow { - screen: screenScope.modelData + screen: modelData id: bg anchors { top: true @@ -163,6 +163,7 @@ ShellRoot { implicitHeight: 22 implicitWidth: (Tags.keys.length !== undefined) ? Tags.keys.length * 13 + 24 : 37; + // implicitWidth:.width + 24 color: "transparent" Rectangle { diff --git a/graphical/desktop/quickshell/tags/Tags.qml b/graphical/desktop/quickshell/tags/Tags.qml index 73aecbc..e90da61 100644 --- a/graphical/desktop/quickshell/tags/Tags.qml +++ b/graphical/desktop/quickshell/tags/Tags.qml @@ -8,8 +8,7 @@ Singleton { id: data property var tags: ({}) property var keys: [] - -Timer { + Timer { id: reconnectTimer running: false repeat: true @@ -44,41 +43,37 @@ Timer { return d; }; - let t = {}; - for (const k of Object.keys(data.tags)) { - t[k] = Object.assign({}, data.tags[k]); - } - if (event.TagEmpty) { - t = ensure(t, event.TagEmpty); - t[event.TagEmpty].occupied = false; + data.tags = ensure(data.tags, event.TagEmpty); + data.tags[event.TagEmpty].occupied = false; } else if (event.TagOccupied) { - t = ensure(t, event.TagOccupied); - t[event.TagOccupied].occupied = true; + data.tags = ensure(data.tags, event.TagOccupied); + data.tags[event.TagOccupied].occupied = true; } else if (event.TagUrgent) { - t = ensure(t, event.TagUrgent); - t[event.TagUrgent].urgent = true; + data.tags = ensure(data.tags, event.TagUrgent); + data.tags[event.TagUrgent].urgent = true; } else if (event.TagEnabled) { - t = ensure(t, event.TagEnabled); - t[event.TagEnabled].enabled = true; + data.tags = ensure(data.tags, event.TagEnabled); + data.tags[event.TagEnabled].enabled = true; } else if (event.TagDisabled) { - t = ensure(t, event.TagDisabled); - t[event.TagDisabled].enabled = false; + data.tags = ensure(data.tags, event.TagDisabled); + data.tags[event.TagDisabled].enabled = false; } else if (event.TagExclusive) { - t = ensure(t, event.TagExclusive); - for (const k of Object.keys(t)) { - t[k].enabled = false; + data.tags = ensure(data.tags, event.TagExclusive); + for (const [k] of Object.keys(data.tags)) { + data.tags[k].enabled = false; } - t[event.TagExclusive].enabled = true; + data.tags[event.TagExclusive].enabled = true; } else if (event.TagFullState) { - t = event.TagFullState; - for (const k of Object.keys(t)) { - t[k].id = k; + data["tags"] = event.TagFullState; + for (const [k, v] of Object.entries(data.tags)) { + data.tags[k].id = k; } } - data.tags = t; - data.keys = Object.keys(t); + data.keys = Object.keys(data.tags); + data.tagsChanged(); + data.keysChanged(); } } } diff --git a/graphical/desktop/shell.nix b/graphical/desktop/shell.nix index 7b3941d..87c6696 100644 --- a/graphical/desktop/shell.nix +++ b/graphical/desktop/shell.nix @@ -4,7 +4,6 @@ inputs, mainUser, getPkgs, - config, ... }: let @@ -17,58 +16,12 @@ in inherit (pkgs) wl-clipboard quickshell; }; - imports = [ - inputs.stasis.nixosModules.default - inputs.stash.nixosModules.default - ]; - services.stasis = { - enable = true; - extraPathPackages = [ (config.programs.niri.package) ]; - extraConfig = '' - default: - dpms_off: - timeout 300 - command "niri msg action power-off-monitors" - end - suspend: - timeout 600 - command "systemctl suspend" - end - end - ''; - }; - - services.stash-clipboard = { - enable = true; - excludedApps = [ "Bitwarden" ]; - }; + imports = [ inputs.stasis.nixosModules.default ]; + services.stasis.enable = true; quick.services = { - noti = "${getExe pkgs.swaynotificationcenter}"; - shell = "${getExe pkgs.quickshell}"; - pwManager = "${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" ]; - + swaync = "${getExe pkgs.swaynotificationcenter}"; + quickshell = "${getExe pkgs.quickshell}"; }; environment.files."/home/${mainUser}/.config/quickshell" = { diff --git a/graphical/desktop/wm.nix b/graphical/desktop/wm.nix index 30a9231..bdf85af 100644 --- a/graphical/desktop/wm.nix +++ b/graphical/desktop/wm.nix @@ -3,7 +3,6 @@ inputs, getFlakePkg', lib, - pkgs, config, ... }: @@ -13,7 +12,6 @@ let inherit (config) rice; in { - imports = [ inputs.niri.nixosModules.niri inputs.niri-tag.nixosModules.niri-tag @@ -43,34 +41,24 @@ in (toString borders.gaps) (toString borders.thickness) palette.shortHex.bright.yellow - palette.shortHex.normal.white + palette.shortHex.normal.yellow (lib.getExe xwayland-satellite) ] template; in baseConfig; }; - user.packages = [ niri xwayland-satellite ]; - services.greetd = { enable = true; restart = false; settings = let session = { - command = - let - niri-session-direct = pkgs.writeShellScript "niri-session-direct" '' - systemctl --user import-environment - dbus-update-activation-environment --all - exec ${lib.getExe niri} --session - ''; - in - "${niri-session-direct}"; + command = "niri-session"; user = "${mainUser}"; }; in @@ -79,26 +67,11 @@ in initial_session = session; }; }; - programs.niri = { enable = true; package = niri; }; - - services.niri-tag = { - enable = true; - prepopulate = 10; - strict = true; - scratchpads = { - "chrome-listen.lobotomise.me__-Default" = 99; - "Bitwarden" = 101; - }; - }; - + services.niri-tag.enable = true; services.niri-s76-bridge.enable = true; - # niri runs directly from greetd (session-1.scope), not as a user service - systemd.user.services.niri.wantedBy = lib.mkForce [ ]; - systemd.user.services.niri.enable = lib.mkForce false; - } diff --git a/graphical/dev.nix b/graphical/dev.nix index d2e7101..0f12b7c 100644 --- a/graphical/dev.nix +++ b/graphical/dev.nix @@ -1,6 +1,7 @@ { inputs, localPkgs, + scope, getFlakePkg', ... }: diff --git a/graphical/documents.nix b/graphical/documents.nix index 0a50ede..31f2f88 100644 --- a/graphical/documents.nix +++ b/graphical/documents.nix @@ -1,5 +1,6 @@ { pkgs, + scope, ... }: with pkgs; @@ -9,5 +10,5 @@ scope "apps" { noteTaking = obsidian; ebookReader = foliate; pdfReader = zathura; - calculator = mate-calc; + calculator = mate.mate-calc; } diff --git a/graphical/fm.nix b/graphical/fm.nix index 0500103..f3aa4b7 100644 --- a/graphical/fm.nix +++ b/graphical/fm.nix @@ -1,8 +1,9 @@ { pkgs, + scope, ... }: -with pkgs; +with pkgs.mate; scope "apps" { fm = caja; archive = engrampa; diff --git a/graphical/gfx-env.nix b/graphical/gfx-env.nix index a70e6cf..bd278eb 100644 --- a/graphical/gfx-env.nix +++ b/graphical/gfx-env.nix @@ -1,4 +1,4 @@ -{ ... }: +{ scope, ... }: scope "environment.sessionVariables" { NIXOS_OZONE_WL = "1"; GBM_BACKEND = "nvidia-drm"; diff --git a/graphical/hw.nix b/graphical/hw.nix index bff93ca..76b5b0f 100644 --- a/graphical/hw.nix +++ b/graphical/hw.nix @@ -1,4 +1,4 @@ -{ ... }: +{ scope, ... }: scope "hardware" { enableRedistributableFirmware = true; enableAllFirmware = true; diff --git a/graphical/integrations.nix b/graphical/integrations.nix index 49b634a..e2b0520 100644 --- a/graphical/integrations.nix +++ b/graphical/integrations.nix @@ -15,6 +15,7 @@ }; }; extraPortals = [ + pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-gnome ]; }; diff --git a/graphical/kernel.nix b/graphical/kernel.nix index 8e631b6..0f1d863 100644 --- a/graphical/kernel.nix +++ b/graphical/kernel.nix @@ -9,10 +9,11 @@ bunker.kernel = { enable = true; + hardened = false; cpuArch = "MZEN3"; version = "6.18"; - hardened = false; lto = "none"; + trimmed = true; }; services.scx = { @@ -20,4 +21,17 @@ scheduler = "scx_bpfland"; }; + # nixpkgs.overlays = [ + # (final: prev: { + # nvidia-open = prev.nvidia-open.override { + # patches = [ + # (pkgs.fetchpatch { + # url = "https://github.com/CachyOS/CachyOS-PKGBUILDS/raw/refs/heads/master/nvidia/nvidia-utils/kernel-6.19.patch"; + # hash = ""; + # }) + # ]; + # }; + # }) + # ]; + } diff --git a/graphical/llm.nix b/graphical/llm.nix deleted file mode 100644 index 2dfe01c..0000000 --- a/graphical/llm.nix +++ /dev/null @@ -1,182 +0,0 @@ -{ - pkgs, - lib, - mainUser, - ... -}: -let - clodTools = with pkgs; [ - bash - procps - ripgrep - socat - bubblewrap - ]; - mkClod = - { - confDir ? null, - suffix ? null, - }: - let - version = "2.1.62"; - runtimeDeps = lib.makeBinPath clodTools; - - patchScript = pkgs.writeScript "patch-claude-src" '' - #!${pkgs.python3}/bin/python3 - import re, sys - W = rb"[\w$]+" - data = open(sys.argv[1], "rb").read() - - pat = (rb"let (" + W + rb")=(" + W + rb")\((" + W + rb'),"CLAUDE\.md"\);' - rb"(" + W + rb")\.push\(\.\.\.(" + W + rb')\(\1,"Project",([^)]+)\)\)') - def agents(m): - v, pj, d, a, lf, rest = [m.group(i) for i in range(1, 7)] - return (b'for(let _f of["CLAUDE.md","AGENTS.md"]){let ' + v + b"=" + pj - + b"(" + d + b",_f);" + a + b".push(..." + lf + b"(" + v - + b',"Project",' + rest + b"))}") - data, n = re.subn(pat, agents, data) - sys.stderr.write(f"AGENTS.md: {n} site(s)\n") - - data = data.replace( - b'case"macos":return"/Library/Application Support/ClaudeCode"', - b'case"macos":return"/etc/claude-code"', - ) - - # Enable hard-disabled slash commands: /btw, /files, /tag - for anchor, label in [ - (b'name:"btw",description:"Ask a quick side question', b"/btw"), - (b'name:"files",description:"List all files currently in context"', b"/files"), - (b'name:"tag",userFacingName', b"/tag"), - ]: - pos = data.find(anchor) - if pos < 0: - sys.stderr.write(f"{label.decode()}: NOT FOUND\n"); continue - window = data[pos:pos+500] - patched = window.replace(b"isEnabled:()=>!1", b"isEnabled:()=>!0", 1) - data = data[:pos] + patched + data[pos+500:] - sys.stderr.write(f"{label.decode()}: enabled\n") - - # Bypass e2() for thinkback (e2 returns false when DISABLE_TELEMETRY is set) - data = data.replace( - b'e2("tengu_thinkback")', - b'!0||"tengu_thinkback"', - ) - sys.stderr.write("thinkback: force-enabled\n") - - # Enable custom keybindings (qA default is false, flip to true) - data = data.replace( - b'qA("tengu_keybinding_customization_release",!1)', - b'qA("tengu_keybinding_customization_release",!0)', - ) - sys.stderr.write("keybindings: force-enabled\n") - - # Force-enable remote control / bridge feature gate - data = data.replace( - b'function ek(){return qA("tengu_ccr_bridge",!1)}', - b'function ek(){return!0} ', - ) - sys.stderr.write("remote-control: force-enabled\n") - - # Fix Deno-compile bridge spawn: Deno compiled binaries intercept --flags - # as V8 flags. Rewrite spawn to go through env(1) which breaks the Deno - # runtime's flag parsing. - data = data.replace( - b'let O=iHz(A.execPath,$,', - b'let O=iHz("env",["--",A.execPath,...$],', - ) - sys.stderr.write("bridge-spawn: patched via env(1)\n") - - # Kill claude-developer-platform bundled skill (~400 tokens/turn dead weight) - data = data.replace( - b'name:"claude-developer-platform",description:`', - b'name:"claude-developer-platform",isEnabled:()=>!1,description:`', - ) - sys.stderr.write("claude-developer-platform: killed\n") - - pat = (rb"context_window:\{total_input_tokens:(" + W + rb"\(\))," - rb"total_output_tokens:(" + W + rb"\(\))," - rb"context_window_size:(" + W + rb")," - rb"current_usage:(" + W + rb")," - rb"used_percentage:(" + W + rb")\.used," - rb"remaining_percentage:\5\.remaining\}") - rl = re.search(rb"(" + W + rb')=\{status:"allowed",unifiedRateLimitFallbackAvailable:!1,isUsingOverage:!1\}', data) - m = re.search(pat, data) - if m and rl: - ci, co, sz, u, p, r = *[m.group(i) for i in range(1, 6)], rl.group(1) - data = data.replace(m[0], - b"context_window:{...(" + u + b"||{})," - b"context_window_size:" + sz + b",current_usage:" + u + b"," - b"used_percentage:" + p + b".used,remaining_percentage:" + p + b".remaining," - b"rate_limit:" + r + b",s_in:" + ci + b",s_out:" + co + b"}") - - open(sys.argv[1], "wb").write(data) - ''; - in - pkgs.writeShellScriptBin "claude${lib.optionalString (suffix != null) "-${suffix}"}" '' - set -euo pipefail - export DISABLE_AUTOUPDATER=1 - export DISABLE_INSTALLATION_CHECKS=1 - export USE_BUILTIN_RIPGREP=0 - export PATH="${runtimeDeps}:${pkgs.deno}/bin:$PATH" - - CACHE="''${XDG_CACHE_HOME:-$HOME/.cache}/claude-code" - BIN="$CACHE/claude-${version}" - ${lib.optionalString (confDir != null) "export CLAUDE_CONFIG_DIR=\"$HOME/${confDir}\""} - - if [ ! -x "$BIN" ]; then - mkdir -p "$CACHE" - DENO_DIR="$CACHE/.deno" - export DENO_DIR - deno cache "npm:@anthropic-ai/claude-code@${version}" - ${patchScript} "$DENO_DIR/npm/registry.npmjs.org/@anthropic-ai/claude-code/${version}/cli.js" - deno compile --allow-all --output "$BIN" "npm:@anthropic-ai/claude-code@${version}" 2>&1 - rm -rf "$DENO_DIR" - fi - - 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 - programs.nix-ld = { - enable = true; - libraries = [ pkgs.stdenv.cc.cc.lib ]; - }; - # experiment with our own sandboxing - # security.yoke.wrappers = - # let - # basePaths = [ - # "wrx=/home/${mainUser}/.claude.json:/home/${mainUser}/.claude-code:/home/${mainUser}/.cache/claude-code:$PWD/.claude" - # "rx=/" - # ]; - # base = { - # package = claude-code; - # executable = "claude"; - # retainEnv = true; - # unrestrictTcp = true; - # extraPackages = clodTools; - # }; - # in - # { - # clod-cuck = base // { - # pathRules = basePaths + [ "rx=$PWD" ]; - # }; - # clod = base // { - # pathRules = basePaths ++ [ - # "wrx=/home/${mainUser}" - # ]; - # addPwd = true; - # unrestrictSockets = true; - # unrestrictSignals = true; - # }; - # }; -} diff --git a/graphical/media.nix b/graphical/media.nix index 1bdb213..8fc2d40 100644 --- a/graphical/media.nix +++ b/graphical/media.nix @@ -1,27 +1,13 @@ { - config, pkgs, + scope, ... }: with pkgs; -(scope "apps" { +scope "apps" { videoPlayer = mpv; imageViewer = imv; musicPlayer = resonance; - streamPlayer = config.programs.pwas.airdrome.package; + streamPlayer = feishin; soulSeek = nicotine-plus; -}) -// (scope "programs.pwas.airdrome" { - name = "Airdrome"; - url = "https://listen.lobotomise.me"; - icon = builtins.fetchurl { - name = "airdrome.svg"; - url = "https://raw.githubusercontent.com/JPGuillemin/Airdrome/refs/heads/master/public/icon.svg"; - sha256 = "sha256:1chmza1cbfg028ilz4dqg583s3121iw4fhc136v9f0zf44h76y7m"; - }; - description = "Airdrome, a Navidrome client"; - categories = [ - "Music" - "Network" - ]; -}) +} diff --git a/graphical/password-manager.nix b/graphical/password-manager.nix index 5b3d10e..80c2763 100644 --- a/graphical/password-manager.nix +++ b/graphical/password-manager.nix @@ -4,14 +4,15 @@ generator = lib.generators.toJSON { }; value = { email = "boss@atagen.co"; - pinentry = lib.getExe pkgs.pinentry-gtk2; # TODO this is fugly + pinentry = lib.getExe pkgs.pinentry-qt; # TODO this is fugly base_url = "https://vault.lobotomise.me"; }; }; - # nixpkgs.config.permittedInsecurePackages = [ - # "electron-36.9.5" - # ]; + # bitwarden ? element ? + nixpkgs.config.permittedInsecurePackages = [ + "electron-36.9.5" + ]; apps = with pkgs; { passwordManager = bitwarden-desktop; passwordCli = rbw; diff --git a/graphical/quick-services.nix b/graphical/quick-services.nix index d696f36..4342095 100644 --- a/graphical/quick-services.nix +++ b/graphical/quick-services.nix @@ -2,6 +2,7 @@ config, lib, mainUser, + scope, ... }: scope "options.quick" { @@ -36,7 +37,6 @@ scope "options.quick" { }; serviceConfig = { ExecStart = cmd; - Restart = "always"; }; wantedBy = [ "graphical-session.target" ]; }) config.quick.services diff --git a/graphical/rice.nix b/graphical/rice.nix index 6ed8bce..60a9108 100644 --- a/graphical/rice.nix +++ b/graphical/rice.nix @@ -59,10 +59,11 @@ }; plymouth = { - theme = "starship"; + theme = "colorful_loop"; font = "${config.rice.fonts.sans.package}/share/fonts/truetype/MSW98UI-Regular.ttf"; themePackages = [ - (getFlakePkg inputs.hudcore) + pkgs.adi1090x-plymouth-themes + # (getFlakePkg inputs.hudcore) ]; }; }; diff --git a/graphical/startup.nix b/graphical/startup.nix index ba196d9..ea0c310 100644 --- a/graphical/startup.nix +++ b/graphical/startup.nix @@ -1,26 +1,5 @@ +{ pkgs, lib, ... }: { - pkgs, - lib, - ... -}: -scope "user.systemd.services.startup-sound" -<| { - unitConfig = { - Description = "startup sound"; - Requires = [ - "graphical-session.target" - ]; - After = [ - "graphical-session.target" - "niri.target" - "sound.target" - "shell.service" - ]; - PartOf = [ "graphical-session.target" ]; - }; - serviceConfig = { - ExecStart = "${lib.getExe' pkgs.alsa-utils "aplay"} " + ../assets/startup.wav; - Type = "oneshot"; - }; - wantedBy = [ "graphical-session.target" ]; + quick.services.startup-sound = "${lib.getExe' pkgs.alsa-utils "aplay"} " + ../assets/startup.wav; + # FIXME broken , maybe use niri exec-once .. } diff --git a/graphical/sync.nix b/graphical/sync.nix index 403e6be..a1e2ece 100644 --- a/graphical/sync.nix +++ b/graphical/sync.nix @@ -1 +1 @@ -{ ... }: scope "services.syncthing.enable" <| true +{ scope, ... }: scope "services.syncthing.enable" <| true diff --git a/graphical/terminal.nix b/graphical/terminal.nix index dccdd61..50bb5d5 100644 --- a/graphical/terminal.nix +++ b/graphical/terminal.nix @@ -1,6 +1,7 @@ { pkgs, config, + scope, ... }: (scope "apps.terminal" <| pkgs.foot) diff --git a/graphical/webapps.nix b/graphical/webapps.nix deleted file mode 100644 index 7a5533c..0000000 --- a/graphical/webapps.nix +++ /dev/null @@ -1,179 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -let - inherit (lib) - mkOption - mkAliasOptionModule - types - mapAttrsToList - attrNames - filterAttrs - replaceStrings - getExe - toLower - ; - inherit (types) - str - strMatching - package - path - nullOr - listOf - attrsOf - submodule - either - ; - - browser = getExe config.apps.browser; - - webAppLauncher = pkgs.writeShellScript "web-app-launcher" '' - browser="${browser}" - - browser_exec="" - for path in ~/.local ~/.nix-profile /usr /nix/var/nix/profiles/system/etc/profiles/per-user/$USER; do - if [ -f "$path/share/applications/$browser.desktop" ]; then - browser_exec=$(sed -n 's/^Exec=\([^ ]*\).*/\1/p' "$path/share/applications/$browser.desktop" 2>/dev/null | head -1) - break - fi - done - - if [ -z "$browser_exec" ]; then - browser_exec="${browser}" - fi - - url="$1" - app_name="''${2:-$(basename "$0")}" - shift 2 - - exec setsid "$browser_exec" \ - --app="$url" \ - --user-data-dir="$HOME/.local/share/web-apps/$app_name" \ - --no-first-run \ - --no-default-browser-check \ - --disable-background-timer-throttling \ - --disable-backgrounding-occluded-windows \ - --disable-renderer-backgrounding \ - --enable-quic \ - --quic-version=h3-29 \ - --enable-features=UseOzonePlatform,WaylandWindowDecorations,WaylandPerWindowScaling,WaylandTextInputV3,WebRTCPipeWireCapturer \ - --disable-features=WebRtcAllowInputVolumeAdjustment \ - --ozone-platform=wayland \ - --gtk-version=4 \ - --enable-experimental-web-platform-features \ - "$@" - ''; - - # Create web app package - mkWebApp = - { - name, - url, - icon, - description, - categories, - }: - let - cleanName = replaceStrings [ " " "\n" "\t" ] [ "-" "-" "-" ] name |> toLower; - pname = "${cleanName}-webapp"; - in - pkgs.stdenv.mkDerivation { - inherit pname; - version = "1.0"; - dontUnpack = true; - - nativeBuildInputs = [ - pkgs.copyDesktopItems - pkgs.makeWrapper - ]; - - installPhase = '' - runHook preInstall - makeWrapper ${webAppLauncher} $out/bin/${pname} \ - --add-flags "${url}" \ - --add-flags "${pname}" - runHook postInstall - ''; - - desktopItems = [ - (pkgs.makeDesktopItem ( - { - name = pname; - exec = "${pname} %U"; - desktopName = name; - startupNotify = true; - startupWMClass = pname; - } - // filterAttrs (_: v: v != null) { - inherit icon categories; - comment = description; - } - )) - ]; - - meta.mainProgram = pname; - - }; - - innerOpts = { - options = { - name = mkOption { - type = str; - }; - url = mkOption { - type = strMatching "[hH][tT][tT][pP][sS]?://[^\n\r[:space:]]+"; - }; - icon = mkOption { - type = nullOr (either str path); - default = null; - }; - description = mkOption { - type = nullOr str; - default = null; - }; - categories = mkOption { - type = nullOr (listOf str); - default = null; - }; - }; - }; - - pwaModule = submodule ( - { config, ... }: - { - imports = - let - names = innerOpts.options |> attrNames; - in - map (optName: mkAliasOptionModule [ optName ] [ "settings" optName ]) names; - options = { - settings = mkOption { - type = submodule innerOpts; - default = { }; - }; - package = mkOption { - type = package; - readOnly = true; - default = mkWebApp config.settings; - }; - }; - } - ); - -in -{ - options = { - programs.pwas = mkOption { - description = "PWA Applications"; - type = attrsOf pwaModule; - default = { }; - }; - }; - - config = { - environment.systemPackages = mapAttrsToList (_: v: v.package) config.programs.pwas; - }; -} diff --git a/hosts/adrift/boot.nix b/hosts/adrift/boot.nix index b6a8412..2e3210d 100644 --- a/hosts/adrift/boot.nix +++ b/hosts/adrift/boot.nix @@ -1,4 +1,4 @@ -{ ... }: +{ scope, ... }: scope "boot" { kernelParams = [ "mitigations=off" diff --git a/hosts/quiver/boot.nix b/hosts/quiver/boot.nix index 59bcc29..9280201 100644 --- a/hosts/quiver/boot.nix +++ b/hosts/quiver/boot.nix @@ -1,4 +1,5 @@ { + scope, ... }: scope "boot" { diff --git a/hosts/quiver/hw.nix b/hosts/quiver/hw.nix index 20e7c01..c582078 100644 --- a/hosts/quiver/hw.nix +++ b/hosts/quiver/hw.nix @@ -1,5 +1,7 @@ { config, + lib, + pkgs, ... }: { @@ -10,7 +12,8 @@ hardware.graphics.enable = true; services.xserver.videoDrivers = [ "nvidia" ]; - nixpkgs.config.cudaSupport = true; + # temporarily disabled bc firefox + nixpkgs.config.cudaSupport = false; hardware.nvidia = { package = config.boot.kernelPackages.nvidiaPackages.beta; @@ -21,12 +24,12 @@ # openrgb no longer recognises the device? # systemd.services.no-rgb = { - # wantedBy = [ "multi-user.target" ]; + # wantedBy = ["multi-user.target"]; # description = "rgb led turn-off-er"; # serviceConfig = { # Type = "oneshot"; - # ExecStart = ''${lib.getExe pkgs.openrgb} -d "HyperX DRAM" -m static -c 000000''; - # After = [ "openrgb" ]; + # ExecStart = ''${pkgs.openrgb}/bin/openrgb -d "HyperX DRAM" -m static -c 000000''; + # After = ["openrgb"]; # }; # }; diff --git a/hosts/quiver/llm.nix b/hosts/quiver/llm.nix new file mode 100644 index 0000000..2f101f5 --- /dev/null +++ b/hosts/quiver/llm.nix @@ -0,0 +1,25 @@ +{ + # inputs, + config, + scope, + ... +}: +scope "services" { + ollama = { + enable = false; + user = "ollama"; + }; + + open-webui = { + # package = inputs.nixpkgs-stable.legacyPackages.x86_64-linux.open-webui; + enable = false; + port = 8088; + environment = { + DO_NOT_TRACK = "True"; + SCARF_NO_ANALYTICS = "True"; + ANONYMIZED_TELEMETRY = "False"; + WEBUI_AUTH = "False"; + DATABASE_URL = "sqlite:///${config.services.open-webui.stateDir}/newdb.db"; + }; + }; +} diff --git a/lib/create.nix b/lib/create.nix index 73880dc..7f77d3c 100644 --- a/lib/create.nix +++ b/lib/create.nix @@ -16,7 +16,7 @@ in inherit (inputs.nixpkgs.legacyPackages.${info.system}) callPackage; directory = ../pkgs; }; - # scope = import ./scope.nix { inherit lib; }; + scope = import ./scope.nix { inherit lib; }; mainUser = info.username; machineName = name; getPkgs = builtins.attrValues; @@ -29,7 +29,7 @@ in inputs.arbys.nixosModules.arbys inputs.hjem.nixosModules.hjem ( - { ... }: + { scope, ... }: scope "hjem" { users.${info.username}.enable = true; extraModules = [ diff --git a/pkgs/gtk-theme.nix b/pkgs/gtk-theme.nix index 91fd551..f492dcd 100644 --- a/pkgs/gtk-theme.nix +++ b/pkgs/gtk-theme.nix @@ -24,11 +24,10 @@ pkgs.stdenv.mkDerivation { meson optipng ninja - dart-sass ; - # inherit (pkgs.nodePackages) - # sass - # ; + inherit (pkgs.nodePackages) + sass + ; inherit (pkgs.gtk4) dev; inherit rendersvg; }; diff --git a/pkgs/hush.nix b/pkgs/hush.nix new file mode 100644 index 0000000..c80e81f --- /dev/null +++ b/pkgs/hush.nix @@ -0,0 +1,18 @@ +{ + rustPlatform, + fetchFromGitHub, + ... +}: +rustPlatform.buildRustPackage (finalAttrs: { + pname = "hush"; + version = "0.1.4-git"; + src = fetchFromGitHub { + owner = "hush-shell"; + repo = "hush"; + rev = "560c33a2dc8bf967b4fb0c80e3f18ca8934615ff"; + hash = "sha256-kJ1o236xvNTPiLPWPgpQLLfEAXCGT419UgVWmwVHBYA="; + }; + + doCheck = false; + cargoLock.lockFile = "${finalAttrs.src}/Cargo.lock"; +})