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"; nur.url = "github:nix-community/NUR";
}; };
outputs = inputs@{ nixpkgs, home-manager, darwin, nur, ... }: outputs = inputs@{ self, nixpkgs, home-manager, darwin, nur, ... }:
let let
system = "aarch64-darwin"; system = "aarch64-darwin";
@ -31,32 +31,30 @@
nurpkgs = pkgs; nurpkgs = pkgs;
pkgs = throw "nixpkgs eval"; pkgs = throw "nixpkgs eval";
}; };
in {
homeConfigurations.willem = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
# Specify your home configuration modules here, for example, home-manager-config = {
# the path to your home.nix. home-manager.useGlobalPkgs = true;
modules = [ nur.hmModules.nur ./home ]; home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit nurNoPkgs pkgs; inputs = { inherit (inputs); }; };
# Optionally use extraSpecialArgs home-manager.sharedModules = [ nur.hmModules.nur ];
# to pass through arguments to home.nix home-manager.users.willem = ./home;
extraSpecialArgs = { inherit nurNoPkgs; inputs = { inherit (inputs); }; }; 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 let
inherit (pkgs) stdenv;
inherit (lib) mkIf;
emacsCommand = "emacsclient -c -nw"; emacsCommand = "emacsclient -c -nw";
in rec { in rec {
home = { home = {
@ -24,7 +22,6 @@ in rec {
} }
''; '';
}; };
homeDirectory = "/Users/willem";
keyboard = { keyboard = {
layout = "us"; layout = "us";
variant = "colemak"; variant = "colemak";
@ -37,7 +34,7 @@ in rec {
sessionVariables = rec { sessionVariables = rec {
EDITOR = emacsCommand; EDITOR = emacsCommand;
VISUAL = emacsCommand; VISUAL = emacsCommand;
ORGDIR = "${home.homeDirectory}/Documents/org"; ORGDIR = "~/Documents/org";
UBCDIR = "${ORGDIR}/ubc"; UBCDIR = "${ORGDIR}/ubc";
}; };
stateVersion = "22.11"; stateVersion = "22.11";

View file

@ -1,4 +1,4 @@
{ lib, config, pkgs, ... }: { lib, config, inputs, pkgs, ... }:
{ {
programs = { programs = {
@ -183,7 +183,7 @@
e = "emacsclient -c -nw"; e = "emacsclient -c -nw";
em = "emacs -nw"; em = "emacs -nw";
ew = "emacsclient -c"; 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"; l = "ls -1";
np = "nix-shell -p"; np = "nix-shell -p";
org = "z ${config.home.sessionVariables.ORGDIR}"; org = "z ${config.home.sessionVariables.ORGDIR}";

View file

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