this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'main' of github.com:ian-h-chamberlain/dotfiles

+64 -41
+4
.config/Code/User/settings.json
··· 298 298 "cmake.configureOnEdit": false, 299 299 "cmake.showOptionsMovedNotification": false, 300 300 "cmake.skipConfigureIfCachePresent": true, 301 + "cmake.pinnedCommands": [ 302 + "workbench.action.tasks.configureTaskRunner", 303 + "workbench.action.tasks.runTask" 304 + ], 301 305 302 306 "color-highlight.matchRgbWithNoFunction": false, 303 307 "color-highlight.languages": [
+30 -24
.config/flake.nix
··· 51 51 user = "ianchamberlain"; 52 52 # TODO: maybe some kinda nixos flag or something 53 53 }; 54 - # ?? 55 - ichamberlain-dev = { 54 + # Unusual case: 55 + dev-ichamberlain = rec { 56 56 system = "x86_64-linux"; 57 57 user = "ichamberlain"; 58 + homeDirectory = "/Users/${user}"; 58 59 }; 59 60 }; 60 61 ··· 97 98 darwinPackages = mapAttrs (cfg: cfg.pkgs) self.darwinConfigurations; 98 99 99 100 homeConfigurations = lib.mapAttrs' 100 - (host: { system, user }: lib.nameValuePair 101 + (host: hostVars @ { system, user, ... }: lib.nameValuePair 101 102 "${user}@${host}" 102 103 (if isDarwin system then 103 104 # Expose the home configuration built by darwinModules.home-manager: 104 105 self.darwinConfigurations.${host}.config.home-manager.users.${user} 105 106 else 106 107 home-manager.lib.homeManagerConfiguration { 108 + pkgs = nixpkgs.legacyPackages.${system}; 109 + 107 110 modules = [ 108 111 ./home-manager/home.nix 112 + ({ pkgs, ... }: { 113 + nix.package = pkgs.lix; 114 + }) 109 115 ]; 110 116 111 - extraSpecialArgs = { 112 - username = user; 113 - pkgs-unstable = inputs.nixpkgs-unstable.legacyPackages.${system}; 117 + extraSpecialArgs = hostVars // { 118 + unstable = inputs.nixpkgs-unstable.legacyPackages.${system}; 114 119 }; 115 120 })) 116 121 systems; 117 122 118 123 devShell = lib.mapAttrs' 119 124 (_: { system, ... }: 120 - let 121 - pkgs = if isDarwin system then 122 - inputs.nixpkgs-darwin.legacyPackages.${system} 123 - else 124 - inputs.nixpkgs.legacyPackages.${system}; 125 - in 125 + let 126 + pkgs = 127 + if isDarwin system then 128 + inputs.nixpkgs-darwin.legacyPackages.${system} 129 + else 130 + inputs.nixpkgs.legacyPackages.${system}; 131 + in 126 132 lib.nameValuePair 127 - system 128 - (pkgs.mkShell { 129 - # Minimal set of packages needed for bootstrapping dotfiles 130 - packages = with pkgs; [ 131 - cacert 132 - git 133 - git-crypt 134 - git-lfs 135 - gnupg 136 - yadm 137 - ]; 138 - }) 133 + system 134 + (pkgs.mkShell { 135 + # Minimal set of packages needed for bootstrapping dotfiles 136 + packages = with pkgs; [ 137 + cacert 138 + git 139 + git-crypt 140 + git-lfs 141 + gnupg 142 + yadm 143 + ]; 144 + }) 139 145 ) 140 146 systems; 141 147 };
+15 -7
.config/home-manager/home.nix
··· 1 - inputs @ { config, lib, pkgs, ... }: 1 + inputs @ { config 2 + , lib 3 + , pkgs 4 + , user ? "ianchamberlain" 5 + , unstable ? import <nixos-unstable> { } 6 + , ... 7 + }: 2 8 let 3 9 inherit (pkgs) stdenv; 4 10 inherit (config.lib.file) mkOutOfStoreSymlink; 5 - # TODO: proper input should be handled by flake or something 6 - unstable = inputs.unstable or (import <nixos-unstable> { }); 7 11 in 8 12 { 9 13 # These defaults are mainly just for nixOS which I haven't converted to flakes yet 10 14 # so it needs to be deprioritized to avoid conflict with e.g. darwinModules 11 - home.username = lib.mkDefault "ianchamberlain"; 12 - home.homeDirectory = lib.mkDefault "/home/${config.home.username}"; 15 + home.username = lib.mkDefault user; 16 + home.homeDirectory = lib.mkDefault inputs.homeDirectory or "/home/${config.home.user}"; 13 17 14 18 nix.extraOptions = '' 15 19 repl-overlays = ${config.xdg.configHome}/nix/repl-overlays.nix ··· 20 24 home-manager.enable = true; 21 25 22 26 bat.enable = true; 23 - # fd.enable = true; 27 + fd.enable = true; 24 28 fish.enable = true; 25 29 git.enable = true; 26 30 gpg.enable = true; ··· 96 100 nil 97 101 unstable.nixd 98 102 nixpkgs-fmt 103 + python3 99 104 rustup 105 + openssh 100 106 shellcheck 101 107 thefuck 102 108 tree ··· 104 110 tmux.terminfo 105 111 unzip 106 112 yadm 107 - ] ++ lib.optionals stdenv.isDarwin [ 113 + 108 114 # Fish completions + path setup stuff, needed since I'm not letting 109 115 # home-manager do all the shell setup for me. Most notably, this creates 110 116 # ~/.nix-profile/etc/profile.d/nix.fish - don't remove without a replacement! 117 + # 118 + # This may cause trouble on nixOS but I can't remember why... 111 119 config.nix.package 112 120 ]; 113 121
+2 -4
.config/yadm/bootstrap
··· 36 36 } 37 37 38 38 function main() { 39 + cd ~ || exit 1 40 + 39 41 yadm submodule update --init 40 42 41 43 # Include "shared" git config in yadm repo ··· 45 47 yadm enter \ 46 48 ~/.config/yadm/hooks/pre-commit.pyz install \ 47 49 --config ~/.config/yadm/.pre-commit-config.yaml 48 - 49 - # For flakes to work nicely, see flake.nix for details 50 - # TODO: maybe could be done as part of home-manager setup instead... 51 - ln -s "$(yadm rev-parse --git-dir)" ~/.config/.git 52 50 53 51 # Ensure yadm alt SSH config files are set with the right permissions 54 52 chmod go-rw ~/.ssh/*
+1 -1
.config/yadm/utils.sh
··· 88 88 } 89 89 90 90 function is_merging() { 91 - git rev-parse -q --verify MERGE_HEAD 91 + git rev-parse -q --verify MERGE_HEAD &>/dev/null 92 92 }
+5 -5
.gitconfig
··· 77 77 allow = always 78 78 [gui] 79 79 editor = code 80 - [filter "lfs"] 81 - required = true 82 - clean = git-lfs clean -- %f 83 - smudge = git-lfs smudge -- %f 84 - process = git-lfs filter-process 85 80 [advice] 86 81 detachedHead = false 87 82 # NOTE: This has to come last to override other settings, e.g. user.email ··· 92 87 [rebase] 93 88 autoSquash = true 94 89 autoStash = true 90 + [filter "lfs"] 91 + required = true 92 + # Don't configure process filter, my wrapper doesn't work with it 93 + smudge = ~/.local/bin/git-lfs-wrapper smudge -- %f 94 + clean = ~/.local/bin/git-lfs-wrapper clean -- %f
+7
.local/bin/git-lfs-wrapper
··· 1 + #!/bin/bash 2 + 3 + if command -v git-lfs &>/dev/null; then 4 + exec git-lfs "$@" 5 + else 6 + exec cat 7 + fi