all repos — dotfiles @ 9f2aa547dae45c6183baab3dbe54bae3bed6050b

my *nix dotfiles

nix: setup kvothe
Anirudh Oppiliappan x@icyphox.sh
Thu, 26 Jan 2023 10:17:15 +0200
commit

9f2aa547dae45c6183baab3dbe54bae3bed6050b

parent

2cbf49bedf571e35822a4d2c73d2cb275657cddd

M nix/darwin/home.nixnix/darwin/home.nix

@@ -7,13 +7,20 @@ , ...

}: { - home.stateVersion = "22.05"; + home.stateVersion = "22.11"; home.username = "icy"; + imports = [ ../programs/common.nix ]; + programs.bash = { + shellAliases = { + ls = "ls --color=auto"; + }; + }; + home.packages = with pkgs; [ tmux git

@@ -21,5 +28,8 @@ fzy

ripgrep pass fd + gnupg + docker + pinentry_mac ]; #++ (import ../bin { inherit pkgs host; }); }
M nix/flake.locknix/flake.lock

@@ -173,11 +173,11 @@ }

}, "nixpkgs_2": { "locked": { - "lastModified": 1671722432, - "narHash": "sha256-ojcZUekIQeOZkHHzR81st7qxX99dB1Eaaq6PU5MNeKc=", + "lastModified": 1674459583, + "narHash": "sha256-L0UZl/u2H3HGsrhN+by42c5kNYeKtdmJiPzIRvEVeiM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "652e92b8064949a11bc193b90b74cb727f2a1405", + "rev": "1b1f50645af2a70dc93eae18bfd88d330bfbcf7f", "type": "github" }, "original": {
M nix/flake.nixnix/flake.nix

@@ -61,6 +61,27 @@ };

} ]; }; + + kvothe = darwin.lib.darwinSystem { + system = "aarch64-darwin"; + modules = [ + { + imports = [ ./hosts/kvothe/configuration.nix ]; + _module.args.self = self; + } + home-manager.darwinModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.icy = { + imports = [ ./darwin/home.nix ]; + _module.args.self = self; + _module.args.host = "kvothe"; + _module.args.inputs = inputs; + }; + } + ]; + }; }; nixosConfigurations = {
A nix/hosts/kvothe/configuration.nix

@@ -0,0 +1,29 @@

+{ self, config, pkgs, lib, ... }: + +{ + programs.bash.enable = true; + environment.shells = [ pkgs.bash ]; + + users.users.icy = { + name = "icy"; + home = "/Users/icy"; + }; + + services.nix-daemon.enable = true; + nixpkgs.overlays = with self.overlays; [ + nvim-nightly + prompt + ]; + + system.activationScripts.applications.text = pkgs.lib.mkForce ( + '' + echo "setting up ~/Applications..." >&2 + rm -rf ~/Applications/Nix\ Apps + mkdir -p ~/Applications/Nix\ Apps + for app in $(find ${config.system.build.applications}/Applications -maxdepth 1 -type l); do + src="$(/usr/bin/stat -f%Y "$app")" + cp -r "$src" ~/Applications/Nix\ Apps + done + '' + ); +}
M nix/programs/git.nixnix/programs/git.nix

@@ -18,5 +18,11 @@ commit.verbose = true;

init.defaultBranch = "master"; pull.rebase = "true"; }; + includes = [ + { + "path" = "~/code/upcloud/gitconfig"; + "condition" = "gitdir:~/code/upcloud/"; + } + ]; }; }