added authentication for darwin system

This commit is contained in:
lsoriano-mcm
2025-06-28 19:10:41 -05:00
parent d9128fcf06
commit 6fc18f11a5
8 changed files with 102 additions and 99 deletions
+3
View File
@@ -1,4 +1,5 @@
{ {
myConfig = {
general = { general = {
Hostname = "hakase"; Hostname = "hakase";
Username = "lsoriano"; Username = "lsoriano";
@@ -56,6 +57,7 @@
linux = { linux = {
system = "x86_64"; system = "x86_64";
gaming = true;
vpn = { vpn = {
Enable = true; Enable = true;
@@ -81,4 +83,5 @@
]; ];
}; };
}; };
};
} }
+8 -9
View File
@@ -1,7 +1,6 @@
{ {
pkgs, pkgs,
builds, myConfig,
general,
... ...
}: { }: {
imports = [ imports = [
@@ -10,7 +9,6 @@
# List packages installed in system profile. To search by name, run: # List packages installed in system profile. To search by name, run:
# $ nix-env -qaP | grep wget # $ nix-env -qaP | grep wget
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
python313Full
]; ];
# Auto upgrade nix package and the daemon service. # Auto upgrade nix package and the daemon service.
@@ -20,7 +18,7 @@
# Necessary for using flakes on this system. # Necessary for using flakes on this system.
nix.settings.experimental-features = "nix-command flakes"; nix.settings.experimental-features = "nix-command flakes";
nix.settings.trusted-users = builds.builder.trustedUsers; nix.settings.trusted-users = myConfig.builds.builder.trustedUsers;
# Create /etc/zshrc that loads the nix-darwin environment. # Create /etc/zshrc that loads the nix-darwin environment.
programs.zsh.enable = true; # default shell on catalina programs.zsh.enable = true; # default shell on catalina
@@ -31,12 +29,13 @@
# The platform the configuration will be used on. # The platform the configuration will be used on.
nixpkgs.hostPlatform = "aarch64-darwin"; nixpkgs.hostPlatform = "aarch64-darwin";
security.pam.services.sudo_local.touchIdAuth = true;
users.users.${general.Username} = { users.users.${myConfig.general.Username} = {
name = "${general.Username}"; name = "${myConfig.general.Username}";
home = "/Users/${general.Username}"; home = "/Users/${myConfig.general.Username}";
shell = pkgs.${general.terminal.Shell}; shell = pkgs.${myConfig.general.terminal.Shell};
}; };
home-manager.users.${general.Username} = import ../../home/macos.nix; home-manager.users.${myConfig.general.Username} = import ../../home/macos.nix;
} }
+5 -3
View File
@@ -1,4 +1,6 @@
{...}: { {lib, ...}: {
imports = [ imports =
]; [
]
++ [lib.optionals (linux-apps.gamingDesktop == true)];
} }
+2 -2
View File
@@ -1,6 +1,6 @@
{ {
pkgs, pkgs,
general, myConfig,
... ...
}: { }: {
programs.zoxide.enable = true; programs.zoxide.enable = true;
@@ -12,7 +12,7 @@
zoxide init fish | source zoxide init fish | source
''; '';
shellAliases = general.terminal.Aliases; shellAliases = myConfig.general.terminal.Aliases;
plugins = with pkgs.fishPlugins; [ plugins = with pkgs.fishPlugins; [
]; ];
+4 -4
View File
@@ -1,10 +1,10 @@
{general, ...}: { {myConfig, ...}: {
programs.git = { programs.git = {
enable = true; enable = true;
extraConfig = { extraConfig = {
user.name = "${general.gitProfile.User}"; user.name = "${myConfig.general.gitProfile.User}";
user.email = "${general.gitProfile.Email}"; user.email = "${myConfig.general.gitProfile.Email}";
init.defaultBranch = "${general.gitProfile.defaultBranch}"; init.defaultBranch = "${myConfig.general.gitProfile.defaultBranch}";
}; };
}; };
} }
+3 -3
View File
@@ -1,4 +1,4 @@
{general, ...}: { {myConfig, ...}: {
programs.kitty = { programs.kitty = {
enable = true; enable = true;
@@ -7,8 +7,8 @@
confirm_os_window_close = 0; confirm_os_window_close = 0;
window_padding_width = 10; window_padding_width = 10;
font_size = general.terminal.Size; font_size = myConfig.general.terminal.Size;
font_family = general.terminal.Font; font_family = myConfig.general.terminal.Font;
bold_font = "auto"; bold_font = "auto";
italic_font = "auto"; italic_font = "auto";
bold_italic_font = "auto"; bold_italic_font = "auto";
+2 -2
View File
@@ -1,6 +1,6 @@
{ {
pkgs, pkgs,
general, myConfig,
... ...
}: { }: {
home.packages = with pkgs; [ home.packages = with pkgs; [
@@ -13,7 +13,7 @@
programs.zsh = { programs.zsh = {
enableCompletion = false; enableCompletion = false;
syntaxHighlighting.enable = false; syntaxHighlighting.enable = false;
shellAliases = general.terminal.Aliases; shellAliases = myConfig.general.terminal.Aliases;
history.size = 10000; history.size = 10000;
antidote = { antidote = {
enable = true; enable = true;
+3 -4
View File
@@ -1,13 +1,12 @@
{ {
pkgs, pkgs,
general, myConfig,
terminal,
... ...
}: { }: {
users = { users = {
defaultUserShell = pkgs.${terminal.Shell}; defaultUserShell = pkgs.${myConfig.terminal.Shell};
users = { users = {
${general.Username} = { ${myConfig.general.Username} = {
isNormalUser = true; isNormalUser = true;
extraGroups = ["wheel" "networkmanager" "input"]; extraGroups = ["wheel" "networkmanager" "input"];
initialHashedPassword = "$6$19ss/QojER5kh20A$4VnZASq0CN4LLKSUvFfGzXsvEPprRa96u7c5GkSPWdKEuZp7aQQ5EHmZ5nsmKYlWu10gXKL.xHBBG2y33IbW01"; initialHashedPassword = "$6$19ss/QojER5kh20A$4VnZASq0CN4LLKSUvFfGzXsvEPprRa96u7c5GkSPWdKEuZp7aQQ5EHmZ5nsmKYlWu10gXKL.xHBBG2y33IbW01";