2023-10-17 23:10:58 +02:00
|
|
|
{
|
2024-08-11 22:19:39 +02:00
|
|
|
description = "sanic - chaos music control";
|
2023-10-17 23:10:58 +02:00
|
|
|
inputs = {
|
2024-08-11 22:19:39 +02:00
|
|
|
nixpkgs.url = github:NixOS/nixpkgs/nixos-24.05;
|
|
|
|
flake-utils.url = github:numtide/flake-utils;
|
2023-10-24 15:59:04 +02:00
|
|
|
gomod2nix = {
|
2024-08-11 22:19:39 +02:00
|
|
|
url = github:tweag/gomod2nix;
|
2023-10-24 15:59:04 +02:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
inputs.flake-utils.follows = "flake-utils";
|
|
|
|
};
|
2023-10-17 23:10:58 +02:00
|
|
|
};
|
2023-10-24 15:59:04 +02:00
|
|
|
outputs = { self, nixpkgs, flake-utils, gomod2nix }: flake-utils.lib.eachDefaultSystem (system:
|
2023-10-17 23:10:58 +02:00
|
|
|
let
|
2023-10-24 15:59:04 +02:00
|
|
|
pkgs = import nixpkgs {
|
|
|
|
inherit system;
|
|
|
|
overlays = [ gomod2nix.overlays.default ];
|
|
|
|
};
|
|
|
|
sanic = pkgs.buildGoApplication {
|
|
|
|
pname = "sanic";
|
|
|
|
version = "0.0.1";
|
|
|
|
src = ./.;
|
|
|
|
modules = ./gomod2nix.toml;
|
|
|
|
};
|
2024-01-26 14:18:46 +01:00
|
|
|
in
|
|
|
|
{
|
2024-01-29 22:09:02 +01:00
|
|
|
packages.default = sanic;
|
2024-01-26 14:18:46 +01:00
|
|
|
formatter = pkgs.nixpkgs-fmt;
|
2023-10-17 23:10:58 +02:00
|
|
|
devShells.default = pkgs.mkShell {
|
2023-10-24 15:59:04 +02:00
|
|
|
buildInputs = with pkgs; [
|
2023-10-19 17:58:36 +02:00
|
|
|
go
|
2024-01-26 14:18:46 +01:00
|
|
|
go-tools # staticcheck
|
2023-10-24 15:59:04 +02:00
|
|
|
gomod2nix.packages.${system}.default
|
|
|
|
];
|
|
|
|
packages = with pkgs; [
|
2023-10-18 00:40:17 +02:00
|
|
|
mpd
|
|
|
|
mpc-cli
|
2023-10-17 23:10:58 +02:00
|
|
|
];
|
|
|
|
};
|
2024-08-11 22:19:39 +02:00
|
|
|
nixosConfigurations."sanic" = nixpkgs.lib.nixosSystem {
|
|
|
|
inherit system;
|
|
|
|
modules = [
|
|
|
|
{
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
sanic
|
|
|
|
];
|
|
|
|
}
|
|
|
|
"${nixpkgs}/nixos/modules/virtualisation/proxmox-lxc.nix"
|
|
|
|
./configuration.nix
|
|
|
|
];
|
|
|
|
};
|
2023-10-17 23:10:58 +02:00
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|