install nix darwin

This commit is contained in:
willemml 2023-02-04 22:35:55 -08:00
parent 658a9412af
commit 7c43c1c753
Signed by: willemml
GPG key ID: C3DE5DF6198DACBD
4 changed files with 32 additions and 35 deletions

View file

@ -10,7 +10,7 @@
nur.url = "github:nix-community/NUR";
};
outputs = inputs@{ nixpkgs, home-manager, darwin, nur, ... }:
outputs = inputs@{ self, nixpkgs, home-manager, darwin, nur, ... }:
let
system = "aarch64-darwin";
@ -31,32 +31,30 @@
nurpkgs = pkgs;
pkgs = throw "nixpkgs eval";
};
in {
homeConfigurations.willem = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
# Specify your home configuration modules here, for example,
# the path to your home.nix.
modules = [ nur.hmModules.nur ./home ];
# Optionally use extraSpecialArgs
# to pass through arguments to home.nix
extraSpecialArgs = { inherit nurNoPkgs; inputs = { inherit (inputs); }; };
home-manager-config = {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit nurNoPkgs pkgs; inputs = { inherit (inputs); }; };
home-manager.sharedModules = [ nur.hmModules.nur ];
home-manager.users.willem = ./home;
users.users.willem = {
home = "/Users/willem";
isHidden = false;
name = "willem";
shell = pkgs.zshInteractive;
};
};
in {
darwinConfigurations = {
zeus = darwin.lib.darwinSystem {
inherit system;
modules = [
./system/darwin.nix
home-manager.darwinModules.home-manager
home-manager-config
];
};
};
# darwinConfigurations = {
# hostname = darwin.lib.darwinSystem {
# inherit system (inputs);
# modules = [
# ./system
# home-manager.darwinModules.home-manager {
# home-manager.useGlobalPkgs = true;
# home-manager.useUserPackages = true;
# home-manager.users.willem = import ./home;
# extraSpecialArgs = { inherit (inputs) nurNoPkgs; };
# }
# ];
# };
# };
};
}

View file

@ -1,8 +1,6 @@
{ config, pkgs, lib, inputs, ... }:
{ config, pkgs, lib, ... }:
let
inherit (pkgs) stdenv;
inherit (lib) mkIf;
emacsCommand = "emacsclient -c -nw";
in rec {
home = {
@ -24,7 +22,6 @@ in rec {
}
'';
};
homeDirectory = "/Users/willem";
keyboard = {
layout = "us";
variant = "colemak";
@ -37,7 +34,7 @@ in rec {
sessionVariables = rec {
EDITOR = emacsCommand;
VISUAL = emacsCommand;
ORGDIR = "${home.homeDirectory}/Documents/org";
ORGDIR = "~/Documents/org";
UBCDIR = "${ORGDIR}/ubc";
};
stateVersion = "22.11";

View file

@ -1,4 +1,4 @@
{ lib, config, pkgs, ... }:
{ lib, config, inputs, pkgs, ... }:
{
programs = {
@ -183,7 +183,7 @@
e = "emacsclient -c -nw";
em = "emacs -nw";
ew = "emacsclient -c";
hms = "home-manager switch --flake ${config.home.homeDirectory}/.config/dotfiles.nix#willem";
drs = "darwin-rebuild switch --flake ${config.home.homeDirectory}/.config/dotfiles.nix#";
l = "ls -1";
np = "nix-shell -p";
org = "z ${config.home.sessionVariables.ORGDIR}";

View file

@ -1,7 +1,9 @@
{ pkgs, ... }:
{
environment.systemPackages = [ ];
{
services.nix-daemon.enable = true;
nix.package = pkgs.nix;
programs.zsh.enable = true;
}