Files
nixos-config/flake.nix
T
2026-05-03 11:32:17 +02:00

55 lines
1.5 KiB
Nix

{
description = "multi-machine nixos config";
nixConfig = {
extra-substituters = [
"https://cache.nixos.org"
"https://nix-community.cachix.org"
"https://quickshell.cachix.org"
];
extra-trusted-public-keys = [
"cache.nixos.org-1:6NCHd7NZLnR7ERU5yZ30jSimkE8jZNoy0LsbwSKh6hI="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkqAbxg648yyCFKExbg/M="
"quickshell.cachix.org-1:vBm3s5tZThc5KDLj6zhHVCMp8wX/AZJwle9wqdi81ts="
];
};
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
zen-browser = {
url = "github:youwen5/zen-browser-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
dms = {
url = "github:AvengeMedia/DankMaterialShell/stable";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
dgop = { # depended on by dms
url = "github:AvengeMedia/dgop";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
};
outputs = { self, nixpkgs, nixpkgs-unstable, ... }@inputs:
let
system = "x86_64-linux";
pkgs-unstable = import nixpkgs-unstable {
inherit system;
config.allowUnfree = true;
};
mkHost = hostname: nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs pkgs-unstable; };
modules = [ ./hosts/${hostname} ];
};
in {
nixosConfigurations = {
minipc = mkHost "minipc";
laptop = mkHost "laptop";
gaming = mkHost "gaming";
};
};
}