refactor(tazjin/nixos): pick correct Emacs from a NixOS option

This gives me the ability to override the Emacs per-machine easily.

Change-Id: Id480889c108833b0a11c377a9b1e946900c5aba1
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9166
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
This commit is contained in:
Vincent Ambo 2023-08-29 17:10:11 +03:00 committed by tazjin
parent 804b7fbe73
commit d4c8840c57
2 changed files with 93 additions and 81 deletions

View file

@ -1,5 +1,5 @@
# EXWM and other desktop configuration.
{ depot, lib, pkgs, ... }:
{ config, depot, lib, pkgs, ... }:
{
services = {
@ -29,7 +29,7 @@
windowManager.session = lib.singleton {
name = "exwm";
start = "${depot.users.tazjin.emacs}/bin/tazjins-emacs";
start = "${config.tazjin.emacs}/bin/tazjins-emacs";
};
};
};

View file

@ -1,16 +1,27 @@
# Default configuration settings for physical machines that I use.
{ lib, pkgs, depot, ... }:
{ lib, pkgs, config, depot, ... }:
let
pass-otp = pkgs.pass.withExtensions (e: [ e.pass-otp ]);
in
{
options = with lib; {
tazjin.emacs = mkOption {
type = types.package;
default = depot.users.tazjin.emacs;
description = ''
Derivation with my Emacs package, with configuration included.
'';
};
};
config = {
# Install all the default software.
environment.systemPackages =
# programs from the depot
(with depot; [
users.tazjin.screenLock
users.tazjin.emacs
config.tazjin.emacs
third_party.agenix.cli
third_party.josh
]) ++
@ -25,7 +36,7 @@ in
direnv
dnsutils
electrum
emacs-unstable # emacsclient
config.tazjin.emacs.emacs # emacsclient
exa
fd
file
@ -88,4 +99,5 @@ in
mosh.enable = true;
ssh.startAgent = true;
};
};
}