This commit is contained in:
@@ -29,6 +29,141 @@ notfiles/
|
|||||||
| [`nix4vscode`][nix4vscode] | VSCode/VSCodium extension management |
|
| [`nix4vscode`][nix4vscode] | VSCode/VSCodium extension management |
|
||||||
| [`globalprotect-openconnect`][globalprotect-openconnect] | VPN client |
|
| [`globalprotect-openconnect`][globalprotect-openconnect] | VPN client |
|
||||||
|
|
||||||
|
## Tasks
|
||||||
|
|
||||||
|
[`just`][just] runs the routine tasks in this repo. Run it with no arguments to list every recipe:
|
||||||
|
|
||||||
|
```
|
||||||
|
just
|
||||||
|
```
|
||||||
|
|
||||||
|
Most recipes act on a single host.
|
||||||
|
The `host` variable resolves on its own: macOS reads `scutil --get LocalHostName`, Linux uses `hostname`.
|
||||||
|
That value has to match a key under `nixosConfigurations` or `darwinConfigurations` in `flake.nix`.
|
||||||
|
To act on a different machine, override it:
|
||||||
|
|
||||||
|
```
|
||||||
|
just host=whitegrizzly rebuild
|
||||||
|
```
|
||||||
|
|
||||||
|
`rebuild`, `clean`, and `diff` choose `darwin-rebuild` or `nixos-rebuild` from the current OS, so one command covers every machine.
|
||||||
|
|
||||||
|
Three recipes (`fmt`, `lint`, `diff`) use tools that live in the flake's dev shell rather than a host profile.
|
||||||
|
With direnv the shell loads on entry to the repo (see [Dev shell](#dev-shell)); without it, prefix the command, for example `nix develop -c just lint`.
|
||||||
|
|
||||||
|
| Recipe | What it does |
|
||||||
|
| :----- | :----------- |
|
||||||
|
| `rebuild` | Build the current host's config and switch to it now |
|
||||||
|
| `diff` | Build the current host's config and show what would change, without switching |
|
||||||
|
| `update` | Update `flake.lock` to the latest inputs |
|
||||||
|
| `clean` | Delete generations older than 7 days, optimize the store, stage the result for next boot |
|
||||||
|
| `fmt` | Format every `.nix` file with `nixfmt` |
|
||||||
|
| `lint` | Run `statix` and `deadnix` over the tree |
|
||||||
|
| `gen-keys` | Generate Ed25519 SSH keys for the named services |
|
||||||
|
| `fetch-iso` | Download the latest NixOS installer ISO into `iso/` |
|
||||||
|
| `make-usb` | Write a bootable installer USB |
|
||||||
|
| `register-host` | Scaffold `hosts/<name>/` and add a `flake.nix` entry |
|
||||||
|
| `capture-hardware` | Write the current machine's `hardware.nix` |
|
||||||
|
| `hosts` | List the hosts registered in `flake.nix` |
|
||||||
|
| `docker-creds` | Seed `~/.docker/config.json` and set up a credential store |
|
||||||
|
|
||||||
|
## Dev shell
|
||||||
|
|
||||||
|
Editing the repo (as opposed to running it) calls for a formatter, two linters, and a pair of inspectors: `nixfmt`, `statix`, `deadnix`, `nvd`, and `nix-tree`.
|
||||||
|
They live in `devShells.default` in `flake.nix`, deliberately outside every host's system profile, so they show up only while you work on this repo.
|
||||||
|
|
||||||
|
A repo-root `.envrc` containing `use flake` loads the shell through [direnv] on entry and drops it on exit.
|
||||||
|
Run `direnv allow` once after cloning.
|
||||||
|
Without direnv, enter it by hand:
|
||||||
|
|
||||||
|
```
|
||||||
|
nix develop
|
||||||
|
```
|
||||||
|
|
||||||
|
Either path puts `just fmt`, `just lint`, and `just diff` in reach.
|
||||||
|
|
||||||
|
## Common workflows
|
||||||
|
|
||||||
|
### The edit loop
|
||||||
|
|
||||||
|
Change a module, preview the effect, then switch:
|
||||||
|
|
||||||
|
```
|
||||||
|
$EDITOR home/modules/helix.nix
|
||||||
|
just diff
|
||||||
|
just rebuild
|
||||||
|
```
|
||||||
|
|
||||||
|
`just diff` builds the target system to `/tmp/notfiles-next` and runs `nvd diff` against the running one, so the added, removed, and upgraded packages are visible before anything changes.
|
||||||
|
The switch happens only at `just rebuild`.
|
||||||
|
|
||||||
|
Before committing, format and lint:
|
||||||
|
|
||||||
|
```
|
||||||
|
just fmt
|
||||||
|
just lint
|
||||||
|
```
|
||||||
|
|
||||||
|
`lint` exits nonzero when `statix` or `deadnix` find something, which makes it a usable pre-commit or CI gate.
|
||||||
|
The first run on an established config tends to surface unused bindings and a few anti-patterns; clear them once and later runs go quiet.
|
||||||
|
|
||||||
|
### Staying current
|
||||||
|
|
||||||
|
```
|
||||||
|
just update
|
||||||
|
just diff
|
||||||
|
just rebuild
|
||||||
|
```
|
||||||
|
|
||||||
|
`just update` refreshes every flake input.
|
||||||
|
Read the changes with `just diff` before switching.
|
||||||
|
Reclaim disk now and then:
|
||||||
|
|
||||||
|
```
|
||||||
|
just clean
|
||||||
|
```
|
||||||
|
|
||||||
|
`clean` drops generations older than a week, deduplicates the store, and stages the rebuilt system for the next boot (a plain `switch` on macOS).
|
||||||
|
|
||||||
|
### Adding a machine
|
||||||
|
|
||||||
|
Register the host from any checkout, then capture hardware on the machine itself:
|
||||||
|
|
||||||
|
```
|
||||||
|
just register-host blackbear # scaffolds hosts/blackbear/, edits flake.nix
|
||||||
|
# then, on blackbear:
|
||||||
|
just capture-hardware blackbear # writes hosts/blackbear/hardware.nix
|
||||||
|
just host=blackbear rebuild
|
||||||
|
```
|
||||||
|
|
||||||
|
`just hosts` shows what is already registered.
|
||||||
|
|
||||||
|
### Building install media
|
||||||
|
|
||||||
|
For a fresh NixOS box, fetch an installer image and write it to a USB stick:
|
||||||
|
|
||||||
|
```
|
||||||
|
just fetch-iso
|
||||||
|
just make-usb --iso iso/latest-nixos-graphical-x86_64-linux.iso
|
||||||
|
```
|
||||||
|
|
||||||
|
`fetch-iso` accepts channel and edition overrides, for example `just fetch-iso --channel nixos-unstable --edition minimal`.
|
||||||
|
`make-usb` self-elevates with sudo when it needs to.
|
||||||
|
|
||||||
|
### Keys and credentials
|
||||||
|
|
||||||
|
Generate signing and auth keys, then seed Docker's credential store:
|
||||||
|
|
||||||
|
```
|
||||||
|
just gen-keys
|
||||||
|
just docker-creds
|
||||||
|
```
|
||||||
|
|
||||||
|
`gen-keys` writes one Ed25519 key per service and defaults to the set this repo expects (GitHub, Gradescope, the HPC clusters, and the two Git signing keys).
|
||||||
|
`docker-creds` defaults to a `pass`-backed store and sets up the GPG key behind it; pass `secretservice` to use the desktop keyring instead.
|
||||||
|
|
||||||
|
[just]: https://github.com/casey/just
|
||||||
|
[direnv]: https://direnv.net/
|
||||||
[nixpkgs]: https://github.com/NixOS/nixpkgs
|
[nixpkgs]: https://github.com/NixOS/nixpkgs
|
||||||
[home-manager]: https://github.com/nix-community/home-manager
|
[home-manager]: https://github.com/nix-community/home-manager
|
||||||
[plasma-manager]: https://github.com/nix-community/plasma-manager
|
[plasma-manager]: https://github.com/nix-community/plasma-manager
|
||||||
|
|||||||
@@ -34,10 +34,26 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, home-manager, nix-darwin, globalprotect-openconnect, ... }@inputs:
|
outputs =
|
||||||
|
{
|
||||||
|
self,
|
||||||
|
nixpkgs,
|
||||||
|
home-manager,
|
||||||
|
nix-darwin,
|
||||||
|
globalprotect-openconnect,
|
||||||
|
...
|
||||||
|
}@inputs:
|
||||||
let
|
let
|
||||||
linuxSystem = "x86_64-linux";
|
linuxSystem = "x86_64-linux";
|
||||||
|
|
||||||
|
# Systems this repo is edited/built on: the Linux hosts and the mac.
|
||||||
|
# devShells are produced for each so `direnv`/`nix develop` works on all.
|
||||||
|
systems = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"aarch64-darwin"
|
||||||
|
];
|
||||||
|
forAllSystems = nixpkgs.lib.genAttrs systems;
|
||||||
|
|
||||||
# Home Manager wiring shared by the NixOS (Linux) hosts.
|
# Home Manager wiring shared by the NixOS (Linux) hosts.
|
||||||
# plasma-manager is Linux-only, so it lives here rather than in the
|
# plasma-manager is Linux-only, so it lives here rather than in the
|
||||||
# darwin block below.
|
# darwin block below.
|
||||||
@@ -47,11 +63,15 @@
|
|||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
backupFileExtension = "backup";
|
backupFileExtension = "backup";
|
||||||
users.alex = import ./home/alex;
|
users.alex = import ./home/alex;
|
||||||
extraSpecialArgs = { inherit inputs; isDarwin = false; };
|
extraSpecialArgs = {
|
||||||
|
inherit inputs;
|
||||||
|
isDarwin = false;
|
||||||
|
};
|
||||||
sharedModules = [ inputs.plasma-manager.homeModules.plasma-manager ];
|
sharedModules = [ inputs.plasma-manager.homeModules.plasma-manager ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
|
|
||||||
# To add a new Linux machine, duplicate this block and change the name.
|
# To add a new Linux machine, duplicate this block and change the name.
|
||||||
@@ -89,11 +109,37 @@
|
|||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
backupFileExtension = "backup";
|
backupFileExtension = "backup";
|
||||||
users.alex = import ./home/alex;
|
users.alex = import ./home/alex;
|
||||||
extraSpecialArgs = { inherit inputs; isDarwin = true; };
|
extraSpecialArgs = {
|
||||||
|
inherit inputs;
|
||||||
|
isDarwin = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Maintenance shell for working on this repo: formatter, linters, and
|
||||||
|
# generation/closure inspectors. Kept out of every host's global profile
|
||||||
|
# and auto-loaded by direnv via the repo-root .envrc (`use flake`).
|
||||||
|
devShells = forAllSystems (
|
||||||
|
system:
|
||||||
|
let
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
default = pkgs.mkShellNoCC {
|
||||||
|
name = "notfiles-dev";
|
||||||
|
packages = with pkgs; [
|
||||||
|
nixfmt # RFC 166 formatter
|
||||||
|
statix # lint / anti-pattern detection
|
||||||
|
deadnix # find unused (dead) bindings
|
||||||
|
nvd # diff two system generations / profiles
|
||||||
|
nix-tree # interactively explore a closure
|
||||||
|
nix-output-monitor # `nom` — readable build output
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
+15
-4
@@ -1,4 +1,9 @@
|
|||||||
{ pkgs, lib, isDarwin, ... }:
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
isDarwin,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
# Modules that only make sense on Linux, either because they use systemd,
|
# Modules that only make sense on Linux, either because they use systemd,
|
||||||
@@ -23,6 +28,7 @@ in
|
|||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
../modules/datalad.nix
|
../modules/datalad.nix
|
||||||
|
../modules/direnv.nix
|
||||||
../modules/docker.nix
|
../modules/docker.nix
|
||||||
../modules/fonts.nix
|
../modules/fonts.nix
|
||||||
../modules/ghostty.nix
|
../modules/ghostty.nix
|
||||||
@@ -31,6 +37,7 @@ in
|
|||||||
../modules/pixi.nix
|
../modules/pixi.nix
|
||||||
../modules/python.nix
|
../modules/python.nix
|
||||||
../modules/rust.nix
|
../modules/rust.nix
|
||||||
|
../modules/shell-tools.nix
|
||||||
../modules/ssh.nix
|
../modules/ssh.nix
|
||||||
../modules/starship.nix
|
../modules/starship.nix
|
||||||
../modules/typst.nix
|
../modules/typst.nix
|
||||||
@@ -41,9 +48,12 @@ in
|
|||||||
../modules/zsh.nix
|
../modules/zsh.nix
|
||||||
./git.nix
|
./git.nix
|
||||||
./gh.nix
|
./gh.nix
|
||||||
] ++ linuxOnly;
|
]
|
||||||
|
++ linuxOnly;
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages =
|
||||||
|
with pkgs;
|
||||||
|
[
|
||||||
atool
|
atool
|
||||||
httpie
|
httpie
|
||||||
just
|
just
|
||||||
@@ -51,7 +61,8 @@ in
|
|||||||
typst
|
typst
|
||||||
unzip
|
unzip
|
||||||
glow
|
glow
|
||||||
] ++ lib.optionals (!isDarwin) [
|
]
|
||||||
|
++ lib.optionals (!isDarwin) [
|
||||||
spotify
|
spotify
|
||||||
brave
|
brave
|
||||||
];
|
];
|
||||||
|
|||||||
+1
-3
@@ -1,6 +1,4 @@
|
|||||||
{ ... }:
|
_: {
|
||||||
|
|
||||||
{
|
|
||||||
programs.gh = {
|
programs.gh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
|||||||
+4
-1
@@ -1,6 +1,9 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
home.packages = [ pkgs.delta pkgs.git-annex ];
|
home.packages = [
|
||||||
|
pkgs.delta
|
||||||
|
pkgs.git-annex
|
||||||
|
];
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
signing = {
|
signing = {
|
||||||
|
|||||||
@@ -4,4 +4,3 @@
|
|||||||
datalad
|
datalad
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
_: {
|
||||||
|
programs.direnv = {
|
||||||
|
enable = true;
|
||||||
|
nix-direnv.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
+264
-56
@@ -1,4 +1,9 @@
|
|||||||
{ pkgs, lib, isDarwin, ... }:
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
isDarwin,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
baseKeybinds = [
|
baseKeybinds = [
|
||||||
"ctrl+t=new_tab"
|
"ctrl+t=new_tab"
|
||||||
@@ -31,58 +36,261 @@ in
|
|||||||
"foreground" = "#abb2bf";
|
"foreground" = "#abb2bf";
|
||||||
"cursor-style" = "block";
|
"cursor-style" = "block";
|
||||||
"palette" = [
|
"palette" = [
|
||||||
"0=#282c34" "1=#e06c75" "2=#98c379" "3=#e5c07b"
|
"0=#282c34"
|
||||||
"4=#61afef" "5=#c678dd" "6=#56b6c2" "7=#abb2bf"
|
"1=#e06c75"
|
||||||
"8=#5c6370" "9=#e06c75" "10=#98c379" "11=#e5c07b"
|
"2=#98c379"
|
||||||
"12=#61afef" "13=#c678dd" "14=#56b6c2" "15=#ffffff"
|
"3=#e5c07b"
|
||||||
"16=#000000" "17=#00005f" "18=#000087" "19=#0000af"
|
"4=#61afef"
|
||||||
"20=#0000d7" "21=#0000ff" "22=#005f00" "23=#005f5f" "24=#005f87"
|
"5=#c678dd"
|
||||||
"25=#005faf" "26=#005fd7" "27=#005fff" "28=#008700" "29=#00875f"
|
"6=#56b6c2"
|
||||||
"30=#008787" "31=#0087af" "32=#0087d7" "33=#0087ff" "34=#00af00"
|
"7=#abb2bf"
|
||||||
"35=#00af5f" "36=#00af87" "37=#00afaf" "38=#00afd7" "39=#00afff"
|
"8=#5c6370"
|
||||||
"40=#00d700" "41=#00d75f" "42=#00d787" "43=#00d7af" "44=#00d7d7"
|
"9=#e06c75"
|
||||||
"45=#00d7ff" "46=#00ff00" "47=#00ff5f" "48=#00ff87" "49=#00ffaf"
|
"10=#98c379"
|
||||||
"50=#00ffd7" "51=#00ffff" "52=#5f0000" "53=#5f005f" "54=#5f0087"
|
"11=#e5c07b"
|
||||||
"55=#5f00af" "56=#5f00d7" "57=#5f00ff" "58=#5f5f00" "59=#5f5f5f"
|
"12=#61afef"
|
||||||
"60=#5f5f87" "61=#5f5faf" "62=#5f5fd7" "63=#5f5fff" "64=#5f8700"
|
"13=#c678dd"
|
||||||
"65=#5f875f" "66=#5f8787" "67=#5f87af" "68=#5f87d7" "69=#5f87ff"
|
"14=#56b6c2"
|
||||||
"70=#5faf00" "71=#5faf5f" "72=#5faf87" "73=#5fafaf" "74=#5fafd7"
|
"15=#ffffff"
|
||||||
"75=#5fafff" "76=#5fd700" "77=#5fd75f" "78=#5fd787" "79=#5fd7af"
|
"16=#000000"
|
||||||
"80=#5fd7d7" "81=#5fd7ff" "82=#5fff00" "83=#5fff5f" "84=#5fff87"
|
"17=#00005f"
|
||||||
"85=#5fffaf" "86=#5fffd7" "87=#5fffff" "88=#870000" "89=#87005f"
|
"18=#000087"
|
||||||
"90=#870087" "91=#8700af" "92=#8700d7" "93=#8700ff" "94=#875f00"
|
"19=#0000af"
|
||||||
"95=#875f5f" "96=#875f87" "97=#875faf" "98=#875fd7" "99=#875fff"
|
"20=#0000d7"
|
||||||
"100=#878700" "101=#87875f" "102=#878787" "103=#8787af" "104=#8787d7"
|
"21=#0000ff"
|
||||||
"105=#8787ff" "106=#87af00" "107=#87af5f" "108=#87af87" "109=#87afaf"
|
"22=#005f00"
|
||||||
"110=#87afd7" "111=#87afff" "112=#87d700" "113=#87d75f" "114=#87d787"
|
"23=#005f5f"
|
||||||
"115=#87d7af" "116=#87d7d7" "117=#87d7ff" "118=#87ff00" "119=#87ff5f"
|
"24=#005f87"
|
||||||
"120=#87ff87" "121=#87ffaf" "122=#87ffd7" "123=#87ffff" "124=#af0000"
|
"25=#005faf"
|
||||||
"125=#af005f" "126=#af0087" "127=#af00af" "128=#af00d7" "129=#af00ff"
|
"26=#005fd7"
|
||||||
"130=#af5f00" "131=#af5f5f" "132=#af5f87" "133=#af5faf" "134=#af5fd7"
|
"27=#005fff"
|
||||||
"135=#af5fff" "136=#af8700" "137=#af875f" "138=#af8787" "139=#af87af"
|
"28=#008700"
|
||||||
"140=#af87d7" "141=#af87ff" "142=#afaf00" "143=#afaf5f" "144=#afaf87"
|
"29=#00875f"
|
||||||
"145=#afafaf" "146=#afafd7" "147=#afafff" "148=#afd700" "149=#afd75f"
|
"30=#008787"
|
||||||
"150=#afd787" "151=#afd7af" "152=#afd7d7" "153=#afd7ff" "154=#afff00"
|
"31=#0087af"
|
||||||
"155=#afff5f" "156=#afff87" "157=#afffaf" "158=#afffd7" "159=#afffff"
|
"32=#0087d7"
|
||||||
"160=#d70000" "161=#d7005f" "162=#d70087" "163=#d700af" "164=#d700d7"
|
"33=#0087ff"
|
||||||
"165=#d700ff" "166=#d75f00" "167=#d75f5f" "168=#d75f87" "169=#d75faf"
|
"34=#00af00"
|
||||||
"170=#d75fd7" "171=#d75fff" "172=#d78700" "173=#d7875f" "174=#d78787"
|
"35=#00af5f"
|
||||||
"175=#d787af" "176=#d787d7" "177=#d787ff" "178=#d7af00" "179=#d7af5f"
|
"36=#00af87"
|
||||||
"180=#d7af87" "181=#d7afaf" "182=#d7afd7" "183=#d7afff" "184=#d7d700"
|
"37=#00afaf"
|
||||||
"185=#d7d75f" "186=#d7d787" "187=#d7d7af" "188=#d7d7d7" "189=#d7d7ff"
|
"38=#00afd7"
|
||||||
"190=#d7ff00" "191=#d7ff5f" "192=#d7ff87" "193=#d7ffaf" "194=#d7ffd7"
|
"39=#00afff"
|
||||||
"195=#d7ffff" "196=#ff0000" "197=#ff005f" "198=#ff0087" "199=#ff00af"
|
"40=#00d700"
|
||||||
"200=#ff00d7" "201=#ff00ff" "202=#ff5f00" "203=#ff5f5f" "204=#ff5f87"
|
"41=#00d75f"
|
||||||
"205=#ff5faf" "206=#ff5fd7" "207=#ff5fff" "208=#ff8700" "209=#ff875f"
|
"42=#00d787"
|
||||||
"210=#ff8787" "211=#ff87af" "212=#ff87d7" "213=#ff87ff" "214=#ffaf00"
|
"43=#00d7af"
|
||||||
"215=#ffaf5f" "216=#ffaf87" "217=#ffafaf" "218=#ffafd7" "219=#ffafff"
|
"44=#00d7d7"
|
||||||
"220=#ffd700" "221=#ffd75f" "222=#ffd787" "223=#ffd7af" "224=#ffd7d7"
|
"45=#00d7ff"
|
||||||
"225=#ffd7ff" "226=#ffff00" "227=#ffff5f" "228=#ffff87" "229=#ffffaf"
|
"46=#00ff00"
|
||||||
"230=#ffffd7" "231=#ffffff" "232=#080808" "233=#121212" "234=#1c1c1c"
|
"47=#00ff5f"
|
||||||
"235=#262626" "236=#303030" "237=#3a3a3a" "238=#444444" "239=#4e4e4e"
|
"48=#00ff87"
|
||||||
"240=#585858" "241=#626262" "242=#6c6c6c" "243=#767676" "244=#808080"
|
"49=#00ffaf"
|
||||||
"245=#8a8a8a" "246=#949494" "247=#9e9e9e" "248=#a8a8a8" "249=#b2b2b2"
|
"50=#00ffd7"
|
||||||
"250=#bcbcbc" "251=#c6c6c6" "252=#d0d0d0" "253=#dadada" "254=#e4e4e4"
|
"51=#00ffff"
|
||||||
|
"52=#5f0000"
|
||||||
|
"53=#5f005f"
|
||||||
|
"54=#5f0087"
|
||||||
|
"55=#5f00af"
|
||||||
|
"56=#5f00d7"
|
||||||
|
"57=#5f00ff"
|
||||||
|
"58=#5f5f00"
|
||||||
|
"59=#5f5f5f"
|
||||||
|
"60=#5f5f87"
|
||||||
|
"61=#5f5faf"
|
||||||
|
"62=#5f5fd7"
|
||||||
|
"63=#5f5fff"
|
||||||
|
"64=#5f8700"
|
||||||
|
"65=#5f875f"
|
||||||
|
"66=#5f8787"
|
||||||
|
"67=#5f87af"
|
||||||
|
"68=#5f87d7"
|
||||||
|
"69=#5f87ff"
|
||||||
|
"70=#5faf00"
|
||||||
|
"71=#5faf5f"
|
||||||
|
"72=#5faf87"
|
||||||
|
"73=#5fafaf"
|
||||||
|
"74=#5fafd7"
|
||||||
|
"75=#5fafff"
|
||||||
|
"76=#5fd700"
|
||||||
|
"77=#5fd75f"
|
||||||
|
"78=#5fd787"
|
||||||
|
"79=#5fd7af"
|
||||||
|
"80=#5fd7d7"
|
||||||
|
"81=#5fd7ff"
|
||||||
|
"82=#5fff00"
|
||||||
|
"83=#5fff5f"
|
||||||
|
"84=#5fff87"
|
||||||
|
"85=#5fffaf"
|
||||||
|
"86=#5fffd7"
|
||||||
|
"87=#5fffff"
|
||||||
|
"88=#870000"
|
||||||
|
"89=#87005f"
|
||||||
|
"90=#870087"
|
||||||
|
"91=#8700af"
|
||||||
|
"92=#8700d7"
|
||||||
|
"93=#8700ff"
|
||||||
|
"94=#875f00"
|
||||||
|
"95=#875f5f"
|
||||||
|
"96=#875f87"
|
||||||
|
"97=#875faf"
|
||||||
|
"98=#875fd7"
|
||||||
|
"99=#875fff"
|
||||||
|
"100=#878700"
|
||||||
|
"101=#87875f"
|
||||||
|
"102=#878787"
|
||||||
|
"103=#8787af"
|
||||||
|
"104=#8787d7"
|
||||||
|
"105=#8787ff"
|
||||||
|
"106=#87af00"
|
||||||
|
"107=#87af5f"
|
||||||
|
"108=#87af87"
|
||||||
|
"109=#87afaf"
|
||||||
|
"110=#87afd7"
|
||||||
|
"111=#87afff"
|
||||||
|
"112=#87d700"
|
||||||
|
"113=#87d75f"
|
||||||
|
"114=#87d787"
|
||||||
|
"115=#87d7af"
|
||||||
|
"116=#87d7d7"
|
||||||
|
"117=#87d7ff"
|
||||||
|
"118=#87ff00"
|
||||||
|
"119=#87ff5f"
|
||||||
|
"120=#87ff87"
|
||||||
|
"121=#87ffaf"
|
||||||
|
"122=#87ffd7"
|
||||||
|
"123=#87ffff"
|
||||||
|
"124=#af0000"
|
||||||
|
"125=#af005f"
|
||||||
|
"126=#af0087"
|
||||||
|
"127=#af00af"
|
||||||
|
"128=#af00d7"
|
||||||
|
"129=#af00ff"
|
||||||
|
"130=#af5f00"
|
||||||
|
"131=#af5f5f"
|
||||||
|
"132=#af5f87"
|
||||||
|
"133=#af5faf"
|
||||||
|
"134=#af5fd7"
|
||||||
|
"135=#af5fff"
|
||||||
|
"136=#af8700"
|
||||||
|
"137=#af875f"
|
||||||
|
"138=#af8787"
|
||||||
|
"139=#af87af"
|
||||||
|
"140=#af87d7"
|
||||||
|
"141=#af87ff"
|
||||||
|
"142=#afaf00"
|
||||||
|
"143=#afaf5f"
|
||||||
|
"144=#afaf87"
|
||||||
|
"145=#afafaf"
|
||||||
|
"146=#afafd7"
|
||||||
|
"147=#afafff"
|
||||||
|
"148=#afd700"
|
||||||
|
"149=#afd75f"
|
||||||
|
"150=#afd787"
|
||||||
|
"151=#afd7af"
|
||||||
|
"152=#afd7d7"
|
||||||
|
"153=#afd7ff"
|
||||||
|
"154=#afff00"
|
||||||
|
"155=#afff5f"
|
||||||
|
"156=#afff87"
|
||||||
|
"157=#afffaf"
|
||||||
|
"158=#afffd7"
|
||||||
|
"159=#afffff"
|
||||||
|
"160=#d70000"
|
||||||
|
"161=#d7005f"
|
||||||
|
"162=#d70087"
|
||||||
|
"163=#d700af"
|
||||||
|
"164=#d700d7"
|
||||||
|
"165=#d700ff"
|
||||||
|
"166=#d75f00"
|
||||||
|
"167=#d75f5f"
|
||||||
|
"168=#d75f87"
|
||||||
|
"169=#d75faf"
|
||||||
|
"170=#d75fd7"
|
||||||
|
"171=#d75fff"
|
||||||
|
"172=#d78700"
|
||||||
|
"173=#d7875f"
|
||||||
|
"174=#d78787"
|
||||||
|
"175=#d787af"
|
||||||
|
"176=#d787d7"
|
||||||
|
"177=#d787ff"
|
||||||
|
"178=#d7af00"
|
||||||
|
"179=#d7af5f"
|
||||||
|
"180=#d7af87"
|
||||||
|
"181=#d7afaf"
|
||||||
|
"182=#d7afd7"
|
||||||
|
"183=#d7afff"
|
||||||
|
"184=#d7d700"
|
||||||
|
"185=#d7d75f"
|
||||||
|
"186=#d7d787"
|
||||||
|
"187=#d7d7af"
|
||||||
|
"188=#d7d7d7"
|
||||||
|
"189=#d7d7ff"
|
||||||
|
"190=#d7ff00"
|
||||||
|
"191=#d7ff5f"
|
||||||
|
"192=#d7ff87"
|
||||||
|
"193=#d7ffaf"
|
||||||
|
"194=#d7ffd7"
|
||||||
|
"195=#d7ffff"
|
||||||
|
"196=#ff0000"
|
||||||
|
"197=#ff005f"
|
||||||
|
"198=#ff0087"
|
||||||
|
"199=#ff00af"
|
||||||
|
"200=#ff00d7"
|
||||||
|
"201=#ff00ff"
|
||||||
|
"202=#ff5f00"
|
||||||
|
"203=#ff5f5f"
|
||||||
|
"204=#ff5f87"
|
||||||
|
"205=#ff5faf"
|
||||||
|
"206=#ff5fd7"
|
||||||
|
"207=#ff5fff"
|
||||||
|
"208=#ff8700"
|
||||||
|
"209=#ff875f"
|
||||||
|
"210=#ff8787"
|
||||||
|
"211=#ff87af"
|
||||||
|
"212=#ff87d7"
|
||||||
|
"213=#ff87ff"
|
||||||
|
"214=#ffaf00"
|
||||||
|
"215=#ffaf5f"
|
||||||
|
"216=#ffaf87"
|
||||||
|
"217=#ffafaf"
|
||||||
|
"218=#ffafd7"
|
||||||
|
"219=#ffafff"
|
||||||
|
"220=#ffd700"
|
||||||
|
"221=#ffd75f"
|
||||||
|
"222=#ffd787"
|
||||||
|
"223=#ffd7af"
|
||||||
|
"224=#ffd7d7"
|
||||||
|
"225=#ffd7ff"
|
||||||
|
"226=#ffff00"
|
||||||
|
"227=#ffff5f"
|
||||||
|
"228=#ffff87"
|
||||||
|
"229=#ffffaf"
|
||||||
|
"230=#ffffd7"
|
||||||
|
"231=#ffffff"
|
||||||
|
"232=#080808"
|
||||||
|
"233=#121212"
|
||||||
|
"234=#1c1c1c"
|
||||||
|
"235=#262626"
|
||||||
|
"236=#303030"
|
||||||
|
"237=#3a3a3a"
|
||||||
|
"238=#444444"
|
||||||
|
"239=#4e4e4e"
|
||||||
|
"240=#585858"
|
||||||
|
"241=#626262"
|
||||||
|
"242=#6c6c6c"
|
||||||
|
"243=#767676"
|
||||||
|
"244=#808080"
|
||||||
|
"245=#8a8a8a"
|
||||||
|
"246=#949494"
|
||||||
|
"247=#9e9e9e"
|
||||||
|
"248=#a8a8a8"
|
||||||
|
"249=#b2b2b2"
|
||||||
|
"250=#bcbcbc"
|
||||||
|
"251=#c6c6c6"
|
||||||
|
"252=#d0d0d0"
|
||||||
|
"253=#dadada"
|
||||||
|
"254=#e4e4e4"
|
||||||
"255=#eeeeee"
|
"255=#eeeeee"
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -95,9 +303,9 @@ in
|
|||||||
"confirm-close-surface" = true;
|
"confirm-close-surface" = true;
|
||||||
|
|
||||||
# Keybindings (Tabs & Splits)
|
# Keybindings (Tabs & Splits)
|
||||||
"keybind" = baseKeybinds
|
"keybind" = baseKeybinds ++ lib.optionals isDarwin [ "super+d=unbind" ];
|
||||||
++ lib.optionals isDarwin [ "super+d=unbind" ];
|
}
|
||||||
} // lib.optionalAttrs isDarwin {
|
// lib.optionalAttrs isDarwin {
|
||||||
"macos-titlebar-style" = "transparent";
|
"macos-titlebar-style" = "transparent";
|
||||||
"macos-icon" = "official";
|
"macos-icon" = "official";
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,4 +4,3 @@
|
|||||||
gimp
|
gimp
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+23
-10
@@ -113,37 +113,51 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
keys.normal = {
|
keys.normal = {
|
||||||
"C-g" = [ ":new" ":insert-output lazygit" ":buffer-close!" ":redraw" ];
|
|
||||||
"d" = "delete_selection_noyank";
|
"d" = "delete_selection_noyank";
|
||||||
"A-d" = "delete_selection";
|
"A-d" = "delete_selection";
|
||||||
"C-y" = [
|
"C-y" = [
|
||||||
":sh rm -f /tmp/yazi-chooser"
|
":sh rm -f /tmp/yazi-chooser"
|
||||||
'':insert-output yazi "%{buffer_name}" --chooser-file=/tmp/yazi-chooser''
|
'':insert-output yazi "%{buffer_name}" --chooser-file=/tmp/yazi-chooser''
|
||||||
'':sh printf '\x1b[?1049h\x1b[?2004h' > /dev/tty''
|
'':sh printf '\x1b[?1049h\x1b[?2004h' > /dev/tty''
|
||||||
'':open %sh{cat /tmp/yazi-chooser}''
|
":open %sh{cat /tmp/yazi-chooser}"
|
||||||
":redraw"
|
":redraw"
|
||||||
];
|
];
|
||||||
} // lib.optionalAttrs pkgs.stdenv.isDarwin macKeys;
|
}
|
||||||
|
// lib.optionalAttrs pkgs.stdenv.isDarwin macKeys;
|
||||||
|
|
||||||
keys.select = {
|
keys.select = {
|
||||||
} // lib.optionalAttrs pkgs.stdenv.isDarwin macKeys;
|
}
|
||||||
|
// lib.optionalAttrs pkgs.stdenv.isDarwin macKeys;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
languages = {
|
languages = {
|
||||||
language = [
|
language = [
|
||||||
{
|
{
|
||||||
name = "quarto";
|
name = "quarto";
|
||||||
language-id = "markdown";
|
language-id = "markdown";
|
||||||
language-servers = [ "marksman" "harper-ls" ];
|
language-servers = [
|
||||||
|
"marksman"
|
||||||
|
"harper-ls"
|
||||||
|
];
|
||||||
auto-format = false;
|
auto-format = false;
|
||||||
comment-tokens = [ "-" "*" ">" ];
|
comment-tokens = [
|
||||||
|
"-"
|
||||||
|
"*"
|
||||||
|
">"
|
||||||
|
];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
name = "markdown";
|
name = "markdown";
|
||||||
language-servers = [ "marksman" "harper-ls" ];
|
language-servers = [
|
||||||
|
"marksman"
|
||||||
|
"harper-ls"
|
||||||
|
];
|
||||||
auto-format = false;
|
auto-format = false;
|
||||||
comment-tokens = [ "-" "*" ">" ];
|
comment-tokens = [
|
||||||
|
"-"
|
||||||
|
"*"
|
||||||
|
">"
|
||||||
|
];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -174,4 +188,3 @@ in
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,4 +4,3 @@
|
|||||||
hyperfine
|
hyperfine
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,4 +4,3 @@
|
|||||||
masterpdfeditor
|
masterpdfeditor
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+43
-12
@@ -1,4 +1,4 @@
|
|||||||
{ ... }: {
|
_: {
|
||||||
programs.plasma = {
|
programs.plasma = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
@@ -41,14 +41,23 @@
|
|||||||
kmix.increase_microphone_volume = "Microphone Volume Up";
|
kmix.increase_microphone_volume = "Microphone Volume Up";
|
||||||
kmix.increase_volume = "Volume Up";
|
kmix.increase_volume = "Volume Up";
|
||||||
kmix.increase_volume_small = "Shift+Volume Up";
|
kmix.increase_volume_small = "Shift+Volume Up";
|
||||||
kmix.mic_mute = ["Microphone Mute" "Meta+Volume Mute"];
|
kmix.mic_mute = [
|
||||||
|
"Microphone Mute"
|
||||||
|
"Meta+Volume Mute"
|
||||||
|
];
|
||||||
kmix.mute = "Volume Mute";
|
kmix.mute = "Volume Mute";
|
||||||
ksmserver."Lock Session" = ["Meta+L" "Screensaver"];
|
ksmserver."Lock Session" = [
|
||||||
|
"Meta+L"
|
||||||
|
"Screensaver"
|
||||||
|
];
|
||||||
ksmserver."Log Out" = "Ctrl+Alt+Del";
|
ksmserver."Log Out" = "Ctrl+Alt+Del";
|
||||||
kwin."Activate Window Demanding Attention" = "Meta+Ctrl+A";
|
kwin."Activate Window Demanding Attention" = "Meta+Ctrl+A";
|
||||||
kwin."Edit Tiles" = "Meta+T";
|
kwin."Edit Tiles" = "Meta+T";
|
||||||
kwin.Expose = "Ctrl+F9";
|
kwin.Expose = "Ctrl+F9";
|
||||||
kwin.ExposeAll = ["Ctrl+F10" "Launch (C)"];
|
kwin.ExposeAll = [
|
||||||
|
"Ctrl+F10"
|
||||||
|
"Launch (C)"
|
||||||
|
];
|
||||||
kwin.ExposeClass = "Ctrl+F7";
|
kwin.ExposeClass = "Ctrl+F7";
|
||||||
kwin."Grid View" = "Meta+G";
|
kwin."Grid View" = "Meta+G";
|
||||||
kwin."Kill Window" = "Meta+Ctrl+Esc";
|
kwin."Kill Window" = "Meta+Ctrl+Esc";
|
||||||
@@ -68,10 +77,22 @@
|
|||||||
kwin."Switch to Desktop 2" = "Ctrl+F2";
|
kwin."Switch to Desktop 2" = "Ctrl+F2";
|
||||||
kwin."Switch to Desktop 3" = "Ctrl+F3";
|
kwin."Switch to Desktop 3" = "Ctrl+F3";
|
||||||
kwin."Switch to Desktop 4" = "Ctrl+F4";
|
kwin."Switch to Desktop 4" = "Ctrl+F4";
|
||||||
kwin."Walk Through Windows" = ["Meta+Tab" "Alt+Tab"];
|
kwin."Walk Through Windows" = [
|
||||||
kwin."Walk Through Windows (Reverse)" = ["Meta+Shift+Tab" "Alt+Shift+Tab"];
|
"Meta+Tab"
|
||||||
kwin."Walk Through Windows of Current Application" = ["Meta+`" "Alt+`"];
|
"Alt+Tab"
|
||||||
kwin."Walk Through Windows of Current Application (Reverse)" = ["Meta+~" "Alt+~"];
|
];
|
||||||
|
kwin."Walk Through Windows (Reverse)" = [
|
||||||
|
"Meta+Shift+Tab"
|
||||||
|
"Alt+Shift+Tab"
|
||||||
|
];
|
||||||
|
kwin."Walk Through Windows of Current Application" = [
|
||||||
|
"Meta+`"
|
||||||
|
"Alt+`"
|
||||||
|
];
|
||||||
|
kwin."Walk Through Windows of Current Application (Reverse)" = [
|
||||||
|
"Meta+~"
|
||||||
|
"Alt+~"
|
||||||
|
];
|
||||||
kwin."Window Close" = "Alt+F4";
|
kwin."Window Close" = "Alt+F4";
|
||||||
kwin."Window Maximize" = "Meta+PgUp";
|
kwin."Window Maximize" = "Meta+PgUp";
|
||||||
kwin."Window Minimize" = "Meta+PgDown";
|
kwin."Window Minimize" = "Meta+PgDown";
|
||||||
@@ -88,7 +109,10 @@
|
|||||||
kwin."Window to Previous Screen" = "Meta+Shift+Left";
|
kwin."Window to Previous Screen" = "Meta+Shift+Left";
|
||||||
kwin.disableInputCapture = "Meta+Shift+Esc";
|
kwin.disableInputCapture = "Meta+Shift+Esc";
|
||||||
kwin.view_actual_size = "Meta+0";
|
kwin.view_actual_size = "Meta+0";
|
||||||
kwin.view_zoom_in = ["Meta++" "Meta+="];
|
kwin.view_zoom_in = [
|
||||||
|
"Meta++"
|
||||||
|
"Meta+="
|
||||||
|
];
|
||||||
kwin.view_zoom_out = "Meta+-";
|
kwin.view_zoom_out = "Meta+-";
|
||||||
mediacontrol.nextmedia = "Media Next";
|
mediacontrol.nextmedia = "Media Next";
|
||||||
mediacontrol.pausemedia = "Media Pause";
|
mediacontrol.pausemedia = "Media Pause";
|
||||||
@@ -106,8 +130,14 @@
|
|||||||
org_kde_powerdevil.PowerOff = "Power Off";
|
org_kde_powerdevil.PowerOff = "Power Off";
|
||||||
org_kde_powerdevil.Sleep = "Sleep";
|
org_kde_powerdevil.Sleep = "Sleep";
|
||||||
org_kde_powerdevil."Toggle Keyboard Backlight" = "Keyboard Light On/Off";
|
org_kde_powerdevil."Toggle Keyboard Backlight" = "Keyboard Light On/Off";
|
||||||
org_kde_powerdevil.powerProfile = ["Battery" "Meta+B"];
|
org_kde_powerdevil.powerProfile = [
|
||||||
plasmashell."activate application launcher" = ["Meta" "Alt+F1"];
|
"Battery"
|
||||||
|
"Meta+B"
|
||||||
|
];
|
||||||
|
plasmashell."activate application launcher" = [
|
||||||
|
"Meta"
|
||||||
|
"Alt+F1"
|
||||||
|
];
|
||||||
plasmashell."activate task manager entry 1" = "Meta+1";
|
plasmashell."activate task manager entry 1" = "Meta+1";
|
||||||
plasmashell."activate task manager entry 2" = "Meta+2";
|
plasmashell."activate task manager entry 2" = "Meta+2";
|
||||||
plasmashell."activate task manager entry 3" = "Meta+3";
|
plasmashell."activate task manager entry 3" = "Meta+3";
|
||||||
@@ -128,7 +158,8 @@
|
|||||||
|
|
||||||
# At the moment, these are mostly defaults.
|
# At the moment, these are mostly defaults.
|
||||||
configFile = {
|
configFile = {
|
||||||
baloofilerc.General."exclude filters" = "*~,*.part,*.o,*.la,*.lo,*.loT,*.moc,moc_*.cpp,qrc_*.cpp,ui_*.h,cmake_install.cmake,CMakeCache.txt,CTestTestfile.cmake,libtool,config.status,confdefs.h,autom4te,conftest,confstat,Makefile.am,*.gcode,.ninja_deps,.ninja_log,build.ninja,*.csproj,*.m4,*.rej,*.gmo,*.pc,*.omf,*.aux,*.tmp,*.po,*.vm*,*.nvram,*.rcore,*.swp,*.swap,lzo,litmain.sh,*.orig,.histfile.*,.xsession-errors*,*.map,*.so,*.a,*.db,*.qrc,*.ini,*.init,*.img,*.vdi,*.vbox*,vbox.log,*.qcow2,*.vmdk,*.vhd,*.vhdx,*.sql,*.sql.gz,*.ytdl,*.tfstate*,*.class,*.pyc,*.pyo,*.elc,*.qmlc,*.jsc,*.fastq,*.fq,*.gb,*.fasta,*.fna,*.gbff,*.faa,po,CVS,.svn,.git,_darcs,.bzr,.hg,CMakeFiles,CMakeTmp,CMakeTmpQmake,.moc,.obj,.pch,.uic,.npm,.yarn,.yarn-cache,__pycache__,node_modules,node_packages,nbproject,.terraform,.venv,venv,core-dumps,lost+found";
|
baloofilerc.General."exclude filters" =
|
||||||
|
"*~,*.part,*.o,*.la,*.lo,*.loT,*.moc,moc_*.cpp,qrc_*.cpp,ui_*.h,cmake_install.cmake,CMakeCache.txt,CTestTestfile.cmake,libtool,config.status,confdefs.h,autom4te,conftest,confstat,Makefile.am,*.gcode,.ninja_deps,.ninja_log,build.ninja,*.csproj,*.m4,*.rej,*.gmo,*.pc,*.omf,*.aux,*.tmp,*.po,*.vm*,*.nvram,*.rcore,*.swp,*.swap,lzo,litmain.sh,*.orig,.histfile.*,.xsession-errors*,*.map,*.so,*.a,*.db,*.qrc,*.ini,*.init,*.img,*.vdi,*.vbox*,vbox.log,*.qcow2,*.vmdk,*.vhd,*.vhdx,*.sql,*.sql.gz,*.ytdl,*.tfstate*,*.class,*.pyc,*.pyo,*.elc,*.qmlc,*.jsc,*.fastq,*.fq,*.gb,*.fasta,*.fna,*.gbff,*.faa,po,CVS,.svn,.git,_darcs,.bzr,.hg,CMakeFiles,CMakeTmp,CMakeTmpQmake,.moc,.obj,.pch,.uic,.npm,.yarn,.yarn-cache,__pycache__,node_modules,node_packages,nbproject,.terraform,.venv,venv,core-dumps,lost+found";
|
||||||
dolphinrc.DetailsMode.PreviewSize = 22;
|
dolphinrc.DetailsMode.PreviewSize = 22;
|
||||||
dolphinrc.General.DoubleClickViewAction = "open_terminal";
|
dolphinrc.General.DoubleClickViewAction = "open_terminal";
|
||||||
dolphinrc."KFileDialog Settings"."Places Icons Auto-resize" = false;
|
dolphinrc."KFileDialog Settings"."Places Icons Auto-resize" = false;
|
||||||
|
|||||||
@@ -4,4 +4,3 @@
|
|||||||
python315
|
python315
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,4 +4,3 @@
|
|||||||
rustup
|
rustup
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
programs = {
|
||||||
|
fzf.enable = true; # Ctrl-R fuzzy history, Ctrl-T file search
|
||||||
|
zoxide.enable = true; # `z foo` smart cd
|
||||||
|
bat.enable = true; # syntax-highlighting pager / fzf preview
|
||||||
|
eza.enable = true;
|
||||||
|
};
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
ripgrep
|
||||||
|
fd
|
||||||
|
jq
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -1,6 +1,4 @@
|
|||||||
{ ... }:
|
_: {
|
||||||
|
|
||||||
{
|
|
||||||
programs.ssh = {
|
programs.ssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
{ ... }:
|
_: {
|
||||||
|
|
||||||
{
|
|
||||||
programs.starship = {
|
programs.starship = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableZshIntegration = true;
|
enableZshIntegration = true;
|
||||||
|
|||||||
@@ -5,4 +5,3 @@
|
|||||||
tinymist
|
tinymist
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+17
-5
@@ -1,10 +1,17 @@
|
|||||||
{ pkgs, lib, isDarwin, ... }: {
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
isDarwin,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
programs.vscodium = {
|
programs.vscodium = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.vscodium;
|
package = pkgs.vscodium;
|
||||||
|
|
||||||
profiles.default = {
|
profiles.default = {
|
||||||
extensions = (with pkgs.vscode-extensions; [
|
extensions =
|
||||||
|
(with pkgs.vscode-extensions; [
|
||||||
charliermarsh.ruff
|
charliermarsh.ruff
|
||||||
editorconfig.editorconfig
|
editorconfig.editorconfig
|
||||||
gruntfuggly.todo-tree
|
gruntfuggly.todo-tree
|
||||||
@@ -18,16 +25,21 @@
|
|||||||
rust-lang.rust-analyzer
|
rust-lang.rust-analyzer
|
||||||
timonwong.shellcheck
|
timonwong.shellcheck
|
||||||
unifiedjs.vscode-mdx
|
unifiedjs.vscode-mdx
|
||||||
]) ++ pkgs.nix4vscode.forOpenVsx [
|
])
|
||||||
|
++ pkgs.nix4vscode.forOpenVsx [
|
||||||
"akamud.vscode-theme-onedark"
|
"akamud.vscode-theme-onedark"
|
||||||
"astral-sh.ty"
|
"astral-sh.ty"
|
||||||
"modular-mojotools.vscode-mojo"
|
"modular-mojotools.vscode-mojo"
|
||||||
] ++ lib.optionals (!isDarwin) (with pkgs.vscode-extensions; [
|
]
|
||||||
|
++ lib.optionals (!isDarwin) (
|
||||||
|
with pkgs.vscode-extensions;
|
||||||
|
[
|
||||||
# markdown-pdf pins ungoogled-chromium (Linux-only) as its PDF
|
# markdown-pdf pins ungoogled-chromium (Linux-only) as its PDF
|
||||||
# renderer. On macOS, install it from the marketplace by hand and set
|
# renderer. On macOS, install it from the marketplace by hand and set
|
||||||
# markdown-pdf.executablePath to Chrome/Brave, or render via typst.
|
# markdown-pdf.executablePath to Chrome/Brave, or render via typst.
|
||||||
yzane.markdown-pdf
|
yzane.markdown-pdf
|
||||||
]);
|
]
|
||||||
|
);
|
||||||
|
|
||||||
userSettings = {
|
userSettings = {
|
||||||
"editor.fontFamily" = "'JetBrains Mono', monospace";
|
"editor.fontFamily" = "'JetBrains Mono', monospace";
|
||||||
|
|||||||
+68
-17
@@ -15,14 +15,23 @@ let
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
helixOpener = [
|
helixOpener = [
|
||||||
{ run = ''hx-zellij-open "$@"''; desc = "Open in Helix pane"; block = false; for = "unix"; }
|
{
|
||||||
|
run = ''hx-zellij-open "$@"'';
|
||||||
|
desc = "Open in Helix pane";
|
||||||
|
block = false;
|
||||||
|
for = "unix";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
tomlFormat = pkgs.formats.toml { };
|
tomlFormat = pkgs.formats.toml { };
|
||||||
|
|
||||||
ideYaziToml = tomlFormat.generate "yazi.toml" {
|
ideYaziToml = tomlFormat.generate "yazi.toml" {
|
||||||
mgr = {
|
mgr = {
|
||||||
ratio = [ 0 1 0 ];
|
ratio = [
|
||||||
|
0
|
||||||
|
1
|
||||||
|
0
|
||||||
|
];
|
||||||
linemode = "none";
|
linemode = "none";
|
||||||
};
|
};
|
||||||
opener.edit = helixOpener;
|
opener.edit = helixOpener;
|
||||||
@@ -30,8 +39,16 @@ let
|
|||||||
|
|
||||||
ideKeymapToml = tomlFormat.generate "keymap.toml" {
|
ideKeymapToml = tomlFormat.generate "keymap.toml" {
|
||||||
mgr.prepend_keymap = [
|
mgr.prepend_keymap = [
|
||||||
{ on = "h"; run = "plugin bounded-leave"; desc = "Parent dir (stop at project root)"; }
|
{
|
||||||
{ on = "<Left>"; run = "plugin bounded-leave"; desc = "Parent dir (stop at project root)"; }
|
on = "h";
|
||||||
|
run = "plugin bounded-leave";
|
||||||
|
desc = "Parent dir (stop at project root)";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
on = "<Left>";
|
||||||
|
run = "plugin bounded-leave";
|
||||||
|
desc = "Parent dir (stop at project root)";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -60,23 +77,59 @@ let
|
|||||||
|
|
||||||
ideThemeToml = tomlFormat.generate "theme.toml" {
|
ideThemeToml = tomlFormat.generate "theme.toml" {
|
||||||
status = {
|
status = {
|
||||||
overall = { fg = "#abb2bf"; bg = "#21252b"; }; # readable text on a dark bar
|
overall = {
|
||||||
progress_label = { fg = "#abb2bf"; bold = true; };
|
fg = "#abb2bf";
|
||||||
progress_normal = { fg = "#98c379"; bg = "#21252b"; };
|
bg = "#21252b";
|
||||||
progress_error = { fg = "#e06c75"; bg = "#21252b"; };
|
}; # readable text on a dark bar
|
||||||
|
progress_label = {
|
||||||
|
fg = "#abb2bf";
|
||||||
|
bold = true;
|
||||||
|
};
|
||||||
|
progress_normal = {
|
||||||
|
fg = "#98c379";
|
||||||
|
bg = "#21252b";
|
||||||
|
};
|
||||||
|
progress_error = {
|
||||||
|
fg = "#e06c75";
|
||||||
|
bg = "#21252b";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
mode = {
|
mode = {
|
||||||
normal_main = { fg = "#21252b"; bg = "#61afef"; bold = true; };
|
normal_main = {
|
||||||
normal_alt = { fg = "#61afef"; bg = "#21252b"; };
|
fg = "#21252b";
|
||||||
select_main = { fg = "#21252b"; bg = "#98c379"; bold = true; };
|
bg = "#61afef";
|
||||||
select_alt = { fg = "#98c379"; bg = "#21252b"; };
|
bold = true;
|
||||||
unset_main = { fg = "#21252b"; bg = "#e06c75"; bold = true; };
|
};
|
||||||
unset_alt = { fg = "#e06c75"; bg = "#21252b"; };
|
normal_alt = {
|
||||||
|
fg = "#61afef";
|
||||||
|
bg = "#21252b";
|
||||||
|
};
|
||||||
|
select_main = {
|
||||||
|
fg = "#21252b";
|
||||||
|
bg = "#98c379";
|
||||||
|
bold = true;
|
||||||
|
};
|
||||||
|
select_alt = {
|
||||||
|
fg = "#98c379";
|
||||||
|
bg = "#21252b";
|
||||||
|
};
|
||||||
|
unset_main = {
|
||||||
|
fg = "#21252b";
|
||||||
|
bg = "#e06c75";
|
||||||
|
bold = true;
|
||||||
|
};
|
||||||
|
unset_alt = {
|
||||||
|
fg = "#e06c75";
|
||||||
|
bg = "#21252b";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
home.packages = [ hx-zellij-open yazi-ide ];
|
home.packages = [
|
||||||
|
hx-zellij-open
|
||||||
|
yazi-ide
|
||||||
|
];
|
||||||
|
|
||||||
programs.yazi = {
|
programs.yazi = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -85,7 +138,6 @@ in
|
|||||||
settings.opener.edit = helixOpener;
|
settings.opener.edit = helixOpener;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
xdg.configFile = {
|
xdg.configFile = {
|
||||||
"yazi-ide/yazi.toml".source = ideYaziToml;
|
"yazi-ide/yazi.toml".source = ideYaziToml;
|
||||||
"yazi-ide/theme.toml".source = ideThemeToml;
|
"yazi-ide/theme.toml".source = ideThemeToml;
|
||||||
@@ -118,4 +170,3 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
{ ... }:
|
_: {
|
||||||
{
|
|
||||||
programs.zellij.enable = true;
|
programs.zellij.enable = true;
|
||||||
|
|
||||||
xdg.configFile."zellij/config.kdl".text = ''
|
xdg.configFile."zellij/config.kdl".text = ''
|
||||||
|
|||||||
@@ -4,4 +4,3 @@
|
|||||||
zig
|
zig
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,4 +4,3 @@
|
|||||||
zoom-us
|
zoom-us
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
{ pkgs, lib, isDarwin, ... }:
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
isDarwin,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
@@ -54,8 +59,7 @@
|
|||||||
# ghostty (GTK) ships terminfo under $out/share on Linux. The macOS
|
# ghostty (GTK) ships terminfo under $out/share on Linux. The macOS
|
||||||
# ghostty-bin bundles its own, so only add ncurses there.
|
# ghostty-bin bundles its own, so only add ncurses there.
|
||||||
TERMINFO_DIRS = lib.concatStringsSep ":" (
|
TERMINFO_DIRS = lib.concatStringsSep ":" (
|
||||||
lib.optional (!isDarwin) "${pkgs.ghostty}/share/terminfo"
|
lib.optional (!isDarwin) "${pkgs.ghostty}/share/terminfo" ++ [ "${pkgs.ncurses}/share/terminfo" ]
|
||||||
++ [ "${pkgs.ncurses}/share/terminfo" ]
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,10 @@
|
|||||||
users.users.alex = {
|
users.users.alex = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
extraGroups = [ "wheel" "networkmanager" ];
|
extraGroups = [
|
||||||
|
"wheel"
|
||||||
|
"networkmanager"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
programs._1password.enable = true;
|
programs._1password.enable = true;
|
||||||
|
|||||||
+26
-11
@@ -1,31 +1,46 @@
|
|||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports = [
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "vmd" "nvme" "rtsx_pci_sdmmc" ];
|
boot.initrd.availableKernelModules = [
|
||||||
|
"xhci_pci"
|
||||||
|
"thunderbolt"
|
||||||
|
"vmd"
|
||||||
|
"nvme"
|
||||||
|
"rtsx_pci_sdmmc"
|
||||||
|
];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{ device = "/dev/disk/by-uuid/5a8d96fe-20a7-40e8-bb27-f42f462123fc";
|
device = "/dev/disk/by-uuid/5a8d96fe-20a7-40e8-bb27-f42f462123fc";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" = {
|
||||||
{ device = "/dev/disk/by-uuid/9A43-44E9";
|
device = "/dev/disk/by-uuid/9A43-44E9";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
options = [ "fmask=0077" "dmask=0077" ];
|
options = [
|
||||||
|
"fmask=0077"
|
||||||
|
"dmask=0077"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices =
|
swapDevices = [
|
||||||
[ { device = "/dev/disk/by-uuid/021c3b9a-3d3b-4eab-ad72-c878bc39bfd5"; }
|
{ device = "/dev/disk/by-uuid/021c3b9a-3d3b-4eab-ad72-c878bc39bfd5"; }
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
{ ... }:
|
_: {
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
../../modules/darwin.nix
|
../../modules/darwin.nix
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -24,7 +24,10 @@
|
|||||||
users.users.alex = {
|
users.users.alex = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
extraGroups = [ "wheel" "networkmanager" ];
|
extraGroups = [
|
||||||
|
"wheel"
|
||||||
|
"networkmanager"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
programs._1password.enable = true;
|
programs._1password.enable = true;
|
||||||
|
|||||||
@@ -1,31 +1,45 @@
|
|||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports = [
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "rtsx_pci_sdmmc" ];
|
boot.initrd.availableKernelModules = [
|
||||||
|
"xhci_pci"
|
||||||
|
"thunderbolt"
|
||||||
|
"nvme"
|
||||||
|
"rtsx_pci_sdmmc"
|
||||||
|
];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{ device = "/dev/disk/by-uuid/29245dae-0f7b-4249-8d53-c305034156fa";
|
device = "/dev/disk/by-uuid/29245dae-0f7b-4249-8d53-c305034156fa";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" = {
|
||||||
{ device = "/dev/disk/by-uuid/3429-BC80";
|
device = "/dev/disk/by-uuid/3429-BC80";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
options = [ "fmask=0077" "dmask=0077" ];
|
options = [
|
||||||
|
"fmask=0077"
|
||||||
|
"dmask=0077"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices =
|
swapDevices = [
|
||||||
[ { device = "/dev/disk/by-uuid/e1adeb6e-feae-4627-a879-4667fd5e689e"; }
|
{ device = "/dev/disk/by-uuid/e1adeb6e-feae-4627-a879-4667fd5e689e"; }
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
|||||||
@@ -26,6 +26,23 @@ clean:
|
|||||||
sudo nix-store --optimise
|
sudo nix-store --optimise
|
||||||
sudo {{ if os() == "macos" { "darwin-rebuild switch" } else { "nixos-rebuild boot" } }} --flake .#{{host}}
|
sudo {{ if os() == "macos" { "darwin-rebuild switch" } else { "nixos-rebuild boot" } }} --flake .#{{host}}
|
||||||
|
|
||||||
|
# Format every .nix file in the repo with nixfmt (RFC 166 style).
|
||||||
|
# Runs inside the devShell, so it works with or without direnv loaded.
|
||||||
|
fmt:
|
||||||
|
nix develop -c bash -c "find . -name '*.nix' -not -path './iso/*' -not -path './.direnv/*' -exec nixfmt {} +"
|
||||||
|
|
||||||
|
# Lint Nix for anti-patterns (statix) and dead/unused bindings (deadnix).
|
||||||
|
# Exits nonzero on findings, so it doubles as a CI check.
|
||||||
|
lint:
|
||||||
|
nix develop -c statix check .
|
||||||
|
nix develop -c deadnix --fail .
|
||||||
|
|
||||||
|
# Preview what the next `rebuild` would change: build the target system
|
||||||
|
# without switching, then diff it against the running one.
|
||||||
|
diff:
|
||||||
|
nix build --out-link /tmp/notfiles-next {{ if os() == "macos" { ".#darwinConfigurations." + host + ".system" } else { ".#nixosConfigurations." + host + ".config.system.build.toplevel" } }}
|
||||||
|
nix develop -c nvd diff /run/current-system /tmp/notfiles-next
|
||||||
|
|
||||||
# Generate Ed25519 SSH keys for each named service (default: github gradescope).
|
# Generate Ed25519 SSH keys for each named service (default: github gradescope).
|
||||||
# Override: just gen-keys gitlab bitbucket
|
# Override: just gen-keys gitlab bitbucket
|
||||||
gen-keys *services='github gradescope h2p durrantlab signing_git scienting_git scienting_static_sites':
|
gen-keys *services='github gradescope h2p durrantlab signing_git scienting_git scienting_static_sites':
|
||||||
|
|||||||
+4
-1
@@ -1,5 +1,8 @@
|
|||||||
{ inputs, pkgs, ... }: {
|
{ inputs, pkgs, ... }: {
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
nix.settings.experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
];
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
time.timeZone = "America/New_York";
|
time.timeZone = "America/New_York";
|
||||||
|
|||||||
@@ -61,4 +61,3 @@
|
|||||||
trackpad.Clicking = false;
|
trackpad.Clicking = false;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-2
@@ -1,4 +1,4 @@
|
|||||||
{ ... }: {
|
_: {
|
||||||
virtualisation.docker = {
|
virtualisation.docker = {
|
||||||
enable = true;
|
enable = true;
|
||||||
rootless = {
|
rootless = {
|
||||||
@@ -7,4 +7,3 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+20
-11
@@ -17,8 +17,7 @@
|
|||||||
package = lib.mkOption {
|
package = lib.mkOption {
|
||||||
type = lib.types.package;
|
type = lib.types.package;
|
||||||
default = config.boot.kernelPackages.nvidiaPackages.stable;
|
default = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||||
defaultText = lib.literalExpression
|
defaultText = lib.literalExpression "config.boot.kernelPackages.nvidiaPackages.stable";
|
||||||
"config.boot.kernelPackages.nvidiaPackages.stable";
|
|
||||||
description = "The NVIDIA driver package to use.";
|
description = "The NVIDIA driver package to use.";
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -26,7 +25,11 @@
|
|||||||
enable = lib.mkEnableOption "NVIDIA Optimus PRIME (hybrid graphics)";
|
enable = lib.mkEnableOption "NVIDIA Optimus PRIME (hybrid graphics)";
|
||||||
|
|
||||||
mode = lib.mkOption {
|
mode = lib.mkOption {
|
||||||
type = lib.types.enum [ "offload" "sync" "reverse-sync" ];
|
type = lib.types.enum [
|
||||||
|
"offload"
|
||||||
|
"sync"
|
||||||
|
"reverse-sync"
|
||||||
|
];
|
||||||
default = "offload";
|
default = "offload";
|
||||||
description = ''
|
description = ''
|
||||||
Which PRIME mode to use.
|
Which PRIME mode to use.
|
||||||
@@ -63,13 +66,13 @@
|
|||||||
hardware.graphics.enable = true;
|
hardware.graphics.enable = true;
|
||||||
|
|
||||||
services.xserver.videoDrivers =
|
services.xserver.videoDrivers =
|
||||||
if config.modules.nvidia.prime.enable
|
if config.modules.nvidia.prime.enable && config.modules.nvidia.prime.mode == "offload" then
|
||||||
&& config.modules.nvidia.prime.mode == "offload"
|
[
|
||||||
then [
|
|
||||||
(if config.modules.nvidia.prime.amdBusId != "" then "amdgpu" else "modesetting")
|
(if config.modules.nvidia.prime.amdBusId != "" then "amdgpu" else "modesetting")
|
||||||
"nvidia"
|
"nvidia"
|
||||||
]
|
]
|
||||||
else [ "nvidia" ];
|
else
|
||||||
|
[ "nvidia" ];
|
||||||
|
|
||||||
hardware.nvidia = {
|
hardware.nvidia = {
|
||||||
modesetting.enable = true;
|
modesetting.enable = true;
|
||||||
@@ -88,16 +91,22 @@
|
|||||||
nvidiaBusId = config.modules.nvidia.prime.nvidiaBusId;
|
nvidiaBusId = config.modules.nvidia.prime.nvidiaBusId;
|
||||||
};
|
};
|
||||||
modeConfig =
|
modeConfig =
|
||||||
if config.modules.nvidia.prime.mode == "offload" then {
|
if config.modules.nvidia.prime.mode == "offload" then
|
||||||
|
{
|
||||||
offload.enable = true;
|
offload.enable = true;
|
||||||
offload.enableOffloadCmd = true;
|
offload.enableOffloadCmd = true;
|
||||||
} else if config.modules.nvidia.prime.mode == "sync" then {
|
}
|
||||||
|
else if config.modules.nvidia.prime.mode == "sync" then
|
||||||
|
{
|
||||||
sync.enable = true;
|
sync.enable = true;
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
reverseSync.enable = true;
|
reverseSync.enable = true;
|
||||||
allowExternalGpu = false;
|
allowExternalGpu = false;
|
||||||
};
|
};
|
||||||
in busIds // modeConfig
|
in
|
||||||
|
busIds // modeConfig
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
{ ... }: {
|
_: {
|
||||||
services.xserver.enable = true;
|
services.xserver.enable = true;
|
||||||
services.displayManager.sddm = {
|
services.displayManager.sddm = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ ... }: {
|
_: {
|
||||||
programs._1password.enable = true;
|
programs._1password.enable = true;
|
||||||
programs._1password-gui = {
|
programs._1password-gui = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user