nixos/flake.nix

75 lines
2.3 KiB
Nix
Raw Normal View History

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 = {
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-25.11";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager-stable = {
url = "github:nix-community/home-manager/release-25.11";
inputs.nixpkgs.follows = "nixpkgs-stable";
};
# Unstable HM for Hyprland Lua config support (configType = "lua",
# available since HM master / future 26.05).
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
2026-03-28 15:57:10 +00:00
zen-browser = {
url = "github:0xc000022070/zen-browser-flake";
inputs = {
2026-05-01 11:27:32 +01:00
nixpkgs.follows = "nixpkgs-stable";
home-manager.follows = "home-manager-stable";
2026-03-28 15:57:10 +00:00
};
2026-03-28 11:52:19 +00:00
};
nix-cachyos-kernel.url = "github:xddxdd/nix-cachyos-kernel/release";
2026-05-15 19:46:44 +01:00
proton-cachyos-nix.url = "github:powerofthe69/proton-cachyos-nix";
# Pin Hyprland to upstream so we get the 0.52.2+ fixes ahead of
# nixos-25.11's slower bump cadence. Doesn't follow our nixpkgs —
# upstream needs newer stdenv than 25.11 ships.
hyprland.url = "github:hyprwm/Hyprland";
# Stylix release branch matching nixos-25.11. Master references
# options (services.displayManager.generic) that only exist in
# newer nixpkgs schemas.
stylix.url = "github:nix-community/stylix/release-25.11";
2026-03-28 11:52:19 +00:00
};
outputs =
{ self
, nixpkgs-stable
, nixpkgs
, home-manager-stable
, home-manager
, zen-browser
, nix-cachyos-kernel
, hyprland
, stylix
2026-05-15 19:46:44 +01:00
, proton-cachyos-nix
, ...
} @ inputs:
let
system = "x86_64-linux";
mkHost = hostname: pkgsInput: hmInput: pkgsInput.lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs; pkgs-unstable = nixpkgs.legacyPackages.${system}; };
modules = [
./hosts/${hostname}.nix
./hosts/hardware/${hostname}.nix
./common.nix
hmInput.nixosModules.home-manager
];
};
in
{
nixosConfigurations = {
FredOS-Gaming = mkHost "FredOS-Gaming" nixpkgs-stable home-manager;
FredOS-Mediaserver = mkHost "FredOS-Mediaserver" nixpkgs-stable home-manager-stable;
FredOS-Macbook = mkHost "FredOS-Macbook" nixpkgs-stable home-manager;
};
2026-03-28 11:52:19 +00:00
};
2026-04-05 11:20:36 +01:00
}