host mac
This commit is contained in:
@@ -12,6 +12,10 @@ in
|
||||
systems = [ system ];
|
||||
flake = {
|
||||
lib = {
|
||||
commonOverlays = mkpkgs: inputs: [
|
||||
(import ../config/overlay.nix { inherit mkpkgs inputs; })
|
||||
inputs.doom-emacs.overlays.default
|
||||
];
|
||||
commonModules = name: [
|
||||
../hosts/${name}/configuration.nix
|
||||
inputs.nur.modules.nixos.default
|
||||
@@ -19,10 +23,7 @@ in
|
||||
inputs.stylix.nixosModules.stylix
|
||||
inputs.nixtendo-switch.nixosModules.nixtendo-switch
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
(import ../config/overlay.nix { inherit mkpkgs inputs; })
|
||||
inputs.doom-emacs.overlays.default
|
||||
];
|
||||
nixpkgs.overlays = inputs.self.lib.commonOverlays mkpkgs inputs;
|
||||
}
|
||||
{
|
||||
nix.registry = {
|
||||
@@ -44,6 +45,41 @@ in
|
||||
outputs = inputs.self;
|
||||
};
|
||||
};
|
||||
createHomeConfig =
|
||||
{
|
||||
name,
|
||||
system,
|
||||
extraModules ? [ ],
|
||||
extraSpecialArgs ? { },
|
||||
}:
|
||||
let
|
||||
pkgs = import inputs.nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
overlays = inputs.self.lib.commonOverlays mkpkgs inputs;
|
||||
};
|
||||
in
|
||||
inputs.home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
modules = [
|
||||
../modules/home-manager.nix
|
||||
../config/home-manager.nix
|
||||
../hosts/${name}/home.nix
|
||||
{
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
programs.home-manager.enable = true;
|
||||
}
|
||||
]
|
||||
++ extraModules;
|
||||
extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
outputs = inputs.self;
|
||||
osConfig = null;
|
||||
preferredShell = "zsh";
|
||||
userEmail = "danilo.reyes.251@proton.me";
|
||||
}
|
||||
// extraSpecialArgs;
|
||||
};
|
||||
langList =
|
||||
builtins.readDir ../modules/dev
|
||||
|> builtins.attrNames
|
||||
@@ -301,11 +337,7 @@ in
|
||||
inherit osCfg enabledByDefault;
|
||||
};
|
||||
hmShellType =
|
||||
config: osConfig:
|
||||
if osConfig == null then
|
||||
if config.programs.bash.enable then "bash" else "zsh"
|
||||
else
|
||||
osConfig.my.shell.type;
|
||||
osConfig: preferredShell: if osConfig == null then preferredShell else osConfig.my.shell.type;
|
||||
hmOnlyUser =
|
||||
config: osConfig: user:
|
||||
osConfig != null && config.home.username == user;
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
{ inputs, ... }:
|
||||
{
|
||||
flake.nixosConfigurations = {
|
||||
workstation = inputs.self.lib.createConfig "workstation" inputs.nixpkgs;
|
||||
miniserver = inputs.self.lib.createConfig "miniserver" inputs.nixpkgs-small;
|
||||
server = inputs.self.lib.createConfig "server" inputs.nixpkgs-small;
|
||||
galaxy = inputs.self.lib.createConfig "galaxy" inputs.nixpkgs-small;
|
||||
emacs = inputs.self.lib.createConfig "emacs" inputs.nixpkgs;
|
||||
vps = inputs.self.lib.createConfig "vps" inputs.nixpkgs-small;
|
||||
flake = {
|
||||
nixosConfigurations = {
|
||||
workstation = inputs.self.lib.createConfig "workstation" inputs.nixpkgs;
|
||||
miniserver = inputs.self.lib.createConfig "miniserver" inputs.nixpkgs-small;
|
||||
server = inputs.self.lib.createConfig "server" inputs.nixpkgs-small;
|
||||
galaxy = inputs.self.lib.createConfig "galaxy" inputs.nixpkgs-small;
|
||||
emacs = inputs.self.lib.createConfig "emacs" inputs.nixpkgs;
|
||||
vps = inputs.self.lib.createConfig "vps" inputs.nixpkgs-small;
|
||||
};
|
||||
homeConfigurations.mac = inputs.self.lib.createHomeConfig {
|
||||
name = "mac";
|
||||
system = "aarch64-darwin";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user