Fix darwin

This commit is contained in:
2024-11-25 12:49:15 +01:00
parent 6c67aa8844
commit 4d286272bf
3 changed files with 14 additions and 6 deletions

View File

@@ -13,7 +13,7 @@
}: let }: let
systemFunc = systemFunc =
if darwin if darwin
then inputs.darwin.lib.darwinSystem then inputs.nix-darwin.lib.darwinSystem
else nixpkgs.lib.nixosSystem; else nixpkgs.lib.nixosSystem;
home-manager = home-manager =
if darwin if darwin
@@ -37,16 +37,12 @@ in
({pkgs, ...}: { ({pkgs, ...}: {
networking.hostName = hostname; networking.hostName = hostname;
users.users.root.hashedPassword = builtins.readFile ../password/root;
users.users.${user} = { users.users.${user} = {
home = home =
if darwin if darwin
then "/Users/${user}" then "/Users/${user}"
else "/home/${user}"; else "/home/${user}";
hashedPassword = builtins.readFile ../password/${user};
isNormalUser = true;
extraGroups = ["wheel" "input" "docker" "audio" "mlocate" "libvirtd"];
shell = pkgs.zsh; shell = pkgs.zsh;
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
@@ -57,6 +53,18 @@ in
]; ];
}; };
}) })
(
if (!darwin)
then {
users.users.root.hashedPassword = builtins.readFile ../password/root;
users.users.${user} = {
isNormalUser = true;
hashedPassword = builtins.readFile ../password/${user};
extraGroups = ["wheel" "input" "docker" "audio" "mlocate" "libvirtd"];
};
}
else {}
)
../hosts/${hostname}/hardware-configuration.nix ../hosts/${hostname}/hardware-configuration.nix
home-manager.home-manager home-manager.home-manager

View File

@@ -14,8 +14,8 @@
# Making legacy nix commands consistent as well, awesome! # Making legacy nix commands consistent as well, awesome!
nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry; nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry;
optimise.automatic = true;
settings = { settings = {
auto-optimise-store = true;
warn-dirty = false; warn-dirty = false;
experimental-features = ["nix-command" "flakes"]; experimental-features = ["nix-command" "flakes"];
use-xdg-base-directories = true; use-xdg-base-directories = true;