From 7318af2f592707118577bfd3c0d145f5565c826a Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Sun, 14 Apr 2024 12:18:09 +0200 Subject: [PATCH] [nix] Try out `self` --- nix/flake.nix | 2 +- nix/hosts/alymac/default.nix | 4 ++-- nix/hosts/alymac/nvim.nix | 4 ++-- nix/hosts/alymac/zsh.nix | 5 +++-- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/nix/flake.nix b/nix/flake.nix index c99e41d..504122d 100644 --- a/nix/flake.nix +++ b/nix/flake.nix @@ -20,7 +20,7 @@ outputs = { self, nixpkgs, home-manager, dotfiles, darwin }: { darwinConfigurations."alymac" = darwin.lib.darwinSystem { system = "x86_64-darwin"; - specialArgs = { inherit dotfiles; }; + specialArgs = { inherit self; inherit dotfiles; }; modules = [ home-manager.darwinModules.home-manager ./hosts/alymac/default.nix diff --git a/nix/hosts/alymac/default.nix b/nix/hosts/alymac/default.nix index c6e3479..4543cfd 100644 --- a/nix/hosts/alymac/default.nix +++ b/nix/hosts/alymac/default.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, dotfiles, ... }: +{ self, pkgs, lib, dotfiles, ... }: with lib; let @@ -178,7 +178,7 @@ in home-manager = { useGlobalPkgs = true; useUserPackages = true; - extraSpecialArgs = { inherit dotfiles; }; + extraSpecialArgs = { inherit self; inherit dotfiles; }; users.alyxia = { pkgs, ... }: { # Defined further above, generates a list of files to import. imports = validFiles ./.; diff --git a/nix/hosts/alymac/nvim.nix b/nix/hosts/alymac/nvim.nix index 5b07d7f..efbb5b5 100644 --- a/nix/hosts/alymac/nvim.nix +++ b/nix/hosts/alymac/nvim.nix @@ -1,11 +1,11 @@ -{ pkgs, dotfiles, ... }: +{ self, pkgs, ... }: { programs.neovim = { enable = true; package = pkgs.neovim-unwrapped; - extraConfig = "source ${dotfiles}/nvim/init.vim"; + extraConfig = ''source ~/.dotfiles/nvim/init.vim"source ${self}/nvim/init.vim''; coc = { enable = true; diff --git a/nix/hosts/alymac/zsh.nix b/nix/hosts/alymac/zsh.nix index 1a6343f..702bb2a 100644 --- a/nix/hosts/alymac/zsh.nix +++ b/nix/hosts/alymac/zsh.nix @@ -1,11 +1,12 @@ -{ dotfiles, ... }: +{ self, ... }: { programs.zsh = { enable = true; initExtra = '' export GPG_TTY=$(tty) - source ${dotfiles}/zsh/zshrc + source ~/.dotfiles/zsh/zshrc #source ${self}/zsh/zshrc + source "$HOME/.cargo/env" [[ -d "$HOME/.local/bin" ]] || mkdir "$HOME/.local/bin"