nixos-configuration/desktop/flake.nix

43 lines
1.3 KiB
Nix

{
description = "NixOS Flake";
inputs = {
bootstrap.url = "github:jrpotter/bootstrap/v0.1.2";
home-manager = {
url = "github:nix-community/home-manager/release-23.05";
inputs.nixpkgs.follows = "nixpkgs";
};
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
};
outputs = { self, nixpkgs, home-manager, bootstrap, ... }:
let
system = "x86_64-linux";
in
{
# Used with `nixos-rebuild --flake .#<hostname>`
# nixosConfigurations."<hostname>".config.system.build.toplevel must be a derivation
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
inherit system;
# Modules can be attribute sets or a function that returns an attribute set.
# https://nixos-and-flakes.thiscute.world/nixos-with-flakes/nixos-with-flakes-enabled
modules = [
./configuration.nix
home-manager.nixosModules.home-manager
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.jrpotter = import ./jrpotter;
# Used to pass non-default parameters to submodules.
extraSpecialArgs = {
inherit system;
bootstrap = bootstrap.packages.${system}.default;
};
};
}
];
};
};
}