Skip to content

Commit 8a22500

Browse files
committed
refactor: fix statix linting warnings and remove unused Hyprland profile
- Add .envrc with direnv integration for automatic nix develop environment * Enables nix flakes and experimental features automatically * Allows pre-commit hooks to run properly with full environment - Fix nix develop shellHook to not hang when using --command flag * Only exec zsh if running interactively (not with --command) * Prevents pre-commit hooks from hanging in CI/non-interactive mode - Remove unused Hyprland profile and desktop configurations * Delete common/profiles/hyprland.nix and wallpapers * Remove desktop-x86 and desktop-arm from flake.nix - Fix all statix linting warnings: * Merge repeated attribute set keys into single blocks - programs.* → programs = { ... } - home.file.* → home.file = { ... } - environment.* → environment = { ... } - system.* → system = { ... } * Replace empty patterns { ... }: with _: * Use inherit syntax where appropriate (username, isLinux, isDarwin) - Update pre-commit flake-check hook to explicitly enable experimental features All pre-commit hooks now pass cleanly.
1 parent 465ed2e commit 8a22500

File tree

17 files changed

+190
-727
lines changed

17 files changed

+190
-727
lines changed

.envrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
use flake
2+
dotenv_if_exists

.pre-commit-config.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ repos:
1616

1717
- id: statix
1818
name: Lint Nix files
19-
entry: bash -c 'if command -v statix &>/dev/null; then statix check "$@"; else echo "⚠️ statix not found, skipping (run in nix develop for linting)"; fi' --
19+
entry: bash -c 'if command -v statix &>/dev/null; then statix check .; else echo "⚠️ statix not found, skipping (run in nix develop for linting)"; fi'
2020
language: system
2121
files: \.nix$
22+
pass_filenames: false
2223
description: Static analysis for Nix files
2324
verbose: true
2425

@@ -32,7 +33,7 @@ repos:
3233

3334
- id: flake-check
3435
name: Validate flake
35-
entry: bash -c 'nix flake check --no-build '
36+
entry: bash -c 'nix --extra-experimental-features "nix-command flakes" flake check --no-build '
3637
language: system
3738
files: \.nix$
3839
pass_filenames: false

common/claude-code/default.nix

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,31 @@
11
{ config, pkgs, ... }: {
2-
# Create writable settings.json using out-of-store symlink
3-
home.file.".claude/settings.json".source = config.lib.file.mkOutOfStoreSymlink
4-
"${config.home.homeDirectory}/.config/nix/common/claude-code/settings.json";
5-
home.file.".claude/output-styles".source = ./output-styles;
2+
home.file = {
3+
# Create writable settings.json using out-of-store symlink
4+
".claude/settings.json".source = config.lib.file.mkOutOfStoreSymlink
5+
"${config.home.homeDirectory}/.config/nix/common/claude-code/settings.json";
66

7-
# Combine local commands with linear commands
8-
home.file.".claude/commands".source = pkgs.symlinkJoin {
9-
name = "claude-commands";
10-
paths = [
11-
./commands
12-
(pkgs.runCommand "linear-commands" { } ''
13-
mkdir -p $out/linear
14-
cp -r ${
15-
pkgs.fetchFromGitHub {
16-
owner = "svnlto";
17-
repo = "claude-code-linear-commands";
18-
rev = "main";
19-
sha256 = "07zl1yfb1pvkyk0kqhdw7z5dpi8078jdybnm0gzwjb13hxk17s21";
20-
}
21-
}/commands/* $out/linear/
22-
'')
23-
];
24-
};
7+
".claude/output-styles".source = ./output-styles;
8+
9+
# Combine local commands with linear commands
10+
".claude/commands".source = pkgs.symlinkJoin {
11+
name = "claude-commands";
12+
paths = [
13+
./commands
14+
(pkgs.runCommand "linear-commands" { } ''
15+
mkdir -p $out/linear
16+
cp -r ${
17+
pkgs.fetchFromGitHub {
18+
owner = "svnlto";
19+
repo = "claude-code-linear-commands";
20+
rev = "main";
21+
sha256 = "07zl1yfb1pvkyk0kqhdw7z5dpi8078jdybnm0gzwjb13hxk17s21";
22+
}
23+
}/commands/* $out/linear/
24+
'')
25+
];
26+
};
2527

26-
# Create necessary directories
27-
home.file.".claude/.keep".text = "";
28+
# Create necessary directories
29+
".claude/.keep".text = "";
30+
};
2831
}

common/gh-dash/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ ... }:
1+
_:
22

33
{
44
# gh-dash configuration with Catppuccin Mocha theme

common/git/default.nix

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
{ pkgs, lib, ... }:
33

44
let
5-
isLinux = pkgs.stdenv.isLinux;
6-
isDarwin = pkgs.stdenv.isDarwin;
5+
inherit (pkgs.stdenv) isLinux isDarwin;
76
signingKey =
87
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFYK1c6kxYT6FzMEqckP04e2unQgTvFPyNEFzT/q/eXR";
98
in {

common/home-manager-base.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ in {
1616

1717
# Base home configuration (homeDirectory set per platform)
1818
home = {
19-
username = username;
19+
inherit username;
2020
stateVersion = versions.homeManagerStateVersion;
2121
};
2222

common/lazygit/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ ... }:
1+
_:
22

33
{
44
# Cross-platform lazygit config

common/neovim/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ ... }:
1+
_:
22

33
{
44
# Neovim program configuration

0 commit comments

Comments
 (0)