System/nixos/machines/crash/machine.nix
2025-01-09 10:58:16 -05:00

50 lines
1.3 KiB
Nix

{ withSystem, inputs, ... }:
{
# perSystem = { ... }: { config.packages.hello = ...; };
flake.nixosConfigurations.crash = withSystem "x86_64-linux" (
ctx@{ config, inputs', ... }:
inputs.nixpkgs.lib.nixosSystem {
# Expose `packages`, `inputs` and `inputs'` as module arguments.
# Use specialArgs permits use in `imports`.
# Note: if you publish modules for reuse, do not rely on specialArgs, but
# on the flake scope instead. See also https://flake.parts/define-module-in-separate-file.html
specialArgs = {
packages = config.packages;
inherit inputs inputs';
};
modules = [
(
{
config,
lib,
pkgs,
...
}:
{
imports = [
# Hardware support
inputs.nixos-hardware.nixosModules.microsoft-surface-common
# Our modules
(import ../../modules/base.nix { inherit inputs; })
(import ./configuration.nix)
(import ./hardware.nix)
(import ../../modules/user.nix {
inherit inputs;
mutableUsers = false;
})
];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
}
)
];
}
);
}