Skip to content

Commit

Permalink
Move macbook config to hosts directory and update paths in to point t…
Browse files Browse the repository at this point in the history
…o new location
  • Loading branch information
mettavi committed Jan 6, 2025
1 parent a687f54 commit 7073efb
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 17 deletions.
6 changes: 3 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@
inherit inputs system nixpkgs;
};
modules = [
./nix-darwin/configuration.nix
./hosts/nix-darwin/configuration.nix
# nix-homebrew.darwinModules.nix-homebrew
./nix-darwin/homebrew.nix
./hosts/nix-darwin/homebrew.nix
home-manager.darwinModules.home-manager
{
# `home-manager` config
Expand All @@ -108,7 +108,7 @@
# a user home directory needs to be explicitly set in home-manager
# See https://github.com/nix-community/home-manager/issues/6036 for details
users.users.timotheos.home = "/Users/timotheos";
home-manager.users.timotheos = import ./nix-darwin/home.nix;
home-manager.users.timotheos = import ./hosts/nix-darwin/home.nix;
# Optionally, use home-manager.extraSpecialArgs to pass
# arguments to home-manager modules
home-manager.extraSpecialArgs = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ let

# place custom packages in one directory for ease of reference
# each individual package is further defined in ../mypkgs/default.nx
mypkgs = (pkgs.callPackage ../mypkgs { });
mypkgs = (pkgs.callPackage ../../mypkgs { });

in
{
Expand Down Expand Up @@ -69,8 +69,8 @@ in
};

imports = [
../modules/sops/sops-system.nix
../overlays
../../modules/sops/sops-system.nix
../../overlays
];

# Auto upgrade the nix daemon service.
Expand All @@ -86,8 +86,8 @@ in
nixpkgs.overlays = [
(final: prev: {
# install global npm packages that are not available in nixpkgs repo
npmGlobals = final.callPackage ../modules/npm_globals/node-packages-v18.nix {
nodeEnv = final.callPackage ../modules/npm_globals/node-env.nix {
npmGlobals = final.callPackage ../../modules/npm_globals/node-packages-v18.nix {
nodeEnv = final.callPackage ../../modules/npm_globals/node-env.nix {
libtool = if final.stdenv.isDarwin then final.darwin.cctools else null;
};
};
Expand All @@ -100,7 +100,9 @@ in
name = "timotheos";
home = "/Users/${name}";
# authorize remote login to host using personal ssh key
openssh.authorizedKeys.keys = [ (builtins.readFile ../modules/secrets/timotheos/keys/id_ed25519.pub) ];
openssh.authorizedKeys.keys = [
(builtins.readFile ../../modules/secrets/timotheos/keys/id_ed25519.pub)
];
};

# Set Git commit hash for darwin-version.
Expand Down
16 changes: 8 additions & 8 deletions nix-darwin/home.nix → hosts/nix-darwin/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ in

imports = [
# sops config for home
../modules/sops/sops-home.nix
../../modules/sops/sops-home.nix
# packages
../modules/yazi.nix
../../modules/yazi.nix
];

######## INSTALL SERVICES #########
Expand Down Expand Up @@ -89,7 +89,7 @@ in
baseIndex = 1;
enable = true;
escapeTime = 10;
extraConfig = (builtins.readFile ../modules/tmux/.config/tmux/tmux.conf);
extraConfig = (builtins.readFile ../../modules/tmux/.config/tmux/tmux.conf);
historyLimit = 50000;
keyMode = "vi";
mouse = true;
Expand Down Expand Up @@ -168,16 +168,16 @@ in
];
};
autosuggestion.enable = true;
completionInit = (builtins.readFile ../modules/zsh/.config/zsh/.zsh_completions);
completionInit = (builtins.readFile ../../modules/zsh/.config/zsh/.zsh_completions);
dotDir = ".config/zsh";
envExtra = (builtins.readFile ../modules/zsh/.config/zsh/.zshenv);
envExtra = (builtins.readFile ../../modules/zsh/.config/zsh/.zshenv);
history = {
path = "$ZDOTDIR/.zsh_history";
save = 100000;
size = 100000;
};
initExtraFirst = (builtins.readFile ../modules/zsh/.config/zsh/.zshrc_top);
initExtra = (builtins.readFile ../modules/zsh/.config/zsh/.zshrc);
initExtraFirst = (builtins.readFile ../../modules/zsh/.config/zsh/.zshrc_top);
initExtra = (builtins.readFile ../../modules/zsh/.config/zsh/.zshrc);
sessionVariables = {
# alias for thefuck command
TF_ALIAS = "oh";
Expand Down Expand Up @@ -215,7 +215,7 @@ in
# enable management of xdg base directories
enable = true;
configFile = {
"zsh/.zsh_aliases".source = ../modules/zsh/.config/zsh/.zsh_aliases;
"zsh/.zsh_aliases".source = ../../modules/zsh/.config/zsh/.zsh_aliases;
};
};
# link without copying to nix store (manage externally) - must use absolute paths
Expand Down
File renamed without changes.

0 comments on commit 7073efb

Please sign in to comment.