43 lines
1.6 KiB
Nix
43 lines
1.6 KiB
Nix
{
|
|
description = "laptop NixOS Flake";
|
|
|
|
# This is the standard format for flake.nix.
|
|
# `inputs` are the dependencies of the flake,
|
|
# and `outputs` function will return all the build results of the flake.
|
|
# Each item in `inputs` will be passed as a parameter to
|
|
# the `outputs` function after being pulled and built.
|
|
inputs = {
|
|
# There are many ways to reference flake inputs.
|
|
# The most widely used is `github:owner/name/reference`,
|
|
# which represents the GitHub repository URL + branch/commit-id/tag.
|
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
|
|
# Home Manager
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager/release-23.11";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
# The `@` syntax here is used to alias the attribute set of the
|
|
# inputs's parameter, making it convenient to use inside the function.
|
|
outputs = { self, nixpkgs, home-manager, ... }@inputs: {
|
|
nixosConfigurations = {
|
|
"durincore" = nixpkgs.lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
specialArgs = inputs;
|
|
modules = [
|
|
# Import the configuration.nix here, so that the
|
|
# old configuration file can still take effect.
|
|
# Note: configuration.nix itself is also a Nixpkgs Module,
|
|
./nixos/configuration.nix
|
|
home-manager.nixosModules.home-manager
|
|
{
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.useUserPackages = true;
|
|
home-manager.users.jahanson = import ./home-manager/home.nix;
|
|
}
|
|
];
|
|
};
|
|
};
|
|
};
|
|
}
|