Compare commits
3 commits
92a216c920
...
036833945d
| Author | SHA1 | Date | |
|---|---|---|---|
| 036833945d | |||
| 4c6e7bdddd | |||
| e81e34c494 |
3 changed files with 6 additions and 25 deletions
15
CLAUDE.md
15
CLAUDE.md
|
|
@ -12,10 +12,6 @@ This is a NixOS infrastructure repository managing multiple hosts (servers and p
|
||||||
# Enter development shell (sets up MCP configs)
|
# Enter development shell (sets up MCP configs)
|
||||||
nix-shell
|
nix-shell
|
||||||
|
|
||||||
# Test configuration before deployment (required before PRs)
|
|
||||||
./scripts/test-configuration <hostname>
|
|
||||||
./scripts/test-configuration -v <hostname> # with --show-trace
|
|
||||||
|
|
||||||
# Edit encrypted secrets
|
# Edit encrypted secrets
|
||||||
nix-shell -p sops --run 'sops hosts/<hostname>/secrets.yaml'
|
nix-shell -p sops --run 'sops hosts/<hostname>/secrets.yaml'
|
||||||
|
|
||||||
|
|
@ -80,17 +76,6 @@ utils/pkgs/<package-name>/
|
||||||
└── (other files like patches, lock files)
|
└── (other files like patches, lock files)
|
||||||
```
|
```
|
||||||
|
|
||||||
**IMPORTANT: When modifying a custom package** (patches, version updates, etc.), always test by building the package directly, not just running `test-configuration`. The configuration test only checks that the Nix expression evaluates, but doesn't verify the package actually builds:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Build a custom package directly to verify it works
|
|
||||||
nix-build -E 'with import <nixpkgs> { overlays = [ (import ./utils/overlays/packages.nix) ]; config.allowUnfree = true; }; <package-name>'
|
|
||||||
```
|
|
||||||
|
|
||||||
## Workflow
|
|
||||||
|
|
||||||
Run `./scripts/test-configuration <hostname>` to verify NixOS configuration changes build successfully.
|
|
||||||
|
|
||||||
## Conventions
|
## Conventions
|
||||||
|
|
||||||
- Nix files: two-space indentation, lower kebab-case naming
|
- Nix files: two-space indentation, lower kebab-case naming
|
||||||
|
|
|
||||||
|
|
@ -334,10 +334,6 @@ input * xkb_layout "de
|
||||||
input * xkb_options "grp:win_space_toggle"
|
input * xkb_options "grp:win_space_toggle"
|
||||||
input "MANUFACTURER1 Keyboard" xkb_model "pc101"
|
input "MANUFACTURER1 Keyboard" xkb_model "pc101"
|
||||||
|
|
||||||
# notebook
|
|
||||||
set $laptop eDP-1
|
|
||||||
# bindswitch --reload --locked lid:on output $laptop disable
|
|
||||||
# bindswitch --reload lid:off output $laptop enable
|
|
||||||
|
|
||||||
# A lock command used in several places
|
# A lock command used in several places
|
||||||
set $lock_script swaylock
|
set $lock_script swaylock
|
||||||
|
|
@ -355,8 +351,8 @@ set $laptop_screen 'eDP-1'
|
||||||
# Clamshell mode or lock & sleep
|
# Clamshell mode or lock & sleep
|
||||||
# This is a if/else statement: [ outputs_count == 1 ] && true || false
|
# This is a if/else statement: [ outputs_count == 1 ] && true || false
|
||||||
# bindswitch --locked lid:on exec '[ $(swaymsg -t get_outputs | grep name | wc -l) == 1 ] && ($sleep) || swaymsg output $laptop_screen disable'
|
# bindswitch --locked lid:on exec '[ $(swaymsg -t get_outputs | grep name | wc -l) == 1 ] && ($sleep) || swaymsg output $laptop_screen disable'
|
||||||
bindswitch --locked lid:on exec 'swaymsg output $laptop_screen disable'
|
bindswitch --reload --locked lid:on exec 'swaymsg output $laptop_screen disable'
|
||||||
bindswitch --locked lid:off output $laptop_screen enable
|
bindswitch --reload --locked lid:off output $laptop_screen enable
|
||||||
|
|
||||||
# disable xwayland
|
# disable xwayland
|
||||||
#xwayland disable
|
#xwayland disable
|
||||||
|
|
|
||||||
|
|
@ -95,10 +95,10 @@
|
||||||
"network": {
|
"network": {
|
||||||
// "interface": "wlp2*", // (Optional) To force the use of this interface
|
// "interface": "wlp2*", // (Optional) To force the use of this interface
|
||||||
"format-wifi": "{essid} ({signalStrength}%) ",
|
"format-wifi": "{essid} ({signalStrength}%) ",
|
||||||
"format-ethernet": "{ipaddr}/{cidr} ",
|
"format-ethernet": "{ipaddr}/{cidr} ",
|
||||||
"tooltip-format": "{ifname} via {gwaddr} ",
|
"tooltip-format": "{ifname} via {gwaddr} ",
|
||||||
"format-linked": "{ifname} (No IP) ",
|
"format-linked": "{ifname} (No IP) ",
|
||||||
"format-disconnected": "Disconnected ",
|
"format-disconnected": "Disconnected ",
|
||||||
"format-alt": "{ifname}: {ipaddr}/{cidr}"
|
"format-alt": "{ifname}: {ipaddr}/{cidr}"
|
||||||
},
|
},
|
||||||
"memory": {
|
"memory": {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue