Merge branch 'feature/desktop'
merge: desktop setup -> main
This commit is contained in:
commit
8a8b5bd48d
25 changed files with 1214 additions and 251 deletions
18
AGENTS.md
18
AGENTS.md
|
|
@ -1,23 +1,19 @@
|
|||
# Repository Guidelines
|
||||
|
||||
## Project Structure & Module Organization
|
||||
This flake manages both macOS (`macbook-pro`) and NixOS (`dev-vm`) hosts. `flake.nix` collects shared modules while `flake.lock` pins inputs. Platform modules live in `modules/darwin/` and `modules/nixos/`; the Linux base `system.nix` pulls in `users.nix`, `network.nix`, `ssh.nix`, and `containerization.nix`. Host overlays such as `modules/nixos/hosts/dev-vm.nix` add virtio tooling or per-machine packages. User-facing configuration sits under `modules/home/rsydn/` with `programs/`, `shell/`, and `devtools/`; Darwin layers `shell/nushell.nix` and Linux sticks to `shell/fish.nix`. Secrets remain encrypted in `secrets/*.sops.yaml` and appear at runtime under `~/.config/secrets/`.
|
||||
Shared logic lives in `flake.nix`, with inputs pinned in `flake.lock`. Platform modules sit under `modules/darwin/` and `modules/nixos/`; Linux hosts compose `modules/nixos/system.nix` plus `users.nix`, `network.nix`, `ssh.nix`, and `containerization.nix`. Host-specific overlays like `modules/nixos/hosts/dev-vm.nix` supply virtualization packages, while macOS tweaks belong in `modules/darwin/hosts/`. Home Manager layers for `rsydn` are under `modules/home/rsydn/` with `programs/`, `shell/`, and `devtools/`. Secrets stay encrypted in `secrets/*.sops.yaml` and surface at runtime in `~/.config/secrets/`.
|
||||
|
||||
## Build, Test & Development Commands
|
||||
- `nix develop` – enter the dev shell with `git`, `nixfmt-classic`, and SOPS tooling prewired.
|
||||
- `nix fmt` – format every Nix file; run before committing module or overlay changes.
|
||||
- `XDG_CACHE_HOME=$PWD/.cache nix flake check` – evaluate all hosts without polluting the global cache.
|
||||
- `darwin-rebuild --dry-run --flake .#macbook-pro` → `darwin-rebuild switch --flake .#macbook-pro` – preview then apply macOS updates.
|
||||
- `nix build .#nixosConfigurations.dev-vm.config.system.build.toplevel` – validate the Linux VM closure before switching.
|
||||
## Build, Test, and Development Commands
|
||||
Use `nix develop` to enter the project shell with `git`, `nixfmt-classic`, and SOPS ready. Run `nix fmt` before committing to format all Nix sources. `XDG_CACHE_HOME=$PWD/.cache nix flake check` validates every host without polluting the global cache. For macOS changes, run `darwin-rebuild --dry-run --flake .#macbook-pro` and follow with `darwin-rebuild switch --flake .#macbook-pro`. Validate the Linux VM closure via `nix build .#nixosConfigurations.dev-vm.config.system.build.toplevel`.
|
||||
|
||||
## Coding Style & Naming Conventions
|
||||
Use two-space indentation, trailing commas, and lower-kebab filenames (e.g. `shell/nushell.nix`). Declare custom options in the `rsydn.*` namespace and prefer shared modules over ad-hoc host tweaks.
|
||||
Indent with two spaces and keep trailing commas in attribute sets. Prefer lower-kebab filenames (e.g. `shell/nushell.nix`), and expose custom options under the `rsydn.*` namespace. Format Nix with `nix fmt`; avoid ad-hoc host tweaks when a shared module fits.
|
||||
|
||||
## Testing Guidelines
|
||||
Treat `nix flake check` as mandatory gatekeeping. Capture activation output (`darwin-rebuild --dry-run`, `nix build .#nixosConfigurations.dev-vm…`) and attach summaries to reviews. Co-locate regression tests next to their modules with the `<option-name>.nix` pattern.
|
||||
Treat `nix flake check` as the minimum gate; capture its output for reviews. When adjusting host builds, keep dry-run transcripts (`darwin-rebuild --dry-run`, `nix build .#nixosConfigurations.dev-vm…`) to share in PRs. Co-locate regression tests next to their modules using the `<option-name>.nix` pattern.
|
||||
|
||||
## Commit & Pull Request Guidelines
|
||||
Keep commit subjects short and imperative (`add dev-vm virtualization module`) and scope each commit narrowly. PRs should list validation commands, link issues or TODOs, and include screenshots or terminal snippets when modifying prompts, Tailscale, or SSH flows.
|
||||
Write imperative commit subjects such as `add dev-vm virtualization module`, and keep each commit narrowly scoped. PRs should list validation commands run, link related issues or TODOs, and attach screenshots or terminal snippets when touching prompts, Tailscale, or SSH flows.
|
||||
|
||||
## Security & Configuration Tips
|
||||
Age keys live at `~/.config/sops/age/keys.txt`; regenerate via Home Manager if missing. Read secrets from the managed files (`open ~/.config/secrets/openai-api-key | str trim`) and scope them with `with-env`. Tailscale and OpenSSH run by default on Linux; rotate keys regularly and audit `services.tailscale.extraUpFlags` before enabling exit nodes.
|
||||
Age keys live at `~/.config/sops/age/keys.txt`; regenerate via Home Manager if missing. Access secrets with `open ~/.config/secrets/<name> | str trim` and scope them using `with-env`. Audit `services.tailscale.extraUpFlags` before enabling exit nodes, and rotate SSH/Tailscale keys regularly.
|
||||
|
|
|
|||
|
|
@ -107,13 +107,6 @@ nix develop .#rust
|
|||
- rustfmt
|
||||
- clippy
|
||||
|
||||
### `zig-nightly` (optional)
|
||||
Zig nightly development (only available if zig overlay is working).
|
||||
|
||||
```bash
|
||||
nix develop .#zig-nightly
|
||||
```
|
||||
|
||||
## Usage from Any Directory
|
||||
|
||||
### Option 1: Direct Path Reference
|
||||
|
|
|
|||
|
|
@ -1,13 +0,0 @@
|
|||
{ pkgs, lib, zigPackage, ... }:
|
||||
|
||||
lib.optionalAttrs (zigPackage != null) (pkgs.mkShell {
|
||||
name = "zig-nightly";
|
||||
packages = [ zigPackage pkgs.zls pkgs.pkg-config pkgs.cmake pkgs.gdb ];
|
||||
shellHook = ''
|
||||
mkdir -p "$PWD/.cache/zig"
|
||||
export ZIG_GLOBAL_CACHE_DIR="$PWD/.cache/zig"
|
||||
echo "Zig shell using ${zigPackage.pname or "zig"} ${
|
||||
zigPackage.version or ""
|
||||
}"
|
||||
'';
|
||||
})
|
||||
213
flake.lock
generated
213
flake.lock
generated
|
|
@ -22,6 +22,29 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"chaotic": {
|
||||
"inputs": {
|
||||
"flake-schemas": "flake-schemas",
|
||||
"home-manager": "home-manager",
|
||||
"jovian": "jovian",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"rust-overlay": "rust-overlay"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1761265276,
|
||||
"narHash": "sha256-ZngDL68RZbT1RUX/m+h8y5zfXJdnydRKjf3oZTfwam0=",
|
||||
"owner": "chaotic-cx",
|
||||
"repo": "nyx",
|
||||
"rev": "5df2883e9401fd257e39285819996203628f3f0e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "chaotic-cx",
|
||||
"ref": "nyxpkgs-unstable",
|
||||
"repo": "nyx",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"darwin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
|
@ -58,20 +81,18 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat_2": {
|
||||
"flake": false,
|
||||
"flake-schemas": {
|
||||
"locked": {
|
||||
"lastModified": 1696426674,
|
||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||
"type": "github"
|
||||
"lastModified": 1721999734,
|
||||
"narHash": "sha256-G5CxYeJVm4lcEtaO87LKzOsVnWeTcHGKbKxNamNWgOw=",
|
||||
"rev": "0a5c42297d870156d9c57d8f99e476b738dcd982",
|
||||
"revCount": 75,
|
||||
"type": "tarball",
|
||||
"url": "https://api.flakehub.com/f/pinned/DeterminateSystems/flake-schemas/0.1.5/0190ef2f-61e0-794b-ba14-e82f225e55e6/source.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
"type": "tarball",
|
||||
"url": "https://flakehub.com/f/DeterminateSystems/flake-schemas/%3D0.1.5.tar.gz"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
|
|
@ -92,24 +113,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_2": {
|
||||
"inputs": {
|
||||
"systems": "systems_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1705309234,
|
||||
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"ghostty": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
|
|
@ -137,6 +140,7 @@
|
|||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"chaotic",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
|
|
@ -154,6 +158,48 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1761081701,
|
||||
"narHash": "sha256-IwpfaKg5c/WWQiy8b5QGaVPMvoEQ2J6kpwRFdpVpBNQ=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "9b4a2a7c4fbd75b422f00794af02d6edb4d9d315",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"jovian": {
|
||||
"inputs": {
|
||||
"nix-github-actions": "nix-github-actions",
|
||||
"nixpkgs": [
|
||||
"chaotic",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1761045626,
|
||||
"narHash": "sha256-N0OyyLp7VIYUdrtLSPt6y40q3+wAAeJWRwAtrKtHYtU=",
|
||||
"owner": "Jovian-Experiments",
|
||||
"repo": "Jovian-NixOS",
|
||||
"rev": "493f3428943605a9a34494cfcba32cd21633752f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Jovian-Experiments",
|
||||
"repo": "Jovian-NixOS",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-ai-tools": {
|
||||
"inputs": {
|
||||
"blueprint": "blueprint",
|
||||
|
|
@ -176,7 +222,46 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-github-actions": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"chaotic",
|
||||
"jovian",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1729697500,
|
||||
"narHash": "sha256-VFTWrbzDlZyFHHb1AlKRiD/qqCJIripXKiCSFS8fAOY=",
|
||||
"owner": "zhaofengli",
|
||||
"repo": "nix-github-actions",
|
||||
"rev": "e418aeb728b6aa5ca8c5c71974e7159c2df1d8cf",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "zhaofengli",
|
||||
"ref": "matrix-name",
|
||||
"repo": "nix-github-actions",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1761114652,
|
||||
"narHash": "sha256-f/QCJM/YhrV/lavyCVz8iU3rlZun6d+dAiC3H+CDle4=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "01f116e4df6a15f4ccdffb1bcd41096869fb385c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1758360447,
|
||||
"narHash": "sha256-XDY3A83bclygHDtesRoaRTafUd80Q30D/Daf9KSG6bs=",
|
||||
|
|
@ -189,7 +274,7 @@
|
|||
"url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1761373498,
|
||||
"narHash": "sha256-Q/uhWNvd7V7k1H1ZPMy/vkx3F8C13ZcdrKjO7Jv7v0c=",
|
||||
|
|
@ -207,13 +292,34 @@
|
|||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"chaotic": "chaotic",
|
||||
"darwin": "darwin",
|
||||
"ghostty": "ghostty",
|
||||
"home-manager": "home-manager",
|
||||
"home-manager": "home-manager_2",
|
||||
"nix-ai-tools": "nix-ai-tools",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"sops-nix": "sops-nix",
|
||||
"zig-overlay": "zig-overlay"
|
||||
"nixpkgs": "nixpkgs_3",
|
||||
"sops-nix": "sops-nix"
|
||||
}
|
||||
},
|
||||
"rust-overlay": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"chaotic",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1761100675,
|
||||
"narHash": "sha256-LX3TCDBeNpCWTDXtGyRASVcLmRPChSli34bgHnZ1DCw=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "72161c6c53f6e3f8dadaf54b2204a5094c6a16ae",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"sops-nix": {
|
||||
|
|
@ -266,21 +372,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_3": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"treefmt-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
|
@ -331,31 +422,9 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"zig-overlay": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat_2",
|
||||
"flake-utils": "flake-utils_2",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1760747435,
|
||||
"narHash": "sha256-wNB/W3x+or4mdNxFPNOH5/WFckNpKgFRZk7OnOsLtm0=",
|
||||
"owner": "mitchellh",
|
||||
"repo": "zig-overlay",
|
||||
"rev": "d0f239b887b1ac736c0f3dde91bf5bf2ecf3a420",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "mitchellh",
|
||||
"repo": "zig-overlay",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"zon2nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1758405547,
|
||||
|
|
|
|||
72
flake.nix
72
flake.nix
|
|
@ -18,12 +18,11 @@
|
|||
sops-nix.url = "github:Mic92/sops-nix";
|
||||
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
zig-overlay.url = "github:mitchellh/zig-overlay";
|
||||
zig-overlay.inputs.nixpkgs.follows = "nixpkgs";
|
||||
chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
|
||||
};
|
||||
|
||||
outputs = inputs@{ self, nixpkgs, darwin, home-manager, ghostty, nix-ai-tools
|
||||
, sops-nix, ... }:
|
||||
, sops-nix, chaotic, ... }:
|
||||
let
|
||||
inherit (nixpkgs.lib) genAttrs;
|
||||
lib = nixpkgs.lib;
|
||||
|
|
@ -34,12 +33,7 @@
|
|||
|
||||
forEachSystem = f: genAttrs systems (system: f system);
|
||||
|
||||
overlaysList = [ ghostty.overlays.default ];
|
||||
|
||||
zigOverlay = if builtins.hasAttr "zig-overlay" inputs then
|
||||
inputs."zig-overlay"
|
||||
else
|
||||
null;
|
||||
overlaysList = [ ghostty.overlays.default chaotic.overlays.default ];
|
||||
|
||||
mkPkgs = system:
|
||||
import nixpkgs {
|
||||
|
|
@ -49,12 +43,13 @@
|
|||
};
|
||||
|
||||
sharedDarwinModules = [ ./modules/darwin/system.nix ];
|
||||
sharedNixosModules = [ ./modules/nixos/system.nix ];
|
||||
sharedNixosModules =
|
||||
[ ./modules/nixos/system.nix chaotic.nixosModules.default ];
|
||||
|
||||
user = "rasyidanakbar";
|
||||
|
||||
mkDarwin = { system ? "aarch64-darwin", extraModules ? [ ]
|
||||
, homeFile ? ./modules/darwin/home/default.nix }:
|
||||
, homeFile ? ./modules/darwin/home/default.nix, }:
|
||||
let pkgs = mkPkgs system;
|
||||
in darwin.lib.darwinSystem {
|
||||
inherit system pkgs;
|
||||
|
|
@ -74,7 +69,7 @@
|
|||
];
|
||||
};
|
||||
mkNixos = { system ? "x86_64-linux", extraModules ? [ ]
|
||||
, homeFile ? ./modules/nixos/home/default.nix }:
|
||||
, homeFile ? ./modules/nixos/home/default.nix, }:
|
||||
let pkgs = mkPkgs system;
|
||||
in lib.nixosSystem {
|
||||
inherit system pkgs;
|
||||
|
|
@ -98,6 +93,14 @@
|
|||
dev-vm = mkNixos {
|
||||
system = "x86_64-linux";
|
||||
extraModules = [ ./modules/nixos/hosts/dev-vm.nix ];
|
||||
# Uses default homeFile: ./modules/nixos/home/default.nix
|
||||
};
|
||||
desktop = mkNixos {
|
||||
system = "x86_64-linux";
|
||||
extraModules = [ ./modules/nixos/hosts/desktop.nix ];
|
||||
# Home Manager configs are imported directly in desktop modules
|
||||
# No homeFile needed - using inline home-manager.users.${user}
|
||||
homeFile = ./modules/nixos/home/default.nix;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -109,49 +112,8 @@
|
|||
else
|
||||
pkgs.python3;
|
||||
|
||||
# Zig overlay setup for zig-nightly shell
|
||||
zigPackages =
|
||||
if zigOverlay != null && builtins.hasAttr "packages" zigOverlay then
|
||||
zigOverlay.packages
|
||||
else
|
||||
{ };
|
||||
|
||||
zigCandidate =
|
||||
if zigOverlay != null && system == "aarch64-darwin" then
|
||||
lib.attrByPath [ system "master" "zig" ] null zigPackages
|
||||
else
|
||||
null;
|
||||
|
||||
zigCandidateBroken = if zigCandidate != null then
|
||||
if zigCandidate ? meta && zigCandidate.meta ? broken then
|
||||
zigCandidate.meta.broken
|
||||
else
|
||||
false
|
||||
else
|
||||
true;
|
||||
|
||||
zigFallback = pkgs.zig;
|
||||
zigFallbackBroken =
|
||||
if zigFallback ? meta && zigFallback.meta ? broken then
|
||||
zigFallback.meta.broken
|
||||
else
|
||||
false;
|
||||
|
||||
zigPackage =
|
||||
if zigCandidate != null && zigCandidateBroken == false then
|
||||
zigCandidate
|
||||
else if zigFallbackBroken == false then
|
||||
zigFallback
|
||||
else
|
||||
null;
|
||||
|
||||
zlsBroken = if pkgs.zls ? meta && pkgs.zls.meta ? broken then
|
||||
pkgs.zls.meta.broken
|
||||
else
|
||||
false;
|
||||
|
||||
# Common arguments passed to all devshell imports
|
||||
shellArgs = { inherit pkgs lib python zigPackage; };
|
||||
shellArgs = { inherit pkgs lib python; };
|
||||
|
||||
# Import all devshells from devshells/ directory
|
||||
importShell = name: import (./devshells + "/${name}.nix") shellArgs;
|
||||
|
|
@ -163,8 +125,6 @@
|
|||
go = importShell "go";
|
||||
web-bun = importShell "web-bun";
|
||||
rust = importShell "rust";
|
||||
} // lib.optionalAttrs (zigPackage != null && zlsBroken == false) {
|
||||
zig-nightly = importShell "zig-nightly";
|
||||
});
|
||||
|
||||
formatter = forEachSystem (system: (mkPkgs system).nixfmt-classic);
|
||||
|
|
|
|||
|
|
@ -6,4 +6,56 @@
|
|||
./programs/aerospace
|
||||
./programs/ghostty.nix
|
||||
];
|
||||
|
||||
# Darwin-specific secrets configuration
|
||||
rsydn.secrets = {
|
||||
enable = lib.mkDefault true;
|
||||
defaultSopsFile = ../../../secrets/local-ai-tokens.sops.yaml;
|
||||
secrets = {
|
||||
"openai-api-key" = {
|
||||
format = "yaml";
|
||||
key = "OPENAI_API_KEY";
|
||||
};
|
||||
|
||||
"openrouter-api-key" = {
|
||||
format = "yaml";
|
||||
key = "OPENROUTER_API_KEY";
|
||||
};
|
||||
|
||||
"zai-api-key" = {
|
||||
format = "yaml";
|
||||
key = "ZAI_API_KEY";
|
||||
};
|
||||
|
||||
"moonshot-api-key" = {
|
||||
format = "yaml";
|
||||
key = "MOONSHOT_API_KEY";
|
||||
};
|
||||
|
||||
"anthropic-api-key" = {
|
||||
format = "yaml";
|
||||
key = "ANTHROPIC_API_KEY";
|
||||
};
|
||||
|
||||
"exa-api-key" = {
|
||||
format = "yaml";
|
||||
key = "EXA_API_KEY";
|
||||
};
|
||||
|
||||
"fal-api-key" = {
|
||||
format = "yaml";
|
||||
key = "FAL_API_KEY";
|
||||
};
|
||||
|
||||
"groq-api-key" = {
|
||||
format = "yaml";
|
||||
key = "GROQ_API_KEY";
|
||||
};
|
||||
|
||||
"firecrawl-api-key" = {
|
||||
format = "yaml";
|
||||
key = "FIRECRAWL_API_KEY";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
{ pkgs, lib, ... }: {
|
||||
home.stateVersion = "24.05";
|
||||
|
||||
imports = [
|
||||
./programs/fastfetch.nix
|
||||
./programs/helix.nix
|
||||
./programs/neovim.nix
|
||||
./shell/tmux.nix
|
||||
|
|
@ -11,6 +10,14 @@
|
|||
./secrets.nix
|
||||
];
|
||||
|
||||
config = {
|
||||
home.stateVersion = "24.05";
|
||||
|
||||
# XDG Base Directory specification
|
||||
# Ensures ~/.config, ~/.local/share, ~/.cache are properly set up
|
||||
# Note: User directories (Desktop, Downloads, etc.) are configured in desktop modules
|
||||
xdg.enable = true;
|
||||
|
||||
programs.git.enable = true;
|
||||
|
||||
home.packages = with pkgs; [ docker docker-compose ];
|
||||
|
|
@ -57,55 +64,5 @@
|
|||
uv.enable = true;
|
||||
node.enable = true;
|
||||
};
|
||||
|
||||
rsydn.secrets = lib.mkIf pkgs.stdenv.hostPlatform.isDarwin {
|
||||
enable = lib.mkDefault true;
|
||||
defaultSopsFile = ../../../secrets/local-ai-tokens.sops.yaml;
|
||||
secrets = {
|
||||
"openai-api-key" = {
|
||||
format = "yaml";
|
||||
key = "OPENAI_API_KEY";
|
||||
};
|
||||
|
||||
"openrouter-api-key" = {
|
||||
format = "yaml";
|
||||
key = "OPENROUTER_API_KEY";
|
||||
};
|
||||
|
||||
"zai-api-key" = {
|
||||
format = "yaml";
|
||||
key = "ZAI_API_KEY";
|
||||
};
|
||||
|
||||
"moonshot-api-key" = {
|
||||
format = "yaml";
|
||||
key = "MOONSHOT_API_KEY";
|
||||
};
|
||||
|
||||
"anthropic-api-key" = {
|
||||
format = "yaml";
|
||||
key = "ANTHROPIC_API_KEY";
|
||||
};
|
||||
|
||||
"exa-api-key" = {
|
||||
format = "yaml";
|
||||
key = "EXA_API_KEY";
|
||||
};
|
||||
|
||||
"fal-api-key" = {
|
||||
format = "yaml";
|
||||
key = "FAL_API_KEY";
|
||||
};
|
||||
|
||||
"groq-api-key" = {
|
||||
format = "yaml";
|
||||
key = "GROQ_API_KEY";
|
||||
};
|
||||
|
||||
"firecrawl-api-key" = {
|
||||
format = "yaml";
|
||||
key = "FIRECRAWL_API_KEY";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
111
modules/home/rsydn/programs/fastfetch.nix
Normal file
111
modules/home/rsydn/programs/fastfetch.nix
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = [ pkgs.fastfetch ];
|
||||
|
||||
# Copy the custom logo file
|
||||
xdg.configFile."fastfetch/oguri-logo.txt".source = ./fastfetch/oguri-logo.txt;
|
||||
|
||||
xdg.configFile."fastfetch/config.jsonc".text = builtins.toJSON {
|
||||
"$schema" =
|
||||
"https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json";
|
||||
|
||||
logo = {
|
||||
type = "file";
|
||||
source = "~/.config/fastfetch/oguri-logo.txt";
|
||||
padding = {
|
||||
top = 1;
|
||||
right = 2;
|
||||
};
|
||||
};
|
||||
|
||||
display = {
|
||||
separator = " → ";
|
||||
color = {
|
||||
keys = "cyan";
|
||||
title = "blue";
|
||||
};
|
||||
};
|
||||
|
||||
modules = [
|
||||
{
|
||||
type = "title";
|
||||
format = "{user-name}@{host-name}";
|
||||
}
|
||||
{
|
||||
type = "separator";
|
||||
string = "─";
|
||||
}
|
||||
{
|
||||
type = "os";
|
||||
key = "OS";
|
||||
keyColor = "cyan";
|
||||
}
|
||||
{
|
||||
type = "kernel";
|
||||
key = "Kernel";
|
||||
}
|
||||
{
|
||||
type = "uptime";
|
||||
key = "Uptime";
|
||||
}
|
||||
{
|
||||
type = "packages";
|
||||
key = "Packages";
|
||||
}
|
||||
{
|
||||
type = "shell";
|
||||
key = "Shell";
|
||||
}
|
||||
{
|
||||
type = "display";
|
||||
key = "Display";
|
||||
compactType = "scaled";
|
||||
}
|
||||
{
|
||||
type = "de";
|
||||
key = "DE";
|
||||
}
|
||||
{
|
||||
type = "wm";
|
||||
key = "WM";
|
||||
}
|
||||
{
|
||||
type = "terminal";
|
||||
key = "Terminal";
|
||||
}
|
||||
{
|
||||
type = "terminalfont";
|
||||
key = "Font";
|
||||
}
|
||||
{
|
||||
type = "cpu";
|
||||
key = "CPU";
|
||||
temp = true;
|
||||
}
|
||||
{
|
||||
type = "gpu";
|
||||
key = "GPU";
|
||||
temp = true;
|
||||
}
|
||||
{
|
||||
type = "memory";
|
||||
key = "Memory";
|
||||
}
|
||||
{
|
||||
type = "disk";
|
||||
key = "Disk (/)";
|
||||
folders = "/";
|
||||
}
|
||||
{
|
||||
type = "separator";
|
||||
string = "─";
|
||||
}
|
||||
{
|
||||
type = "colors";
|
||||
paddingLeft = 2;
|
||||
symbol = "circle";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
18
modules/home/rsydn/programs/fastfetch/oguri-logo.txt
Normal file
18
modules/home/rsydn/programs/fastfetch/oguri-logo.txt
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
[38;2;245;245;245m⣿[0m[38;2;244;245;243m⣿[0m[38;2;244;244;243m⣿[0m[38;2;241;241;241m⣿[0m[38;2;240;241;240m⣿[0m[38;2;215;203;219m⣿[0m[38;2;238;239;239m⣿[0m[38;2;237;237;237m⣿[0m[38;2;193;194;216m⣿[0m[38;2;232;235;235m⣿[0m[38;2;238;236;235m⣿[0m[38;2;238;236;235m⣿[0m[38;2;237;234;234m⣿[0m[38;2;238;231;235m⣿[0m[38;2;238;235;232m⣿[0m[38;2;247;245;242m⣿[0m[38;2;231;236;238m⣿[0m[38;2;246;247;243m⣿[0m[38;2;248;246;243m⣿[0m[38;2;249;247;244m⣿[0m[38;2;249;247;244m⣿[0m[38;2;246;244;241m⣿[0m[38;2;245;243;241m⣿[0m[38;2;202;193;216m⣿[0m[38;2;250;233;194m⣿[0m[38;2;251;231;193m⣿[0m[38;2;249;230;189m⣿[0m[38;2;250;230;181m⣿[0m[38;2;249;215;163m⣿[0m[38;2;112;102;154m⣾[0m[38;2;219;194;200m⣽[0m[38;2;109;95;142m⣶[0m[38;2;170;161;130m⣿[0m[38;2;191;148;100m⣏[0m[38;2;251;253;240m⣿[0m[38;2;249;243;237m⣿[0m
|
||||
[38;2;245;246;241m⣿[0m[38;2;242;243;241m⣿[0m[38;2;240;240;240m⣿[0m[38;2;238;237;238m⣿[0m[38;2;225;220;226m⣿[0m[38;2;238;237;237m⣿[0m[38;2;238;237;237m⣿[0m[38;2;238;236;235m⣿[0m[38;2;238;236;234m⣿[0m[38;2;238;236;235m⣿[0m[38;2;238;236;235m⣿[0m[38;2;236;234;233m⣿[0m[38;2;238;233;233m⣿[0m[38;2;236;231;232m⣿[0m[38;2;234;228;228m⣿[0m[38;2;247;244;241m⣿[0m[38;2;246;246;240m⣿[0m[38;2;246;246;242m⣿[0m[38;2;248;248;244m⣿[0m[38;2;247;245;241m⣿[0m[38;2;246;245;240m⣿[0m[38;2;247;246;239m⣿[0m[38;2;244;245;239m⣿[0m[38;2;243;244;239m⣿[0m[38;2;240;237;237m⣿[0m[38;2;171;154;201m⣿[0m[38;2;215;221;229m⣿[0m[38;2;251;250;244m⣿[0m[38;2;248;242;236m⣿[0m[38;2;244;241;235m⣿[0m[38;2;213;199;219m⣿[0m[38;2;244;224;164m⣿[0m[38;2;248;221;153m⣿[0m[38;2;254;220;140m⣿[0m[38;2;131;114;135m⣼[0m[38;2;246;241;236m⣿[0m
|
||||
[38;2;241;241;241m⣿[0m[38;2;241;239;238m⣿[0m[38;2;240;238;235m⣿[0m[38;2;240;239;237m⣿[0m[38;2;225;218;227m⣿[0m[38;2;238;235;234m⣿[0m[38;2;233;230;230m⣿[0m[38;2;237;236;235m⣿[0m[38;2;232;230;229m⣿[0m[38;2;235;227;230m⣿[0m[38;2;235;236;234m⣿[0m[38;2;236;233;232m⣿[0m[38;2;237;232;231m⣿[0m[38;2;230;224;225m⣿[0m[38;2;233;228;228m⣿[0m[38;2;242;236;231m⣿[0m[38;2;237;232;230m⣿[0m[38;2;246;244;239m⣿[0m[38;2;246;244;240m⣿[0m[38;2;244;245;239m⣿[0m[38;2;244;245;239m⣿[0m[38;2;244;245;239m⣿[0m[38;2;244;245;239m⣿[0m[38;2;247;246;240m⣿[0m[38;2;248;247;239m⣿[0m[38;2;247;246;237m⣿[0m[38;2;247;246;240m⣿[0m[38;2;247;246;239m⣿[0m[38;2;248;244;237m⣿[0m[38;2;247;244;239m⣿[0m[38;2;252;248;238m⣿[0m[38;2;158;130;180m⣿[0m[38;2;251;226;169m⣿[0m[38;2;253;229;162m⣿[0m[38;2;200;152;128m⣽[0m[38;2;251;247;233m⣫[0m
|
||||
[38;2;240;238;236m⣿[0m[38;2;238;236;232m⣿[0m[38;2;235;233;231m⣿[0m[38;2;226;218;225m⣿[0m[38;2;238;233;232m⣿[0m[38;2;232;226;226m⣿[0m[38;2;237;231;231m⣿[0m[38;2;230;221;223m⣿[0m[38;2;232;228;227m⣿[0m[38;2;169;108;147m⢹[0m[38;2;242;243;237m⣿[0m[38;2;227;217;218m⣿[0m[38;2;234;226;226m⣿[0m[38;2;234;229;229m⣿[0m[38;2;230;215;219m⣿[0m[38;2;236;234;230m⣿[0m[38;2;235;227;225m⣿[0m[38;2;245;242;237m⣿[0m[38;2;243;242;234m⣿[0m[38;2;244;245;239m⣿[0m[38;2;244;245;239m⣿[0m[38;2;244;245;239m⣿[0m[38;2;244;245;239m⣿[0m[38;2;245;245;239m⣿[0m[38;2;246;246;239m⣿[0m[38;2;248;247;239m⣿[0m[38;2;247;246;238m⣿[0m[38;2;246;244;240m⣿[0m[38;2;249;243;239m⣿[0m[38;2;249;244;237m⣿[0m[38;2;249;244;237m⣿[0m[38;2;243;237;235m⣿[0m[38;2;238;242;238m⣿[0m[38;2;250;242;236m⣿[0m[38;2;243;238;233m⣿[0m[38;2;167;139;179m⣿[0m
|
||||
[38;2;236;234;231m⣿[0m[38;2;237;229;228m⣿[0m[38;2;235;229;227m⣿[0m[38;2;226;218;220m⣿[0m[38;2;229;223;223m⣿[0m[38;2;232;223;224m⡿[0m[38;2;193;152;176m⣹[0m[38;2;200;166;186m⣿[0m[38;2;227;206;215m⡇[0m[38;2;139;80;116m⢸[0m[38;2;245;244;239m⣿[0m[38;2;187;165;174m⢿[0m[38;2;221;205;213m⣿[0m[38;2;238;232;230m⣿[0m[38;2;218;194;207m⡇[0m[38;2;229;222;216m⣿[0m[38;2;233;224;225m⣿[0m[38;2;234;230;228m⣿[0m[38;2;242;237;233m⣿[0m[38;2;245;243;235m⣿[0m[38;2;246;245;239m⣿[0m[38;2;246;245;238m⣿[0m[38;2;248;247;239m⣿[0m[38;2;248;247;239m⣿[0m[38;2;247;246;238m⣿[0m[38;2;247;246;240m⣿[0m[38;2;246;245;240m⣿[0m[38;2;247;243;241m⣿[0m[38;2;248;243;238m⣿[0m[38;2;249;243;239m⣿[0m[38;2;249;244;236m⣿[0m[38;2;248;243;236m⣿[0m[38;2;247;241;235m⣿[0m[38;2;248;238;237m⣿[0m[38;2;245;239;233m⣿[0m[38;2;229;213;223m⣿[0m
|
||||
[38;2;236;229;227m⣿[0m[38;2;233;225;226m⣿[0m[38;2;232;224;225m⣿[0m[38;2;231;223;224m⣿[0m[38;2;227;216;218m⡿[0m[38;2;202;156;177m⣁[0m[38;2;180;152;166m⣇[0m[38;2;163;131;144m⣿[0m[38;2;149;90;122m⠀[0m[38;2;130;73;103m⠈[0m[38;2;243;240;237m⡟[0m[38;2;142;79;108m⠘[0m[38;2;223;205;215m⣿[0m[38;2;239;234;231m⣿[0m[38;2;211;182;200m⡇[0m[38;2;155;104;123m⠸[0m[38;2;239;232;231m⣿[0m[38;2;236;229;229m⣿[0m[38;2;235;228;226m⣿[0m[38;2;238;232;229m⣿[0m[38;2;247;242;236m⣿[0m[38;2;238;230;227m⣿[0m[38;2;247;243;240m⣿[0m[38;2;247;244;241m⣿[0m[38;2;247;243;240m⣿[0m[38;2;247;244;239m⣿[0m[38;2;249;243;238m⣿[0m[38;2;249;243;239m⣿[0m[38;2;244;238;234m⣿[0m[38;2;247;243;237m⣿[0m[38;2;248;241;236m⣿[0m[38;2;248;238;237m⣿[0m[38;2;249;237;237m⣿[0m[38;2;245;238;234m⣿[0m[38;2;244;237;231m⣿[0m[38;2;244;238;234m⣿[0m
|
||||
[38;2;232;225;226m⣿[0m[38;2;228;215;217m⣿[0m[38;2;231;222;220m⣿[0m[38;2;227;217;218m⣟[0m[38;2;139;84;117m⢀[0m[38;2;194;185;187m⠿[0m[38;2;178;167;177m⡏[0m[38;2;168;155;158m⣽[0m[38;2;18;32;106m⣴[0m[38;2;30;48;119m⣦[0m[38;2;209;210;212m⣿[0m[38;2;36;27;48m⠀[0m[38;2;162;153;147m⣹[0m[38;2;226;217;214m⣿[0m[38;2;209;171;191m⡇[0m[38;2;151;77;107m⠀[0m[38;2;203;173;171m⢹[0m[38;2;237;227;228m⣿[0m[38;2;218;194;205m⣿[0m[38;2;241;234;230m⣿[0m[38;2;240;232;230m⣿[0m[38;2;239;231;230m⣿[0m[38;2;243;235;231m⣿[0m[38;2;249;244;237m⣿[0m[38;2;249;243;239m⣿[0m[38;2;249;244;237m⣿[0m[38;2;249;244;237m⣿[0m[38;2;245;238;235m⣿[0m[38;2;244;237;233m⣿[0m[38;2;244;239;235m⣿[0m[38;2;241;236;229m⣿[0m[38;2;242;235;231m⣿[0m[38;2;246;240;236m⣿[0m[38;2;243;239;231m⣿[0m[38;2;245;238;232m⣿[0m[38;2;239;228;229m⣿[0m
|
||||
[38;2;227;214;217m⣿[0m[38;2;229;220;219m⣿[0m[38;2;228;220;219m⣿[0m[38;2;179;131;154m⣿[0m[38;2;181;148;164m⣿[0m[38;2;165;110;134m⣷[0m[38;2;136;87;113m⣶[0m[38;2;187;204;223m⣿[0m[38;2;210;242;255m⣿[0m[38;2;245;254;252m⣿[0m[38;2;191;215;250m⣿[0m[38;2;120;123;202m⣧[0m[38;2;155;150;149m⣿[0m[38;2;174;142;150m⣿[0m[38;2;229;211;220m⣷[0m[38;2;151;82;103m⣀[0m[38;2;160;81;111m⡀[0m[38;2;227;217;211m⣿[0m[38;2;237;225;227m⡟[0m[38;2;221;204;203m⣿[0m[38;2;242;231;229m⣿[0m[38;2;234;222;223m⣿[0m[38;2;241;234;230m⣿[0m[38;2;246;242;235m⣿[0m[38;2;246;239;235m⣿[0m[38;2;246;240;234m⣿[0m[38;2;242;238;231m⣿[0m[38;2;232;223;220m⣿[0m[38;2;247;243;238m⠟[0m[38;2;169;80;101m⣸[0m[38;2;247;244;239m⣿[0m[38;2;232;217;216m⣿[0m[38;2;239;231;226m⣿[0m[38;2;243;238;231m⣿[0m[38;2;244;234;230m⣿[0m[38;2;227;205;212m⣿[0m
|
||||
[38;2;221;204;211m⣿[0m[38;2;231;221;219m⣿[0m[38;2;226;212;213m⣿[0m[38;2;207;173;178m⣿[0m[38;2;234;220;208m⣿[0m[38;2;255;242;225m⣿[0m[38;2;238;220;212m⣿[0m[38;2;196;162;172m⣿[0m[38;2;196;166;173m⣿[0m[38;2;188;159;172m⣿[0m[38;2;182;152;165m⣿[0m[38;2;176;139;156m⣿[0m[38;2;153;112;130m⣶[0m[38;2;161;116;130m⣿[0m[38;2;195;167;166m⣿[0m[38;2;181;126;141m⣿[0m[38;2;170;117;131m⣿[0m[38;2;184;132;142m⣿[0m[38;2;218;190;201m⣷[0m[38;2;169;100;117m⣞[0m[38;2;233;222;219m⣿[0m[38;2;242;233;232m⣿[0m[38;2;212;189;194m⣿[0m[38;2;239;228;228m⣿[0m[38;2;238;230;229m⣿[0m[38;2;230;220;220m⡿[0m[38;2;199;141;158m⣹[0m[38;2;249;255;249m⠏[0m[38;2;138;49;77m⠀[0m[38;2;185;150;154m⣿[0m[38;2;230;209;214m⠃[0m[38;2;219;209;202m⣿[0m[38;2;218;183;190m⣿[0m[38;2;245;236;231m⣿[0m[38;2;242;235;229m⣿[0m[38;2;221;192;203m⣿[0m
|
||||
[38;2;224;205;211m⣿[0m[38;2;230;217;217m⣿[0m[38;2;227;210;207m⣿[0m[38;2;252;236;220m⣿[0m[38;2;251;238;220m⣿[0m[38;2;251;238;220m⣿[0m[38;2;251;238;220m⣿[0m[38;2;252;237;220m⣿[0m[38;2;252;236;220m⣿[0m[38;2;255;242;224m⣿[0m[38;2;246;229;218m⣿[0m[38;2;250;235;221m⣿[0m[38;2;254;239;224m⣿[0m[38;2;255;241;225m⣿[0m[38;2;255;240;222m⣿[0m[38;2;255;240;222m⣿[0m[38;2;252;235;222m⣿[0m[38;2;236;223;216m⣿[0m[38;2;253;238;222m⣿[0m[38;2;191;136;147m⣿[0m[38;2;180;115;128m⣧[0m[38;2;199;179;173m⣿[0m[38;2;199;154;166m⣿[0m[38;2;235;229;227m⣿[0m[38;2;233;229;226m⣯[0m[38;2;111;55;75m⢀[0m[38;2;163;150;151m⣇[0m[38;2;55;18;35m⣀[0m[38;2;51;19;32m⡸[0m[38;2;235;213;216m⠁[0m[38;2;132;50;65m⢸[0m[38;2;242;245;238m⠏[0m[38;2;187;123;127m⢿[0m[38;2;244;236;230m⣿[0m[38;2;244;238;231m⣿[0m[38;2;213;181;190m⣿[0m
|
||||
[38;2;231;216;216m⣿[0m[38;2;225;205;206m⣿[0m[38;2;242;223;211m⣿[0m[38;2;240;221;211m⣿[0m[38;2;253;234;219m⣿[0m[38;2;253;238;221m⣿[0m[38;2;252;237;222m⣿[0m[38;2;253;236;222m⣿[0m[38;2;253;237;221m⣿[0m[38;2;254;237;221m⣿[0m[38;2;253;237;221m⣿[0m[38;2;253;237;221m⣿[0m[38;2;252;236;220m⣿[0m[38;2;253;236;220m⣿[0m[38;2;253;236;221m⣿[0m[38;2;253;235;220m⣿[0m[38;2;251;233;219m⣿[0m[38;2;254;236;220m⣿[0m[38;2;252;235;219m⣿[0m[38;2;236;213;205m⣿[0m[38;2;202;161;163m⢿[0m[38;2;198;155;156m⣿[0m[38;2;178;121;129m⣿[0m[38;2;240;235;233m⣏[0m[38;2;187;136;138m⡉[0m[38;2;144;180;233m⠻[0m[38;2;206;231;248m⣿[0m[38;2;207;230;246m⣿[0m[38;2;125;128;210m⡇[0m[38;2;30;32;70m⢠[0m[38;2;139;127;126m⣿[0m[38;2;64;24;47m⣄[0m[38;2;132;79;79m⢸[0m[38;2;244;239;234m⣿[0m[38;2;244;236;232m⣿[0m[38;2;236;229;224m⣿[0m
|
||||
[38;2;229;213;211m⣿[0m[38;2;220;199;200m⣿[0m[38;2;232;213;208m⣿[0m[38;2;249;231;220m⣿[0m[38;2;248;228;212m⣿[0m[38;2;253;236;220m⣿[0m[38;2;253;236;220m⣿[0m[38;2;253;236;220m⣿[0m[38;2;253;236;220m⣿[0m[38;2;255;234;219m⣿[0m[38;2;255;235;220m⣿[0m[38;2;253;236;220m⣿[0m[38;2;253;236;220m⣿[0m[38;2;253;236;220m⣿[0m[38;2;253;236;220m⣿[0m[38;2;253;236;220m⣿[0m[38;2;255;243;226m⣿[0m[38;2;249;231;216m⣿[0m[38;2;253;236;220m⣿[0m[38;2;255;250;233m⠏[0m[38;2;107;81;85m⣸[0m[38;2;208;174;176m⣿[0m[38;2;232;215;205m⣿[0m[38;2;255;239;222m⣿[0m[38;2;197;139;148m⣿[0m[38;2;182;123;132m⣿[0m[38;2;158;96;118m⣦[0m[38;2;172;167;188m⣭[0m[38;2;173;188;242m⣑[0m[38;2;189;197;190m⢛[0m[38;2;205;190;184m⠋[0m[38;2;156;120;123m⠁[0m[38;2;79;43;52m⢸[0m[38;2;251;246;240m⣿[0m[38;2;223;200;204m⣿[0m[38;2;244;238;231m⣿[0m
|
||||
[38;2;228;212;209m⣿[0m[38;2;228;212;209m⣿[0m[38;2;223;202;200m⣿[0m[38;2;253;235;219m⣿[0m[38;2;254;235;220m⣿[0m[38;2;253;237;222m⣿[0m[38;2;254;235;220m⣿[0m[38;2;253;236;220m⣿[0m[38;2;253;236;220m⣿[0m[38;2;253;236;220m⣿[0m[38;2;253;236;220m⣿[0m[38;2;253;236;220m⣿[0m[38;2;253;236;220m⣿[0m[38;2;253;236;220m⣿[0m[38;2;253;236;220m⣿[0m[38;2;253;236;220m⣿[0m[38;2;252;234;218m⣿[0m[38;2;254;236;221m⣿[0m[38;2;255;247;229m⣿[0m[38;2;149;114;122m⣾[0m[38;2;255;235;220m⣿[0m[38;2;254;234;219m⣿[0m[38;2;254;236;221m⣿[0m[38;2;254;235;221m⣿[0m[38;2;255;236;221m⣿[0m[38;2;253;232;218m⣿[0m[38;2;255;239;224m⣿[0m[38;2;237;211;204m⣿[0m[38;2;219;181;178m⣿[0m[38;2;206;160;160m⣿[0m[38;2;189;124;130m⣿[0m[38;2;179;109;114m⣿[0m[38;2;174;97;103m⢸[0m[38;2;245;243;235m⣿[0m[38;2;243;236;232m⣿[0m[38;2;241;234;232m⣿[0m
|
||||
[38;2;205;172;171m⣿[0m[38;2;227;208;207m⣿[0m[38;2;233;212;202m⣿[0m[38;2;232;206;200m⣿[0m[38;2;255;237;217m⣿[0m[38;2;254;234;219m⣿[0m[38;2;255;235;220m⣿[0m[38;2;255;235;220m⣿[0m[38;2;255;235;220m⣿[0m[38;2;254;234;219m⣿[0m[38;2;254;234;219m⣿[0m[38;2;255;235;220m⣿[0m[38;2;254;233;219m⣿[0m[38;2;254;233;219m⣿[0m[38;2;255;235;220m⣿[0m[38;2;255;234;219m⣿[0m[38;2;253;233;220m⣿[0m[38;2;253;233;219m⣿[0m[38;2;253;233;218m⣿[0m[38;2;253;233;218m⣿[0m[38;2;253;233;218m⣿[0m[38;2;247;227;212m⣿[0m[38;2;254;233;216m⣿[0m[38;2;253;233;218m⣿[0m[38;2;252;233;217m⣿[0m[38;2;253;232;215m⣿[0m[38;2;253;234;216m⣿[0m[38;2;248;224;209m⣿[0m[38;2;252;231;216m⣿[0m[38;2;252;232;217m⣿[0m[38;2;253;227;214m⣿[0m[38;2;184;124;124m⢯[0m[38;2;170;116;125m⣿[0m[38;2;245;244;237m⣿[0m[38;2;243;237;230m⣿[0m[38;2;240;231;229m⣿[0m
|
||||
[38;2;174;114;133m⣿[0m[38;2;212;187;181m⣿[0m[38;2;217;191;191m⣿[0m[38;2;240;217;203m⣿[0m[38;2;254;232;215m⣿[0m[38;2;249;229;211m⣿[0m[38;2;252;233;216m⣿[0m[38;2;252;232;217m⣿[0m[38;2;252;232;216m⣿[0m[38;2;252;234;215m⣿[0m[38;2;252;233;216m⣿[0m[38;2;252;233;216m⣿[0m[38;2;250;232;216m⣿[0m[38;2;251;233;214m⣿[0m[38;2;252;233;214m⣿[0m[38;2;252;233;213m⣿[0m[38;2;252;233;215m⣿[0m[38;2;253;234;215m⣿[0m[38;2;252;233;216m⣿[0m[38;2;252;233;213m⣿[0m[38;2;252;233;213m⣿[0m[38;2;252;233;214m⣿[0m[38;2;252;233;212m⣿[0m[38;2;252;233;215m⣿[0m[38;2;252;233;213m⣿[0m[38;2;252;233;215m⣿[0m[38;2;252;233;215m⣿[0m[38;2;253;233;215m⣿[0m[38;2;255;232;216m⣿[0m[38;2;254;231;214m⣿[0m[38;2;205;144;144m⣷[0m[38;2;187;155;162m⢿[0m[38;2;236;225;223m⣿[0m[38;2;244;237;231m⣿[0m[38;2;240;232;230m⣿[0m[38;2;237;230;223m⣿[0m
|
||||
[38;2;191;142;160m⣿[0m[38;2;181;119;131m⢿[0m[38;2;232;207;192m⣿[0m[38;2;232;204;196m⣿[0m[38;2;254;231;212m⣿[0m[38;2;254;230;214m⣿[0m[38;2;255;231;215m⣿[0m[38;2;255;231;215m⣿[0m[38;2;255;231;215m⣿[0m[38;2;254;232;215m⣿[0m[38;2;255;231;215m⣿[0m[38;2;255;232;215m⣿[0m[38;2;255;231;215m⣿[0m[38;2;255;231;215m⣿[0m[38;2;255;233;217m⣿[0m[38;2;240;219;201m⣿[0m[38;2;255;233;214m⣿[0m[38;2;255;232;213m⣿[0m[38;2;254;231;212m⣿[0m[38;2;255;232;213m⣿[0m[38;2;255;232;213m⣿[0m[38;2;255;232;213m⣿[0m[38;2;255;231;215m⣿[0m[38;2;255;232;213m⣿[0m[38;2;255;232;212m⣿[0m[38;2;254;231;211m⣿[0m[38;2;254;230;211m⣿[0m[38;2;250;227;208m⣿[0m[38;2;243;214;197m⣿[0m[38;2;227;193;190m⠋[0m[38;2;157;72;96m⢠[0m[38;2;192;152;162m⣿[0m[38;2;240;232;226m⣿[0m[38;2;240;233;227m⣿[0m[38;2;237;229;225m⣿[0m[38;2;233;223;220m⣿[0m
|
||||
[38;2;226;206;203m⣿[0m[38;2;172;108;130m⣷[0m[38;2;203;147;121m⣿[0m[38;2;243;206;179m⣿[0m[38;2;232;204;191m⡿[0m[38;2;250;227;206m⠿[0m[38;2;250;228;206m⠿[0m[38;2;249;227;207m⠟[0m[38;2;250;230;208m⠛[0m[38;2;252;233;209m⣻[0m[38;2;254;232;210m⣿[0m[38;2;255;231;209m⣿[0m[38;2;255;232;209m⣿[0m[38;2;255;233;210m⣿[0m[38;2;253;231;209m⣿[0m[38;2;254;231;209m⣿[0m[38;2;251;232;207m⣿[0m[38;2;250;226;205m⡿[0m[38;2;250;228;207m⠿[0m[38;2;252;229;207m⣿[0m[38;2;252;229;207m⣿[0m[38;2;252;230;208m⣿[0m[38;2;251;229;207m⣿[0m[38;2;251;228;206m⣿[0m[38;2;251;228;206m⣿[0m[38;2;252;229;207m⣿[0m[38;2;251;228;206m⣿[0m[38;2;253;229;207m⣿[0m[38;2;250;218;197m⠃[0m[38;2;141;65;92m⣠[0m[38;2;188;156;163m⣿[0m[38;2;236;231;224m⣿[0m[38;2;237;229;225m⣿[0m[38;2;234;224;221m⣟[0m[38;2;210;182;185m⣿[0m[38;2;228;214;213m⣿[0m
|
||||
[38;2;220;201;199m⣿[0m[38;2;209;179;186m⣏[0m[38;2;184;107;96m⠁[0m[38;2;97;54;111m⢀[0m[38;2;142;101;143m⣶[0m[38;2;81;57;142m⣶[0m[38;2;87;64;143m⣶[0m[38;2;88;68;145m⣶[0m[38;2;104;96;156m⣾[0m[38;2;252;255;242m⣿[0m[38;2;253;248;236m⣿[0m[38;2;254;249;236m⣿[0m[38;2;251;245;233m⣿[0m[38;2;247;237;218m⣿[0m[38;2;255;248;222m⣿[0m[38;2;255;246;222m⣿[0m[38;2;252;245;221m⣿[0m[38;2;255;252;227m⣿[0m[38;2;92;55;145m⣆[0m[38;2;80;47;136m⠀[0m[38;2;100;59;130m⠈[0m[38;2;162;124;137m⠁[0m[38;2;196;157;164m⠉[0m[38;2;255;238;208m⠛[0m[38;2;250;224;204m⢿[0m[38;2;252;227;205m⣿[0m[38;2;246;215;196m⣿[0m[38;2;246;216;195m⣿[0m[38;2;141;90;122m⣴[0m[38;2;228;224;222m⣿[0m[38;2;233;227;223m⣿[0m[38;2;227;218;214m⠿[0m[38;2;239;235;229m⢋[0m[38;2;117;41;71m⡾[0m[38;2;220;187;191m⢡[0m[38;2;222;214;204m⣿[0m
|
||||
13
modules/nixos/audio.nix
Normal file
13
modules/nixos/audio.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{ lib, ... }: {
|
||||
# Modern audio stack - PipeWire replaces PulseAudio + JACK + ALSA
|
||||
services.pipewire = {
|
||||
enable = lib.mkDefault true;
|
||||
alsa.enable = lib.mkDefault true;
|
||||
alsa.support32Bit = lib.mkDefault true; # For 32-bit games/apps
|
||||
pulse.enable = lib.mkDefault true; # PulseAudio compatibility
|
||||
jack.enable = lib.mkDefault true; # JACK compatibility
|
||||
};
|
||||
|
||||
# Real-time audio priority
|
||||
security.rtkit.enable = lib.mkDefault true;
|
||||
}
|
||||
12
modules/nixos/bluetooth.nix
Normal file
12
modules/nixos/bluetooth.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{ lib, ... }: {
|
||||
hardware.bluetooth = {
|
||||
enable = lib.mkDefault false; # Enable when needed
|
||||
powerOnBoot = lib.mkDefault true;
|
||||
settings = {
|
||||
General = {
|
||||
Enable = "Source,Sink,Media,Socket";
|
||||
Experimental = true; # Better codec support
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
176
modules/nixos/desktops/README.md
Normal file
176
modules/nixos/desktops/README.md
Normal file
|
|
@ -0,0 +1,176 @@
|
|||
# Desktop Environments
|
||||
|
||||
This directory contains system-level desktop environment configurations for NixOS desktop hosts.
|
||||
|
||||
## Structure
|
||||
|
||||
```
|
||||
desktops/
|
||||
├── base.nix # Shared desktop settings (XDG portals, polkit, gvfs)
|
||||
├── plasma.nix # KDE Plasma 6 + SDDM
|
||||
├── hyprland/ # Hyprland tiling compositor
|
||||
│ └── default.nix
|
||||
├── gaming.nix # Steam, Proton, GameMode, gaming tools
|
||||
├── apps/ # Desktop applications
|
||||
│ ├── browsers.nix # Brave, Zen Browser
|
||||
│ └── terminals.nix # Alacritty (Dracula theme)
|
||||
├── themes/ # Theme configurations
|
||||
│ ├── catppuccin.nix # Catppuccin GTK/Qt theme
|
||||
│ └── default.nix # Adwaita default theme
|
||||
└── hardware-configuration.nix # Hardware-specific settings (generated)
|
||||
```
|
||||
|
||||
## Available Desktop Environments
|
||||
|
||||
### KDE Plasma 6 (`plasma.nix`)
|
||||
- Full-featured desktop with SDDM display manager
|
||||
- Wayland-first with X11 fallback
|
||||
- Includes essential KDE applications (commented out by default)
|
||||
- User-level Plasma configuration via Home Manager (optional)
|
||||
|
||||
### Hyprland (`hyprland/default.nix`)
|
||||
- Dynamic tiling Wayland compositor
|
||||
- Minimal default keybinds (SUPER key)
|
||||
- Includes Wayland utilities: wl-clipboard, grim, slurp
|
||||
- User-level configuration for keybinds, visual settings
|
||||
|
||||
## Additional Modules
|
||||
|
||||
### Gaming (`gaming.nix`)
|
||||
**Features:**
|
||||
- Steam with Proton GE compatibility
|
||||
- GameMode for performance optimization
|
||||
- 32-bit graphics support for games
|
||||
- Wine, Winetricks, Lutris, Heroic launcher
|
||||
- MangoHud for FPS overlay
|
||||
- Discord for communication
|
||||
- Increased inotify watchers for modding tools
|
||||
|
||||
### Apps (`apps/`)
|
||||
**Browsers** (`browsers.nix`):
|
||||
- Brave, Zen Browser (enabled by default)
|
||||
|
||||
**Terminals** (`terminals.nix`):
|
||||
- Alacritty enabled with JetBrains Mono + Dracula theme
|
||||
- Kitty and WezTerm explicitly disabled to keep a single default
|
||||
|
||||
### Themes (`themes/`)
|
||||
**Catppuccin** (`catppuccin.nix`):
|
||||
- Soothing pastel theme for GTK and Qt
|
||||
- Mocha variant with blue accents
|
||||
- Kvantum Qt theme engine
|
||||
- Papirus icon theme
|
||||
- Catppuccin cursor theme
|
||||
|
||||
**Default** (`default.nix`):
|
||||
- Adwaita theme (GNOME default)
|
||||
- Minimal theming setup
|
||||
|
||||
## Usage
|
||||
|
||||
### Single Desktop Environment
|
||||
|
||||
Import one desktop environment in your host configuration:
|
||||
|
||||
```nix
|
||||
# modules/nixos/hosts/your-host.nix
|
||||
{
|
||||
imports = [
|
||||
../desktops/plasma.nix
|
||||
# OR
|
||||
# ../desktops/hyprland
|
||||
];
|
||||
}
|
||||
```
|
||||
|
||||
### Multi-Desktop Setup (Switch at Login)
|
||||
|
||||
The current desktop host uses both KDE Plasma (for gaming) and Hyprland (for development):
|
||||
|
||||
```nix
|
||||
# modules/nixos/hosts/desktop.nix
|
||||
{
|
||||
imports = [
|
||||
# Hardware
|
||||
../desktops/hardware-configuration.nix
|
||||
|
||||
# Desktop Environments
|
||||
../desktops/plasma.nix # KDE Plasma (for gaming)
|
||||
../desktops/hyprland # Hyprland (for development)
|
||||
|
||||
# Desktop Apps & Theme
|
||||
../desktops/apps/browsers.nix
|
||||
../desktops/apps/terminals.nix
|
||||
../desktops/themes/catppuccin.nix
|
||||
|
||||
# Gaming & Features
|
||||
../desktops/gaming.nix
|
||||
../bluetooth.nix
|
||||
];
|
||||
|
||||
boot = {
|
||||
loader.systemd-boot.enable = true;
|
||||
loader.efi.canTouchEfiVariables = true;
|
||||
kernelPackages = pkgs.linuxPackages_cachyos-lts;
|
||||
};
|
||||
|
||||
networking.hostName = "desktop";
|
||||
system.stateVersion = "24.05";
|
||||
}
|
||||
```
|
||||
|
||||
**Boot Configuration:**
|
||||
- CachyOS LTS kernel for gaming performance
|
||||
- Systemd-boot for EFI boot management
|
||||
|
||||
**Switch Desktop at Login:**
|
||||
- SDDM login screen shows both Plasma and Hyprland sessions
|
||||
- Select desired environment before logging in
|
||||
|
||||
## Base Desktop Settings (`base.nix`)
|
||||
|
||||
Shared settings imported by all desktop environments:
|
||||
|
||||
- **XDG Portals**: Desktop integration, file picker, screen sharing
|
||||
- **PolicyKit**: Privilege escalation for GUI apps
|
||||
- **GVFS**: Trash, mounting, network drives
|
||||
- **Common Packages**: pavucontrol, networkmanagerapplet
|
||||
|
||||
## Adding a New Desktop Environment
|
||||
|
||||
1. Create a new file (e.g., `gnome.nix`)
|
||||
2. Import `./base.nix` for shared settings
|
||||
3. Enable the desktop environment and display manager
|
||||
4. Add essential system packages
|
||||
5. Configure user-level settings via Home Manager
|
||||
|
||||
Example:
|
||||
|
||||
```nix
|
||||
{ lib, pkgs, user, ... }: {
|
||||
imports = [ ./base.nix ];
|
||||
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
desktopManager.gnome.enable = true;
|
||||
displayManager.gdm.enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
gnome-tweaks
|
||||
];
|
||||
}
|
||||
```
|
||||
|
||||
## Testing Desktop Changes
|
||||
|
||||
```bash
|
||||
# Dry-run to check closure
|
||||
nix build .#nixosConfigurations.desktop.config.system.build.toplevel --dry-run
|
||||
|
||||
# Build and switch
|
||||
sudo nixos-rebuild switch --flake .#desktop
|
||||
|
||||
# Format before committing
|
||||
nix fmt
|
||||
```
|
||||
8
modules/nixos/desktops/apps/browsers.nix
Normal file
8
modules/nixos/desktops/apps/browsers.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{ pkgs, user, ... }: {
|
||||
# Browser configurations for desktop users
|
||||
|
||||
home-manager.users.${user} = {
|
||||
# User packages: Browsers
|
||||
home.packages = with pkgs; [ brave ];
|
||||
};
|
||||
}
|
||||
114
modules/nixos/desktops/apps/terminals.nix
Normal file
114
modules/nixos/desktops/apps/terminals.nix
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
{ lib, pkgs, user, ... }: {
|
||||
# Terminal emulator configurations for desktop users
|
||||
|
||||
home-manager.users.${user} = {
|
||||
# Provide JetBrains Mono font locally for Alacritty.
|
||||
home.packages = with pkgs; [ jetbrains-mono ];
|
||||
|
||||
# Ensure Kitty stays disabled when desktop module is imported.
|
||||
programs.kitty.enable = lib.mkForce false;
|
||||
|
||||
# Configure Alacritty as the default terminal with Dracula theme.
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
window.opacity = 0.85;
|
||||
|
||||
font = {
|
||||
normal = {
|
||||
family = "JetBrains Mono";
|
||||
style = "Regular";
|
||||
};
|
||||
bold = {
|
||||
family = "JetBrains Mono";
|
||||
style = "Bold";
|
||||
};
|
||||
italic = {
|
||||
family = "JetBrains Mono";
|
||||
style = "Italic";
|
||||
};
|
||||
bold_italic = {
|
||||
family = "JetBrains Mono";
|
||||
style = "Bold Italic";
|
||||
};
|
||||
size = 12.0;
|
||||
};
|
||||
|
||||
colors = {
|
||||
primary = {
|
||||
background = "#282a36";
|
||||
foreground = "#f8f8f2";
|
||||
bright_foreground = "#ffffff";
|
||||
};
|
||||
|
||||
cursor = {
|
||||
text = "#282a36";
|
||||
cursor = "#f8f8f2";
|
||||
};
|
||||
|
||||
vi_mode_cursor = {
|
||||
text = "CellBackground";
|
||||
cursor = "CellForeground";
|
||||
};
|
||||
|
||||
selection = {
|
||||
text = "CellForeground";
|
||||
background = "#44475a";
|
||||
};
|
||||
|
||||
normal = {
|
||||
black = "#21222c";
|
||||
red = "#ff5555";
|
||||
green = "#50fa7b";
|
||||
yellow = "#f1fa8c";
|
||||
blue = "#bd93f9";
|
||||
magenta = "#ff79c6";
|
||||
cyan = "#8be9fd";
|
||||
white = "#f8f8f2";
|
||||
};
|
||||
|
||||
bright = {
|
||||
black = "#6272a4";
|
||||
red = "#ff6e6e";
|
||||
green = "#69ff94";
|
||||
yellow = "#ffffa5";
|
||||
blue = "#d6acff";
|
||||
magenta = "#ff92df";
|
||||
cyan = "#a4ffff";
|
||||
white = "#ffffff";
|
||||
};
|
||||
|
||||
search = {
|
||||
matches = {
|
||||
foreground = "#44475a";
|
||||
background = "#50fa7b";
|
||||
};
|
||||
focused_match = {
|
||||
foreground = "#44475a";
|
||||
background = "#ffb86c";
|
||||
};
|
||||
};
|
||||
|
||||
footer_bar = {
|
||||
background = "#282a36";
|
||||
foreground = "#f8f8f2";
|
||||
};
|
||||
|
||||
hints = {
|
||||
start = {
|
||||
foreground = "#282a36";
|
||||
background = "#f1fa8c";
|
||||
};
|
||||
end = {
|
||||
foreground = "#f1fa8c";
|
||||
background = "#282a36";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Keep WezTerm disabled to avoid conflicting terminal defaults.
|
||||
programs.wezterm.enable = lib.mkForce false;
|
||||
};
|
||||
}
|
||||
27
modules/nixos/desktops/base.nix
Normal file
27
modules/nixos/desktops/base.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{ lib, pkgs, ... }: {
|
||||
# Shared desktop settings (imported by all DEs)
|
||||
|
||||
# XDG portals for desktop integration
|
||||
xdg.portal = {
|
||||
enable = lib.mkDefault true;
|
||||
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||
};
|
||||
|
||||
# Policy kit for privilege escalation
|
||||
security.polkit.enable = lib.mkDefault true;
|
||||
|
||||
# GVFS for trash, mounting, etc
|
||||
services.gvfs.enable = lib.mkDefault true;
|
||||
|
||||
# Common desktop packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
# File managers (choose one)
|
||||
# nautilus # GNOME
|
||||
# dolphin # KDE
|
||||
# thunar # XFCE
|
||||
|
||||
# Basic utilities
|
||||
pavucontrol # Audio control
|
||||
networkmanagerapplet # Network management GUI
|
||||
];
|
||||
}
|
||||
76
modules/nixos/desktops/gaming.nix
Normal file
76
modules/nixos/desktops/gaming.nix
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
{ pkgs, ... }: {
|
||||
# Gaming configuration module
|
||||
# Steam, Proton, Vulkan, Wine, and gaming optimizations
|
||||
|
||||
# Steam with Proton support
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
dedicatedServer.openFirewall = true;
|
||||
|
||||
# Enable Proton compatibility layer
|
||||
extraCompatPackages = with pkgs;
|
||||
[
|
||||
proton-ge-bin # GloriousEggroll's Proton builds
|
||||
];
|
||||
};
|
||||
|
||||
# GameMode for performance optimization
|
||||
programs.gamemode = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = { renice = 10; };
|
||||
custom = {
|
||||
start = "${pkgs.libnotify}/bin/notify-send 'GameMode started'";
|
||||
end = "${pkgs.libnotify}/bin/notify-send 'GameMode ended'";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Enable 32-bit graphics support for games
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
|
||||
# Gaming-related packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
# Game launchers
|
||||
lutris
|
||||
heroic # Epic Games, GOG launcher
|
||||
# bottles # Windows app manager
|
||||
|
||||
# Wine for Windows games
|
||||
wineWowPackages.stable # Both 32 and 64-bit Wine
|
||||
winetricks
|
||||
|
||||
# Performance monitoring
|
||||
mangohud # FPS overlay and performance metrics
|
||||
# gamescope # Gaming compositor/micro-compositor
|
||||
|
||||
# Proton utilities
|
||||
# protonup-qt # Manage Proton versions
|
||||
protontricks # Winetricks for Proton games
|
||||
|
||||
# Communication
|
||||
discord
|
||||
# teamspeak_client
|
||||
|
||||
# Other gaming tools
|
||||
# steam-run # Run non-Steam games in Steam runtime
|
||||
];
|
||||
|
||||
# Vulkan support
|
||||
environment.variables = {
|
||||
# Enable Vulkan validation layers for debugging (optional)
|
||||
# VK_LAYER_PATH = "${pkgs.vulkan-validation-layers}/share/vulkan/explicit_layer.d";
|
||||
};
|
||||
|
||||
# Kernel parameters for gaming performance (optional, adjust as needed)
|
||||
# boot.kernelParams = [
|
||||
# "mitigations=off" # Disable CPU mitigations for performance (less secure)
|
||||
# ];
|
||||
|
||||
# Increase file watchers for game modding tools
|
||||
boot.kernel.sysctl = { "fs.inotify.max_user_watches" = 524288; };
|
||||
}
|
||||
78
modules/nixos/desktops/hardware-configuration.nix
Normal file
78
modules/nixos/desktops/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
# Hardware configuration for desktop
|
||||
# Generated by running: nixos-generate-config --show-hardware-config
|
||||
# This file contains hardware-specific settings that should be adjusted for your actual hardware
|
||||
|
||||
{ config, lib, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
# Kernel modules needed during boot
|
||||
# Adjust based on your hardware (NVMe, SATA, USB, etc.)
|
||||
boot.initrd.availableKernelModules =
|
||||
[ "nvme" "xhci_pci" "ahci" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ]; # Change to "kvm-intel" for Intel CPUs
|
||||
|
||||
# Filesystem configuration
|
||||
# Run `lsblk -f` or `blkid` to get your actual device UUIDs
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/REPLACE-WITH-YOUR-ROOT-UUID";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/REPLACE-WITH-YOUR-BOOT-UUID";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
||||
# Swap configuration (optional)
|
||||
# Uncomment and adjust if you have a swap partition
|
||||
# swapDevices = [
|
||||
# { device = "/dev/disk/by-uuid/REPLACE-WITH-YOUR-SWAP-UUID"; }
|
||||
# ];
|
||||
|
||||
# CPU microcode updates
|
||||
hardware.cpu.amd.updateMicrocode =
|
||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
# For Intel CPUs, use this instead:
|
||||
# hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
|
||||
# GPU configuration
|
||||
# Uncomment the section that matches your GPU
|
||||
|
||||
# NVIDIA GPU
|
||||
# services.xserver.videoDrivers = [ "nvidia" ];
|
||||
# hardware.nvidia = {
|
||||
# modesetting.enable = true;
|
||||
# powerManagement.enable = false;
|
||||
# powerManagement.finegrained = false;
|
||||
# open = false; # Use proprietary driver
|
||||
# nvidiaSettings = true;
|
||||
# package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
# };
|
||||
|
||||
# AMD GPU
|
||||
# services.xserver.videoDrivers = [ "amdgpu" ];
|
||||
# hardware.opengl = {
|
||||
# enable = true;
|
||||
# driSupport = true;
|
||||
# driSupport32Bit = true; # For 32-bit games
|
||||
# };
|
||||
|
||||
# Intel GPU
|
||||
# services.xserver.videoDrivers = [ "modesetting" ];
|
||||
# hardware.opengl = {
|
||||
# enable = true;
|
||||
# extraPackages = with pkgs; [
|
||||
# intel-media-driver
|
||||
# vaapiIntel
|
||||
# vaapiVdpau
|
||||
# libvdpau-va-gl
|
||||
# ];
|
||||
# };
|
||||
|
||||
# Maximum number of open files
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
||||
71
modules/nixos/desktops/hyprland/default.nix
Normal file
71
modules/nixos/desktops/hyprland/default.nix
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
{ pkgs, lib, user, ... }: {
|
||||
imports = [ ../base.nix ];
|
||||
|
||||
# System-level: Enable Hyprland
|
||||
programs.hyprland = {
|
||||
enable = lib.mkDefault true;
|
||||
xwayland.enable = lib.mkDefault true;
|
||||
};
|
||||
|
||||
# Wayland-specific portal
|
||||
xdg.portal.wlr.enable = lib.mkDefault true;
|
||||
|
||||
# System packages: Wayland essentials
|
||||
environment.systemPackages = with pkgs; [
|
||||
# Wayland essentials
|
||||
wayland
|
||||
wl-clipboard
|
||||
wlr-randr
|
||||
|
||||
# Screenshot & screen recording
|
||||
grim # Screenshot
|
||||
slurp # Region selector
|
||||
# wf-recorder # Screen recording (optional)
|
||||
];
|
||||
|
||||
# User-level: Hyprland configuration
|
||||
home-manager.users.${user} = {
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = lib.mkDefault true;
|
||||
xwayland.enable = lib.mkDefault true;
|
||||
|
||||
settings = {
|
||||
# Minimal config - expand as needed
|
||||
"$mod" = "SUPER";
|
||||
|
||||
# Example keybinds
|
||||
bind = [
|
||||
"$mod, Return, exec, kitty" # Terminal
|
||||
"$mod, Q, killactive"
|
||||
"$mod, M, exit"
|
||||
"$mod, F, fullscreen"
|
||||
"$mod, Space, togglefloating"
|
||||
|
||||
# Move focus
|
||||
"$mod, h, movefocus, l"
|
||||
"$mod, l, movefocus, r"
|
||||
"$mod, k, movefocus, u"
|
||||
"$mod, j, movefocus, d"
|
||||
];
|
||||
|
||||
# Visual settings
|
||||
general = {
|
||||
gaps_in = 5;
|
||||
gaps_out = 10;
|
||||
border_size = 2;
|
||||
};
|
||||
|
||||
decoration = { rounding = 8; };
|
||||
};
|
||||
};
|
||||
|
||||
# User packages: Hyprland utilities
|
||||
home.packages = with pkgs;
|
||||
[
|
||||
# Uncomment as needed:
|
||||
# wofi # Launcher
|
||||
# waybar # Status bar
|
||||
# dunst # Notifications
|
||||
];
|
||||
};
|
||||
}
|
||||
42
modules/nixos/desktops/plasma.nix
Normal file
42
modules/nixos/desktops/plasma.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{ lib, pkgs, user, ... }: {
|
||||
imports = [ ./base.nix ];
|
||||
|
||||
# System-level: KDE Plasma 6
|
||||
services.desktopManager.plasma6.enable = lib.mkDefault true;
|
||||
|
||||
# SDDM display manager
|
||||
services.displayManager.sddm = {
|
||||
enable = lib.mkDefault true;
|
||||
wayland.enable = lib.mkDefault true;
|
||||
};
|
||||
|
||||
# System packages: KDE applications
|
||||
environment.systemPackages = with pkgs;
|
||||
[
|
||||
# KDE applications (uncomment as needed)
|
||||
# kdePackages.kate # Text editor
|
||||
# kdePackages.dolphin # File manager
|
||||
# kdePackages.konsole # Terminal
|
||||
# kdePackages.okular # Document viewer
|
||||
# kdePackages.gwenview # Image viewer
|
||||
# kdePackages.spectacle # Screenshot tool
|
||||
];
|
||||
|
||||
# User-level: KDE Plasma settings (optional)
|
||||
home-manager.users.${user} = {
|
||||
# KDE Plasma configuration via Home Manager (optional)
|
||||
# programs.plasma = {
|
||||
# enable = true;
|
||||
# workspace = {
|
||||
# theme = "breeze-dark";
|
||||
# colorScheme = "BreezeDark";
|
||||
# };
|
||||
# };
|
||||
|
||||
# User packages for KDE environment
|
||||
home.packages = with pkgs;
|
||||
[
|
||||
# Add user-specific apps here
|
||||
];
|
||||
};
|
||||
}
|
||||
64
modules/nixos/desktops/themes/catppuccin.nix
Normal file
64
modules/nixos/desktops/themes/catppuccin.nix
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
{ lib, pkgs, user, ... }: {
|
||||
# Catppuccin theme configuration
|
||||
# Soothing pastel theme for both GTK and Qt applications
|
||||
# Works with KDE Plasma, Hyprland, and other desktop environments
|
||||
|
||||
# System packages: Theme engines and Catppuccin themes
|
||||
environment.systemPackages = with pkgs; [
|
||||
libsForQt5.qtstyleplugin-kvantum # Kvantum Qt theme engine
|
||||
qt6Packages.qtstyleplugin-kvantum # Kvantum for Qt6
|
||||
catppuccin-kvantum # Catppuccin theme for Kvantum
|
||||
catppuccin-cursors # Catppuccin cursor theme
|
||||
];
|
||||
|
||||
home-manager.users.${user} = {
|
||||
# GTK theming - Catppuccin Mocha variant
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme = {
|
||||
name = "Catppuccin-Mocha-Standard-Blue-Dark";
|
||||
package = pkgs.catppuccin-gtk.override {
|
||||
accents = [
|
||||
"blue"
|
||||
]; # Options: blue, flamingo, green, lavender, maroon, mauve, peach, pink, red, rosewater, sapphire, sky, teal, yellow
|
||||
size = "standard"; # Options: standard, compact
|
||||
variant = "mocha"; # Options: latte, frappe, macchiato, mocha
|
||||
};
|
||||
};
|
||||
|
||||
# GTK icon theme
|
||||
iconTheme = {
|
||||
name = "Papirus-Dark";
|
||||
package = pkgs.papirus-icon-theme;
|
||||
};
|
||||
};
|
||||
|
||||
# Qt theming - Catppuccin via Kvantum
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme.name = "kvantum";
|
||||
style.name = "kvantum";
|
||||
};
|
||||
|
||||
# Kvantum configuration
|
||||
xdg.configFile."Kvantum/kvantum.kvconfig".text = ''
|
||||
[General]
|
||||
theme=Catppuccin-Mocha-Blue
|
||||
'';
|
||||
|
||||
# Cursor theme
|
||||
home.pointerCursor = {
|
||||
name = "catppuccin-mocha-blue-cursors";
|
||||
package = pkgs.catppuccin-cursors.mochaBlue;
|
||||
size = 24;
|
||||
gtk.enable = true;
|
||||
x11.enable = true;
|
||||
};
|
||||
|
||||
# XDG user directories for desktop environments
|
||||
xdg.userDirs = {
|
||||
enable = true;
|
||||
createDirectories = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
33
modules/nixos/desktops/themes/default.nix
Normal file
33
modules/nixos/desktops/themes/default.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ lib, pkgs, user, ... }: {
|
||||
# Default theme configuration for desktop
|
||||
# Simple Adwaita-dark theme that works across all desktop environments
|
||||
# Switch to catppuccin.nix or create your own for custom themes
|
||||
|
||||
home-manager.users.${user} = {
|
||||
# GTK theming - Adwaita Dark
|
||||
gtk = {
|
||||
enable = lib.mkDefault true;
|
||||
theme = lib.mkDefault {
|
||||
name = "Adwaita-dark";
|
||||
package = pkgs.gnome-themes-extra;
|
||||
};
|
||||
iconTheme = lib.mkDefault {
|
||||
name = "Adwaita";
|
||||
package = pkgs.adwaita-icon-theme;
|
||||
};
|
||||
};
|
||||
|
||||
# Qt theming - Use GTK theme for consistency
|
||||
qt = {
|
||||
enable = lib.mkDefault true;
|
||||
platformTheme.name = lib.mkDefault "gtk";
|
||||
style.name = lib.mkDefault "adwaita-dark";
|
||||
};
|
||||
|
||||
# XDG user directories for desktop environments
|
||||
xdg.userDirs = {
|
||||
enable = true;
|
||||
createDirectories = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
30
modules/nixos/fonts.nix
Normal file
30
modules/nixos/fonts.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ lib, pkgs, ... }: {
|
||||
fonts = {
|
||||
enableDefaultPackages = lib.mkDefault true;
|
||||
|
||||
packages = with pkgs; [
|
||||
# Nerd Fonts for terminal icons
|
||||
(nerdfonts.override { fonts = [ "FiraCode" "JetBrainsMono" "Iosevka" ]; })
|
||||
|
||||
# Core fonts
|
||||
noto-fonts
|
||||
noto-fonts-cjk
|
||||
noto-fonts-emoji
|
||||
liberation_ttf
|
||||
|
||||
# Code fonts
|
||||
fira-code
|
||||
jetbrains-mono
|
||||
];
|
||||
|
||||
fontconfig = {
|
||||
enable = lib.mkDefault true;
|
||||
defaultFonts = {
|
||||
monospace = [ "JetBrains Mono" "FiraCode Nerd Font" ];
|
||||
sansSerif = [ "Noto Sans" ];
|
||||
serif = [ "Noto Serif" ];
|
||||
emoji = [ "Noto Color Emoji" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
21
modules/nixos/graphics.nix
Normal file
21
modules/nixos/graphics.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{ lib, pkgs, ... }: {
|
||||
# Hardware acceleration (OpenGL/Vulkan)
|
||||
hardware.graphics = {
|
||||
enable = lib.mkDefault true;
|
||||
enable32Bit = lib.mkDefault true; # For 32-bit games/apps
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
# Common drivers (expand based on your hardware)
|
||||
mesa.drivers
|
||||
vulkan-validation-layers
|
||||
vulkan-tools
|
||||
|
||||
# Intel-specific (comment out if not using Intel)
|
||||
intel-media-driver
|
||||
intel-vaapi-driver
|
||||
|
||||
# AMD-specific (comment out if not using AMD)
|
||||
# rocmPackages.clr.icd
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -1,3 +1,10 @@
|
|||
{ config, pkgs, lib, ... }: {
|
||||
imports = [ ../../home/rsydn/base.nix ../../home/rsydn/shell/fish.nix ];
|
||||
# Minimal CLI-only Home Manager configuration
|
||||
# Used for servers, VMs, and headless systems
|
||||
# Desktop configs are handled directly in nixos/desktops/* modules
|
||||
|
||||
imports = [
|
||||
../../home/rsydn/base.nix # Base CLI tools (git, tmux, etc.)
|
||||
../../home/rsydn/shell/fish.nix # Shell configuration
|
||||
];
|
||||
}
|
||||
|
|
|
|||
48
modules/nixos/hosts/desktop.nix
Normal file
48
modules/nixos/hosts/desktop.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
{ lib, pkgs, ... }:
|
||||
let
|
||||
hardwareConfigPath = builtins.toString ./.
|
||||
+ "/../desktops/hardware-configuration.nix";
|
||||
hardwareModule = if builtins.pathExists hardwareConfigPath then
|
||||
import hardwareConfigPath
|
||||
else
|
||||
(_: { });
|
||||
in {
|
||||
# Unified desktop configuration for gaming and development
|
||||
# Includes both KDE Plasma and Hyprland - switch at login screen
|
||||
|
||||
# Import hardware and desktop configurations
|
||||
imports = [
|
||||
# Hardware
|
||||
hardwareModule
|
||||
|
||||
# Audio & Graphics
|
||||
../audio.nix
|
||||
../graphics.nix
|
||||
|
||||
# Desktop Environments
|
||||
../desktops/plasma.nix # KDE Plasma (for gaming)
|
||||
../desktops/hyprland # Hyprland (for development)
|
||||
|
||||
# Desktop Apps & Theme
|
||||
../desktops/apps/browsers.nix
|
||||
../desktops/apps/terminals.nix
|
||||
../desktops/themes/catppuccin.nix # Or use themes/default.nix for Adwaita
|
||||
|
||||
# Gaming & Features
|
||||
../desktops/gaming.nix
|
||||
../bluetooth.nix
|
||||
];
|
||||
|
||||
# Boot configuration with CachyOS LTS kernel
|
||||
boot = {
|
||||
loader.systemd-boot.enable = true;
|
||||
loader.efi.canTouchEfiVariables = true;
|
||||
kernelPackages = pkgs.linuxPackages_cachyos-lts;
|
||||
};
|
||||
|
||||
# Hostname
|
||||
networking.hostName = "desktop";
|
||||
|
||||
# This value determines the NixOS release compatibility
|
||||
system.stateVersion = "24.05";
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue