[nix] Try out `self`

This commit is contained in:
Alyxia Sother 2024-04-14 12:18:09 +02:00
parent 0d22d6ac7a
commit 7318af2f59
No known key found for this signature in database
GPG Key ID: 01E16C4E775A37E4
4 changed files with 8 additions and 7 deletions

View File

@ -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

View File

@ -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 ./.;

View File

@ -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;

View File

@ -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"