2021-12-06 22:35:29 +00:00
|
|
|
{
|
|
|
|
inputs = {
|
2023-06-13 08:22:57 +00:00
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
2023-07-28 22:58:25 +00:00
|
|
|
nixos-stable.url = "github:nixos/nixpkgs/nixos-23.05";
|
2023-07-08 09:51:45 +00:00
|
|
|
# nixpkgs-master.url = "github:nixos/nixpkgs/master";
|
2023-07-07 08:53:05 +00:00
|
|
|
|
2023-07-13 14:10:44 +00:00
|
|
|
# Tools
|
|
|
|
|
|
|
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
|
|
|
|
2023-07-13 17:57:12 +00:00
|
|
|
flake-root.url = "github:srid/flake-root";
|
|
|
|
|
2023-07-13 14:10:44 +00:00
|
|
|
treefmt-nix = {
|
|
|
|
url = "github:numtide/treefmt-nix";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
|
2023-07-16 22:17:50 +00:00
|
|
|
pre-commit-hooks-nix = {
|
|
|
|
url = "github:cachix/pre-commit-hooks.nix";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
|
2023-07-13 14:10:44 +00:00
|
|
|
# Overlays
|
|
|
|
|
2023-06-21 12:21:40 +00:00
|
|
|
disko = {
|
|
|
|
url = "github:nix-community/disko";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2021-12-06 22:35:29 +00:00
|
|
|
|
2023-07-13 10:02:14 +00:00
|
|
|
nix-darwin = {
|
2022-02-03 22:35:52 +00:00
|
|
|
url = "github:lnl7/nix-darwin";
|
2022-07-30 16:18:04 +00:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
2022-02-03 22:35:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-10 21:15:13 +00:00
|
|
|
home-manager = {
|
|
|
|
url = "github:nix-community/home-manager";
|
2022-07-30 16:18:04 +00:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
2021-12-10 21:15:13 +00:00
|
|
|
};
|
2021-12-06 22:35:29 +00:00
|
|
|
|
2023-06-07 18:40:27 +00:00
|
|
|
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
|
|
|
|
2023-04-14 08:23:54 +00:00
|
|
|
agenix = {
|
|
|
|
url = "github:ryantm/agenix";
|
2023-02-05 16:51:04 +00:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
2023-07-13 10:02:14 +00:00
|
|
|
inputs.darwin.follows = "nix-darwin";
|
2023-02-05 16:51:04 +00:00
|
|
|
};
|
|
|
|
|
2023-04-04 18:31:35 +00:00
|
|
|
attic = {
|
|
|
|
url = "github:zhaofengli/attic";
|
2023-08-13 15:21:19 +00:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
2023-04-04 18:31:35 +00:00
|
|
|
};
|
2023-04-04 15:20:09 +00:00
|
|
|
|
2021-12-17 20:41:54 +00:00
|
|
|
nifoc-overlay = {
|
|
|
|
url = "github:nifoc/nix-overlay";
|
2022-07-30 16:18:04 +00:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
2021-12-17 20:41:54 +00:00
|
|
|
};
|
2023-05-12 15:39:09 +00:00
|
|
|
|
|
|
|
deploy-rs = {
|
|
|
|
url = "github:serokell/deploy-rs";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2021-12-06 22:35:29 +00:00
|
|
|
};
|
|
|
|
|
2023-07-13 14:10:44 +00:00
|
|
|
outputs = inputs@{ flake-parts, ... }:
|
|
|
|
flake-parts.lib.mkFlake { inherit inputs; } {
|
|
|
|
flake =
|
|
|
|
let
|
|
|
|
Styx = import ./system/flakes/Styx.nix {
|
|
|
|
inherit (inputs) nixpkgs home-manager nix-darwin;
|
|
|
|
inherit inputs;
|
|
|
|
};
|
|
|
|
|
|
|
|
tanker = import ./system/flakes/tanker.nix {
|
2023-07-28 22:58:25 +00:00
|
|
|
inherit (inputs) nixpkgs nixos-stable disko deploy-rs home-manager agenix attic;
|
2023-07-13 14:10:44 +00:00
|
|
|
inherit inputs;
|
|
|
|
};
|
|
|
|
|
|
|
|
mediaserver = import ./system/flakes/mediaserver.nix {
|
|
|
|
inherit (inputs) nixpkgs deploy-rs home-manager agenix;
|
|
|
|
inherit inputs;
|
|
|
|
};
|
|
|
|
|
|
|
|
argon = import ./system/flakes/argon.nix {
|
|
|
|
inherit (inputs) nixpkgs nixos-hardware deploy-rs home-manager agenix;
|
|
|
|
inherit inputs;
|
|
|
|
};
|
|
|
|
|
|
|
|
weather-sdr = import ./system/flakes/weather-sdr.nix {
|
|
|
|
inherit (inputs) nixpkgs deploy-rs home-manager agenix;
|
|
|
|
inherit inputs;
|
|
|
|
};
|
|
|
|
|
|
|
|
adsb-antenna = import ./system/flakes/adsb-antenna.nix {
|
|
|
|
inherit (inputs) nixpkgs nixos-hardware deploy-rs home-manager;
|
|
|
|
inherit inputs;
|
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
|
|
|
darwinConfigurations = {
|
|
|
|
"Styx" = Styx.system;
|
|
|
|
};
|
|
|
|
|
|
|
|
nixosConfigurations = {
|
|
|
|
tanker = tanker.system;
|
|
|
|
mediaserver = mediaserver.system;
|
|
|
|
argon = argon.system;
|
|
|
|
weather-sdr = weather-sdr.system;
|
|
|
|
adsb-antenna = adsb-antenna.system;
|
|
|
|
};
|
|
|
|
|
|
|
|
deploy.nodes = {
|
|
|
|
tanker = tanker.deployment;
|
|
|
|
mediaserver = mediaserver.deployment;
|
|
|
|
argon = argon.deployment;
|
|
|
|
weather-sdr = weather-sdr.deployment;
|
|
|
|
adsb-antenna = adsb-antenna.deployment;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
imports = [
|
2023-07-13 17:57:12 +00:00
|
|
|
inputs.flake-root.flakeModule
|
2023-07-13 14:10:44 +00:00
|
|
|
inputs.treefmt-nix.flakeModule
|
2023-07-16 22:17:50 +00:00
|
|
|
inputs.pre-commit-hooks-nix.flakeModule
|
2023-07-13 14:10:44 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
systems = [
|
|
|
|
"aarch64-darwin"
|
|
|
|
"x86_64-linux"
|
|
|
|
"aarch64-linux"
|
|
|
|
];
|
|
|
|
|
2023-07-28 23:59:23 +00:00
|
|
|
perSystem = { config, pkgs, inputs', ... }: {
|
2023-07-13 14:10:44 +00:00
|
|
|
treefmt = {
|
2023-07-13 17:57:12 +00:00
|
|
|
inherit (config.flake-root) projectRootFile;
|
2023-07-13 14:10:44 +00:00
|
|
|
|
|
|
|
programs = {
|
|
|
|
fnlfmt.enable = true;
|
|
|
|
nixpkgs-fmt.enable = true;
|
|
|
|
shfmt.enable = true;
|
2023-07-13 17:57:12 +00:00
|
|
|
yamlfmt.enable = true;
|
2023-07-13 14:10:44 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-07-16 22:17:50 +00:00
|
|
|
pre-commit = {
|
|
|
|
settings = {
|
|
|
|
hooks = {
|
|
|
|
deadnix.enable = true;
|
2023-07-16 22:41:03 +00:00
|
|
|
shellcheck.enable = true;
|
2023-09-10 15:30:22 +00:00
|
|
|
# statix.enable = true;
|
2023-07-16 22:17:50 +00:00
|
|
|
treefmt.enable = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-07-13 14:10:44 +00:00
|
|
|
devShells.default = pkgs.mkShell {
|
|
|
|
name = "dotfiles";
|
|
|
|
|
|
|
|
inputsFrom = [
|
2023-07-13 17:57:12 +00:00
|
|
|
config.flake-root.devShell
|
2023-07-13 14:10:44 +00:00
|
|
|
config.treefmt.build.devShell
|
2023-07-16 22:17:50 +00:00
|
|
|
config.pre-commit.devShell
|
2023-07-13 14:10:44 +00:00
|
|
|
];
|
2023-07-21 10:29:50 +00:00
|
|
|
|
2023-07-28 23:59:23 +00:00
|
|
|
packages = [
|
|
|
|
inputs'.agenix.packages.agenix
|
|
|
|
inputs'.deploy-rs.packages.deploy-rs
|
|
|
|
];
|
|
|
|
|
2023-07-21 10:29:50 +00:00
|
|
|
TREEFMT_CONFIG_FILE = config.treefmt.build.configFile;
|
2023-07-13 14:10:44 +00:00
|
|
|
};
|
2023-05-12 15:39:09 +00:00
|
|
|
};
|
2022-08-01 20:39:14 +00:00
|
|
|
};
|
2021-12-06 22:35:29 +00:00
|
|
|
}
|