58 lines
1.8 KiB
Nix
58 lines
1.8 KiB
Nix
{
|
|
description = "JawZ NixOS flake setup";
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
|
nixpkgs-small.url = "github:nixos/nixpkgs?ref=nixos-unstable-small";
|
|
nur.url = "github:nix-community/nur";
|
|
ucodenix.url = "github:e-tho/ucodenix";
|
|
nix-gaming.url = "github:fufexan/nix-gaming";
|
|
hyprland.url = "github:hyprwm/Hyprland";
|
|
zen-browser.url = "github:MarceColl/zen-browser-flake";
|
|
home-manager.url = "github:nix-community/home-manager";
|
|
sops-nix.url = "github:Mic92/sops-nix";
|
|
nixos-cosmic.url = "github:lilyinstarlight/nixos-cosmic";
|
|
};
|
|
|
|
outputs =
|
|
{ self, ... }@inputs:
|
|
let
|
|
inherit (self) outputs;
|
|
system = "x86_64-linux";
|
|
makePkgs =
|
|
repo:
|
|
import repo {
|
|
inherit system;
|
|
config.allowUnfree = true;
|
|
};
|
|
createConfig =
|
|
name:
|
|
let
|
|
useGUI = name == "workstation";
|
|
nixpkgsSelect = if useGUI then inputs.nixpkgs else inputs.nixpkgs-small;
|
|
pkgs = nixpkgsSelect |> makePkgs;
|
|
overlayFile = import ./overlay.nix { inherit pkgs; };
|
|
lib = nixpkgsSelect.lib // inputs.home-manager.lib;
|
|
in
|
|
lib.nixosSystem {
|
|
inherit system;
|
|
specialArgs = {
|
|
inherit inputs outputs;
|
|
};
|
|
modules = [
|
|
{ nixpkgs.overlays = [ overlayFile ]; }
|
|
./hosts/${name}/configuration.nix
|
|
inputs.nur.nixosModules.nur
|
|
inputs.sops-nix.nixosModules.sops
|
|
inputs.nixos-cosmic.nixosModules.default
|
|
];
|
|
};
|
|
in
|
|
{
|
|
nixosConfigurations = {
|
|
workstation = "workstation" |> createConfig;
|
|
miniserver = "miniserver" |> createConfig;
|
|
server = "server" |> createConfig;
|
|
};
|
|
};
|
|
}
|