erpnext-nix/flake.nix
teutat3s 518ebf980d
flake.lock: Update
Update nixpkgs 23.11 -> 24.05

Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/b0b2c5445c64191fd8d0b31f2b1a34e45a64547d' (2024-01-03)
  → 'github:NixOS/nixpkgs/086b448a5d54fd117f4dc2dee55c9f0ff461bdc1' (2024-09-16)
• Updated input 'agenix':
    'github:ryantm/agenix/417caa847f9383e111d1397039c9d4337d024bf0' (2023-12-24)
  → 'github:ryantm/agenix/f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41' (2024-08-10)
• Updated input 'devshell':
    'github:numtide/devshell/44ddedcbcfc2d52a76b64fb6122f209881bd3e1e' (2023-12-05)
  → 'github:numtide/devshell/67cce7359e4cd3c45296fb4aaf6a19e2a9c757ae' (2024-07-27)
• Removed input 'devshell/systems'
2024-09-19 11:49:23 +02:00

97 lines
2.5 KiB
Nix

{
description = "Dev Setup";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
systems.url = "github:nix-systems/default";
devshell.url = "github:numtide/devshell";
devshell.inputs.nixpkgs.follows = "nixpkgs";
devshell.inputs.systems.follows = "systems";
agenix.url = "github:ryantm/agenix";
agenix.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = {agenix, devshell, nixpkgs, self, systems}:
let
eachSystem = nixpkgs.lib.genAttrs (import systems);
# Nixpkgs instantiated for system types in nix-systems
nixpkgsFor = eachSystem (system:
import nixpkgs {
inherit system;
overlays = [
self.overlays.default
self.overlays.pythonOverlay
agenix.overlays.default
devshell.overlays.default
# https://github.com/NixOS/nixpkgs/issues/265675#issuecomment-1846591842
(final: prev: {
pipewire = prev.pipewire.override { ffadoSupport = false; };
})
];
}
);
in
{
overlays = {
default = (import ./overlay.nix);
pythonOverlay = (import ./python-overlay.nix);
};
devShells = eachSystem (system:
let
pkgs = nixpkgsFor.${system};
in
{
default = pkgs.devshell.mkShell {
# Add additional packages you'd like to be available in your devshell
# PATH here
devshell.packages = with pkgs; [
jq
];
commands = [
{
help = pkgs.cachix.meta.description;
name = pkgs.cachix.pname;
package = pkgs.cachix;
}
{
help = pkgs.agenix.meta.description;
name = pkgs.agenix.pname;
package = pkgs.agenix;
}
];
bash.extra = ''
'';
};
});
packages = eachSystem (system:
let
pkgs = nixpkgsFor.${system};
in
{
run-erpnext = pkgs.run-erpnext;
erpnext = pkgs.python3.pkgs.erpnext;
bench = pkgs.python3.pkgs.bench;
});
nixosModules = import ./modules/nixos-modules.nix;
nixosConfigurations =
let
system = "x86_64-linux";
pkgs = nixpkgsFor.${system};
in
{
test-vm = nixpkgs.lib.nixosSystem {
inherit system pkgs;
modules = [
agenix.nixosModules.age
./test-vm/configuration.nix
];
};
};
};
}