config/flake.nix

161 lines
3.9 KiB
Nix

2023-01-13 20:12:54 +01:00
{
inputs = {
2023-04-12 13:45:45 +02:00
nixpkgs.url = "nixpkgs/nixos-22.11";
2023-06-03 11:42:15 +02:00
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
2023-05-07 03:59:51 +02:00
nur.url = "github:nix-community/nur";
sanctureplicum-nur = {
url = "git+https://gitea.pid1.sh/sanctureplicum/nur.git";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
nekowinston-nur = {
url = "github:nekowinston/nur";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
home-manager = {
2023-05-10 05:18:43 +02:00
url = "github:nix-community/home-manager/release-22.11";
2023-05-07 03:59:51 +02:00
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
url = "github:Mic92/sops-nix";
inputs = {
nixpkgs.follows = "nixpkgs-unstable";
nixpkgs-stable.follows = "nixpkgs";
};
};
nixos-wsl = {
url = "github:nix-community/nixos-wsl";
inputs.nixpkgs.follows = "nixpkgs";
};
2023-06-04 23:05:10 +02:00
crane = {
url = "github:ipetkov/crane/v0.11.3";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
2023-05-07 03:59:51 +02:00
emacs-overlay = {
url = "github:nix-community/emacs-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
2023-01-13 20:12:54 +01:00
};
2023-06-03 11:42:15 +02:00
outputs = {
self,
nixpkgs,
nixpkgs-unstable,
nur,
sanctureplicum-nur,
nekowinston-nur,
emacs-overlay,
nixos-wsl,
sops-nix,
2023-06-04 23:05:10 +02:00
crane,
2023-06-03 11:42:15 +02:00
home-manager,
...
} @ inputs: let
overlays = [
(import emacs-overlay)
(final: prev: let
unstable = import nixpkgs-unstable {
system = prev.system;
config.allowUnfree = true;
};
in {
nur = import nur {
nurpkgs = unstable;
pkgs = unstable;
repoOverrides = {
nekowinston = import nekowinston-nur {pkgs = unstable;};
sanctureplicum = import sanctureplicum-nur {
pkgs = unstable;
system = unstable.system;
2023-04-12 13:45:45 +02:00
};
};
2023-06-03 11:42:15 +02:00
};
inherit unstable;
})
];
in {
nixosConfigurations.falcon = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
({
config,
pkgs,
...
}: {
nixpkgs.overlays = overlays;
2023-04-12 13:45:45 +02:00
})
2023-06-03 11:42:15 +02:00
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.backupFileExtension = "bak";
}
./hosts/falcon
2023-02-13 20:46:11 +01:00
];
2023-06-03 11:42:15 +02:00
};
nixosConfigurations.eagle = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
({
config,
pkgs,
...
}: {
nixpkgs.overlays = overlays;
})
2023-01-13 20:12:54 +01:00
2023-06-03 11:42:15 +02:00
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.backupFileExtension = "bak";
home-manager.sharedModules = [
sops-nix.homeManagerModule
];
}
./hosts/eagle
];
};
nixosConfigurations.buzzard = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
({
config,
pkgs,
...
}: {
nixpkgs.overlays = overlays;
})
2023-01-16 14:49:16 +01:00
2023-06-03 11:42:15 +02:00
nixos-wsl.nixosModules.wsl
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.backupFileExtension = "bak";
home-manager.sharedModules = [
(import ./powershell.nix)
];
}
./hosts/buzzard
];
};
nixosConfigurations.gitea = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
2023-06-04 23:05:10 +02:00
specialArgs = {craneLib = crane.lib."x86_64-linux";};
2023-06-03 11:42:15 +02:00
modules = [
({
config,
pkgs,
...
}: {
nixpkgs.overlays = overlays;
})
2023-06-03 11:42:15 +02:00
sops-nix.nixosModules.sops
./hosts/gitea
];
2023-01-13 20:12:54 +01:00
};
2023-06-03 11:42:15 +02:00
};
2023-01-13 20:12:54 +01:00
}