flake: export nixosModules.gaming for guests with their own hardware
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
7be860ad0c
commit
42b1f16938
2 changed files with 73 additions and 7 deletions
41
readme.md
41
readme.md
|
|
@ -139,6 +139,47 @@ After this succeeds, the plain `update` alias works from then on.
|
|||
|
||||
---
|
||||
|
||||
## Running the desktop on someone else's machine
|
||||
|
||||
`nixosModules.gaming` is the whole FredOS-Gaming desktop — Hyprland, quickshell,
|
||||
stylix theming, Steam, the lot — with `hosts/hardware/FredOS-Gaming.nix` left
|
||||
out. Import it from your own flake alongside your own
|
||||
`/etc/nixos/hardware-configuration.nix`, which stays on your machine and never
|
||||
touches this repo, so `nix flake update` keeps pulling my changes without ever
|
||||
overwriting your disks and GPU:
|
||||
|
||||
```nix
|
||||
{
|
||||
inputs.fredos.url = "git+https://forg.gregersen.it/rope/nixos";
|
||||
|
||||
outputs = { self, fredos, ... }: {
|
||||
nixosConfigurations.mine = fredos.inputs.nixpkgs.lib.nixosSystem {
|
||||
modules = [
|
||||
fredos.nixosModules.gaming
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
Then `sudo nixos-rebuild switch --flake .#mine`.
|
||||
|
||||
Notes:
|
||||
|
||||
- The hostname stays `FredOS-Gaming` — every module in here is gated on it, so
|
||||
changing it switches the desktop off.
|
||||
- The module drops my build server and my SSH keys, and defaults
|
||||
`system.stateVersion`, `nixpkgs.hostPlatform` and systemd-boot so a stock
|
||||
`hardware-configuration.nix` is enough. All `mkDefault`, so override freely.
|
||||
- The CachyOS kernel and its binary cache live in the hardware file, so you
|
||||
won't get them. Copy those lines out of `hosts/hardware/FredOS-Gaming.nix` if
|
||||
you want them.
|
||||
- The user is `fred` with passwordless sudo. `passwd fred` after the first
|
||||
switch.
|
||||
- My monitor layout (`DP-3`, 3440x1440@180) is in `hosts/FredOS-Gaming.nix`;
|
||||
override `wayland.windowManager.hyprland.settings.monitor` for yours.
|
||||
|
||||
## Flake inputs
|
||||
|
||||
| Input | Source |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue