nichts/flake.nix
2025-06-10 20:26:17 +02:00

87 lines
2 KiB
Nix

{
description = "My NixOS config flake";
outputs = inputs: let
inherit (inputs.nixpkgs) lib;
eachSystem = lib.genAttrs (import inputs.systems);
pkgsFor = inputs.nixpkgs.legacyPackages;
in {
nixosConfigurations = import ./hosts inputs;
devShells =
lib.mapAttrs (system: pkgs: {
default = pkgs.callPackage ./shell.nix {};
})
pkgsFor;
formatter = eachSystem (system: pkgsFor.${system}.alejandra);
packages =
lib.mapAttrs (
system: pkgs: {
inherit
(import ./packages {
inherit pkgs;
})
fish
helix
kakoune
;
}
)
pkgsFor;
apps = eachSystem (system: let
inherit (inputs.self.packages.${system}) fish helix;
in {
default = {
type = "app";
program = "${fish}/bin/fish";
};
helix = {
type = "app";
program = "${helix}/bin/hx";
};
});
templates = import ./templates;
};
inputs = {
# Unstable nixpkgs baby!
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
systems.url = "github:nix-systems/default-linux";
impermanence.url = "github:nix-community/impermanence";
schizofox.url = "github:schizofox/schizofox";
watt = {
url = "github:notashelf/watt";
inputs.nixpkgs.follows = "nixpkgs";
};
# secure booting
lanzaboote = {
url = "github:nix-community/lanzaboote";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland = {
url = "github:hyprwm/hyprland";
inputs.nixpkgs.follows = "nixpkgs";
inputs.systems.follows = "systems";
};
quickshell = {
url = "git+https://git.outfoxxed.me/outfoxxed/quickshell";
# THIS IS IMPORTANT
# Mismatched system dependencies will lead to crashes and other issues.
inputs.nixpkgs.follows = "nixpkgs";
};
lix-module = {
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.93.0.tar.gz";
inputs.nixpkgs.follows = "nixpkgs";
};
};
}