os/flake.nix

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

101 lines
2.6 KiB
Nix
Raw Normal View History

2019-12-03 05:18:30 +00:00
{
2024-01-06 09:46:10 +00:00
description = "Momo infra in nix";
2022-02-02 03:15:24 +00:00
nixConfig.extra-experimental-features = "nix-command flakes";
inputs = {
# Track channels with commits tested and built by hydra
2024-01-06 09:46:10 +00:00
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
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
2024-01-06 09:46:10 +00:00
nix-darwin.url = "github:lnl7/nix-darwin/master";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
2022-11-20 22:28:23 +00:00
2024-01-06 09:46:10 +00:00
home-manager.url = "github:nix-community/home-manager/release-23.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
2022-11-20 22:28:23 +00:00
2024-01-06 09:46:10 +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
2024-01-06 09:46:10 +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";
2024-01-06 09:46:10 +00:00
agenix.inputs.nixpkgs.follows = "nixpkgs";
agenix.inputs.darwin.follows = "nix-darwin";
agenix.inputs.home-manager.follows = "home-manager";
2022-11-20 22:28:23 +00:00
2021-03-02 03:30:47 +00:00
nixos-hardware.url = "github:nixos/nixos-hardware";
2023-07-17 20:40:52 +00:00
erpnext.url = "git+https://git.pub.solar/axeman/erpnext-nix?ref=main";
2024-01-06 09:46:10 +00:00
erpnext.inputs.nixpkgs.follows = "nixpkgs";
2023-07-17 20:40:52 +00:00
erpnext.inputs.agenix.follows = "agenix";
2022-11-20 22:28:23 +00:00
};
outputs = inputs @ {self, ...}:
inputs.flake-parts.lib.mkFlake {inherit inputs;} {
2024-01-06 09:46:10 +00:00
debug = true;
systems = [
"x86_64-linux"
];
2022-11-20 22:28:23 +00:00
2024-01-06 09:46:10 +00:00
imports = [
inputs.nixos-flake.flakeModule
./lib
./modules
./hosts
./users
./overlays
];
2021-07-16 21:01:25 +00:00
perSystem = args @ {
system,
pkgs,
config,
...
}: {
2024-01-06 09:46:10 +00:00
_module.args = {
inherit inputs;
pkgs = import inputs.nixpkgs {
inherit system;
overlays = [
inputs.agenix.overlays.default
2023-07-17 20:40:52 +00:00
];
};
unstable = import inputs.unstable {inherit system;};
2022-11-20 22:28:23 +00:00
};
2023-03-06 23:48:42 +00:00
2024-01-06 09:46:10 +00:00
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
deploy-rs
drone-cli
2024-01-06 09:46:10 +00:00
nixpkgs-fmt
agenix
cachix
editorconfig-checker
nodePackages.prettier
nvfetcher
shellcheck
shfmt
alejandra
2024-01-06 09:46:10 +00:00
treefmt
nixos-generators
];
2021-04-22 03:44:15 +00:00
};
2022-11-20 22:28:23 +00:00
};
2021-07-16 21:01:25 +00:00
2024-01-06 09:46:10 +00:00
flake = {
2024-01-08 22:53:06 +00:00
deploy.nodes = self.lib.deploy.mkDeployNodes self.nixosConfigurations {
2024-01-06 09:46:10 +00:00
pioneer-momo-koeln = {
hostname = "80.244.242.4";
sshUser = "barkeeper";
};
2023-03-06 23:48:42 +00:00
};
};
};
2019-12-03 05:18:30 +00:00
}