diff --git a/flake.nix b/flake.nix index 1552b67..519698a 100644 --- a/flake.nix +++ b/flake.nix @@ -49,31 +49,28 @@ services.nix-daemon.enable = true; nixpkgs = { + config.allpwUnfree = true; - overlays = - let - versionOf = input: input.rev; - in - with inputs; [ - (final: prev: { - emacs-mac = (prev.emacs.override { - srcRepo = true; - nativeComp = true; - withSQLite3 = true; - withNS = true; - }).overrideAttrs (o: rec { - version = "29.0.50"; - src = inputs.emacs-src; - patches = [ - ./patches/fix-window-role.patch - ./patches/my-no-titlebar.patch - ./patches/system-appearance.patch - ]; + overlays = with inputs; [ + (final: prev: { + emacs-mac = (prev.emacs.override { + srcRepo = true; + nativeComp = true; + withSQLite3 = true; + withNS = true; + }).overrideAttrs (o: rec { + version = "29.0.50"; + src = inputs.emacs-src; - }); - }) - ]; + patches = [ + ./patches/fix-window-role.patch + ./patches/my-no-titlebar.patch + ./patches/system-appearance.patch + ]; + }); + }) + ]; }; }) ]; diff --git a/modules/home.nix b/modules/home.nix index fe3c056..e1a9e0f 100644 --- a/modules/home.nix +++ b/modules/home.nix @@ -3,87 +3,103 @@ # Can probably be removed when this is resolved: # https://github.com/nix-community/home-manager/issues/1341 home.activation = { - 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 - ''; + 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.packages = with pkgs; [ ((emacsPackagesFor emacs-mac).emacsWithPackages - (epkgs: [ - epkgs.vterm - epkgs.pdf-tools + (epkgs: with epkgs; [ + vterm + pdf-tools + ])) + (aspellWithDicts + (dpkgs: with dpkgs; [ + en + en-computers + en-science ])) - sqlite - htop - (aspellWithDicts (ds: with ds; [ en en-computers en-science ])) bat fd - fzf ffmpeg + fzf + htop + nixpkgs-fmt ripgrep rnix-lsp - nixpkgs-fmt + sqlite tree wget ]; - programs.direnv.enable = true; - programs.direnv.nix-direnv.enable = true; - + # Somehow related to: https://github.com/NixOS/nixpkgs/issues/1000 home.file.".aspell.conf".text = "data-dir ${pkgs.aspell}/lib/aspell"; - programs.fzf = { - enable = true; - enableFishIntegration = true; - }; + programs = { - programs.fish = { - enable = true; + direnv = { + enable = true; + nix-direnv.enable = true; + }; - functions = { - track_directories = { - description = "For directory tracking in emacs vterm"; - onEvent = "fish_postexec"; - body = "printf \'\\e]51;A\'(pwd)\'\\e\\\\\'"; + fzf = { + enable = true; + enableFishIntegration = true; + }; + + fish = { + enable = true; + + functions = { + track_directories = { + description = "For directory tracking in emacs vterm"; + onEvent = "fish_postexec"; + body = "printf \'\\e]51;A\'(pwd)\'\\e\\\\\'"; + }; + }; + + shellInit = '' + track_directories + ''; + }; + + starship = { + enable = true; + settings = { + character = { + success_symbol = "[λ](bold green)"; + error_symbol = "[λ](bold red)"; + }; }; }; - shellInit = '' - track_directories - ''; - }; - - programs.starship = { - enable = true; - settings = { - character = { - success_symbol = "[λ](bold green)"; - error_symbol = "[λ](bold red)"; - }; + git = { + enable = true; + userName = "larstvei"; + userEmail = "larstvei@ifi.uio.no"; + ignores = [ ".dir-locals.el" ".envrc" ".DS_Store" ]; }; - }; - programs.git = { - enable = true; - userName = "larstvei"; - userEmail = "larstvei@ifi.uio.no"; - ignores = [ ".dir-locals.el" ".envrc" ".DS_Store" ]; + # Let Home Manager install and manage itself. + home-manager.enable = true; }; # This value determines the Home Manager release that your @@ -95,7 +111,4 @@ # the Home Manager release notes for a list of state version # changes in each release. home.stateVersion = "22.05"; - - # Let Home Manager install and manage itself. - programs.home-manager.enable = true; }