dotfiles/etcnixos/flake.nix
2024-10-02 13:04:36 -04:00

68 lines
1.5 KiB
Nix

{
description = "A simple NixOS flake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
lanzaboote = {
url = "github:nix-community/lanzaboote";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
alvr.url = "github:NixOS/nixpkgs/pull/308097/head";
chaotic = {
url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
inputs.nixpkgs.follows = "nixpkgs";
};
agenix = {
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
self,
nixpkgs,
lanzaboote,
nixos-hardware,
chaotic,
agenix,
...
}@inputs:
let
username = "primary";
hostname = nixpkgs.lib.strings.removeSuffix "\n" (builtins.readFile /etc/hostname);
system = "x86_64-linux";
# pkgs = import nixpkgs {
# config.replaceStdenv = { pkgs }: pkgs.clangStdenv;
# };
pkgs = import nixpkgs {
config.allowUnfreePredicate =
pkg:
builtins.elem (nixpkgs.lib.getName pkg) [
"steam"
"steam-original"
"steam-run"
];
};
in
{
nixosConfigurations.${hostname} = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs username hostname;
};
inherit pkgs;
modules = [
./system-${hostname}.nix
chaotic.nixosModules.default
agenix.nixosModules.default
];
};
};
}