Files
nixos/flake.nix
Alexander Wainwright a92446fe58 Add locutus
2025-06-24 18:49:51 +10:00

46 lines
1.5 KiB
Nix

{
description = "NixOS configuration";
inputs = {
# NixOS official package source
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
home-manager = {
url = "github:nix-community/home-manager/release-25.05";
# The `follows` keyword in inputs is used for inheritance.
# Here, `inputs.nixpkgs` of home-manager is kept consistent with
# the `inputs.nixpkgs` of the current flake,
# to avoid problems caused by different versions of nixpkgs.
inputs.nixpkgs.follows = "nixpkgs";
};
locutus.url = "git+https://git.figtree.dev/alex/locutus";
};
outputs = { self, nixpkgs, home-manager, ... }@inputs: {
nixosConfigurations.case = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
# Import the previous configuration.nix we used,
# so the old configuration file still takes effect
./configuration.nix
# make home-manager as a module of nixos so that home-manager
# configuration will be deployed automatically when executing
# `nixos-rebuild switch`
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.alex = import ./alex/home.nix;
# Optionally, use home-manager.extraSpecialArgs to pass arguments to
# home.nix
home-manager.extraSpecialArgs = { inherit inputs; };
}
];
};
};
}