Files
dotfiles/etcnixos/flake.nix
2026-03-03 14:27:49 -05:00

62 lines
1.4 KiB
Nix

{
description = "System nixOS flake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
# nixpkgs.url = "github:NixOS/nixpkgs/master";
lanzaboote = {
url = "github:nix-community/lanzaboote";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
agenix = {
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
self,
nixpkgs,
lanzaboote,
nixos-hardware,
agenix,
...
}@inputs:
let
username = "primary";
hostname = nixpkgs.lib.strings.removeSuffix "\n" (builtins.readFile /etc/hostname);
system = "x86_64-linux";
pkgs = import nixpkgs {
# config.allowUnfreePredicate =
# pkg:
# builtins.elem (nixpkgs.lib.getName pkg) [
# "steam-unwrapped"
# "steam"
# ];
# idk pkgs.wivrn pulls a bunch of cuda stuff even though cudaSupport is disabled?
config.allowUnfree = true;
config.cudaSupport = false;
};
in
{
nixosConfigurations.${hostname} = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs username hostname;
};
inherit pkgs;
modules = [
./system-${hostname}.nix
agenix.nixosModules.default
];
};
};
}