Add home-manager and fix worf
This commit is contained in:
@@ -1,12 +1,21 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
# List packages installed in system profile. To search by name, run:
|
||||
# $ nix-env -qaP | grep wget
|
||||
# Many settings should be handled by home manager. System-wide settings are however managed here.
|
||||
|
||||
# System packages for all users
|
||||
environment.systemPackages = [
|
||||
pkgs.neovim
|
||||
pkgs.iterm2
|
||||
pkgs.ripgrep
|
||||
pkgs.wget
|
||||
];
|
||||
|
||||
users.users.felixalb = {
|
||||
home = "/Users/felixalb";
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
programs.zsh.enable = true;
|
||||
system.activationScripts.postActivation.text = ''sudo chsh -s ${pkgs.zsh}/bin/zsh''; # Since it's not possible to declare default shell, run this command after build
|
||||
|
||||
# Auto upgrade nix package and the daemon service.
|
||||
services.nix-daemon.enable = true;
|
||||
nix.package = pkgs.nix;
|
||||
|
||||
50
hosts/worf/home.nix
Normal file
50
hosts/worf/home.nix
Normal file
@@ -0,0 +1,50 @@
|
||||
{ pkgs
|
||||
, lib
|
||||
, inputs
|
||||
, config
|
||||
, ...
|
||||
}: {
|
||||
|
||||
|
||||
home.packages = with pkgs; [
|
||||
iterm2
|
||||
#element-desktop
|
||||
exa
|
||||
];
|
||||
|
||||
programs = {
|
||||
zsh = {
|
||||
enable = true;
|
||||
enableAutosuggestions = true;
|
||||
enableSyntaxHighlighting = true;
|
||||
history.size = 10000;
|
||||
};
|
||||
};
|
||||
|
||||
# symlinks don't work with finder + spotlight, copy them instead
|
||||
disabledModules = [ "targets/darwin/linkapps.nix" ];
|
||||
home.activation = lib.mkIf pkgs.stdenv.isDarwin {
|
||||
copyApplications =
|
||||
let
|
||||
apps = pkgs.buildEnv {
|
||||
name = "home-manager-applications";
|
||||
paths = config.home.packages;
|
||||
pathsToLink = "/Applications";
|
||||
};
|
||||
in
|
||||
lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
baseDir="$HOME/Applications/Home Manager Apps"
|
||||
if [ -d "$baseDir" ]; then
|
||||
rm -rf "$baseDir"
|
||||
fi
|
||||
mkdir -p "$baseDir"
|
||||
for appFile in ${apps}/Applications/*; do
|
||||
target="$baseDir/$(basename "$appFile")"
|
||||
$DRY_RUN_CMD cp ''${VERBOSE_ARG:+-v} -fHRL "$appFile" "$baseDir"
|
||||
$DRY_RUN_CMD chmod ''${VERBOSE_ARG:+-v} -R +w "$target"
|
||||
done
|
||||
'';
|
||||
};
|
||||
|
||||
home.stateVersion = "23.05";
|
||||
}
|
||||
Reference in New Issue
Block a user