diff --git a/.gitignore b/.gitignore index 39a8227..98d9f1e 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ results-* /hardware-configuration.nix .direnv .remote.toml +/.pre-commit-config.yaml _* /logs mprocs.log diff --git a/flake.nix b/flake.nix index df7abfe..663d631 100644 --- a/flake.nix +++ b/flake.nix @@ -82,11 +82,12 @@ nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions" #https://github.com/numtide/nixpkgs-unfree # has a cache #https://github.com/matthewbauer/nixiosk + /**/ + /** / # https://github.com/cachix/pre-commit-hooks.nix - inputs.pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix"; - inputs.pre-commit-hooks.inputs.nixpkgs.follows = "nixpkgs-edge"; - inputs.pre-commit-hooks.inputs.nixpkgs-stable.follows = "nixpkgs-2311"; + pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix"; + pre-commit-hooks.inputs.nixpkgs.follows = "nixpkgs-edge"; /**/ #pbsds-papers.url = "git+ssh://git@github.com/pbsds/papers.git"; @@ -426,8 +427,25 @@ test = mkSystem "furiphoneflx1" inputs-edge "x86_64-linux"; }; + #checks = forAllSystems ({ inputs, system, ... }: { + # pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run { + # src = ./.; + # excludes = ["flake.lock"]; + # hooks = { + # # https://devenv.sh/reference/options/#pre-commithooks + # alejandra.enable = true; + # pretties.enable = true; + # /* pretties.excludes = [".js" ".md" ".ts"]; */ + # }; + # }; + #}); + devShells = forAllSystems ({ pkgs, system, ... }: let mkShell = packages: pkgs.mkShellNoCC { inherit packages; }; + #mkShell'= packages: pkgs.mkShellNoCC { + # inherit (self.checks.${system}.pre-commit-check) shellHook; + # packages = packages ++ self.checks.${system}.pre-commit-check.enabledPackages; + #}; envrc-pkgs = [ self.packages.${system}.nixos-rebuild-nom inputs-edge.system-manager-edge.packages.${system}.system-manager diff --git a/justfile b/justfile index f40b11e..454d11c 100644 --- a/justfile +++ b/justfile @@ -30,6 +30,7 @@ update: | (echo --commit-lock-file; jq '.[]' -r | tr '0123456789' '9876543210' | sort | tr '0123456789' '9876543210' | grep -v "^self$") \ | gum choose --no-limit --height=15 \ | xargs nix flake update + git add flake.lock #build hostname=`if test -z "${IS_REMOTE_ENV:-}"; then just _a_host_timeout; else echo; fi`: build hostname="": diff --git a/users/pbsds/home/profiles/bashrc.d/nix-shell.sh b/users/pbsds/home/profiles/bashrc.d/nix-shell.sh index 3ebbe41..d5b7503 100644 --- a/users/pbsds/home/profiles/bashrc.d/nix-shell.sh +++ b/users/pbsds/home/profiles/bashrc.d/nix-shell.sh @@ -4,5 +4,7 @@ function ns() { args+=(nixpkgs#"$pkg") done >&2 echo + exec nix shell "${args[@]}" - export PATH=$(nix --extra-experimental-features "nix-command flakes" shell "${args[@]}" -c sh -c 'echo $PATH') + local tmp=$(nix --extra-experimental-features "nix-command flakes" shell "${args[@]}" -c sh -c 'echo $PATH') + test $? -eq 0 && -n "$tmp" || return 1 + export PATH="$tmp" } diff --git a/users/pbsds/home/profiles/desktop/default.nix b/users/pbsds/home/profiles/desktop/default.nix index 0cc7378..b554740 100644 --- a/users/pbsds/home/profiles/desktop/default.nix +++ b/users/pbsds/home/profiles/desktop/default.nix @@ -32,6 +32,7 @@ element-desktop unstable.signal-desktop #element-desktop-wayland + /* fractal */ /* neochat */ /* nheko */ /* fluffychat */ diff --git a/users/pbsds/home/profiles/desktop/ghostty/ghosty.config b/users/pbsds/home/profiles/desktop/ghostty/ghosty.config index 7f3c6e8..46e3fed 100644 --- a/users/pbsds/home/profiles/desktop/ghostty/ghosty.config +++ b/users/pbsds/home/profiles/desktop/ghostty/ghosty.config @@ -36,3 +36,4 @@ keybind = ctrl+shift+right=unbind keybind = shift+home=unbind keybind = shift+end=unbind keybind = ctrl+shift+q=unbind +keybind = ctrl+enter=unbind