2023-05-18 13:57:22 +00:00
|
|
|
{
|
|
|
|
description = "Dev Setup";
|
|
|
|
|
2023-07-15 14:32:18 +00:00
|
|
|
inputs = {
|
2024-09-19 09:48:58 +00:00
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
|
2023-06-12 13:28:17 +00:00
|
|
|
|
2023-07-15 14:32:18 +00:00
|
|
|
systems.url = "github:nix-systems/default";
|
2023-05-18 13:57:22 +00:00
|
|
|
|
2023-07-15 14:32:18 +00:00
|
|
|
devshell.url = "github:numtide/devshell";
|
|
|
|
devshell.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
devshell.inputs.systems.follows = "systems";
|
2023-06-12 13:28:17 +00:00
|
|
|
|
2023-07-15 14:32:18 +00:00
|
|
|
agenix.url = "github:ryantm/agenix";
|
|
|
|
agenix.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = {agenix, devshell, nixpkgs, self, systems}:
|
2023-06-03 17:31:46 +00:00
|
|
|
let
|
2023-06-05 17:19:43 +00:00
|
|
|
eachSystem = nixpkgs.lib.genAttrs (import systems);
|
2023-06-12 13:28:17 +00:00
|
|
|
# Nixpkgs instantiated for system types in nix-systems
|
|
|
|
nixpkgsFor = eachSystem (system:
|
|
|
|
import nixpkgs {
|
|
|
|
inherit system;
|
|
|
|
overlays = [
|
|
|
|
self.overlays.default
|
|
|
|
self.overlays.pythonOverlay
|
2023-07-15 14:32:18 +00:00
|
|
|
agenix.overlays.default
|
2023-06-12 13:28:17 +00:00
|
|
|
devshell.overlays.default
|
2024-01-06 12:07:28 +00:00
|
|
|
# https://github.com/NixOS/nixpkgs/issues/265675#issuecomment-1846591842
|
|
|
|
(final: prev: {
|
|
|
|
pipewire = prev.pipewire.override { ffadoSupport = false; };
|
|
|
|
})
|
2023-06-12 13:28:17 +00:00
|
|
|
];
|
|
|
|
}
|
|
|
|
);
|
2023-06-05 17:19:43 +00:00
|
|
|
in
|
|
|
|
{
|
2023-06-12 13:28:17 +00:00
|
|
|
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; [
|
2024-01-06 10:49:51 +00:00
|
|
|
jq
|
2023-06-12 13:28:17 +00:00
|
|
|
];
|
|
|
|
commands = [
|
|
|
|
{
|
|
|
|
help = pkgs.cachix.meta.description;
|
|
|
|
name = pkgs.cachix.pname;
|
|
|
|
package = pkgs.cachix;
|
|
|
|
}
|
2023-07-15 14:32:18 +00:00
|
|
|
{
|
|
|
|
help = pkgs.agenix.meta.description;
|
|
|
|
name = pkgs.agenix.pname;
|
|
|
|
package = pkgs.agenix;
|
|
|
|
}
|
2023-06-02 14:00:58 +00:00
|
|
|
];
|
2023-06-12 13:28:17 +00:00
|
|
|
bash.extra = ''
|
|
|
|
'';
|
2023-05-21 15:55:26 +00:00
|
|
|
};
|
2023-06-12 13:28:17 +00:00
|
|
|
});
|
|
|
|
packages = eachSystem (system:
|
|
|
|
let
|
|
|
|
pkgs = nixpkgsFor.${system};
|
|
|
|
in
|
|
|
|
{
|
2023-06-03 17:31:46 +00:00
|
|
|
run-erpnext = pkgs.run-erpnext;
|
2023-06-12 13:28:17 +00:00
|
|
|
erpnext = pkgs.python3.pkgs.erpnext;
|
|
|
|
bench = pkgs.python3.pkgs.bench;
|
2023-06-03 17:31:46 +00:00
|
|
|
});
|
2023-07-17 19:29:46 +00:00
|
|
|
|
|
|
|
nixosModules = import ./modules/nixos-modules.nix;
|
|
|
|
|
2023-06-12 13:28:17 +00:00
|
|
|
nixosConfigurations =
|
|
|
|
let
|
|
|
|
system = "x86_64-linux";
|
|
|
|
pkgs = nixpkgsFor.${system};
|
|
|
|
in
|
|
|
|
{
|
2023-06-03 17:31:46 +00:00
|
|
|
test-vm = nixpkgs.lib.nixosSystem {
|
2023-06-12 13:28:17 +00:00
|
|
|
inherit system pkgs;
|
2023-07-15 14:32:18 +00:00
|
|
|
modules = [
|
|
|
|
agenix.nixosModules.age
|
|
|
|
./test-vm/configuration.nix
|
|
|
|
];
|
2023-05-18 13:57:22 +00:00
|
|
|
};
|
2023-06-03 17:31:46 +00:00
|
|
|
};
|
2023-06-05 17:19:43 +00:00
|
|
|
};
|
2023-05-18 13:57:22 +00:00
|
|
|
}
|