nixos/flake.nix

61 lines
1.3 KiB
Nix

{
description = "Nixos config flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
musnix = {url = "github:musnix/musnix";};
};
outputs = {
self,
nixpkgs,
home-manager,
sops-nix,
...
} @ inputs: let
system = "x86_64-linux";
unstable = final: prev: {
unstable = import inputs.unstable {
system = final.system;
config = final.config;
};
};
pkgs = import nixpkgs {
inherit system;
overlays = [unstable];
config.allowUnfree = true;
};
in {
nixosConfigurations."MaxNixosLaptop" = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs;
inherit pkgs;
};
system = "x86_64-linux";
modules = [
./hosts/MaxNixosLaptop/configuration.nix
sops-nix.nixosModules.sops
home-manager.nixosModules.default
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
}
inputs.musnix.nixosModules.musnix
];
};
};
}