os/flake.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

118 lines
3.1 KiB
Nix
Raw Normal View History

2019-12-03 05:18:30 +00:00
{
2023-09-12 20:07:05 +00:00
description = "b12f hosts";
nixConfig.extra-experimental-features = "nix-command flakes";
inputs = {
# Track channels with commits tested and built by hydra
2023-09-12 20:07:05 +00:00
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
2022-11-20 22:28:23 +00:00
flake-compat.url = "github:edolstra/flake-compat";
flake-compat.flake = false;
2022-11-20 22:28:23 +00:00
2023-09-12 20:07:05 +00:00
nix-darwin.url = "github:lnl7/nix-darwin/master";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
2022-11-20 22:28:23 +00:00
2023-09-12 20:07:05 +00:00
home-manager.url = "github:nix-community/home-manager/release-23.05";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
2022-11-20 22:28:23 +00:00
2023-09-12 20:07:05 +00:00
flake-parts.url = "github:hercules-ci/flake-parts";
nixos-flake.url = "github:srid/nixos-flake";
2022-11-20 22:28:23 +00:00
2023-09-12 20:07:05 +00:00
deploy-rs.url = "github:serokell/deploy-rs";
deploy-rs.inputs.nixpkgs.follows = "nixpkgs";
deploy-rs.inputs.flake-compat.follows = "flake-compat";
2022-11-20 22:28:23 +00:00
agenix.url = "github:ryantm/agenix";
2023-09-12 20:07:05 +00:00
agenix.inputs.nixpkgs.follows = "nixpkgs";
agenix.inputs.darwin.follows = "nix-darwin";
2022-11-20 22:28:23 +00:00
2021-03-02 03:30:47 +00:00
nixos-hardware.url = "github:nixos/nixos-hardware";
2022-11-20 22:28:23 +00:00
2023-10-03 12:21:09 +00:00
mobile-nixos.url = "github:nixos/mobile-nixos";
mobile-nixos.flake = false;
2023-01-28 21:34:24 +00:00
master.url = "github:nixos/nixpkgs/master";
2023-02-21 11:37:18 +00:00
scan2paperless.url = "git+https://git.pub.solar/b12f/scan2paperless.git";
2023-09-11 21:51:13 +00:00
musnix.url = "github:musnix/musnix";
adblock-unbound.url = "github:MayNiklas/nixos-adblock-unbound";
2023-09-12 20:07:05 +00:00
adblock-unbound.inputs.nixpkgs.follows = "nixpkgs";
2022-11-20 22:28:23 +00:00
};
2023-09-12 20:07:05 +00:00
outputs = inputs@{ self, ... }:
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
2022-11-20 22:28:23 +00:00
2023-09-12 20:07:05 +00:00
imports = [
inputs.nixos-flake.flakeModule
./lib
2023-09-12 20:07:05 +00:00
./modules
./hosts
./users
];
2021-07-16 21:01:25 +00:00
2023-09-12 20:07:05 +00:00
perSystem = args@{ system, pkgs, config, ... }: {
_module.args = {
inherit inputs;
pkgs = import inputs.nixpkgs {
inherit system;
overlays = [
inputs.agenix.overlays.default
2021-07-16 21:01:25 +00:00
];
};
2023-09-12 20:07:05 +00:00
unstable = import inputs.unstable { inherit system; };
master = import inputs.master { inherit system; };
2021-04-22 03:44:15 +00:00
};
2021-07-16 21:01:25 +00:00
2023-09-12 20:07:05 +00:00
devShells.default = pkgs.mkShell {
2023-10-03 12:21:09 +00:00
buildInputs = with pkgs; [
deploy-rs
nixpkgs-fmt
agenix
cachix
editorconfig-checker
nix
nodePackages.prettier
nvfetcher
shellcheck
shfmt
treefmt
nixos-generators
2023-09-12 20:07:05 +00:00
];
2023-02-01 12:52:00 +00:00
};
2022-11-20 22:28:23 +00:00
};
2021-04-22 03:44:15 +00:00
2023-09-12 20:07:05 +00:00
flake = {
2023-10-03 12:21:09 +00:00
deploy.nodes = self.b12f-os.lib.deploy.mkDeployNodes self.nixosConfigurations {
2023-10-03 11:50:01 +00:00
chocolatebar = {
sshUser = "b12f";
};
biolimo = {
sshUser = "b12f";
};
droppie = {
hostname = "backup.b12f.io";
sshUser = "yule";
};
2023-10-03 11:50:01 +00:00
pie = {
hostname = "pie.local";
sshUser = "yule";
};
2023-09-12 18:11:29 +00:00
2023-10-03 11:50:01 +00:00
maoam = {
sshUser = "b12f";
};
2023-09-12 18:11:29 +00:00
};
2023-01-28 21:34:24 +00:00
};
};
2019-12-03 05:18:30 +00:00
}