87 lines
2.0 KiB
Nix
87 lines
2.0 KiB
Nix
{
|
|
description = "NixOS configuration";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager/master";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
stylix = {
|
|
url = "github:danth/stylix/master";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
install-system = {
|
|
url = "path:scripts/install-system";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs =
|
|
{
|
|
nixpkgs,
|
|
home-manager,
|
|
install-system,
|
|
...
|
|
}@inputs:
|
|
let
|
|
system = "x86_64-linux";
|
|
host = "vm";
|
|
profile = "vm";
|
|
username = "josh";
|
|
in
|
|
{
|
|
nixosConfigurations = {
|
|
nixos = nixpkgs.lib.nixosSystem {
|
|
inherit system;
|
|
specialArgs = {
|
|
inherit inputs;
|
|
inherit host;
|
|
inherit profile;
|
|
inherit username;
|
|
};
|
|
modules = [
|
|
./hosts/${host}
|
|
];
|
|
};
|
|
|
|
live = nixpkgs.lib.nixosSystem {
|
|
inherit system;
|
|
specialArgs = {
|
|
inherit inputs;
|
|
inherit host;
|
|
inherit profile;
|
|
inherit username;
|
|
};
|
|
modules = [
|
|
(nixpkgs + "/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix")
|
|
{ environment.systemPackages = [ install-system.packages.${system}.default ]; }
|
|
./hosts/${host}
|
|
];
|
|
};
|
|
|
|
nixosvm = nixpkgs.lib.nixosSystem {
|
|
inherit system;
|
|
specialArgs = {
|
|
inherit inputs;
|
|
inherit host;
|
|
inherit profile;
|
|
inherit username;
|
|
};
|
|
modules = [
|
|
./hosts/${host}
|
|
];
|
|
};
|
|
};
|
|
|
|
devShell.${system} = nixpkgs.legacyPackages.${system}.pkgs.mkShell {
|
|
packages = with nixpkgs.legacyPackages.${system}.pkgs; [
|
|
nixd
|
|
];
|
|
};
|
|
|
|
formatter.${system} = nixpkgs.legacyPackages.${system}.nixfmt-tree;
|
|
};
|
|
}
|