dibbler/flake.nix

78 lines
2.2 KiB
Nix
Raw Permalink Normal View History

{
description = "Dibbler samspleisebod";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils }:
2023-08-29 18:32:49 +02:00
flake-utils.lib.eachDefaultSystem (system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
packages = {
default = self.packages.${system}.dibbler;
dibbler = pkgs.callPackage ./nix/dibbler.nix {
python3Packages = pkgs.python311Packages;
2022-08-28 09:39:07 +02:00
};
2023-08-29 18:32:49 +02:00
};
2022-08-28 09:39:07 +02:00
2023-08-29 18:32:49 +02:00
apps = {
default = self.apps.${system}.dibbler;
dibbler = flake-utils.lib.mkApp {
drv = self.packages.${system}.dibbler;
2022-08-28 09:39:07 +02:00
};
2023-08-29 18:32:49 +02:00
};
2023-08-30 00:02:17 +02:00
devShells = {
default = self.devShells.${system}.dibbler;
dibbler = pkgs.mkShell {
packages = with pkgs; [
python311Packages.black
ruff
];
};
};
2023-08-29 18:32:49 +02:00
})
2023-08-29 18:32:49 +02:00
//
2023-08-29 18:32:49 +02:00
{
# Note: using the module requires that you have applied the
# overlay first
nixosModules.default = import ./nix/module.nix;
2023-08-29 18:32:49 +02:00
images.skrot = self.nixosConfigurations.skrot.config.system.build.sdImage;
2022-08-28 09:39:07 +02:00
nixosConfigurations.skrot = nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
modules = [
(nixpkgs + "/nixos/modules/installer/sd-card/sd-image-aarch64.nix")
self.nixosModules.default
({...}: {
system.stateVersion = "22.05";
2022-08-28 09:39:07 +02:00
networking = {
hostName = "skrot";
domain = "pvv.ntnu.no";
nameservers = [ "129.241.0.200" "129.241.0.201" ];
defaultGateway = "129.241.210.129";
interfaces.eth0 = {
useDHCP = false;
ipv4.addresses = [{
address = "129.241.210.235";
prefixLength = 25;
}];
};
2022-08-28 09:39:07 +02:00
};
# services.resolved.enable = true;
# systemd.network.enable = true;
# systemd.network.networks."30-network" = {
# matchConfig.Name = "*";
# DHCP = "no";
# address = [ "129.241.210.235/25" ];
# gateway = [ "129.241.210.129" ];
# };
2022-08-28 09:39:07 +02:00
})
];
};
};
}