Refactoring

This commit is contained in:
larstvei 2022-09-19 16:23:37 +02:00
parent ce6ce0ae70
commit c43ca98179
2 changed files with 93 additions and 83 deletions

View File

@ -49,12 +49,10 @@
services.nix-daemon.enable = true; services.nix-daemon.enable = true;
nixpkgs = { nixpkgs = {
config.allpwUnfree = true; config.allpwUnfree = true;
overlays =
let overlays = with inputs; [
versionOf = input: input.rev;
in
with inputs; [
(final: prev: { (final: prev: {
emacs-mac = (prev.emacs.override { emacs-mac = (prev.emacs.override {
srcRepo = true; srcRepo = true;
@ -70,7 +68,6 @@
./patches/my-no-titlebar.patch ./patches/my-no-titlebar.patch
./patches/system-appearance.patch ./patches/system-appearance.patch
]; ];
}); });
}) })
]; ];

View File

@ -3,13 +3,15 @@
# Can probably be removed when this is resolved: # Can probably be removed when this is resolved:
# https://github.com/nix-community/home-manager/issues/1341 # https://github.com/nix-community/home-manager/issues/1341
home.activation = { home.activation = {
copyApplications = let copyApplications =
let
apps = pkgs.buildEnv { apps = pkgs.buildEnv {
name = "home-manager-applications"; name = "home-manager-applications";
paths = config.home.packages; paths = config.home.packages;
pathsToLink = "/Applications"; pathsToLink = "/Applications";
}; };
in lib.hm.dag.entryAfter [ "writeBoundary" ] '' in
lib.hm.dag.entryAfter [ "writeBoundary" ] ''
baseDir="$HOME/Applications/Home Manager Apps" baseDir="$HOME/Applications/Home Manager Apps"
if [ -d "$baseDir" ]; then if [ -d "$baseDir" ]; then
rm -rf "$baseDir" rm -rf "$baseDir"
@ -25,35 +27,45 @@
home.packages = with pkgs; [ home.packages = with pkgs; [
((emacsPackagesFor emacs-mac).emacsWithPackages ((emacsPackagesFor emacs-mac).emacsWithPackages
(epkgs: [ (epkgs: with epkgs; [
epkgs.vterm vterm
epkgs.pdf-tools pdf-tools
]))
(aspellWithDicts
(dpkgs: with dpkgs; [
en
en-computers
en-science
])) ]))
sqlite
htop
(aspellWithDicts (ds: with ds; [ en en-computers en-science ]))
bat bat
fd fd
fzf
ffmpeg ffmpeg
fzf
htop
nixpkgs-fmt
ripgrep ripgrep
rnix-lsp rnix-lsp
nixpkgs-fmt sqlite
tree tree
wget wget
]; ];
programs.direnv.enable = true; # Somehow related to: https://github.com/NixOS/nixpkgs/issues/1000
programs.direnv.nix-direnv.enable = true;
home.file.".aspell.conf".text = "data-dir ${pkgs.aspell}/lib/aspell"; home.file.".aspell.conf".text = "data-dir ${pkgs.aspell}/lib/aspell";
programs.fzf = { programs = {
direnv = {
enable = true;
nix-direnv.enable = true;
};
fzf = {
enable = true; enable = true;
enableFishIntegration = true; enableFishIntegration = true;
}; };
programs.fish = { fish = {
enable = true; enable = true;
functions = { functions = {
@ -69,7 +81,7 @@
''; '';
}; };
programs.starship = { starship = {
enable = true; enable = true;
settings = { settings = {
character = { character = {
@ -79,13 +91,17 @@
}; };
}; };
programs.git = { git = {
enable = true; enable = true;
userName = "larstvei"; userName = "larstvei";
userEmail = "larstvei@ifi.uio.no"; userEmail = "larstvei@ifi.uio.no";
ignores = [ ".dir-locals.el" ".envrc" ".DS_Store" ]; 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 # This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage # configuration is compatible with. This helps avoid breakage
# when a new Home Manager release introduces backwards # when a new Home Manager release introduces backwards
@ -95,7 +111,4 @@
# the Home Manager release notes for a list of state version # the Home Manager release notes for a list of state version
# changes in each release. # changes in each release.
home.stateVersion = "22.05"; home.stateVersion = "22.05";
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
} }