os/flake.nix

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

126 lines
3.2 KiB
Nix
Raw Normal View History

2019-12-03 05:18:30 +00:00
{
2023-11-11 00:06:12 +00:00
description = "pub.solar NixOS flake";
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
2023-12-18 21:39:35 +00:00
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
2023-11-11 00:06:12 +00:00
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
flake-compat.url = "github:edolstra/flake-compat";
flake-compat.flake = false;
2022-11-20 22:28:23 +00:00
2023-11-11 00:06:12 +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-12-18 21:39:35 +00:00
home-manager.url = "github:nix-community/home-manager/release-23.11";
2023-11-11 00:06:12 +00:00
home-manager.inputs.nixpkgs.follows = "nixpkgs";
2022-11-20 22:28:23 +00:00
2023-11-11 00:06:12 +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-11-11 00:06:12 +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-11-11 00:06:12 +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";
2023-11-11 00:06:12 +00:00
master.url = "github:nixos/nixpkgs/master";
2022-08-21 21:21:15 +00:00
# hensoko additions
musnix.url = "github:musnix/musnix";
2023-11-11 00:06:12 +00:00
musnix.inputs.nixpkgs.follows = "nixpkgs";
2022-08-21 22:53:04 +00:00
2023-11-11 20:17:58 +00:00
nixmodules-hensoko.url = "git+ssh://gitea@git.pub.solar/hensoko/nix-modules.git?ref=main";
2023-12-18 21:39:35 +00:00
nixos-config.url = "git+ssh://gitea@git.pub.solar/hensoko/nixos-config.git?ref=feature/work-on-home-assistant";
2022-11-20 22:28:23 +00:00
};
2023-11-11 00:06:12 +00:00
outputs = inputs@{ self, ... }:
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
2023-11-11 00:06:12 +00:00
imports = [
inputs.nixos-flake.flakeModule
./lib
2023-12-18 21:39:35 +00:00
./overlays
2023-11-11 00:06:12 +00:00
./modules
./hosts
./users
];
2023-11-11 00:06:12 +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-11-11 00:06:12 +00:00
unstable = import inputs.unstable { inherit system; };
master = import inputs.master { inherit system; };
};
2022-11-20 22:28:23 +00:00
2023-11-11 00:06:12 +00:00
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
deploy-rs
nixpkgs-fmt
agenix
cachix
editorconfig-checker
nix
nodePackages.prettier
nvfetcher
shellcheck
shfmt
treefmt
nixos-generators
2022-01-31 16:52:56 +00:00
];
2021-07-16 21:01:25 +00:00
};
2023-11-11 00:06:12 +00:00
};
2021-07-16 21:01:25 +00:00
2023-11-11 00:06:12 +00:00
flake = {
deploy.nodes = self.pub-solar-os.lib.deploy.mkDeployNodes self.nixosConfigurations {
2022-08-21 22:53:04 +00:00
companion = {
2023-11-11 00:06:12 +00:00
sshUser = "iot";
2023-02-25 13:45:21 +00:00
};
cox = {
2023-11-11 00:06:12 +00:00
sshUser = "iot";
2023-02-25 13:45:21 +00:00
};
falcone = {
2023-11-11 00:06:12 +00:00
sshUser = "iot";
2023-02-25 13:45:21 +00:00
};
giggles = {
2023-11-11 00:06:12 +00:00
sshUser = "iot";
2023-02-25 13:45:21 +00:00
};
2023-12-18 21:39:35 +00:00
cube = {
sshUser = "iot";
};
chonk = {
sshUser = "iot";
};
2022-08-21 22:53:04 +00:00
2023-02-25 13:45:21 +00:00
norman = {};
2022-08-21 22:53:04 +00:00
2023-02-25 13:45:21 +00:00
harrison = {
2023-11-11 00:06:12 +00:00
sshUser = "iot";
2023-02-25 13:45:21 +00:00
};
2022-08-21 22:53:04 +00:00
2023-02-25 13:45:21 +00:00
surfplace = {
2023-11-11 00:06:12 +00:00
sshUser = "iot";
2022-08-21 22:53:04 +00:00
};
};
2023-02-25 13:45:21 +00:00
};
};
2019-12-03 05:18:30 +00:00
}