refactor
This commit is contained in:
45
flake.nix
Normal file
45
flake.nix
Normal file
@@ -0,0 +1,45 @@
|
||||
{
|
||||
description = "menno's dotfiles";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-25.05";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
opnix.url = "github:brizzbuzz/opnix";
|
||||
};
|
||||
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
opnix,
|
||||
}:
|
||||
let
|
||||
supportedSystems = [ "x86_64-linux" "aarch64-linux" ];
|
||||
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
||||
pkgsFor = system: import nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
in
|
||||
{
|
||||
homeConfigurations = let
|
||||
mkHomeConfig = system: hostname: isServer:
|
||||
home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = pkgsFor system;
|
||||
modules = [ ./home.nix ];
|
||||
extraSpecialArgs = {
|
||||
pkgs = pkgsFor system;
|
||||
inherit opnix isServer hostname;
|
||||
};
|
||||
};
|
||||
in {
|
||||
"mennos-vps" = mkHomeConfig "aarch64-linux" "mennos-vps" true;
|
||||
"mennos-desktop" = mkHomeConfig "x86_64-linux" "mennos-desktop" false;
|
||||
"mennos-laptop" = mkHomeConfig "x86_64-linux" "mennos-laptop" false;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user