flocon/flake.nix

87 lines
2.7 KiB
Nix

{
description = "nezia's nixos configuration";
outputs = {
self,
nixpkgs,
systems,
agenix,
deploy-rs,
treefmt-nix,
...
} @ inputs: let
eachSystem = f: nixpkgs.lib.genAttrs (import systems) (system: f nixpkgs.legacyPackages.${system});
treefmtEval = eachSystem (pkgs: treefmt-nix.lib.evalModule pkgs ./treefmt.nix);
in {
imports = [./modules];
devShells = eachSystem (pkgs: {
default = pkgs.mkShell {
packages = [
pkgs.alejandra
pkgs.git
deploy-rs.packages.${pkgs.system}.default
agenix.packages.${pkgs.system}.default
];
};
});
formatter = eachSystem (pkgs: treefmtEval.${pkgs.system}.config.build.wrapper);
nixosConfigurations = let
lib' = import ./lib {inherit inputs lib';};
in
import ./hosts {inherit inputs lib';};
packages = eachSystem (pkgs: import ./pkgs {inherit inputs pkgs;});
deploy.nodes = import ./nodes {inherit inputs;};
checks = builtins.mapAttrs (_: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
};
inputs = {
# nix related
nixpkgs.url = "github:NixOS/nixpkgs/dc460ec76cbff0e66e269457d7b728432263166c"; # TODO: remove when 24.11 is out
systems.url = "github:nix-systems/default-linux";
nixos-hardware.url = "github:NixOS/nixos-hardware";
lanzaboote = {
url = "github:nix-community/lanzaboote/v0.4.1";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-index-db = {
url = "github:nix-community/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
# other
agenix = {
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs";
};
ags.url = "github:Aylur/ags";
basix.url = "github:notashelf/basix";
deploy-rs.url = "github:serokell/deploy-rs";
ironbar = {
url = "github:JakeStanger/ironbar";
inputs.nixpkgs.follows = "nixpkgs";
};
firefox-addons = {
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
inputs.nixpkgs.follows = "nixpkgs";
};
niri.url = "github:sodiboo/niri-flake";
neovim-flake = {
url = "git+https://git.nezia.dev/nezia/neovim-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
portfolio.url = "github:nezia1/portfolio";
plasma-manager = {
url = "github:nix-community/plasma-manager";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
treefmt-nix.url = "github:numtide/treefmt-nix";
wezterm = {
url = "github:wez/wezterm/main?dir=nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
}