Compare commits
61 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8a2c5ba577 | |||
| f904a672d4 | |||
| 379fdd5b46 | |||
| 21090c93e8 | |||
| 2b914efbb1 | |||
| 7b1bab3c9b | |||
| d517d74bf7 | |||
| d83cfcf681 | |||
| a9d08f15a2 | |||
| ce4588d0c2 | |||
| 69eee64e7e | |||
| 09fbea3f77 | |||
| 64a7b2c6cf | |||
| c8bc396e89 | |||
| 035c07d658 | |||
| 30d73dabf1 | |||
| adc49e7f6e | |||
| 74b19dd7dc | |||
| 329f03c1e2 | |||
| 99cf8d6ac6 | |||
| d222dc05a9 | |||
| 84b30c0233 | |||
| ebf1b6b4d0 | |||
| 6e246c38b6 | |||
| f5e2f1832a | |||
| d53ab3b4e3 | |||
| f9368749b5 | |||
| 3c409bd83a | |||
| 01448b6e0e | |||
| e54af73cb2 | |||
| 7da0b208e6 | |||
| 0fe704c32a | |||
| 273bfd2ac8 | |||
| 09a01ff947 | |||
| 1ef015cb16 | |||
| 52dfcea713 | |||
| 863f124b08 | |||
| 7a78b1831c | |||
| 13bb77108c | |||
| d10b30b06b | |||
| 4d218e314c | |||
| 87229f9a31 | |||
| bc163b8157 | |||
| 30fefb0f5f | |||
| 8124b9ffa9 | |||
| 77c9514b88 | |||
| bc2523302d | |||
| 31c1139dbd | |||
| 32fa706f9f | |||
| 18cabc994c | |||
| 4bb92855e7 | |||
| fa7bfabf48 | |||
| 9bd5c5b727 | |||
| 88f85bb5d7 | |||
| 70154b0652 | |||
| e226d4b28f | |||
| 58dc1d49f6 | |||
| 90f36202a9 | |||
| 9548fef641 | |||
| e0fe69b887 | |||
| d3c4fd6aa3 |
@@ -77,7 +77,7 @@ shell:
|
||||
[group('nix')]
|
||||
fmt:
|
||||
# format the nix files in this repo
|
||||
nix fmt
|
||||
ls **/*.nix | each { |it| nixfmt $it.name }
|
||||
|
||||
# Show all the auto gc roots in the nix store
|
||||
[group('nix')]
|
||||
@@ -108,19 +108,29 @@ up-nix:
|
||||
#
|
||||
############################################################################
|
||||
|
||||
# Deploy the nixosConfiguration by hostname match
|
||||
[linux]
|
||||
[group('homelab')]
|
||||
local mode="default":
|
||||
#!/usr/bin/env nu
|
||||
use {{utils_nu}} *;
|
||||
nixos-switch (hostname) {{mode}}
|
||||
|
||||
# Deploy the hyprland nixosConfiguration by hostname match
|
||||
[linux]
|
||||
[group('desktop')]
|
||||
hypr mode="default":
|
||||
#!/usr/bin/env nu
|
||||
use {{utils_nu}} *;
|
||||
nixos-switch ai-hyprland {{mode}}
|
||||
nixos-switch $"(hostname)-hyprland" {{mode}}
|
||||
|
||||
# Deploy the niri nixosConfiguration by hostname match
|
||||
[linux]
|
||||
[group('desktop')]
|
||||
s-hypr mode="default":
|
||||
niri mode="default":
|
||||
#!/usr/bin/env nu
|
||||
use {{utils_nu}} *;
|
||||
nixos-switch shoukei-hyprland {{mode}}
|
||||
nixos-switch $"(hostname)-niri" {{mode}}
|
||||
|
||||
############################################################################
|
||||
#
|
||||
@@ -141,23 +151,15 @@ darwin-rollback:
|
||||
use {{utils_nu}} *;
|
||||
darwin-rollback
|
||||
|
||||
# Depoly to fern(macOS host)
|
||||
# Deploy the darwinConfiguration by hostname match
|
||||
[macos]
|
||||
[group('desktop')]
|
||||
fe mode="default":
|
||||
local mode="default":
|
||||
#!/usr/bin/env nu
|
||||
use {{utils_nu}} *;
|
||||
darwin-build "fern" {{mode}};
|
||||
darwin-switch "fern" {{mode}}
|
||||
darwin-build (hostname) {{mode}};
|
||||
darwin-switch (hostname) {{mode}}
|
||||
|
||||
# Depoly to frieren(macOS host)
|
||||
[macos]
|
||||
[group('desktop')]
|
||||
fr mode="default":
|
||||
#!/usr/bin/env nu
|
||||
use {{utils_nu}} *;
|
||||
darwin-build "frieren" {{mode}};
|
||||
darwin-switch "frieren" {{mode}}
|
||||
|
||||
# Reset launchpad to force it to reindex Applications
|
||||
[macos]
|
||||
@@ -178,13 +180,6 @@ reset-launchpad:
|
||||
col tag:
|
||||
colmena apply --on '@{{tag}}' --verbose --show-trace
|
||||
|
||||
[linux]
|
||||
[group('homelab')]
|
||||
local name mode="default":
|
||||
#!/usr/bin/env nu
|
||||
use {{utils_nu}} *;
|
||||
nixos-switch {{name}} {{mode}}
|
||||
|
||||
# Build and upload a vm image
|
||||
[linux]
|
||||
[group('homelab')]
|
||||
@@ -204,37 +199,16 @@ lab:
|
||||
shoryu:
|
||||
colmena apply --on '@kubevirt-shoryu' --verbose --show-trace
|
||||
|
||||
[linux]
|
||||
[group('homelab')]
|
||||
shoryu-local mode="default":
|
||||
#!/usr/bin/env nu
|
||||
use {{utils_nu}} *;
|
||||
nixos-switch kubevirt-shoryu {{mode}}
|
||||
|
||||
[linux]
|
||||
[group('homelab')]
|
||||
shushou:
|
||||
colmena apply --on '@kubevirt-shushou' --verbose --show-trace
|
||||
|
||||
[linux]
|
||||
[group('homelab')]
|
||||
shushou-local mode="default":
|
||||
#!/usr/bin/env nu
|
||||
use {{utils_nu}} *;
|
||||
nixos-switch kubevirt-shushou {{mode}}
|
||||
|
||||
[linux]
|
||||
[group('homelab')]
|
||||
youko:
|
||||
colmena apply --on '@kubevirt-youko' --verbose --show-trace
|
||||
|
||||
[linux]
|
||||
[group('homelab')]
|
||||
youko-local mode="default":
|
||||
#!/usr/bin/env nu
|
||||
use {{utils_nu}} *;
|
||||
nixos-switch kubevirt-youko {{mode}}
|
||||
|
||||
############################################################################
|
||||
#
|
||||
# Commands for other Virtual Machines
|
||||
@@ -256,37 +230,16 @@ upload-idols mode="default":
|
||||
aqua:
|
||||
colmena apply --on '@aqua' --verbose --show-trace
|
||||
|
||||
[linux]
|
||||
[group('homelab')]
|
||||
aqua-local mode="default":
|
||||
#!/usr/bin/env nu
|
||||
use {{utils_nu}} *;
|
||||
nixos-switch aquamarine {{mode}}
|
||||
|
||||
[linux]
|
||||
[group('homelab')]
|
||||
ruby:
|
||||
colmena apply --on '@ruby' --verbose --show-trace
|
||||
|
||||
[linux]
|
||||
[group('homelab')]
|
||||
ruby-local mode="default":
|
||||
#!/usr/bin/env nu
|
||||
use {{utils_nu}} *;
|
||||
nixos-switch ruby {{mode}}
|
||||
|
||||
[linux]
|
||||
[group('homelab')]
|
||||
kana:
|
||||
colmena apply --on '@kana' --verbose --show-trace
|
||||
|
||||
[linux]
|
||||
[group('homelab')]
|
||||
kana-local mode="default":
|
||||
#!/usr/bin/env nu
|
||||
use {{utils_nu}} *;
|
||||
nixos-switch kana {{mode}}
|
||||
|
||||
############################################################################
|
||||
#
|
||||
# Kubernetes related commands
|
||||
|
||||
@@ -56,7 +56,7 @@ You don't have to go through the pain I've experienced again! Check out my
|
||||
|
||||
| | NixOS(Wayland) |
|
||||
| --------------------------- | ------------------------------------------------------------------------------------------------------------------- |
|
||||
| **Window Manager** | [Hyprland][Hyprland] |
|
||||
| **Window Manager** | [Hyprland][Hyprland] / [Niri][Niri] |
|
||||
| **Terminal Emulator** | [Zellij][Zellij] + [Kitty][Kitty] |
|
||||
| **Bar** | [Waybar][Waybar] |
|
||||
| **Application Launcher** | [anyrun][anyrun] |
|
||||
@@ -116,7 +116,8 @@ For NixOS:
|
||||
sudo nixos-rebuild switch --flake .#ai-hyprland
|
||||
|
||||
# deploy via `just`(a command runner with similar syntax to make) & Justfile
|
||||
just hypr # deploy my pc with hyprland compositor
|
||||
# Deploy the hyprland nixosConfiguration by hostname match
|
||||
just hypr
|
||||
|
||||
# or we can deploy with details
|
||||
just hypr debug
|
||||
@@ -132,11 +133,11 @@ nix-shell -p just nushell
|
||||
# 3. comment home-manager's code in lib/macosSystem.nix to speed up the first deployment.
|
||||
# 4. comment out the proxy settings in scripts/darwin_set_proxy.py if the proxy is not ready yet.
|
||||
|
||||
# deploy fern's configuration(Apple Silicon)
|
||||
just fe
|
||||
# Deploy the darwinConfiguration by hostname match
|
||||
just local
|
||||
|
||||
# deploy with details
|
||||
just fe debug
|
||||
just local debug
|
||||
```
|
||||
|
||||
> [What y'all will need when Nix drives you to drink.](https://www.youtube.com/watch?v=Eni9PPPPBpg)
|
||||
@@ -175,6 +176,7 @@ Other dotfiles that inspired me:
|
||||
- [1amSimp1e/dots](https://github.com/1amSimp1e/dots)
|
||||
|
||||
[Hyprland]: https://github.com/hyprwm/Hyprland
|
||||
[Niri]: https://github.com/YaLTeR/niri
|
||||
[Kitty]: https://github.com/kovidgoyal/kitty
|
||||
[Nushell]: https://github.com/nushell/nushell
|
||||
[Starship]: https://github.com/starship/starship
|
||||
|
||||
@@ -33,11 +33,11 @@
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1748365336,
|
||||
"narHash": "sha256-pg0w4uOZI32dLASD6UbBezeQg5PwOa0GLv7rTwn3VxY=",
|
||||
"lastModified": 1755411828,
|
||||
"narHash": "sha256-TJhktHx79CMN6dCvFMST9PECDS9zW5iWEDyiMleXUSo=",
|
||||
"owner": "Kirottu",
|
||||
"repo": "anyrun",
|
||||
"rev": "25367153f225a59c5ce5746583e39a71ff052f09",
|
||||
"rev": "0c3fa788227d29cf8b0184e553c83021bcebad7c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -54,11 +54,11 @@
|
||||
},
|
||||
"locked": {
|
||||
"dir": "blender",
|
||||
"lastModified": 1746378999,
|
||||
"narHash": "sha256-aF+uC/aYR4I7VxN9s0gQG1WRDTE0Re3jAMd0qBkWjV4=",
|
||||
"lastModified": 1754037902,
|
||||
"narHash": "sha256-d9hAFy/R8o5UM/mrgCBm+xE8NbtgkXYPHLVza07xGgE=",
|
||||
"owner": "edolstra",
|
||||
"repo": "nix-warez",
|
||||
"rev": "85d76721132cc6631bbaa8c950d4d0f3aa4003fd",
|
||||
"rev": "e8b2b3214f07970e45ec3fc98d957b0507a3564a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -75,11 +75,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1752227483,
|
||||
"narHash": "sha256-eetITGJfURryoHY5gfuE9/4sEV9aSgzhPxgsQgofNa8=",
|
||||
"lastModified": 1755334713,
|
||||
"narHash": "sha256-Nxq+mi6aqEbJA4R7i4TLr68ANuIgnEo2aKzJKRYd11s=",
|
||||
"owner": "catppuccin",
|
||||
"repo": "nix",
|
||||
"rev": "5f431aac1a4038c385e6de2d2384d943e4802d61",
|
||||
"rev": "a2ef20ed6fb921073c2d1b1929447c3bd88f595e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -196,11 +196,11 @@
|
||||
"flake-compat_4": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1696426674,
|
||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||
"lastModified": 1747046372,
|
||||
"narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -256,11 +256,11 @@
|
||||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1751413152,
|
||||
"narHash": "sha256-Tyw1RjYEsp5scoigs1384gIg6e0GoBVjms4aXFfRssQ=",
|
||||
"lastModified": 1754487366,
|
||||
"narHash": "sha256-pHYj8gUBapuUzKV/kN/tR3Zvqc7o6gdFB9XKXIp1SQ8=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "77826244401ea9de6e3bac47c2db46005e1f30b5",
|
||||
"rev": "af66ad14b28a127c5c0f3bbb298218fc63528a18",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -277,11 +277,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1751413152,
|
||||
"narHash": "sha256-Tyw1RjYEsp5scoigs1384gIg6e0GoBVjms4aXFfRssQ=",
|
||||
"lastModified": 1754487366,
|
||||
"narHash": "sha256-pHYj8gUBapuUzKV/kN/tR3Zvqc7o6gdFB9XKXIp1SQ8=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "77826244401ea9de6e3bac47c2db46005e1f30b5",
|
||||
"rev": "af66ad14b28a127c5c0f3bbb298218fc63528a18",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -335,11 +335,11 @@
|
||||
"zon2nix": "zon2nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1752207706,
|
||||
"narHash": "sha256-6Fiy+icid2rKXL9oKcRd3zuITSwtdnShqCPp0Evt3fM=",
|
||||
"lastModified": 1755285323,
|
||||
"narHash": "sha256-o+TmZKnch5D0IjhWD/rhVK9Ahqafz6oZ61NKDDocXMw=",
|
||||
"owner": "ghostty-org",
|
||||
"repo": "ghostty",
|
||||
"rev": "4aa28988a6ddd9aa8b3402e4bab05ad02a0c12c6",
|
||||
"rev": "11d56235f9e4a227b794a87a503785ef9f3349ed",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -424,11 +424,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1748000383,
|
||||
"narHash": "sha256-EaAJhwfJGBncgIV/0NlJviid2DP93cTMc9h0q6P6xXk=",
|
||||
"lastModified": 1752595130,
|
||||
"narHash": "sha256-CNBgr4OZSuklGtNOa9CnTNo9+Xceqn/EDAC1Tc43fH8=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "hercules-ci-effects",
|
||||
"rev": "231726642197817d20310b9d39dd4afb9e899489",
|
||||
"rev": "5f2e09654b2e70ba643e41609d9f9b6640f22113",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -465,11 +465,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1752202894,
|
||||
"narHash": "sha256-knafgng4gCjZIUMyAEWjxxdols6n/swkYnbWr+oF+1w=",
|
||||
"lastModified": 1755397986,
|
||||
"narHash": "sha256-qwrF5laj6eE3Zht0wKYTmH6QzL7bdOyE2f6jd3WCO8g=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "fab659b346c0d4252208434c3c4b3983a4b38fec",
|
||||
"rev": "8b4ac149687e8520187a66f05e9d4eafebf96522",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -539,6 +539,62 @@
|
||||
"url": "ssh://git@github.com/ryan4yin/nix-secrets.git"
|
||||
}
|
||||
},
|
||||
"niri": {
|
||||
"inputs": {
|
||||
"niri-stable": "niri-stable",
|
||||
"niri-unstable": "niri-unstable",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nixpkgs-stable": "nixpkgs-stable_2",
|
||||
"xwayland-satellite-stable": "xwayland-satellite-stable",
|
||||
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1755424351,
|
||||
"narHash": "sha256-xcorYLNdtLpb0wH5CPlUcpmYQUxeK95j1X855xQw+DY=",
|
||||
"owner": "sodiboo",
|
||||
"repo": "niri-flake",
|
||||
"rev": "9aa137af01f05386e5bb5050e983750017007a66",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "sodiboo",
|
||||
"repo": "niri-flake",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"niri-stable": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1748151941,
|
||||
"narHash": "sha256-z4viQZLgC2bIJ3VrzQnR+q2F3gAOEQpU1H5xHtX/2fs=",
|
||||
"owner": "YaLTeR",
|
||||
"repo": "niri",
|
||||
"rev": "8ba57fcf25d2fc9565131684a839d58703f1dae7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "YaLTeR",
|
||||
"ref": "v25.05.1",
|
||||
"repo": "niri",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"niri-unstable": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1755419373,
|
||||
"narHash": "sha256-EFH3zbpyLYjEboNV2Lmkxf9joEuFCmeYX+MMLRPStpg=",
|
||||
"owner": "YaLTeR",
|
||||
"repo": "niri",
|
||||
"rev": "a6febb86aa5af0df7bf2792ca027ef95a503d599",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "YaLTeR",
|
||||
"repo": "niri",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-darwin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@@ -546,11 +602,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1751313918,
|
||||
"narHash": "sha256-HsJM3XLa43WpG+665aGEh8iS8AfEwOIQWk3Mke3e7nk=",
|
||||
"lastModified": 1755275010,
|
||||
"narHash": "sha256-lEApCoWUEWh0Ifc3k1JdVjpMtFFXeL2gG1qvBnoRc2I=",
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "e04a388232d9a6ba56967ce5b53a8a6f713cdfcf",
|
||||
"rev": "7220b01d679e93ede8d7b25d6f392855b81dd475",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -567,11 +623,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1752199489,
|
||||
"narHash": "sha256-p2zkn8fdLvZ19MgAA5CdiuQWQ/gE3YNg1Nhbm4EAflI=",
|
||||
"lastModified": 1755396822,
|
||||
"narHash": "sha256-gID7ynpJuflQ/+ibrhYUWybiGPduNvvMJSk27oqfK24=",
|
||||
"owner": "fufexan",
|
||||
"repo": "nix-gaming",
|
||||
"rev": "62f976ed47de88323770646a9a92e4912d33585f",
|
||||
"rev": "f2bf778502254d8852402a83ae346fd803095ccc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -600,20 +656,21 @@
|
||||
"flake-compat": "flake-compat_3",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
],
|
||||
"treefmt-nix": "treefmt-nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1751622568,
|
||||
"narHash": "sha256-EE3NBsej517VRa1x+ylAghrvngftxf1KgfHlE9OYyXE=",
|
||||
"lastModified": 1755124568,
|
||||
"narHash": "sha256-8fXTYruAwE6OiIz/99P5qknQYag7ZX985pNT+jhIIrU=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixos-apple-silicon",
|
||||
"rev": "eba4b40c816e5aff8951ae231ac237e8aab8ec1d",
|
||||
"rev": "2f873fc3ef373e59cd3a7dad4087685fc8ce02ca",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-2025-08-10",
|
||||
"repo": "nixos-apple-silicon",
|
||||
"rev": "eba4b40c816e5aff8951ae231ac237e8aab8ec1d",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
@@ -647,11 +704,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1752113924,
|
||||
"narHash": "sha256-mbAHO0rZDBdSosV4LIk9s/3IH1ZhQY9ELixieo+iEns=",
|
||||
"lastModified": 1755139484,
|
||||
"narHash": "sha256-gCMJp0indBuBXnog2C86aby5Pz268gUMZD0ORahulO8=",
|
||||
"owner": "nixpak",
|
||||
"repo": "nixpak",
|
||||
"rev": "19942ded45bd73c74dbb44642406da0569f639a8",
|
||||
"rev": "ae70d05017be7e0aa6c1cf5f267fe6953eb027e6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -675,11 +732,11 @@
|
||||
},
|
||||
"nixpkgs-darwin": {
|
||||
"locked": {
|
||||
"lastModified": 1751949589,
|
||||
"narHash": "sha256-mgFxAPLWw0Kq+C8P3dRrZrOYEQXOtKuYVlo9xvPntt8=",
|
||||
"lastModified": 1755268003,
|
||||
"narHash": "sha256-nNaeJjo861wFR0tjHDyCnHs1rbRtrMgxAKMoig9Sj/w=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9b008d60392981ad674e04016d25619281550a9d",
|
||||
"rev": "32f313e49e42f715491e1ea7b306a87c16fe0388",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -691,11 +748,11 @@
|
||||
},
|
||||
"nixpkgs-lib": {
|
||||
"locked": {
|
||||
"lastModified": 1751159883,
|
||||
"narHash": "sha256-urW/Ylk9FIfvXfliA1ywh75yszAbiTEVgpPeinFyVZo=",
|
||||
"lastModified": 1753579242,
|
||||
"narHash": "sha256-zvaMGVn14/Zz8hnp4VWT9xVnhc8vuL3TStRqwk22biA=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"rev": "14a40a1d7fb9afa4739275ac642ed7301a9ba1ab",
|
||||
"rev": "0f36c44e01a6129be94e3ade315a5883f0228a6e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -706,11 +763,11 @@
|
||||
},
|
||||
"nixpkgs-ollama": {
|
||||
"locked": {
|
||||
"lastModified": 1751984180,
|
||||
"narHash": "sha256-LwWRsENAZJKUdD3SpLluwDmdXY9F45ZEgCb0X+xgOL0=",
|
||||
"lastModified": 1755186698,
|
||||
"narHash": "sha256-wNO3+Ks2jZJ4nTHMuks+cxAiVBGNuEBXsT29Bz6HASo=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9807714d6944a957c2e036f84b0ff8caf9930bc0",
|
||||
"rev": "fbcf476f790d8a217c3eab4e12033dc4a0f6d23c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -738,11 +795,27 @@
|
||||
},
|
||||
"nixpkgs-stable_2": {
|
||||
"locked": {
|
||||
"lastModified": 1751943650,
|
||||
"narHash": "sha256-7orTnNqkGGru8Je6Un6mq1T8YVVU/O5kyW4+f9C1mZQ=",
|
||||
"lastModified": 1755274400,
|
||||
"narHash": "sha256-rTInmnp/xYrfcMZyFMH3kc8oko5zYfxsowaLv1LVobY=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ad7196ae55c295f53a7d1ec39e4a06d922f3b899",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-25.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable_3": {
|
||||
"locked": {
|
||||
"lastModified": 1755274400,
|
||||
"narHash": "sha256-rTInmnp/xYrfcMZyFMH3kc8oko5zYfxsowaLv1LVobY=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "88983d4b665fb491861005137ce2b11a9f89f203",
|
||||
"rev": "ad7196ae55c295f53a7d1ec39e4a06d922f3b899",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -754,11 +827,11 @@
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1751984180,
|
||||
"narHash": "sha256-LwWRsENAZJKUdD3SpLluwDmdXY9F45ZEgCb0X+xgOL0=",
|
||||
"lastModified": 1755186698,
|
||||
"narHash": "sha256-wNO3+Ks2jZJ4nTHMuks+cxAiVBGNuEBXsT29Bz6HASo=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9807714d6944a957c2e036f84b0ff8caf9930bc0",
|
||||
"rev": "fbcf476f790d8a217c3eab4e12033dc4a0f6d23c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -770,11 +843,27 @@
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1751984180,
|
||||
"narHash": "sha256-LwWRsENAZJKUdD3SpLluwDmdXY9F45ZEgCb0X+xgOL0=",
|
||||
"lastModified": 1755186698,
|
||||
"narHash": "sha256-wNO3+Ks2jZJ4nTHMuks+cxAiVBGNuEBXsT29Bz6HASo=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "fbcf476f790d8a217c3eab4e12033dc4a0f6d23c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1755186698,
|
||||
"narHash": "sha256-wNO3+Ks2jZJ4nTHMuks+cxAiVBGNuEBXsT29Bz6HASo=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9807714d6944a957c2e036f84b0ff8caf9930bc0",
|
||||
"rev": "fbcf476f790d8a217c3eab4e12033dc4a0f6d23c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -828,11 +917,11 @@
|
||||
"polybar-themes": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1750950071,
|
||||
"narHash": "sha256-Hanx8zEueKvI4jBrcUQIo6GnkzcS2TgsixBLS8V9ZKM=",
|
||||
"lastModified": 1753542051,
|
||||
"narHash": "sha256-f/54m7RJnqNW6eC/75IrnFxmSWTY+zd5epm6TQsYeYA=",
|
||||
"owner": "adi1090x",
|
||||
"repo": "polybar-themes",
|
||||
"rev": "ccf23ef328f1e988650487c40678c6953038e2b2",
|
||||
"rev": "e6326ff356b296256b7fac9c5bcc42a1ef4a4d5b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -850,16 +939,16 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1750779888,
|
||||
"narHash": "sha256-wibppH3g/E2lxU43ZQHC5yA/7kIKLGxVEnsnVK1BtRg=",
|
||||
"lastModified": 1754416808,
|
||||
"narHash": "sha256-c6yg0EQ9xVESx6HGDOCMcyRSjaTpNJP10ef+6fRcofA=",
|
||||
"owner": "cachix",
|
||||
"repo": "pre-commit-hooks.nix",
|
||||
"rev": "16ec914f6fb6f599ce988427d9d94efddf25fe6d",
|
||||
"repo": "git-hooks.nix",
|
||||
"rev": "9c52372878df6911f9afc1e2a1391f55e4dfc864",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "cachix",
|
||||
"repo": "pre-commit-hooks.nix",
|
||||
"repo": "git-hooks.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
@@ -918,15 +1007,16 @@
|
||||
"lanzaboote": "lanzaboote",
|
||||
"my-asahi-firmware": "my-asahi-firmware",
|
||||
"mysecrets": "mysecrets",
|
||||
"niri": "niri",
|
||||
"nix-darwin": "nix-darwin",
|
||||
"nix-gaming": "nix-gaming",
|
||||
"nixos-apple-silicon": "nixos-apple-silicon",
|
||||
"nixos-generators": "nixos-generators",
|
||||
"nixpak": "nixpak",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nixpkgs": "nixpkgs_3",
|
||||
"nixpkgs-darwin": "nixpkgs-darwin",
|
||||
"nixpkgs-ollama": "nixpkgs-ollama",
|
||||
"nixpkgs-stable": "nixpkgs-stable_2",
|
||||
"nixpkgs-stable": "nixpkgs-stable_3",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||
"nuenv": "nuenv",
|
||||
"nur-ryan4yin": "nur-ryan4yin",
|
||||
@@ -1039,6 +1129,27 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"treefmt-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixos-apple-silicon",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1754847726,
|
||||
"narHash": "sha256-2vX8QjO5lRsDbNYvN9hVHXLU6oMl+V/PsmIiJREG4rE=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "7d81f6fb2e19bf84f1c65135d1060d829fae2408",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"wallpapers": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
@@ -1055,10 +1166,44 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"xwayland-satellite-stable": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1748488455,
|
||||
"narHash": "sha256-IiLr1alzKFIy5tGGpDlabQbe6LV1c9ABvkH6T5WmyRI=",
|
||||
"owner": "Supreeeme",
|
||||
"repo": "xwayland-satellite",
|
||||
"rev": "3ba30b149f9eb2bbf42cf4758d2158ca8cceef73",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Supreeeme",
|
||||
"ref": "v0.6",
|
||||
"repo": "xwayland-satellite",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"xwayland-satellite-unstable": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1755219541,
|
||||
"narHash": "sha256-yKV6xHaPbEbh5RPxAJnb9yTs1wypr7do86hFFGQm1w8=",
|
||||
"owner": "Supreeeme",
|
||||
"repo": "xwayland-satellite",
|
||||
"rev": "5a184d435927c3423f0ad189ea2b490578450fb7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Supreeeme",
|
||||
"repo": "xwayland-satellite",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"zig": {
|
||||
"inputs": {
|
||||
"flake-compat": [
|
||||
"ghostty"
|
||||
"ghostty",
|
||||
"flake-compat"
|
||||
],
|
||||
"flake-utils": [
|
||||
"ghostty",
|
||||
@@ -1104,8 +1249,8 @@
|
||||
},
|
||||
"original": {
|
||||
"owner": "jcollie",
|
||||
"ref": "56c159be489cc6c0e73c3930bd908ddc6fe89613",
|
||||
"repo": "zon2nix",
|
||||
"rev": "56c159be489cc6c0e73c3930bd908ddc6fe89613",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
|
||||
# add git hooks to format nix code before commit
|
||||
pre-commit-hooks = {
|
||||
url = "github:cachix/pre-commit-hooks.nix";
|
||||
url = "github:cachix/git-hooks.nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
@@ -139,10 +139,12 @@
|
||||
|
||||
nixos-apple-silicon = {
|
||||
# 2025-07-04
|
||||
url = "github:nix-community/nixos-apple-silicon/eba4b40c816e5aff8951ae231ac237e8aab8ec1d";
|
||||
url = "github:nix-community/nixos-apple-silicon/release-2025-08-10";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
niri.url = "github:sodiboo/niri-flake";
|
||||
|
||||
######################## Some non-flake repositories #########################################
|
||||
|
||||
polybar-themes = {
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
services.dbus.apparmor = "enabled";
|
||||
security.apparmor = {
|
||||
enable = true;
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
appimageTools,
|
||||
fetchurl,
|
||||
stdenvNoCC,
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
pname = "wechat";
|
||||
# https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/by-name/we/wechat/package.nix
|
||||
sources = {
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
pkgs,
|
||||
nixpak,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
callArgs = {
|
||||
mkNixPak = nixpak.lib.nixpak {
|
||||
inherit (pkgs) lib;
|
||||
@@ -14,7 +15,8 @@
|
||||
];
|
||||
};
|
||||
wrapper = _pkgs: path: (_pkgs.callPackage path callArgs).config.script;
|
||||
in {
|
||||
in
|
||||
{
|
||||
# Add nixpaked Apps into nixpkgs, and reference them in home-manager or other nixos modules
|
||||
nixpkgs.overlays = [
|
||||
(_: super: {
|
||||
|
||||
@@ -10,11 +10,13 @@
|
||||
...
|
||||
}:
|
||||
mkNixPak {
|
||||
config = {
|
||||
config =
|
||||
{
|
||||
config,
|
||||
sloth,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
app = {
|
||||
package = pkgs.firefox-wayland;
|
||||
binPath = "bin/firefox";
|
||||
@@ -61,7 +63,10 @@ mkNixPak {
|
||||
];
|
||||
bind.ro = [
|
||||
"/sys/bus/pci"
|
||||
["${config.app.package}/lib/firefox" "/app/etc/firefox"]
|
||||
[
|
||||
"${config.app.package}/lib/firefox"
|
||||
"/app/etc/firefox"
|
||||
]
|
||||
|
||||
# ================ for browserpass extension ===============================
|
||||
"/etc/gnupg"
|
||||
|
||||
@@ -5,12 +5,14 @@
|
||||
pkgs,
|
||||
sloth,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
envSuffix = envKey: suffix: sloth.concat' (sloth.env envKey) suffix;
|
||||
# cursor & icon's theme should be the same as the host's one.
|
||||
cursorTheme = pkgs.bibata-cursors;
|
||||
iconTheme = pkgs.papirus-icon-theme;
|
||||
in {
|
||||
in
|
||||
{
|
||||
config = {
|
||||
dbus.policies = {
|
||||
"${config.flatpak.appId}" = "own";
|
||||
@@ -89,15 +91,19 @@ in {
|
||||
];
|
||||
|
||||
env = {
|
||||
XDG_DATA_DIRS = lib.mkForce (lib.makeSearchPath "share" [
|
||||
XDG_DATA_DIRS = lib.mkForce (
|
||||
lib.makeSearchPath "share" [
|
||||
iconTheme
|
||||
cursorTheme
|
||||
pkgs.shared-mime-info
|
||||
]);
|
||||
XCURSOR_PATH = lib.mkForce (lib.concatStringsSep ":" [
|
||||
]
|
||||
);
|
||||
XCURSOR_PATH = lib.mkForce (
|
||||
lib.concatStringsSep ":" [
|
||||
"${cursorTheme}/share/icons"
|
||||
"${cursorTheme}/share/pixmaps"
|
||||
]);
|
||||
]
|
||||
);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -10,7 +10,9 @@
|
||||
...
|
||||
}:
|
||||
mkNixPak {
|
||||
config = {sloth, ...}: {
|
||||
config =
|
||||
{ sloth, ... }:
|
||||
{
|
||||
app = {
|
||||
package = pkgs.qq.override {
|
||||
# fix fcitx5 input method
|
||||
@@ -45,7 +47,12 @@ mkNixPak {
|
||||
bind.rw = [
|
||||
# given the read write permission to the following directories.
|
||||
# NOTE: sloth.mkdir is used to create the directory if it does not exist!
|
||||
(sloth.mkdir (sloth.concat [sloth.xdgConfigHome "/QQ"]))
|
||||
(sloth.mkdir (
|
||||
sloth.concat [
|
||||
sloth.xdgConfigHome
|
||||
"/QQ"
|
||||
]
|
||||
))
|
||||
|
||||
sloth.xdgDocumentsDir
|
||||
sloth.xdgDownloadDir
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{modulesPath, ...}: {
|
||||
{ modulesPath, ... }:
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/profiles/hardened.nix")
|
||||
];
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
# Misc
|
||||
cowsay
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
{mylib, ...}: {
|
||||
{ mylib, ... }:
|
||||
{
|
||||
imports = mylib.scanPaths ./.;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
{mylib, ...}: {
|
||||
{ mylib, ... }:
|
||||
{
|
||||
imports = mylib.scanPaths ./.;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.helix = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs = {
|
||||
neovim = {
|
||||
enable = true;
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
pkgs,
|
||||
myvars,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
# `programs.git` will generate the config file: ~/.config/git/config
|
||||
# to make git use this config file, `~/.gitconfig` should not exist!
|
||||
#
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{config, ...}: {
|
||||
{ config, ... }:
|
||||
{
|
||||
# make `npm install -g <pkg>` happey
|
||||
#
|
||||
# mainly used to install npm packages that updates frequently
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{config, ...}: let
|
||||
{ config, ... }:
|
||||
let
|
||||
shellAliases = {
|
||||
k = "kubectl";
|
||||
|
||||
@@ -10,7 +11,8 @@
|
||||
goBin = "${config.home.homeDirectory}/go/bin";
|
||||
rustBin = "${config.home.homeDirectory}/.cargo/bin";
|
||||
npmBin = "${config.home.homeDirectory}/.npm/bin";
|
||||
in {
|
||||
in
|
||||
{
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{catppuccin, ...}: {
|
||||
{ catppuccin, ... }:
|
||||
{
|
||||
# https://github.com/catppuccin/nix
|
||||
imports = [
|
||||
catppuccin.homeModules.catppuccin
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
# terminal file manager
|
||||
programs.yazi = {
|
||||
enable = true;
|
||||
|
||||
@@ -2,7 +2,8 @@ let
|
||||
shellAliases = {
|
||||
"zj" = "zellij";
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
programs.zellij = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
{mylib, ...}: {
|
||||
{ mylib, ... }:
|
||||
{
|
||||
imports = mylib.scanPaths ./.;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
{pkgs, ...}: {
|
||||
home.packages = with pkgs;
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages =
|
||||
with pkgs;
|
||||
[
|
||||
mitmproxy # http/https proxy tool
|
||||
wireshark # network analyzer
|
||||
|
||||
@@ -52,10 +52,7 @@
|
||||
bold_italic = {
|
||||
family = "Maple Mono NF CN";
|
||||
};
|
||||
size =
|
||||
if pkgs.stdenv.isDarwin
|
||||
then 14
|
||||
else 13;
|
||||
size = if pkgs.stdenv.isDarwin then 14 else 13;
|
||||
};
|
||||
terminal = {
|
||||
# Spawn a nushell in login mode via `bash`
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
{mylib, ...}: {
|
||||
{ mylib, ... }:
|
||||
{
|
||||
imports = mylib.scanPaths ./.;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.foot = {
|
||||
# foot is designed only for Linux
|
||||
enable = pkgs.stdenv.isLinux;
|
||||
|
||||
@@ -12,9 +12,10 @@
|
||||
programs.ghostty = {
|
||||
enable = true;
|
||||
package =
|
||||
if pkgs.stdenv.isDarwin
|
||||
then pkgs.hello # pkgs.ghostty is currently broken on darwin
|
||||
else pkgs.ghostty; # the stable version
|
||||
if pkgs.stdenv.isDarwin then
|
||||
pkgs.hello # pkgs.ghostty is currently broken on darwin
|
||||
else
|
||||
pkgs.ghostty; # the stable version
|
||||
# package = ghostty.packages.${pkgs.system}.default; # the latest version
|
||||
enableBashIntegration = false;
|
||||
installBatSyntax = false;
|
||||
|
||||
@@ -19,10 +19,7 @@
|
||||
font = {
|
||||
name = "Maple Mono NF CN";
|
||||
# use different font size on macOS
|
||||
size =
|
||||
if pkgs.stdenv.isDarwin
|
||||
then 14
|
||||
else 13;
|
||||
size = if pkgs.stdenv.isDarwin then 14 else 13;
|
||||
};
|
||||
|
||||
# consistent with other terminal emulators
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{myvars, ...}: {
|
||||
{ myvars, ... }:
|
||||
{
|
||||
# Home Manager needs a bit of information about you and the
|
||||
# paths it should manage.
|
||||
home = {
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
# https://developer.hashicorp.com/terraform/cli/config/config-file
|
||||
home.file.".terraformrc".source = ./terraformrc;
|
||||
|
||||
@@ -30,9 +31,12 @@
|
||||
# digitalocean
|
||||
doctl
|
||||
# google cloud
|
||||
(google-cloud-sdk.withExtraComponents (with google-cloud-sdk.components; [
|
||||
(google-cloud-sdk.withExtraComponents (
|
||||
with google-cloud-sdk.components;
|
||||
[
|
||||
gke-gcloud-auth-plugin
|
||||
]))
|
||||
]
|
||||
))
|
||||
|
||||
# cloud tools that nix do not have cache for.
|
||||
terraform
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
pkgs-unstable,
|
||||
nur-ryan4yin,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
podman-compose
|
||||
dive # explore docker layers
|
||||
@@ -17,6 +18,7 @@
|
||||
kubectl-tree # kubectl tree
|
||||
kubectl-node-shell # exec into node
|
||||
kubepug # kubernetes pre upgrade checker
|
||||
kubectl-cnpg # cloudnative-pg's cli tool
|
||||
|
||||
kubebuilder
|
||||
istioctl
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
{mylib, ...}: {
|
||||
{ mylib, ... }:
|
||||
{
|
||||
imports = mylib.scanPaths ./.;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
pkgs,
|
||||
pkgs-unstable,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
#############################################################
|
||||
#
|
||||
# Basic settings for development environment
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
{mylib, ...}: {
|
||||
{ mylib, ... }:
|
||||
{
|
||||
imports = mylib.scanPaths ./.;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.helix = {
|
||||
enable = true;
|
||||
package = pkgs.helix;
|
||||
|
||||
@@ -18,7 +18,8 @@ let
|
||||
# the path to nvim directory
|
||||
# to make this symlink work, we need to git clone this repo to your home directory.
|
||||
configPath = "${config.home.homeDirectory}/nix-config/home/base/tui/editors/neovim/nvim";
|
||||
in {
|
||||
in
|
||||
{
|
||||
xdg.configFile."nvim".source = config.lib.file.mkOutOfStoreSymlink configPath;
|
||||
# Disable catppuccin to avoid conflict with my non-nix config.
|
||||
catppuccin.nvim.enable = false;
|
||||
|
||||
@@ -52,7 +52,8 @@ return {
|
||||
"terraformls", -- terraform hcl
|
||||
"marksman", -- markdown ls
|
||||
"nickel_ls", -- nickel language server
|
||||
"nil_ls", -- nix language server
|
||||
-- "nil_ls", -- nix language server
|
||||
"nixd", -- another nix language server
|
||||
"buf_ls", -- protocol buffer language server
|
||||
"dockerls", -- dockerfile
|
||||
"cmake", -- cmake language server
|
||||
|
||||
@@ -39,7 +39,7 @@ return {
|
||||
formatting.shfmt, -- Shell formatter
|
||||
formatting.terraform_fmt, -- Terraform formatter
|
||||
formatting.stylua, -- Lua formatter
|
||||
formatting.alejandra, -- Nix formatter
|
||||
-- formatting.alejandra, -- Nix formatter
|
||||
formatting.sqlfluff.with { -- SQL formatter
|
||||
extra_args = { "--dialect", "postgres" }, -- change to your dialect
|
||||
},
|
||||
|
||||
@@ -2,17 +2,19 @@
|
||||
pkgs,
|
||||
pkgs-unstable,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; (
|
||||
}:
|
||||
{
|
||||
home.packages =
|
||||
with pkgs;
|
||||
(
|
||||
# -*- Data & Configuration Languages -*-#
|
||||
[
|
||||
#-- nix
|
||||
nil
|
||||
# rnix-lsp
|
||||
# nixd
|
||||
nixd
|
||||
statix # Lints and suggestions for the nix programming language
|
||||
deadnix # Find and remove unused code in .nix source files
|
||||
alejandra # Nix Code Formatter
|
||||
nixfmt # Nix Code Formatter
|
||||
|
||||
#-- nickel lang
|
||||
nickel
|
||||
@@ -65,8 +67,7 @@
|
||||
uv # python project package manager
|
||||
pyright # python language server
|
||||
(python313.withPackages (
|
||||
ps:
|
||||
with ps; [
|
||||
ps: with ps; [
|
||||
ruff
|
||||
black # python formatter
|
||||
# debugpy
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
pkgs,
|
||||
pkgs-unstable,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
age
|
||||
sops
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
config,
|
||||
mysecrets,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
programs.gpg = {
|
||||
enable = true;
|
||||
homedir = "${config.home.homeDirectory}/.gnupg";
|
||||
|
||||
@@ -3,9 +3,11 @@
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
passwordStoreDir = "${config.xdg.dataHome}/password-store";
|
||||
in {
|
||||
in
|
||||
{
|
||||
programs.password-store = {
|
||||
enable = true;
|
||||
package = pkgs.pass.withExtensions (exts: [
|
||||
|
||||
@@ -2,9 +2,11 @@
|
||||
config,
|
||||
pkgs-unstable,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (pkgs-unstable) nu_scripts;
|
||||
in {
|
||||
in
|
||||
{
|
||||
programs.nushell = {
|
||||
# load the alias file for work
|
||||
# the file must exist, otherwise nushell will complain about it!
|
||||
@@ -38,7 +40,7 @@ in {
|
||||
# use custom-completions/zoxide/zoxide-completions.nu *
|
||||
|
||||
# alias
|
||||
use aliases/git/git-aliases.nu *
|
||||
# use aliases/git/git-aliases.nu *
|
||||
use aliases/eza/eza-aliases.nu *
|
||||
use aliases/bat/bat-aliases.nu *
|
||||
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
config,
|
||||
mysecrets,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
home.file.".ssh/romantic.pub".source = "${mysecrets}/public/romantic.pub";
|
||||
|
||||
programs.ssh = {
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
{pkgs, ...}: let
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
shellAliases = {
|
||||
"zj" = "zellij";
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
programs.zellij = {
|
||||
enable = true;
|
||||
package = pkgs.zellij;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{config, ...}: {
|
||||
{ config, ... }:
|
||||
{
|
||||
home.file.".aerospace.toml".source =
|
||||
config.lib.file.mkOutOfStoreSymlink
|
||||
"${config.home.homeDirectory}/nix-config/home/darwin/aerospace/aerospace.toml";
|
||||
config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/nix-config/home/darwin/aerospace/aerospace.toml";
|
||||
}
|
||||
|
||||
@@ -2,11 +2,10 @@
|
||||
mylib,
|
||||
myvars,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
home.homeDirectory = "/Users/${myvars.username}";
|
||||
imports =
|
||||
(mylib.scanPaths ./.)
|
||||
++ [
|
||||
imports = (mylib.scanPaths ./.) ++ [
|
||||
../base/core
|
||||
../base/tui
|
||||
../base/gui
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
clash-meta
|
||||
];
|
||||
|
||||
home.file.".proxychains/proxychains.conf".source =
|
||||
config.lib.file.mkOutOfStoreSymlink
|
||||
"${config.home.homeDirectory}/nix-config/home/darwin/proxy/proxychains.conf";
|
||||
config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/nix-config/home/darwin/proxy/proxychains.conf";
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
# Squirrel Input Method
|
||||
home.file."Library/Rime" = {
|
||||
# my custom squirrel data (flypy input method)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{lib, ...}: let
|
||||
{ lib, ... }:
|
||||
let
|
||||
envExtra = ''
|
||||
export PATH="$PATH:/opt/homebrew/bin:/usr/local/bin"
|
||||
'';
|
||||
@@ -20,7 +21,8 @@
|
||||
true
|
||||
fi
|
||||
'';
|
||||
in {
|
||||
in
|
||||
{
|
||||
# Homebrew's default install location:
|
||||
# /opt/homebrew for Apple Silicon
|
||||
# /usr/local for macOS Intel
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
{mylib, ...}: {
|
||||
{ mylib, ... }:
|
||||
{
|
||||
imports = mylib.scanPaths ./.;
|
||||
}
|
||||
|
||||
@@ -2,11 +2,13 @@
|
||||
config,
|
||||
myvars,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
d = config.xdg.dataHome;
|
||||
c = config.xdg.configHome;
|
||||
cache = config.xdg.cacheHome;
|
||||
in rec {
|
||||
in
|
||||
rec {
|
||||
home.homeDirectory = "/home/${myvars.username}";
|
||||
|
||||
# environment variables that always set at login
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
# Linux Only Packages, not available on Darwin
|
||||
home.packages = with pkgs; [
|
||||
# misc
|
||||
|
||||
@@ -6,8 +6,10 @@
|
||||
nur-ryan4yin,
|
||||
blender-bin,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs;
|
||||
}:
|
||||
{
|
||||
home.packages =
|
||||
with pkgs;
|
||||
[
|
||||
# creative
|
||||
# gimp # image editing, I prefer using figma in browser instead of this one
|
||||
@@ -41,7 +43,8 @@
|
||||
# live streaming
|
||||
obs-studio = {
|
||||
enable = pkgs.stdenv.isx86_64;
|
||||
plugins = with pkgs.obs-studio-plugins;
|
||||
plugins =
|
||||
with pkgs.obs-studio-plugins;
|
||||
[
|
||||
# screen capture
|
||||
wlrobs
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
{mylib, ...}: {
|
||||
{ mylib, ... }:
|
||||
{
|
||||
imports = mylib.scanPaths ./.;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
pkgs,
|
||||
anyrun,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
programs.anyrun = {
|
||||
enable = true;
|
||||
config = {
|
||||
@@ -1,17 +1,17 @@
|
||||
|
||||
general {
|
||||
lock_cmd = pidof hyprlock || hyprlock # avoid starting multiple instances
|
||||
lock_cmd = pidof swaylock || swaylock # avoid starting multiple instances
|
||||
before_sleep_cmd = loginctl lock-session # lock before suspend
|
||||
after_sleep_cmd = hyprctl dispatch dpms on # resume dpms after suspend
|
||||
ignore_dbus_inhibit = false # whether to ignore dbus-sent idle-inhibit requests
|
||||
}
|
||||
|
||||
# turn off keyboard backlight, comment out this section if you dont have a keyboard backlight.
|
||||
# listener {
|
||||
# timeout = 180 # 3 minutes
|
||||
# on-timeout = brightnessctl -sd rgb:kbd_backlight set 0 # turn off keyboard backlight.
|
||||
# on-resume = brightnessctl -rd rgb:kbd_backlight # turn on keyboard backlight.
|
||||
# }
|
||||
listener {
|
||||
timeout = 180 # 3 minutes
|
||||
# List devices: brightnessctl --list
|
||||
# Adjust keyboard backlight: brightnessctl -d kbd_backlight set 50%
|
||||
on-timeout = brightnessctl --save --device=kbd_backlight set 0 # turn off keyboard backlight.
|
||||
on-resume = brightnessctl --restore --device=kbd_backlight # turn on keyboard backlight.
|
||||
}
|
||||
|
||||
# listener {
|
||||
# timeout = 600 # 10min.
|
||||
@@ -20,13 +20,13 @@ general {
|
||||
# }
|
||||
|
||||
listener {
|
||||
timeout = 1200 # 20 minutes
|
||||
on-timeout = pidof hyprlock || hyprlock # lock screen
|
||||
timeout = 1600 # 20 minutes
|
||||
on-timeout = pidof swaylock || swaylock # lock screen
|
||||
on-resume = hyprctl dispatch dpms on # monitor wake up
|
||||
}
|
||||
|
||||
listener {
|
||||
timeout = 1260 # 21 minutes
|
||||
timeout = 1660 # 31 minutes
|
||||
on-timeout = hyprctl dispatch dpms off # screen off
|
||||
on-resume = hyprctl dispatch dpms on && brightnessctl -r # monitor wake up & screen on
|
||||
}
|
||||
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
@@ -6,10 +6,10 @@
|
||||
"modules-center": ["custom/playerctl"],
|
||||
"modules-right": [
|
||||
"pulseaudio",
|
||||
"battery",
|
||||
"memory",
|
||||
"cpu",
|
||||
"network",
|
||||
"battery",
|
||||
"clock",
|
||||
"idle_inhibitor",
|
||||
"custom/powermenu",
|
||||
@@ -91,12 +91,12 @@
|
||||
"network": {
|
||||
"interval": 5,
|
||||
"format": "{ifname}",
|
||||
"format-wifi": " {essid} ({signalStrength}%) Up: {bandwidthUpBits} Down: {bandwidthDownBits}",
|
||||
"format-ethernet": " {ifname} Up: {bandwidthUpBits} Down: {bandwidthDownBits}",
|
||||
"format-wifi": " {signalStrength}% Down: {bandwidthDownBytes} Up: {bandwidthUpBytes} {essid}",
|
||||
"format-ethernet": " {ifname} Down: {bandwidthDownBytes} Up: {bandwidthUpBytes}",
|
||||
"format-disconnected": "Disconnected ⚠",
|
||||
"tooltip-format": " {ifname} via {gwaddri}",
|
||||
"tooltip-format-wifi": " {ifname} @ {essid}\nIP: {ipaddr}\nStrength: {signalStrength}%\nFreq: {frequency}MHz\nUp: {bandwidthUpBits} Down: {bandwidthDownBits}",
|
||||
"tooltip-format-ethernet": " {ifname}\nIP: {ipaddr}\n up: {bandwidthUpBits} down: {bandwidthDownBits}",
|
||||
"tooltip-format-wifi": " {ifname} @ {essid}\nIP: {ipaddr}\nStrength: {signalStrength}%\nFreq: {frequency}MHz\nDown: {bandwidthDownBytes} Up: {bandwidthUpBytes}",
|
||||
"tooltip-format-ethernet": " {ifname}\nIP: {ipaddr}\n Down: {bandwidthDownBytes} Up: {bandwidthUpBytes}",
|
||||
"tooltip-format-disconnected": "Disconnected",
|
||||
"max-length": 50,
|
||||
"on-click-middle": "nm-connection-editor",
|
||||
@@ -122,7 +122,7 @@
|
||||
"scroll-step": 5.0,
|
||||
// Commands to execute on events
|
||||
"on-click": "amixer set Master toggle",
|
||||
"on-click-right": "pavucontrol",
|
||||
"on-click-right": "GSK_RENDERER=opengl pavucontrol",
|
||||
"smooth-scrolling-threshold": 1,
|
||||
},
|
||||
"temperature": {
|
||||
@@ -138,8 +138,6 @@
|
||||
"spacing": 5,
|
||||
},
|
||||
"battery": {
|
||||
"bat": "BAT0",
|
||||
"adapter": "ADP0",
|
||||
"interval": 60,
|
||||
"states": {
|
||||
"warning": 30,
|
||||
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 7.0 KiB |
@@ -0,0 +1,73 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
./anyrun.nix
|
||||
./nvidia.nix
|
||||
];
|
||||
|
||||
# wayland related
|
||||
home.sessionVariables = {
|
||||
"NIXOS_OZONE_WL" = "1"; # for any ozone-based browser & electron apps to run on wayland
|
||||
"MOZ_ENABLE_WAYLAND" = "1"; # for firefox to run on wayland
|
||||
"MOZ_WEBRENDER" = "1";
|
||||
# enable native Wayland support for most Electron apps
|
||||
"ELECTRON_OZONE_PLATFORM_HINT" = "auto";
|
||||
# misc
|
||||
"_JAVA_AWT_WM_NONREPARENTING" = "1";
|
||||
"QT_WAYLAND_DISABLE_WINDOWDECORATION" = "1";
|
||||
"QT_QPA_PLATFORM" = "wayland";
|
||||
"SDL_VIDEODRIVER" = "wayland";
|
||||
"GDK_BACKEND" = "wayland";
|
||||
"XDG_SESSION_TYPE" = "wayland";
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
swaybg # the wallpaper
|
||||
wl-clipboard # copying and pasting
|
||||
hyprpicker # color picker
|
||||
brightnessctl
|
||||
hyprshot # screen shot
|
||||
wf-recorder # screen recording
|
||||
# audio
|
||||
alsa-utils # provides amixer/alsamixer/...
|
||||
networkmanagerapplet # provide GUI app: nm-connection-editor
|
||||
];
|
||||
|
||||
xdg.configFile =
|
||||
let
|
||||
mkSymlink = config.lib.file.mkOutOfStoreSymlink;
|
||||
confPath = "${config.home.homeDirectory}/nix-config/home/linux/gui/base/desktop/conf";
|
||||
in
|
||||
{
|
||||
"mako".source = mkSymlink "${confPath}/mako";
|
||||
"waybar".source = mkSymlink "${confPath}/waybar";
|
||||
"wlogout".source = mkSymlink "${confPath}/wlogout";
|
||||
"hypr/hypridle.conf".source = mkSymlink "${confPath}/hypridle.conf";
|
||||
};
|
||||
|
||||
# status bar
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
};
|
||||
# Disable catppuccin to avoid conflict with my non-nix config.
|
||||
catppuccin.waybar.enable = false;
|
||||
|
||||
# screen locker
|
||||
programs.swaylock.enable = true;
|
||||
|
||||
# Logout Menu
|
||||
programs.wlogout.enable = true;
|
||||
catppuccin.wlogout.enable = false;
|
||||
|
||||
# Hyprland idle daemon
|
||||
services.hypridle.enable = true;
|
||||
|
||||
# notification daemon, the same as dunst
|
||||
services.mako.enable = true;
|
||||
catppuccin.mako.enable = false;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.desktop.nvidia;
|
||||
in
|
||||
{
|
||||
options.modules.desktop.nvidia = {
|
||||
enable = mkEnableOption "whether nvidia GPU is used";
|
||||
};
|
||||
|
||||
config = mkIf (cfg.enable && cfg.enable) {
|
||||
home.sessionVariables = {
|
||||
# for hyprland with nvidia gpu" = " ref https://wiki.hyprland.org/Nvidia/
|
||||
"LIBVA_DRIVER_NAME" = "nvidia";
|
||||
"__GLX_VENDOR_LIBRARY_NAME" = "nvidia";
|
||||
# VA-API hardware video acceleration
|
||||
"NVD_BACKEND" = "direct";
|
||||
|
||||
"GBM_BACKEND" = "nvidia-drm";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
android-tools
|
||||
];
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
# Adjust the color temperature(& brightness) of your screen according to
|
||||
# your surroundings. This may help your eyes hurt less if you are
|
||||
# working in front of the screen at night.
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
xdg.configFile = {
|
||||
"fcitx5/profile" = {
|
||||
source = ./profile;
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
pkgs,
|
||||
nix-gaming,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
# nix-gaming.packages.${pkgs.system}.osu-laser-bin
|
||||
gamescope # SteamOS session compositing window manager
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
# If your themes for mouse cursor, icons or windows don’t load correctly,
|
||||
# try setting them with home.pointerCursor and gtk.theme,
|
||||
# which enable a bunch of compatibility options that should make the themes load in all situations.
|
||||
@@ -37,10 +38,5 @@
|
||||
};
|
||||
|
||||
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
|
||||
|
||||
iconTheme = {
|
||||
name = "Papirus-Dark";
|
||||
package = pkgs.papirus-icon-theme;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
# TODO not used yet, need to test it.
|
||||
#
|
||||
##############################################################################################
|
||||
with lib; let
|
||||
with lib;
|
||||
let
|
||||
cfg = config.home.immutable-file;
|
||||
immutableFileOpts = _: {
|
||||
options = {
|
||||
@@ -42,24 +43,25 @@ with lib; let
|
||||
sudo cp $2 $1
|
||||
sudo chattr +i $1
|
||||
'';
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.home.immutable-file = mkOption {
|
||||
type = with types; attrsOf (submodule immutableFileOpts);
|
||||
default = { };
|
||||
};
|
||||
|
||||
config = mkIf (cfg != { }) {
|
||||
home.activation =
|
||||
mapAttrs'
|
||||
(name: {
|
||||
home.activation = mapAttrs' (
|
||||
name:
|
||||
{
|
||||
src,
|
||||
dst,
|
||||
}:
|
||||
nameValuePair
|
||||
"make-immutable-${name}"
|
||||
(lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||
nameValuePair "make-immutable-${name}" (
|
||||
lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
${mkImmutableFile} ${dst} ${src}
|
||||
''))
|
||||
cfg;
|
||||
''
|
||||
)
|
||||
) cfg;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
}:
|
||||
# media - control and enjoy audio/video
|
||||
{
|
||||
home.packages = with pkgs;
|
||||
home.packages =
|
||||
with pkgs;
|
||||
[
|
||||
# audio control
|
||||
pavucontrol
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
pkgs,
|
||||
pkgs-unstable,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
# GUI apps
|
||||
# e-book viewer(.epub/.mobi/...)
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; (lib.optionals pkgs.stdenv.isx86_64 [
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages =
|
||||
with pkgs;
|
||||
(lib.optionals pkgs.stdenv.isx86_64 [
|
||||
# https://joplinapp.org/help/
|
||||
joplin # joplin-cli
|
||||
joplin-desktop
|
||||
|
||||
@@ -4,18 +4,28 @@
|
||||
lib,
|
||||
wallpapers,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
systemd.user.services.wallpaper = {
|
||||
Unit = {
|
||||
Description = "Wallpaper Switcher daemon";
|
||||
After = ["graphical-session-pre.target" "xdg-desktop-autostart.target"];
|
||||
After = [
|
||||
"graphical-session-pre.target"
|
||||
"xdg-desktop-autostart.target"
|
||||
];
|
||||
Wants = [ "graphical-session-pre.target" ];
|
||||
};
|
||||
Install.WantedBy = [ "graphical-session.target" ];
|
||||
Service = {
|
||||
ExecStart = lib.getExe (pkgs.writeShellApplication {
|
||||
ExecStart = lib.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "wallpaper";
|
||||
runtimeInputs = with pkgs; [procps feh swaybg python3];
|
||||
runtimeInputs = with pkgs; [
|
||||
procps
|
||||
feh
|
||||
swaybg
|
||||
python3
|
||||
];
|
||||
text = ''
|
||||
export WALLPAPERS_DIR="${wallpapers}"
|
||||
export WALLPAPERS_STATE_FILEPATH="${config.xdg.stateHome}/wallpaper-switcher/switcher_state"
|
||||
@@ -23,7 +33,8 @@
|
||||
export WALLPAPER_WAIT_MAX=180
|
||||
exec ${./wallpaper-switcher.py}
|
||||
'';
|
||||
});
|
||||
}
|
||||
);
|
||||
RestartSec = 3;
|
||||
Restart = "on-failure";
|
||||
};
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
pkgs,
|
||||
pkgs-stable,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
# firefox-wayland
|
||||
nixpaks.firefox
|
||||
@@ -12,8 +12,8 @@
|
||||
programs = {
|
||||
# source code: https://github.com/nix-community/home-manager/blob/master/modules/programs/chromium.nix
|
||||
google-chrome = {
|
||||
enable = pkgs.stdenv.isx86_64;
|
||||
package = pkgs-stable.google-chrome;
|
||||
enable = true;
|
||||
package = if pkgs.stdenv.isAarch64 then pkgs.chromium else pkgs.google-chrome;
|
||||
|
||||
# https://wiki.archlinux.org/title/Chromium#Native_Wayland_support
|
||||
commandLineArgs = [
|
||||
@@ -32,9 +32,7 @@
|
||||
|
||||
vscode = {
|
||||
enable = true;
|
||||
package =
|
||||
pkgs.vscode.override
|
||||
{
|
||||
package = pkgs.vscode.override {
|
||||
isInsiders = false;
|
||||
# https://wiki.archlinux.org/title/Wayland#Electron
|
||||
commandLineArgs = [
|
||||
@@ -6,7 +6,8 @@
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
xdg-utils # provides cli tools such as `xdg-mime` `xdg-open`
|
||||
xdg-user-dirs
|
||||
@@ -31,10 +32,20 @@
|
||||
mimeApps = {
|
||||
enable = true;
|
||||
# let `xdg-open` to open the url with the correct application.
|
||||
defaultApplications = let
|
||||
browser = ["google-chrome.desktop" "firefox.desktop"];
|
||||
editor = ["nvim.desktop" "Helix.desktop" "code.desktop" "code-insiders.desktop"];
|
||||
in {
|
||||
defaultApplications =
|
||||
let
|
||||
browser = [
|
||||
"google-chrome.desktop"
|
||||
"firefox.desktop"
|
||||
];
|
||||
editor = [
|
||||
"nvim.desktop"
|
||||
"Helix.desktop"
|
||||
"code.desktop"
|
||||
"code-insiders.desktop"
|
||||
];
|
||||
in
|
||||
{
|
||||
"application/json" = browser;
|
||||
"application/pdf" = browser; # TODO: pdf viewer
|
||||
|
||||
|
||||