nix/flake.nix

143 lines
3.3 KiB
Nix
Raw Normal View History

{
description = "flake for nixos-pulse";
nixConfig = {
extra-trusted-substituters = [
"https://nix-community.cachix.org"
];
extra-trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
inputs = {
nixpkgs-unstable = {
url = "github:NixOS/nixpkgs/nixos-unstable";
};
nixpkgs = {
url = "github:NixOS/nixpkgs/nixos-23.05";
};
tuxedo-nixos = {
url = "github:blitz/tuxedo-nixos";
};
home-manager = {
url = "github:nix-community/home-manager/release-23.05";
inputs.nixpkgs.follows = "nixpkgs";
};
emacs-overlay = {
url = "github:nix-community/emacs-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
nur = {
url = "github:nix-community/NUR";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-wallpaper = {
url = "github:lunik1/nix-wallpaper";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-index-database = {
url = "github:Mic92/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
plasma-manager = {
url = "github:pjones/plasma-manager";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
nix-ld = {
url = "github:Mic92/nix-ld";
inputs.nixpkgs.follows = "nixpkgs";
};
};
2023-10-16 23:54:37 +02:00
outputs = {
self,
nixpkgs,
nixpkgs-unstable,
home-manager,
emacs-overlay,
nur,
nix-index-database,
disko,
...
} @ inputs: let
system = "x86_64-linux";
2023-10-16 23:54:37 +02:00
unstable-pkgs = import nixpkgs-unstable pkgs-args;
unstable-overlay = final: prev: {
unstable = unstable-pkgs.pkgs;
};
overlays = [
unstable-overlay
2023-10-16 23:54:37 +02:00
emacs-overlay.overlay
];
pkgs-args = {
system = system;
overlays = overlays;
config = {
allowUnfree = true;
};
};
pkgs = import nixpkgs pkgs-args;
2023-10-16 23:54:37 +02:00
hmModules = [
nix-index-database.hmModules.nix-index
nur.hmModules.nur
inputs.plasma-manager.homeManagerModules.plasma-manager
];
osModules = [
disko.nixosModules.disko
home-manager.nixosModules.home-manager
nix-index-database.nixosModules.nix-index
nur.nixosModules.nur
inputs.nix-ld.nixosModules.nix-ld
inputs.tuxedo-nixos.nixosModules.default
];
args = {
inherit inputs;
inherit system;
};
in {
formatter = {
${system} = pkgs.alejandra;
};
diskoConfigurations = {
2023-10-16 23:54:37 +02:00
nixos-pulse = import ./systems/nixos-pulse/disko.nix;
};
homeConfigurations = {
2023-10-16 23:54:37 +02:00
"tristand" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
2023-10-16 23:54:37 +02:00
modules =
[
./users/tristand.nix
{
_module = {inherit args;};
}
]
++ hmModules;
};
};
nixosConfigurations = {
2023-10-16 23:54:37 +02:00
nixos-pulse = nixpkgs.lib.nixosSystem {
modules =
[
./systems/nixos-pulse
{
_module = {inherit args;};
2023-10-16 23:54:37 +02:00
nix.registry.nixpkgs.flake = nixpkgs;
nixpkgs.pkgs = pkgs;
2023-10-05 16:34:20 +02:00
2023-10-16 23:54:37 +02:00
home-manager.sharedModules = hmModules;
}
]
++ osModules;
};
};
};
}