nixos/flake.nix

39 lines
1.0 KiB
Nix

{
description = "Kellog's config (get it?)";
inputs = {
# NixOS official package source, using the nixos-24.11 branch here
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
home-manager = {
url = "github:nix-community/home-manager/release-24.11";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, home-manager, ... }@inputs:
let
localEnv = {
system = "x86_64-linux";
username = "victor";
hostname = "galleon";
timezone = "Europe/Vienna";
};
in {
nixosConfigurations.${localEnv.hostname} = nixpkgs.lib.nixosSystem {
specialArgs = { inherit localEnv; };
modules = [
./configuration.nix
home-manager.nixosModules.home-manager
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = { inherit localEnv; };
users.${localEnv.username} = import ./home.nix;
};
}
];
};
};
}