nix-background-upgrade/flake.nix

32 lines
1,005 B
Nix
Raw Normal View History

{
description = "Upgrade NixOS system (and/or home-manager) in the background, with notification support";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
inputs.poetry2nix.url = "github:nix-community/poetry2nix";
outputs = {
self,
nixpkgs,
poetry2nix,
}: let
supportedSystems = ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
pkgs = forAllSystems (system: nixpkgs.legacyPackages.${system});
in {
apps = forAllSystems (system: {
default = {
type = "app";
program = "${self.packages.${system}.default}/bin/nix-background-upgrade";
};
});
devShells = forAllSystems (system: {
default = (poetry2nix.lib.mkPoetry2Nix {pkgs = pkgs.${system};}).callPackage ./shell.nix {};
});
packages = forAllSystems (system: {
default = (poetry2nix.lib.mkPoetry2Nix {pkgs = pkgs.${system};}).callPackage ./default.nix {};
});
};
}