66 lines
1.4 KiB
Nix
66 lines
1.4 KiB
Nix
{
|
|
description = "A simple NixOS flake";
|
|
|
|
inputs = {
|
|
# nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
nixpkgs.url = "github:NixOS/nixpkgs/master";
|
|
|
|
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.allowUnfreePredicate =
|
|
pkg:
|
|
builtins.elem (nixpkgs.lib.getName pkg) [
|
|
"steam-unwrapped"
|
|
"steam"
|
|
];
|
|
};
|
|
in
|
|
{
|
|
nixosConfigurations.${hostname} = nixpkgs.lib.nixosSystem {
|
|
specialArgs = {
|
|
inherit inputs username hostname;
|
|
};
|
|
inherit pkgs;
|
|
modules = [
|
|
./system-${hostname}.nix
|
|
chaotic.nixosModules.default
|
|
agenix.nixosModules.default
|
|
];
|
|
};
|
|
};
|
|
}
|