refactor(nix): Preparing setup for other n*x systems

This commit is contained in:
Ahmad Ansori Palembani 2024-10-16 07:54:18 +07:00
parent 767ba9ef03
commit 6a5c04a1e4
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6
6 changed files with 390 additions and 3 deletions

View file

@ -3,17 +3,24 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-24.05-darwin";
nix-darwin = {
url = "github:LnL7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs";
};
system-manager = {
url = "github:numtide/system-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs@{ self, nix-darwin, nixpkgs, home-manager }:
outputs = inputs@{ self, nix-darwin, nixpkgs, home-manager, system-manager }:
let
vars = {
user = "ziro"; # TODO: Make it possible to setup multi-user
@ -22,10 +29,18 @@
in
{
darwinConfigurations = (
import ./darwin {
import ./systems/darwin {
inherit (nixpkgs) lib;
inherit inputs nixpkgs nix-darwin home-manager vars;
}
);
# FIXME: Not yet functional
systemConfigs = (
import ./systems/nix {
inherit (nixpkgs) lib;
inherit inputs nixpkgs system-manager home-manager vars;
}
);
};
}