Skip to content

Commit

Permalink
refactor(darwin): Achieve parity with nixos config
Browse files Browse the repository at this point in the history
Move `users.users` config from `darwin/home-manager` to `hosts/darwin`
  • Loading branch information
AVGVSTVS96 committed Nov 11, 2024
1 parent af1ceb8 commit ebe0a63
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 28 deletions.
8 changes: 8 additions & 0 deletions hosts/darwin/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ pkgs, variables, ... }:

let
inherit (variables) userName;
hostName = variables.hostName.darwin;
localHostName = hostName;
in
Expand All @@ -11,6 +12,13 @@ in
../../modules/shared
];

users.users.${userName} = {
name = "${userName}";
home = "/Users/${userName}";
isHidden = false;
shell = pkgs.zsh;
};

# Auto upgrade nix package and the daemon service.
services.nix-daemon.enable = true;

Expand Down
28 changes: 0 additions & 28 deletions modules/darwin/home-manager.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,6 @@ in
{
imports = [ ./dock ];

# TODO:
# Consider moving this to hosts/darwin/default.nix
# Look into diffences in options between darwin and nixos users.users
users.users.${userName} = {
name = "${userName}";
home = "/Users/${userName}";
isHidden = false;
shell = pkgs.zsh;
};

homebrew = {
enable = true;
casks = pkgs.callPackage ./casks.nix { };
# onActivation.cleanup = "uninstall";

# These app IDs are from using the mas CLI app
# $ nix shell nixpkgs#mas
# $ mas search <app name>
#
# If you have previously added these apps to your Mac App Store profile (but not installed them on this system),
# you may receive an error message "Redownload Unavailable with This Apple ID".
# This message is safe to ignore. (https://github.com/dustinlyons/nixos-config/issues/83)
# masApps = {
# "1password" = 1333542190;
# "wireguard" = 1451685025;
# };
};

home-manager = {
extraSpecialArgs = { inherit variables inputs; };
useGlobalPkgs = true;
Expand Down

0 comments on commit ebe0a63

Please sign in to comment.