os/flake.nix

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

150 lines
4.6 KiB
Nix
Raw Normal View History

2019-12-03 05:18:30 +00:00
{
description = "teutat3s hosts in nix";
nixConfig.extra-experimental-features = "nix-command flakes";
2022-11-26 15:00:22 +00:00
inputs = {
# Track channels with commits tested and built by hydra
nixos-22-05.url = "github:nixos/nixpkgs/nixos-22.05";
2024-05-27 08:56:46 +00:00
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
2022-11-26 15:00:22 +00:00
flake-compat.url = "github:edolstra/flake-compat";
flake-compat.flake = false;
nix-darwin.url = "github:lnl7/nix-darwin/master";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
2022-11-26 15:00:22 +00:00
2024-05-27 08:56:46 +00:00
home-manager.url = "github:nix-community/home-manager/release-24.05";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
2022-11-26 15:00:22 +00:00
flake-parts.url = "github:hercules-ci/flake-parts";
nixos-flake.url = "github:srid/nixos-flake";
2022-11-26 15:00:22 +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-26 15:00:22 +00:00
agenix.url = "github:ryantm/agenix";
agenix.inputs.nixpkgs.follows = "nixpkgs";
agenix.inputs.darwin.follows = "nix-darwin";
chore: bump flake inputs • Updated input 'agenix': 'github:ryantm/agenix/2994d002dcff5353ca1ac48ec584c7f6589fe447' (2023-04-21) → 'github:ryantm/agenix/daf42cb35b2dc614d1551e37f96406e4c4a2d3e4' (2023-10-08) • Added input 'agenix/home-manager': follows 'home-manager' • Added input 'agenix/home-manager/nixpkgs': follows 'agenix/nixpkgs' • Updated input 'deploy-rs': 'github:serokell/deploy-rs/e3f41832680801d0ee9e2ed33eb63af398b090e9' (2023-09-18) → 'github:serokell/deploy-rs/660180bbbeae7d60dad5a92b30858306945fd427' (2023-11-02) • Updated input 'flake-compat': 'github:edolstra/flake-compat/35bb57c0c8d8b62bbfd284272c928ceb64ddbde9' (2023-01-17) → 'github:edolstra/flake-compat/0f9255e01c2351cc7d116c072cb317785dd33b33' (2023-10-04) • Updated input 'flake-parts': 'github:hercules-ci/flake-parts/f76e870d64779109e41370848074ac4eaa1606ec' (2023-10-29) → 'github:hercules-ci/flake-parts/8c9fa2545007b49a5db5f650ae91f227672c3877' (2023-11-01) • Updated input 'flake-parts/nixpkgs-lib': 'github:NixOS/nixpkgs/f5892ddac112a1e9b3612c39af1b72987ee5783a?dir=lib' (2023-09-29) → 'github:NixOS/nixpkgs/0cbe9f69c234a7700596e943bfae7ef27a31b735?dir=lib' (2023-10-29) • Updated input 'master': 'github:nixos/nixpkgs/8a3054c4f31ffa22ad4cca22a8aa271c59ccc91d' (2023-06-15) → 'github:nixos/nixpkgs/593c11ae9aba7cf5ad3e3915c7f581d09f895f5b' (2023-11-10) • Updated input 'nix-darwin': 'github:lnl7/nix-darwin/afe83cbc2e673b1f08d32dd0f70df599678ff1e7' (2023-10-27) → 'github:lnl7/nix-darwin/c8f385766ba076a096caa794309c40f89894d88a' (2023-11-09) • Updated input 'nixos-22-05': 'github:nixos/nixpkgs/50fc86b75d2744e1ab3837ef74b53f103a9b55a0' (2023-04-27) → 'github:nixos/nixpkgs/380be19fbd2d9079f677978361792cb25e8a3635' (2023-05-31) • Updated input 'nixos-hardware': 'github:nixos/nixos-hardware/793de77d9f83418b428e8ba70d1e42c6507d0d35' (2023-09-03) → 'github:nixos/nixos-hardware/627bc9b88256379578885a7028c9e791c29fb581' (2023-11-05)
2023-11-10 19:00:35 +00:00
agenix.inputs.home-manager.follows = "home-manager";
2022-11-26 15:00:22 +00:00
nix-direnv.url = "github:nix-community/nix-direnv";
nix-direnv.inputs.nixpkgs.follows = "nixpkgs";
nix-direnv.inputs.flake-parts.follows = "flake-parts";
2022-11-26 15:00:22 +00:00
nixos-hardware.url = "github:nixos/nixos-hardware";
lix-module = {
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.91.0.tar.gz";
inputs.nixpkgs.follows = "nixpkgs";
};
2024-06-24 21:00:22 +00:00
invoiceplane-template.url = "git+https://git.pub.solar/teutat3s/invoiceplane-templates.git";
invoiceplane-template.inputs.nixpkgs.follows = "nixpkgs";
invoiceplane-template.inputs.flake-parts.follows = "flake-parts";
2022-11-26 15:00:22 +00:00
# PubSolarOS additions
triton-vmtools.url = "git+https://git.pub.solar/pub-solar/infra-vintage?ref=main&dir=vmtools";
triton-vmtools.inputs.nixpkgs.follows = "nixpkgs";
2022-11-26 15:00:22 +00:00
tritonshell.url = "git+https://git.pub.solar/teutat3s/tritonshell?ref=main";
tritonshell.inputs.nixpkgs.follows = "nixpkgs";
wayland-pipewire-idle-inhibit.url = "github:rafaelrc7/wayland-pipewire-idle-inhibit";
wayland-pipewire-idle-inhibit.inputs.nixpkgs.follows = "nixpkgs";
wayland-pipewire-idle-inhibit.inputs.flake-parts.follows = "flake-parts";
2022-11-26 15:00:22 +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-26 15:00:22 +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,
...
}:
{
_module.args = {
inherit inputs;
pkgs = import inputs.nixpkgs {
inherit system;
overlays = [ inputs.agenix.overlays.default ];
2024-08-19 10:38:46 +00:00
};
2021-07-16 21:01:25 +00:00
unstable = import inputs.unstable { inherit system; };
master = import inputs.master { inherit system; };
2021-07-16 21:01:25 +00:00
};
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
agenix
cachix
deploy-rs
nixd
nixos-generators
nvfetcher
2024-08-19 10:38:46 +00:00
editorconfig-checker
nodePackages.prettier
shellcheck
shfmt
treefmt
];
2024-08-19 10:38:46 +00:00
};
2021-04-22 03:44:15 +00:00
};
flake = {
formatter."x86_64-linux" = inputs.unstable.legacyPackages."x86_64-linux".nixfmt-rfc-style;
2024-02-02 22:25:54 +00:00
deploy.nodes = self.lib.deploy.mkDeployNodes self.nixosConfigurations {
#example = {
# hostname = "example.com:22";
# sshUser = "bartender";
# fastConnect = true;
# profilesOrder = ["system" "direnv"];
# profiles.direnv = {
# user = "bartender";
# path = self.pkgs.x86_64-linux.nixos.deploy-rs.lib.x86_64-linux.activate.home-manager self.homeConfigurationsPortable.x86_64-linux.bartender;
# };
#};
2024-08-19 10:38:46 +00:00
2022-11-26 15:00:22 +00:00
fae = {
hostname = "192.168.13.35";
2022-11-26 15:00:22 +00:00
sshUser = "pub-solar";
};
powder = {
hostname = "80.71.153.194";
sshUser = "root";
profilesOrder = [
"system"
"direnv"
];
profiles.direnv = {
user = "pub-solar";
2023-07-13 15:18:05 +00:00
path = self.pkgs.x86_64-linux.nixos.deploy-rs.lib.x86_64-linux.activate.home-manager self.homeConfigurationsPortable.x86_64-linux.pub-solar;
2024-08-19 10:38:46 +00:00
};
2022-07-08 12:20:00 +00:00
};
2022-01-19 00:13:15 +00:00
};
};
2022-11-26 15:00:22 +00:00
};
2019-12-03 05:18:30 +00:00
}