104 lines
2.5 KiB
Nix
104 lines
2.5 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";
|
|
};
|
|
nix-vscode-extensions = {
|
|
url = "github:nix-community/nix-vscode-extensions";
|
|
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,
|
|
stylix,
|
|
...
|
|
}@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}
|
|
];
|
|
};
|
|
};
|
|
|
|
homeConfigurations.${username} = home-manager.lib.homeManagerConfiguration {
|
|
extraSpecialArgs = {
|
|
inherit username;
|
|
};
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
modules = [
|
|
./modules/home
|
|
stylix.homeModules.stylix
|
|
];
|
|
};
|
|
|
|
devShell.${system} = nixpkgs.legacyPackages.${system}.pkgs.mkShell {
|
|
packages = with nixpkgs.legacyPackages.${system}.pkgs; [
|
|
nil
|
|
nixd
|
|
];
|
|
};
|
|
|
|
formatter.${system} = nixpkgs.legacyPackages.${system}.nixfmt-tree;
|
|
};
|
|
}
|