2026-03-28 11:52:19 +00:00
|
|
|
{
|
|
|
|
|
description = "FredOS NixOS configuration";
|
2026-05-12 14:00:46 +01:00
|
|
|
|
2026-03-28 11:52:19 +00:00
|
|
|
inputs = {
|
2026-05-30 11:11:33 +01:00
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05";
|
2026-05-17 20:38:30 +01:00
|
|
|
home-manager = {
|
2026-05-30 11:11:33 +01:00
|
|
|
url = "github:nix-community/home-manager/release-26.05";
|
2026-05-17 20:38:30 +01:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
};
|
|
|
|
|
|
2026-03-28 15:57:10 +00:00
|
|
|
zen-browser = {
|
|
|
|
|
url = "github:0xc000022070/zen-browser-flake";
|
2026-08-16 12:22:10 +01:00
|
|
|
# no nixpkgs.follows: zen needs ffmpeg_9, only in unstable
|
|
|
|
|
inputs.home-manager.follows = "home-manager";
|
2026-03-28 11:52:19 +00:00
|
|
|
};
|
2026-04-29 13:26:07 +01:00
|
|
|
|
2026-04-04 20:32:58 +01:00
|
|
|
nix-cachyos-kernel.url = "github:xddxdd/nix-cachyos-kernel/release";
|
2026-05-11 11:48:36 +01:00
|
|
|
|
2026-10-05 13:36:43 +01:00
|
|
|
lanzaboote = {
|
|
|
|
|
url = "github:nix-community/lanzaboote/v1.2.0";
|
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
};
|
|
|
|
|
|
2026-05-15 19:46:44 +01:00
|
|
|
proton-cachyos-nix.url = "github:powerofthe69/proton-cachyos-nix";
|
|
|
|
|
|
2026-09-18 20:49:00 +01:00
|
|
|
loupe = {
|
|
|
|
|
url = "git+https://forg.gregersen.it/lazzexus/Loupe";
|
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
};
|
|
|
|
|
|
2026-08-29 14:16:13 +01:00
|
|
|
# Source only, not this flake's outputs: nixpkgs' redlib predates the wreq
|
|
|
|
|
# switch and Reddit 403s its rustls TLS fingerprint (see services/redlib.nix).
|
|
|
|
|
redlib = {
|
|
|
|
|
url = "github:redlib-org/redlib";
|
|
|
|
|
flake = false;
|
|
|
|
|
};
|
|
|
|
|
|
2026-10-18 09:01:45 +01:00
|
|
|
flowtrack = {
|
|
|
|
|
url = "git+https://forg.gregersen.it/rope/flowtrack";
|
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
};
|
|
|
|
|
|
2026-10-04 19:53:06 +01:00
|
|
|
stardew-tracker = {
|
|
|
|
|
url = "git+https://forg.gregersen.it/rope/stardew-tracker";
|
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
};
|
|
|
|
|
|
2026-10-18 13:55:14 +01:00
|
|
|
guildhall = {
|
|
|
|
|
url = "git+https://forg.gregersen.it/rope/guildhall";
|
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
};
|
|
|
|
|
|
2026-09-23 10:03:30 +01:00
|
|
|
stylix = {
|
|
|
|
|
url = "github:nix-community/stylix/release-26.05";
|
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
};
|
2026-03-28 11:52:19 +00:00
|
|
|
};
|
2026-04-29 13:26:07 +01:00
|
|
|
outputs =
|
|
|
|
|
{ self
|
2026-05-16 11:17:25 +01:00
|
|
|
, nixpkgs
|
2026-05-17 20:38:30 +01:00
|
|
|
, home-manager
|
2026-04-29 13:26:07 +01:00
|
|
|
, zen-browser
|
|
|
|
|
, nix-cachyos-kernel
|
2026-05-11 13:32:18 +01:00
|
|
|
, stylix
|
2026-05-15 19:46:44 +01:00
|
|
|
, proton-cachyos-nix
|
2026-10-04 19:53:06 +01:00
|
|
|
, stardew-tracker
|
2026-10-18 09:01:45 +01:00
|
|
|
, flowtrack
|
2026-10-18 13:55:14 +01:00
|
|
|
, guildhall
|
2026-04-29 13:26:07 +01:00
|
|
|
, ...
|
|
|
|
|
} @ inputs:
|
|
|
|
|
let
|
|
|
|
|
system = "x86_64-linux";
|
2026-09-09 19:10:03 +01:00
|
|
|
baseModules = hostname: [
|
|
|
|
|
./hosts/${hostname}.nix
|
|
|
|
|
./common.nix
|
|
|
|
|
home-manager.nixosModules.home-manager
|
|
|
|
|
stylix.nixosModules.stylix
|
2026-10-04 19:53:06 +01:00
|
|
|
stardew-tracker.nixosModules.default
|
2026-10-18 09:01:45 +01:00
|
|
|
flowtrack.nixosModules.default
|
2026-10-18 13:55:14 +01:00
|
|
|
guildhall.nixosModules.default
|
2026-09-09 19:10:03 +01:00
|
|
|
./settings/stylix.nix
|
|
|
|
|
];
|
2026-05-30 11:11:33 +01:00
|
|
|
mkHost = hostname: extraModules: nixpkgs.lib.nixosSystem {
|
2026-04-29 13:26:07 +01:00
|
|
|
inherit system;
|
2026-05-30 11:11:33 +01:00
|
|
|
specialArgs = { inherit inputs; };
|
2026-09-09 19:10:03 +01:00
|
|
|
modules = baseModules hostname ++ extraModules;
|
2026-04-29 13:26:07 +01:00
|
|
|
};
|
|
|
|
|
in
|
|
|
|
|
{
|
2026-09-09 19:10:03 +01:00
|
|
|
# Everything FredOS-Gaming is, minus the hardware — for anyone who wants
|
|
|
|
|
# to run this config on their own machine. They import this module next
|
|
|
|
|
# to their own hardware-configuration.nix from their own flake (readme.md
|
|
|
|
|
# has the snippet). `_module.args` stands in for mkHost's specialArgs,
|
|
|
|
|
# which a plain module can't set.
|
|
|
|
|
nixosModules.gaming = { lib, ... }: {
|
|
|
|
|
imports = baseModules "FredOS-Gaming";
|
|
|
|
|
_module.args.inputs = inputs;
|
|
|
|
|
|
|
|
|
|
# Hostname gates every FredOS-Gaming module, so it has to keep matching.
|
|
|
|
|
# These four otherwise live in hosts/hardware/FredOS-Gaming.nix, which
|
|
|
|
|
# is exactly the file a guest replaces.
|
|
|
|
|
networking.hostName = "FredOS-Gaming";
|
|
|
|
|
nixpkgs.hostPlatform = lib.mkDefault system;
|
|
|
|
|
system.stateVersion = lib.mkDefault "25.11";
|
|
|
|
|
boot.loader.systemd-boot.enable = lib.mkDefault true;
|
|
|
|
|
boot.loader.efi.canTouchEfiVariables = lib.mkDefault true;
|
|
|
|
|
|
|
|
|
|
# nordhammer.it is my build server and those are my SSH keys; neither
|
|
|
|
|
# belongs on someone else's machine.
|
|
|
|
|
nix.distributedBuilds = lib.mkForce false;
|
|
|
|
|
users.users.fred.openssh.authorizedKeys.keys = lib.mkForce [ ];
|
|
|
|
|
};
|
|
|
|
|
|
2026-04-29 13:26:07 +01:00
|
|
|
nixosConfigurations = {
|
2026-10-05 13:36:43 +01:00
|
|
|
FredOS-Gaming = mkHost "FredOS-Gaming" [
|
|
|
|
|
inputs.lanzaboote.nixosModules.lanzaboote
|
|
|
|
|
./hosts/hardware/FredOS-Gaming.nix
|
|
|
|
|
];
|
2026-08-03 14:07:34 +01:00
|
|
|
FredOS-Mediaserver = mkHost "FredOS-Mediaserver" [ ./hosts/hardware/FredOS-Mediaserver.nix ];
|
|
|
|
|
FredOS-Macbook = mkHost "FredOS-Macbook" [ ./hosts/hardware/FredOS-Macbook.nix ];
|
2026-08-10 08:44:50 +01:00
|
|
|
FredOS-Kayla = mkHost "FredOS-Kayla" [ ./hosts/hardware/FredOS-Kayla.nix ];
|
2026-09-28 14:40:05 +01:00
|
|
|
# i686 netbook: no common.nix/stylix/home-manager (see hosts/FredOS-Eee.nix).
|
|
|
|
|
FredOS-Eee = nixpkgs.lib.nixosSystem {
|
|
|
|
|
modules = [ ./hosts/FredOS-Eee.nix ./hosts/hardware/FredOS-Eee.nix ];
|
|
|
|
|
};
|
2026-10-05 21:22:14 +01:00
|
|
|
# Live rescue USB with Claude Code; standalone like the Eee.
|
|
|
|
|
FredOS-Rescue = nixpkgs.lib.nixosSystem {
|
|
|
|
|
modules = [ ./hosts/FredOS-Rescue.nix ];
|
|
|
|
|
};
|
2026-04-29 13:26:07 +01:00
|
|
|
};
|
2026-10-05 21:22:14 +01:00
|
|
|
|
|
|
|
|
packages.${system}.rescue-iso =
|
|
|
|
|
self.nixosConfigurations.FredOS-Rescue.config.system.build.isoImage;
|
2026-03-28 11:52:19 +00:00
|
|
|
};
|
2026-04-05 11:20:36 +01:00
|
|
|
}
|