nixos-flake/flake.nix

54 lines
1.7 KiB
Nix
Raw Permalink Normal View History

2023-09-04 06:34:53 +00:00
{
inputs = {
2023-10-03 01:50:41 +00:00
#nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
2024-07-22 05:23:25 +00:00
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
stable.url = "github:NixOS/nixpkgs/nixos-24.05";
2023-09-04 06:34:53 +00:00
unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
2024-07-22 05:36:29 +00:00
home-manager = {
url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs";
};
2023-09-04 06:34:53 +00:00
};
2024-07-22 05:36:29 +00:00
outputs = { self, nixpkgs, stable, unstable, home-manager, ... }@attrs: {
2024-08-29 21:12:14 +00:00
nixosConfigurations = let
mkNixosConfig = hostName:
nixpkgs.lib.nixosSystem rec {
pkgs = let
nixpkgsConfig = {
inherit system;
config.allowUnfree = true;
};
in import nixpkgs (nixpkgsConfig // {
overlays = [
(new: prev: {
unstable = import unstable nixpkgsConfig;
stable = import stable nixpkgsConfig;
})
];
});
system = "x86_64-linux";
modules = [
./configuration.nix
# This fixes nixpkgs (for e.g. "nix shell") to match the system nixpkgs
({ config, pkgs, options, ... }: {
nix.registry.nixpkgs.flake = nixpkgs;
networking.hostName = hostName; # Define your hostname.
})
2024-07-22 05:36:29 +00:00
2024-08-29 21:12:14 +00:00
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.jaina = import ./home-manager/home.nix;
home-manager.backupFileExtension = "hmbackup";
}
];
};
in {
harrowhark = mkNixosConfig "harrowhark";
murray = mkNixosConfig "murray";
2023-09-04 06:34:53 +00:00
};
};
}