nix-background-upgrade/flake.nix
Evie Litherland-Smith 0396bdb66a Move nix shell to separate shell.nix
Update README for nix shell instructions, refile long lines
2024-05-27 08:34:36 +01:00

40 lines
1.1 KiB
Nix

{
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 {
packages = forAllSystems (system: let
inherit (poetry2nix.lib.mkPoetry2Nix {pkgs = pkgs.${system};}) mkPoetryApplication;
in {
default = mkPoetryApplication {
projectDir = self;
checkGroups = [];
};
});
apps = forAllSystems (system: {
default = {
type = "app";
program = "${self.packages.${system}.default}/bin/nix-background-upgrade";
};
});
devShells = forAllSystems (system: {
default = import ./shell.nix {
pkgs = pkgs.${system};
inherit (poetry2nix.lib.mkPoetry2Nix {pkgs = pkgs.${system};}) mkPoetryEnv;
};
});
};
}