[nix] Load the zsh configs

This commit is contained in:
Alyxia Sother 2023-06-09 12:47:29 +02:00
parent f4619def12
commit 1b8db91b79
No known key found for this signature in database
GPG Key ID: 01E16C4E775A37E4
3 changed files with 44 additions and 12 deletions

View File

@ -20,6 +20,24 @@
"type": "github"
}
},
"dotfiles": {
"flake": false,
"locked": {
"lastModified": 1686302382,
"narHash": "sha256-BKJnBMPuFylshzuY8EQoyP6xuAGcxCauJspl1cVkg/A=",
"ref": "refs/heads/master",
"rev": "4ea89899caf8a0fd87cdfdc4601f7e79fc666c37",
"revCount": 360,
"submodules": true,
"type": "git",
"url": "https://github.com/keanuplayz/dotfiles"
},
"original": {
"submodules": true,
"type": "git",
"url": "https://github.com/keanuplayz/dotfiles"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@ -27,11 +45,11 @@
]
},
"locked": {
"lastModified": 1686265152,
"narHash": "sha256-ArdPMx2G2rWlnGlqfIV+efTKXcN7F3W0/b5XKYq7n8E=",
"lastModified": 1686305101,
"narHash": "sha256-xCgeI+uTKay3Ab3tMdP9m9flIJbFkRMKwRAmg5PQhJQ=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "2bbfc3a78afb4ea60345a5660d8d4173da66c884",
"rev": "1e5d741ea3f3290d7ac06a02ded24bfdc7aadb37",
"type": "github"
},
"original": {
@ -42,11 +60,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1686087926,
"narHash": "sha256-mXzfJpCCT7Vup2sC3rZPB/AbEW+uBjwT027XWm7R6rA=",
"lastModified": 1686265002,
"narHash": "sha256-JcRprVevSl5JNCp2oHy8fd3zvTsnuQgVCay0/sP/1GE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9ea6dd599d2781168e36486745b5d17e826ab015",
"rev": "9e447f1c786f9d1375c3c8b2bff2c9400c63a34e",
"type": "github"
},
"original": {
@ -59,6 +77,7 @@
"root": {
"inputs": {
"darwin": "darwin",
"dotfiles": "dotfiles",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
}

View File

@ -8,12 +8,19 @@
# nix will normally use the nixpkgs defined in home-managers inputs, we only want one copy of nixpkgs though
darwin.url = "github:lnl7/nix-darwin";
darwin.inputs.nixpkgs.follows = "nixpkgs"; # ...
dotfiles = {
url = "https://github.com/keanuplayz/dotfiles";
type = "git";
submodules = true;
flake = false;
};
};
# add the inputs declared above to the argument attribute set
outputs = { self, nixpkgs, home-manager, darwin }: {
outputs = { self, nixpkgs, home-manager, dotfiles, darwin }: {
darwinConfigurations."alymac" = darwin.lib.darwinSystem {
system = "x86_64-darwin";
specialArgs = { inherit dotfiles; };
modules = [
home-manager.darwinModules.home-manager
./hosts/alymac/default.nix

View File

@ -1,19 +1,17 @@
# hosts/YourHostName/default.nix
{ pkgs, ... }:
{ pkgs, dotfiles, ... }:
{
# Make sure the nix daemon always runs
services.nix-daemon.enable = true;
# Installs a version of nix, that dosen't need "experimental-features = nix-command flakes" in /etc/nix/nix.conf
# services.nix-daemon.package = pkgs.nixFlakes;
users.users.alyxia = {
name = "alyxia";
home = "/Users/alyxia";
};
# if you use zsh (the default on new macOS installations),
# you'll need to enable this so nix-darwin creates a zshrc sourcing needed environment changes
programs.zsh.enable = true;
# bash is enabled by default
# enable the gpg agent by default
programs.gnupg.agent.enable = true;
@ -21,6 +19,14 @@
useGlobalPkgs = true;
useUserPackages = true;
users.alyxia = { pkgs, ... }: {
programs.zsh = {
enable = true;
initExtra = ''
export GPG_TTY=$(tty)
source ${dotfiles}/zsh/zshrc
'';
};
programs.git = {
enable = true;
package = pkgs.gitAndTools.gitFull; # contains git send-email et al