73 lines
1.8 KiB
Nix
73 lines
1.8 KiB
Nix
# github.com/brianmcgee has lots of great ideas for going above and beyond for this
|
|
{
|
|
description = "Greg's homepage";
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
|
devshell.url = "github:numtide/devshell";
|
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
|
flake-root.url = "github:srid/flake-root";
|
|
process-compose.url = "github:Platonic-Systems/process-compose-flake";
|
|
treefmt-nix.url = "github:numtide/treefmt-nix";
|
|
};
|
|
|
|
outputs = { devshell, flake-parts, flake-root, process-compose, treefmt-nix, ... }@inputs:
|
|
flake-parts.lib.mkFlake { inherit inputs; } {
|
|
imports = [
|
|
inputs.devshell.flakeModule
|
|
inputs.flake-root.flakeModule
|
|
inputs.treefmt-nix.flakeModule
|
|
];
|
|
flake = {
|
|
# Universal things
|
|
};
|
|
systems = [
|
|
"x86_64-linux"
|
|
"aarch64-linux"
|
|
];
|
|
perSystem = { config, pkgs, self', system, ... }: let
|
|
lib = pkgs.lib;
|
|
in {
|
|
_module.args.pkgs = import inputs.nixpkgs {
|
|
inherit system;
|
|
config.allowUnfree = true;
|
|
};
|
|
# https://numtide.github.io/devshell/intro.html
|
|
devshells.default = {
|
|
# These commands will be shown in the motd that users read
|
|
# upon entering the shell
|
|
commands = [ {
|
|
package = self'.packages.cache;
|
|
category = "utils";
|
|
help = "Downloads ISO files and adds them to the S3 bucket";
|
|
} ];
|
|
};
|
|
|
|
# This is not special, this is just flakes
|
|
packages = {
|
|
cache = pkgs.writeShellApplication {
|
|
name = "cache-isos";
|
|
runtimeInputs = with pkgs; [
|
|
curl
|
|
minio-client
|
|
packer
|
|
];
|
|
text = builtins.readFile ./cache.sh;
|
|
};
|
|
};
|
|
|
|
# https://numtide.github.io/treefmt/
|
|
treefmt.config = {
|
|
inherit (config.flake-root) projectRootFile;
|
|
package = pkgs.treefmt;
|
|
|
|
programs = {
|
|
deadnix.enable = true;
|
|
};
|
|
|
|
settings.formatter = {
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|