diff --git a/flake.lock b/flake.lock index fe1d1c2..dfa344e 100755 --- a/flake.lock +++ b/flake.lock @@ -272,11 +272,11 @@ ] }, "locked": { - "lastModified": 1753809622, - "narHash": "sha256-66G3qmbOUJJEaxvH97S7I467ILMUV2nTkkRuoN/ZQq4=", + "lastModified": 1753983724, + "narHash": "sha256-2vlAOJv4lBrE+P1uOGhZ1symyjXTRdn/mz0tZ6faQcg=", "owner": "nix-community", "repo": "home-manager", - "rev": "03fdb31290d1a4a8d23f52206283450d304c3841", + "rev": "7035020a507ed616e2b20c61491ae3eaa8e5462c", "type": "github" }, "original": { @@ -377,11 +377,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1753804949, - "narHash": "sha256-WWUeMJs7kAIK1ZVqHf2acI6LV2U5X2Vbwql8qnnzif8=", + "lastModified": 1753978079, + "narHash": "sha256-9VhQ8igwVxPonlMDwpkAyrcvIQ4FgR/LQF7NWl2YR4Q=", "ref": "refs/heads/main", - "rev": "f51be7f20109cd8eae87db96641aead843a3ef0b", - "revCount": 6321, + "rev": "9607e3b5a88f22017af64ab1ba360a39169a4bf7", + "revCount": 6330, "submodules": true, "type": "git", "url": "https://github.com/hyprwm/Hyprland" @@ -547,11 +547,11 @@ ] }, "locked": { - "lastModified": 1752252310, - "narHash": "sha256-06i1pIh6wb+sDeDmWlzuPwIdaFMxLlj1J9I5B9XqSeo=", + "lastModified": 1753800567, + "narHash": "sha256-W0xgXsaqGa/5/7IBzKNhf0+23MqGPymYYfqT7ECqeTE=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "bcabcbada90ed2aacb435dc09b91001819a6dc82", + "rev": "c65d41d4f4e6ded6fdb9d508a73e2fe90e55cdf7", "type": "github" }, "original": { @@ -744,6 +744,22 @@ } }, "nixpkgs_6": { + "locked": { + "lastModified": 1754393734, + "narHash": "sha256-fbnmAwTQkuXHKBlcL5Nq1sMAzd3GFqCOQgEQw6Hy0Ak=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "a683adc19ff5228af548c6539dbc3440509bfed3", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_7": { "locked": { "lastModified": 1751792365, "narHash": "sha256-J1kI6oAj25IG4EdVlg2hQz8NZTBNYvIS0l4wpr9KcUo=", @@ -762,18 +778,16 @@ "nixvim": { "inputs": { "flake-parts": "flake-parts", - "nixpkgs": [ - "nixpkgs" - ], + "nixpkgs": "nixpkgs_6", "nuschtosSearch": "nuschtosSearch", "systems": "systems_4" }, "locked": { - "lastModified": 1753805595, - "narHash": "sha256-5m0FqObrj/0/nfoaKlgpye4+SZzj1nMPnlxGxlIxKNg=", + "lastModified": 1753977315, + "narHash": "sha256-AM3CZh+Emk/cr5Gf6RUf2xzkWdRB+yewP1YWoRxUbYQ=", "owner": "nix-community", "repo": "nixvim", - "rev": "fe0bcc92c8c593d5e2b45ffb0d1253c3aa55eb72", + "rev": "a16c89c175277309fd3dd065fb5bc4eab450ae07", "type": "github" }, "original": { @@ -896,7 +910,7 @@ "firefox-gnome-theme": "firefox-gnome-theme", "flake-parts": "flake-parts_2", "gnome-shell": "gnome-shell", - "nixpkgs": "nixpkgs_6", + "nixpkgs": "nixpkgs_7", "nur": "nur", "systems": "systems_6", "tinted-foot": "tinted-foot", @@ -906,11 +920,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1753731630, - "narHash": "sha256-8pyTksY2aYtLGmqP8u3xhs4ZfttsfzZXAQZXHKecLDo=", + "lastModified": 1753978157, + "narHash": "sha256-sVy8hb71VawSOIsLv/hMGzpvbbWszdP9aSKI5Drbt6Q=", "owner": "danth", "repo": "stylix", - "rev": "57d036d92283fddc6ae080459e72e767144a1cda", + "rev": "ded4f29a023e0f14506ec16b0e32d129e56341cc", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index f7e9f7f..6d27467 100755 --- a/flake.nix +++ b/flake.nix @@ -8,10 +8,7 @@ stylix.url = "github:danth/stylix"; disko.url = "github:nix-community/disko"; - nixvim = { - url = "github:nix-community/nixvim"; - inputs.nixpkgs.follows = "nixpkgs"; - }; + nixvim.url = "github:nix-community/nixvim"; home-manager = { url = "github:nix-community/home-manager"; diff --git a/hosts/work/config.nix b/hosts/work/config.nix index bae5ca9..be137e5 100755 --- a/hosts/work/config.nix +++ b/hosts/work/config.nix @@ -45,6 +45,7 @@ }; }; }; + security.polkit.enable = true; security.sudo.extraConfig = '' ${username} ALL=(ALL) NOPASSWD: /etc/profiles/per-user/${username}/bin/rebuild ''; diff --git a/modules/home/environment/userpkgs.nix b/modules/home/environment/userpkgs.nix index bf1fb31..c30429c 100755 --- a/modules/home/environment/userpkgs.nix +++ b/modules/home/environment/userpkgs.nix @@ -10,6 +10,7 @@ let myScripts.viconf myScripts.vipkg myScripts.fetchfromgh + myScripts.mkshell myScripts.garbage-collect myScripts.rebuild myScripts.chpaper @@ -59,6 +60,7 @@ in { rustup w3m neovide + claude-code python3 ghostty firefox @@ -70,6 +72,7 @@ in { discord cloc wine + nerd-fonts.fira-code nodejs_latest ] ++ scripts; }; diff --git a/modules/home/environment/zsh/extraconfig.nix b/modules/home/environment/zsh/extraconfig.nix index c5c4c62..9d5bddd 100644 --- a/modules/home/environment/zsh/extraconfig.nix +++ b/modules/home/environment/zsh/extraconfig.nix @@ -21,13 +21,6 @@ in export RESULT echo "\$RESULT = $RESULT" } - precmd() { # Reset kitty color scheme - if [ "$NIX_SHELL" = "false" ]; then # don't run this in a nix-shell - trap 'NIX_SHELL=false kitty_theme' EXIT SIGINT SIGTERM SIGHUP - else # but still apply ssh theme logic in nix-shell - trap 'kitty_theme' EXIT SIGINT SIGTERM SIGHUP - fi - } nix-shell() { NIX_SHELL=true command nix-shell "$@" --run zsh } @@ -55,17 +48,6 @@ in command neovide "$@" } alias vi="nvim" - kitty_theme() { - if [ $TERM = "xterm-kitty" ]; then - if [ -n "$SSH_CONNECTION" ]; then - kitty @ set-colors -a ~/.config/kitty/ssh-theme.conf - elif [ "$name" = "nix-shell-env" ] || [ "$NIX_SHELL" = "true" ]; then - kitty @ set-colors -a ~/.config/kitty/nix-shell-theme.conf - else - kitty @ set-colors -a ~/.config/kitty/default-theme.conf - fi - fi - } grimblast() { if command grimblast "$@"; then ${shellsound} ${sndpath}/screenshot.wav @@ -145,9 +127,10 @@ in eza -1 --group-directories-first --icons "$@" SOUNDS_ENABLED=$prev_sounds_enabled builtin cd "$@" - ${shellsound} /nix/store/7a9w7np3qrvmzxjbs7xj05qq2yccgfsj-source/assets/sound/cd.wav + ${shellsound} ${sndpath}/cd.wav return 0 } + if [ ! -e $HOME/.zsh_history ]; then touch $HOME/.zsh_history chmod 600 $HOME/.zsh_history @@ -191,7 +174,6 @@ in source ${fzf-tab}/fzf-tab.plugin.zsh bindkey -v - kitty_theme type starship_zle-keymap-select >/dev/null || \ { eval "$(starship init zsh)" diff --git a/modules/home/programs/nixvim/default.nix b/modules/home/programs/nixvim/default.nix index f1cf14c..f26137d 100755 --- a/modules/home/programs/nixvim/default.nix +++ b/modules/home/programs/nixvim/default.nix @@ -1,9 +1,14 @@ { env, config, pkgs, host, self, ... }: { - programs.nixvim.extraPackages = [ - pkgs.cargo - pkgs.rustc - pkgs.rustup - pkgs.rust-analyzer - ]; + programs.nixvim = { + nixpkgs.useGlobalPackages = true; + extraPackages = [ + pkgs.cargo + pkgs.rustc + pkgs.clippy + pkgs.rustup + pkgs.rust-analyzer + pkgs.nerd-fonts.envy-code-r + ]; + }; imports = [ ./plugins ./options.nix ./keymaps.nix ./autocmd.nix ]; } diff --git a/modules/home/programs/nixvim/options.nix b/modules/home/programs/nixvim/options.nix index c20ee52..6d6d44b 100755 --- a/modules/home/programs/nixvim/options.nix +++ b/modules/home/programs/nixvim/options.nix @@ -56,7 +56,7 @@ in { vim.opt.linebreak = true vim.opt.textwidth = 0 vim.opt.breakat = " \t!@*-+;:,./?" - vim.opt.guifont = "Fira Code:h18" + vim.opt.guifont = "EnvyCodeR Nerd Font Mono:h18" vim.g.mapleader = "!" vim.g.rust_recommended_style = 0 diff --git a/modules/home/programs/nixvim/plugins/claudecode.nix b/modules/home/programs/nixvim/plugins/claudecode.nix new file mode 100644 index 0000000..8096c66 --- /dev/null +++ b/modules/home/programs/nixvim/plugins/claudecode.nix @@ -0,0 +1,8 @@ +{ + programs.nixvim.plugins = { + claude-code = { + enable = true; + autoLoad = true; + }; + }; +} diff --git a/modules/home/programs/nixvim/plugins/default.nix b/modules/home/programs/nixvim/plugins/default.nix index 90787e0..aa45852 100755 --- a/modules/home/programs/nixvim/plugins/default.nix +++ b/modules/home/programs/nixvim/plugins/default.nix @@ -17,6 +17,7 @@ ./nvim-lightbulb.nix ./neocord.nix ./copilot.nix + ./claudecode.nix ./plugins.nix ./nvim-tree.nix ./telescope.nix diff --git a/modules/home/programs/nixvim/plugins/lsp.nix b/modules/home/programs/nixvim/plugins/lsp.nix index 267c5ed..7a431d4 100755 --- a/modules/home/programs/nixvim/plugins/lsp.nix +++ b/modules/home/programs/nixvim/plugins/lsp.nix @@ -82,7 +82,10 @@ installCargo = false; installRustc = false; settings = { - check.allTargets = false; + check = { + allTargets = false; + command = "clippy"; + }; }; }; nixd = { diff --git a/modules/home/programs/nixvim/plugins/rustaceanvim.nix b/modules/home/programs/nixvim/plugins/rustaceanvim.nix index 56561db..75ebbd2 100644 --- a/modules/home/programs/nixvim/plugins/rustaceanvim.nix +++ b/modules/home/programs/nixvim/plugins/rustaceanvim.nix @@ -4,7 +4,12 @@ programs.nixvim.plugins.rustaceanvim = { enable = false; settings = { - server.auto_attach = true; + server = { + auto_attach = true; + default_settings = { + checkOnSave.command = "clippy"; + }; + }; dap.adapter = false; }; }; diff --git a/modules/sys/hardware/network.nix b/modules/sys/hardware/network.nix index a300624..b497703 100755 --- a/modules/sys/hardware/network.nix +++ b/modules/sys/hardware/network.nix @@ -16,6 +16,7 @@ firewall = { enable = true; allowedTCPPorts = [ 443 8080 ]; + trustedInterfaces = [ "vnet9" "virbr0" "enp0s2" ]; }; }; }; diff --git a/modules/sys/software/gaming/gaming_pkgs.nix b/modules/sys/software/gaming/gaming_pkgs.nix index 65c078a..6a692fb 100755 --- a/modules/sys/software/gaming/gaming_pkgs.nix +++ b/modules/sys/software/gaming/gaming_pkgs.nix @@ -22,6 +22,7 @@ in { #snes9x-gtk #cust-openrct2 mgba + shadps4 cust-prismlauncher ]; }; diff --git a/modules/sys/software/virtualization.nix b/modules/sys/software/virtualization.nix index 2634d70..ad7073d 100755 --- a/modules/sys/software/virtualization.nix +++ b/modules/sys/software/virtualization.nix @@ -1,4 +1,4 @@ -{ lib, config, username, ... }: { +{ lib, config, username, pkgs, ... }: { options = { movOpts.softwareCfg.virtConfig.enable = lib.mkEnableOption "enables virtualization"; @@ -6,5 +6,9 @@ config = lib.mkIf config.movOpts.softwareCfg.virtConfig.enable { virtualisation.libvirtd.enable = true; programs.virt-manager.enable = true; + environment.systemPackages = with pkgs; [ + spice-gtk + usbredir + ]; }; } diff --git a/overlay/overlay.nix b/overlay/overlay.nix index 66fb6c9..197b713 100644 --- a/overlay/overlay.nix +++ b/overlay/overlay.nix @@ -23,29 +23,5 @@ in slash = super.callPackage ./pkgs/slash/package.nix {}; fzf-tab = super.callPackage ./pkgs/zsh-fzf-tab/package.nix {}; }; - myScripts = { - # Scripts written using pkgs.writeShellApplication - icanhazip = super.callPackage ./scripts/commands/icanhazip.nix {}; - invoke = super.callPackage ./scripts/commands/invoke.nix { self = root; }; - git-compose = super.callPackage ./scripts/commands/git-compose.nix { self = root; }; - runbg = super.callPackage ./scripts/commands/runbg.nix {}; - splash = super.callPackage ./scripts/commands/splash.nix {}; - toolbelt = super.callPackage ./scripts/commands/toolbelt.nix {}; - viconf = super.callPackage ./scripts/commands/viconf.nix {}; - vipkg = super.callPackage ./scripts/commands/vipkg.nix {}; - fetchfromgh = super.callPackage ./scripts/nix/fetchfromgh.nix {}; - garbage-collect = super.callPackage ./scripts/nix/garbage-collect.nix {}; - check_updates = super.callPackage ./scripts/nix/check_updates.nix {}; - rebuild = super.callPackage ./scripts/nix/rebuild.nix { inherit host; self = root; }; - chpaper = super.callPackage ./scripts/wm-controls/chpaper.nix {}; - chscheme = super.callPackage ./scripts/wm-controls/chscheme.nix {}; - keyring = super.callPackage ./scripts/wm-controls/keyring.nix {}; - playshellsound = super.callPackage ./scripts/wm-controls/playshellsound.nix {}; - mkscreenshots = super.callPackage ./scripts/wm-controls/mkscreenshots.nix {}; - moveonscreen = super.callPackage ./scripts/wm-controls/moveonscreen.nix {}; - s_check = super.callPackage ./scripts/wm-controls/s_check.nix {}; - switchmon = super.callPackage ./scripts/wm-controls/switchmon.nix {}; - color-commit = super.callPackage ./scripts/misc/color-commit.nix {}; - mntstack = super.callPackage ./scripts/misc/mntstack.nix {}; - }; + myScripts = import ./scripts { inherit super root host; }; } diff --git a/overlay/scripts/commands/default.nix b/overlay/scripts/commands/default.nix new file mode 100644 index 0000000..110ea49 --- /dev/null +++ b/overlay/scripts/commands/default.nix @@ -0,0 +1,12 @@ +{ super, root }: + +{ + icanhazip = super.callPackage ./icanhazip.nix {}; + invoke = super.callPackage ./invoke.nix { self = root; }; + git-compose = super.callPackage ./git-compose.nix { self = root; }; + runbg = super.callPackage ./runbg.nix {}; + splash = super.callPackage ./splash.nix {}; + toolbelt = super.callPackage ./toolbelt.nix {}; + viconf = super.callPackage ./viconf.nix {}; + vipkg = super.callPackage ./vipkg.nix {}; +} diff --git a/overlay/scripts/default.nix b/overlay/scripts/default.nix new file mode 100644 index 0000000..1f7ba3f --- /dev/null +++ b/overlay/scripts/default.nix @@ -0,0 +1,7 @@ +{ super, root, host }: + +# We need to fold all of these into a single attribute set +import ./commands { inherit super root; } // +import ./nix { inherit super host root; } // +import ./misc { inherit super; } // +import ./wm-controls { inherit super; } diff --git a/overlay/scripts/misc/default.nix b/overlay/scripts/misc/default.nix new file mode 100644 index 0000000..95d50b6 --- /dev/null +++ b/overlay/scripts/misc/default.nix @@ -0,0 +1,6 @@ +{ super }: + +{ + color-commit = super.callPackage ./color-commit.nix {}; + mntstack = super.callPackage ./mntstack.nix {}; +} diff --git a/overlay/scripts/nix/default.nix b/overlay/scripts/nix/default.nix new file mode 100644 index 0000000..4884eac --- /dev/null +++ b/overlay/scripts/nix/default.nix @@ -0,0 +1,9 @@ +{ super, host, root }: + +{ + fetchfromgh = super.callPackage ./templates/fetchfromgh.nix {}; + mkshell = super.callPackage ./templates/mkshell.nix {}; + garbage-collect = super.callPackage ./garbage-collect.nix {}; + check_updates = super.callPackage ./check_updates.nix {}; + rebuild = super.callPackage ./rebuild.nix { inherit host; self = root; }; +} diff --git a/overlay/scripts/nix/fetchfromgh.nix b/overlay/scripts/nix/templates/fetchfromgh.nix similarity index 100% rename from overlay/scripts/nix/fetchfromgh.nix rename to overlay/scripts/nix/templates/fetchfromgh.nix diff --git a/overlay/scripts/nix/templates/mkshell.nix b/overlay/scripts/nix/templates/mkshell.nix new file mode 100644 index 0000000..a233b52 --- /dev/null +++ b/overlay/scripts/nix/templates/mkshell.nix @@ -0,0 +1,19 @@ +{ pkgs ? import { } }: + +pkgs.writeShellApplication { + name = "mkshell"; + runtimeInputs = []; + text = '' + command cat <