nix-config/flake.nix

85 lines
2.6 KiB
Nix
Raw Normal View History

2024-05-15 09:25:27 +00:00
{
description = ''
This i my basic NixOS system configuration. Feel free to reuse anything you find useful.
'';
inputs = {
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
agenix.url = "github:ryantm/agenix";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-23.11";
fh.url = "https://flakehub.com/f/DeterminateSystems/fh/*.tar.gz";
deploy-rs.url = "github:serokell/deploy-rs";
};
2024-05-15 10:06:11 +00:00
outputs = { self, nixpkgs, fh, home-manager, agenix, deploy-rs, ... }@inputs:
let
inherit (self) outputs;
lib = nixpkgs.lib;
systems = [
"aarch64-linux"
"i686-linux"
"x86_64-linux"
"aarch64-darwin"
"x86_64-darwin"
];
in {
overlays = import ./overlays { inherit inputs; };
nixosConfigurations = {
lkk-nix-1 = lib.nixosSystem rec {
specialArgs = { inherit inputs outputs; };
modules = [ ./hosts/lkk-nix-1 agenix.nixosModules.default ];
2024-05-15 09:25:27 +00:00
};
2024-05-15 10:06:11 +00:00
lkk-prod-1 = lib.nixosSystem {
specialArgs = { inherit inputs outputs; };
modules = [ ./hosts/lkk-prod-1 agenix.nixosModules.default ];
};
lkk-prod-2 = lib.nixosSystem {
specialArgs = { inherit inputs outputs; };
modules = [ ./hosts/lkk-prod-2 agenix.nixosModules.default ];
2024-05-15 09:25:27 +00:00
};
};
2024-05-15 10:06:11 +00:00
homeConfigurations = {
# Laptop
"lkk-admin@lkk-nix-1" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages."x86_64-linux";
extraSpecialArgs = {
# pass things to t
};
modules = [ ./home/users/lkk-admin/lkk-nix-1.nix ];
};
2024-05-15 09:25:27 +00:00
};
2024-05-15 10:06:11 +00:00
deploy.nodes.lkk-nix-1 = {
hostname = "lkk-nix-1";
sshUser = "root";
profiles.system = {
user = "root";
path = deploy-rs.lib.x86_64-linux.activate.nixos
self.nixosConfigurations.lkk-nix-1;
};
2024-05-15 09:25:27 +00:00
};
2024-05-15 10:06:11 +00:00
deploy.nodes.lkk-prod-1 = {
hostname = "lkk-prod-1";
sshUser = "root";
profiles.system = {
user = "root";
path = deploy-rs.lib.x86_64-linux.activate.nixos
self.nixosConfigurations.lkk-prod-1;
};
2024-05-15 09:25:27 +00:00
};
2024-05-15 10:06:11 +00:00
deploy.nodes.lkk-prod-2 = {
hostname = "lkk-prod-2";
sshUser = "root";
profiles.system = {
user = "root";
path = deploy-rs.lib.x86_64-linux.activate.nixos
self.nixosConfigurations.lkk-prod-2;
};
2024-05-15 09:25:27 +00:00
};
2024-05-15 10:06:11 +00:00
deploy.remoteBuild = true;
2024-05-15 09:25:27 +00:00
};
}