move some stuff around
This commit is contained in:
78
etcnixos/flake.nix
Normal file
78
etcnixos/flake.nix
Normal file
@@ -0,0 +1,78 @@
|
||||
{
|
||||
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
|
||||
|
||||
]
|
||||
++ (
|
||||
if ("${hostname}" == "mreow") then # laptop
|
||||
[
|
||||
nixos-hardware.nixosModules.framework-12th-gen-intel
|
||||
lanzaboote.nixosModules.lanzaboote
|
||||
]
|
||||
else
|
||||
[ ]
|
||||
);
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user