summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2022-09-02 10:07:50 -0400
committerBen Sima <ben@bsima.me>2022-09-02 10:07:50 -0400
commitf645808a1449a40d71e3cadd0b5b5bac164d5a7f (patch)
treebb1f9477c840ed41fc90e7a86cfb735d543d2ec0
parenta55d3efcaa9b8d2a30b40606dae3e06b37665369 (diff)
lots of updates, idk
-rw-r--r--lib/common.nix13
-rw-r--r--lib/emacs-packages.nix5
-rw-r--r--lib/email.nix18
-rw-r--r--lib/linux.nix45
-rw-r--r--lib/packages.nix15
-rw-r--r--lib/ssh.nix1
-rw-r--r--lib/userstyles.css3
-rw-r--r--machines/helium.nix10
-rw-r--r--nixpkgs.nix4
-rw-r--r--overlay.nix3
-rw-r--r--pkgs/base16.nix19
-rw-r--r--pkgs/cmdtree.nix19
-rw-r--r--pkgs/zebra.nix14
-rw-r--r--profiles/laptop.nix60
14 files changed, 125 insertions, 104 deletions
diff --git a/lib/common.nix b/lib/common.nix
index 3f15754..cdbbf6e 100644
--- a/lib/common.nix
+++ b/lib/common.nix
@@ -224,12 +224,19 @@ in
];
};
- urxvt = {
+ urxvt = let font = size: "xft:Fira Mono:size=${toString size}:ant"; in {
enable = true;
fonts = [
- "xft:Fira Mono:size=8:ant"
- "xfg:Noto Emoji"
+ (font 6)
+ "xft:Noto Emoji"
];
+ keybindings = {
+ # why don't any of these work?
+ "Shift-Control-C" = "eval:selection_to_clipboard";
+ "Shift-Control-V" = "eval:paste_clipboard";
+ "Shift-Control-+" = "command:\033]710;${font 12}\007\033]711;${font 12}\007";
+ "Shift-Control--" = "command:\033]710;${font 8}\007\033]711;${font 8}\007";
+ };
iso14755 = true; # unicode chars
#transparent = true;
#shading = 10;
diff --git a/lib/emacs-packages.nix b/lib/emacs-packages.nix
index eeb85dd..d930e12 100644
--- a/lib/emacs-packages.nix
+++ b/lib/emacs-packages.nix
@@ -8,8 +8,7 @@ ace-link
all-the-icons
anzu
avy
-avy-zap
-# bbdb
+bbdb
blacken
carbon-now-sh
centaur-tabs
@@ -24,6 +23,7 @@ dired-narrow
direnv
doom-themes
doom-modeline
+embark
editorconfig
erc-hl-nicks
evil
@@ -42,6 +42,7 @@ geiser-guile
general
# melpaStablePackages.git-timemachine # broken hash
haskell-mode
+helpful
highlight-symbol
htmlize
ibuffer-vc
diff --git a/lib/email.nix b/lib/email.nix
index 061cf46..23a41a3 100644
--- a/lib/email.nix
+++ b/lib/email.nix
@@ -19,8 +19,7 @@ in
realName = "Ben Sima";
address = "ben@bsima.me";
userName = "ben@simatime.com";
- # alot is broken in nixpkgs 21.11
- #alot.sendMailCommand = "${homedir}/bin/sendmail";
+ alot.sendMailCommand = "${homedir}/bin/sendmail";
imap = {
host = "simatime.com";
port = 993;
@@ -47,21 +46,6 @@ in
passwordCommand = "${pkgs.coreutils}/bin/cat ~/private/ben@simatime.com";
msmtp.enable = true;
};
-
- # "ben@heroprojects.io" = {
- # flavor = "gmail.com";
- # realName = "Ben Sima";
- # address = "ben@heroprojects.io";
- # userName = "ben@heroprojects.io";
- # mbsync = {
- # enable = true;
- # create = "both";
- # expunge = "none";
- # };
- # notmuch.enable = true;
- # msmtp.enable = true;
- # passwordCommand = "cat ~/keybase/private/bsima/ben@heroprojects.io";
- # };
};
};
};
diff --git a/lib/linux.nix b/lib/linux.nix
index 5ac859a..f5bad73 100644
--- a/lib/linux.nix
+++ b/lib/linux.nix
@@ -4,43 +4,10 @@ let
homedir = builtins.getEnv "HOME";
hostname = lib.strings.removeSuffix "\n" (builtins.readFile /etc/hostname);
gpgid = "66A6AD150399D970DCA4C4E6C8218B7D0BFDECCD";
- cmdtree = pkgs.stdenv.mkDerivation {
- name = "cmdtree";
- src = fetchGit {
- url = "https://git.sr.ht/~jb55/cmdtree";
- ref = "master";
- rev = "5606078e8fa02462f0208d9f9cad98c7673812e6";
- };
- buildPhase = ''
- cp ${./cfg.def.h} ./cfg.def.h
- make
- '';
- installPhase = ''
- mkdir -p $out/bin
- cp ./cmdtree $out/bin
- '';
- buildInputs = [ pkgs.xorg.libX11 pkgs.xorg.libXft ];
- };
-
base16-scheme = "atelier-sulphurpool";
base16-scheme-filename = lib.strings.concatStrings (lib.strings.splitString "-" base16-scheme);
- base16 = pkgs.stdenv.mkDerivation {
- name = "base16-builder";
- src = pkgs.fetchFromGitHub {
- owner = "auduchinok";
- repo = "base16-builder";
- rev = "51e3ad4d447fc3f1f539d0bfe33c851728fb6b5f";
- sha256 = "1qir689h38c6jr7fbbqbc3029544zgv41lrrqdcq26kcwxcwjrz1";
- };
- nativeBuildInputs = [pkgs.ruby];
- buildPhase = "${pkgs.ruby}/bin/ruby base16 -s schemes/${base16-scheme}.yml";
- installPhase = ''
- mkdir -p $out
- cp -r output/* $out
- '';
- };
theme = lib.removeSuffix "\n" (builtins.readFile "${homedir}/.local/share/xtheme");
- xresources = "${base16}/xresources/base16-${base16-scheme-filename}.${theme}.256.xresources";
+ xresourcesFile = "${pkgs.base16}/xresources/base16-${base16-scheme-filename}.${theme}.256.xresources";
# used in polybar and dunst
colors = { # derived from spacemacs
@@ -111,7 +78,9 @@ in
libnotify
lshw
mplayer
+ muchsync
mumble
+ nyxt
pandoc
pavucontrol
pinentry
@@ -138,7 +107,7 @@ in
xresources = {
properties = {
- "XTerm*font" = "-*-FiraMono-medium-r-normal--18-*-*-*-*-*-iso10646-1";
+ "XTerm*font" = "-*-FiraMono-medium-r-normal--10-*-*-*-*-*-iso10646-1";
"XTerm*faceName" = "FireMono";
"XTerm*faceSize" = "10";
"XTerm*termName" = "xterm-256color";
@@ -151,7 +120,7 @@ in
#"Xautolock.notify:" = 30;
#"Xautolock.notifier:" = "notify-send -u critical -t 10000 -- 'Locking screen in 30 seconds'";
};
- extraConfig = builtins.readFile(xresources);
+ extraConfig = builtins.readFile xresourcesFile;
};
services = {
@@ -337,7 +306,7 @@ in
temperature = {
# orange = 1000, white = 5000
day = 5000;
- night = 2300;
+ night = 1800;
};
};
@@ -345,7 +314,7 @@ in
enable = true;
enableXinerama = true;
imageDirectory = "%h/wallpaper";
- interval = "5m";
+ interval = "30m";
};
gpg-agent = {
diff --git a/lib/packages.nix b/lib/packages.nix
index caf2449..9d0251e 100644
--- a/lib/packages.nix
+++ b/lib/packages.nix
@@ -39,21 +39,6 @@ let
# ];
# doCheck = false;
#};
-
- zebra = pkgs.stdenv.mkDerivation {
- name = "zebra";
- src = fetchGit {
- url = "https://github.com/jb55/zebra";
- ref = "master";
- rev = "8fd29bc1c2e9b7b695d61e0f1329c819f57f74bb";
- #sha256 = "11apyy90n26l3c4diqg8y8m4a4ndz9mp8nr8prcxkcsckpa3vqi2";
- };
- buildPhase = "make";
- installPhase = ''
- mkdir -p $out/bin
- cp ./zebra $out/bin
- '';
- };
in {
home.packages = [
amfora
diff --git a/lib/ssh.nix b/lib/ssh.nix
index 2d1ab46..48b79ad 100644
--- a/lib/ssh.nix
+++ b/lib/ssh.nix
@@ -4,6 +4,7 @@ let
homedir = builtins.getEnv "HOME";
in {
programs.ssh = {
+ controlMaster = "auto";
enable = true;
forwardAgent = true;
matchBlocks = {
diff --git a/lib/userstyles.css b/lib/userstyles.css
index dfafb89..1b1449b 100644
--- a/lib/userstyles.css
+++ b/lib/userstyles.css
@@ -4,3 +4,6 @@ input, input#hoogle
/* gwern.net */
.markdownBody a:link, .markdownBody a:link *, #footer a:link
{ text-shadow: none }
+
+/* gitolite.com */
+body { background: transparent }
diff --git a/machines/helium.nix b/machines/helium.nix
index 62f7450..d2a054f 100644
--- a/machines/helium.nix
+++ b/machines/helium.nix
@@ -95,7 +95,7 @@ in {
clight.enable = true;
clight.temperature.day = 5000;
- clight.temperature.night = 2300;
+ clight.temperature.night = 1800;
printing.enable = true;
@@ -172,12 +172,11 @@ in {
nix.gc.automatic = false;
nix.gc.dates = "03:15";
- nix.binaryCaches = [ "https://cache.nixos.org/" ];
+
nix.extraOptions = ''
builders-use-substitutes = true
'';
- nix.maxJobs = lib.mkDefault 4;
nix.buildMachines = [
{
hostName = "dev.simatime.com";
@@ -187,7 +186,10 @@ in {
}
];
nix.distributedBuilds = true;
- nix.trustedUsers = [ "root" "ben" ];
+
+ nix.settings.trusted-users = [ "root" "ben" ];
+ nix.settings.substituters = [ "https://cache.nixos.org/" ];
+ nix.settings.max-jobs = lib.mkDefault 4;
# This value determines the NixOS release with which your system is to be
# compatible, in order to avoid breaking some software such as database
diff --git a/nixpkgs.nix b/nixpkgs.nix
index c40e80f..e39e195 100644
--- a/nixpkgs.nix
+++ b/nixpkgs.nix
@@ -1,5 +1,5 @@
# generated with ~/bin/nixpkgs-pin
{
- url = "https://github.com/NixOS/nixpkgs/archive/21.11.tar.gz";
- sha256 = "162dywda2dvfj1248afxc45kcrg83appjd0nmdb541hl7rnncf02";
+ url = "https://github.com/NixOS/nixpkgs/archive/16e4d460b7ecd63049d3e62aa85d038fcda264f0.tar.gz";
+ sha256 = "0nzbmp2v5cch687ymfk7cd2kf5mmwc7awq3fy3aw2wavy7hbrm2s";
}
diff --git a/overlay.nix b/overlay.nix
index b43d9ed..1545d9d 100644
--- a/overlay.nix
+++ b/overlay.nix
@@ -1,5 +1,8 @@
self: super:
{
+ base16 = super.callPackage ./pkgs/base16.nix {};
+ cmdtree = super.callPackage ./pkgs/cmdtree.nix {};
forgit = super.callPackage ./pkgs/forgit.nix {};
+ zebra = super.callPackage ./pkgs/zebra.nix {};
}
diff --git a/pkgs/base16.nix b/pkgs/base16.nix
new file mode 100644
index 0000000..b0dc69a
--- /dev/null
+++ b/pkgs/base16.nix
@@ -0,0 +1,19 @@
+{ stdenv, lib, pkgs, }:
+
+stdenv.mkDerivation {
+ name = "base16-builder";
+ src = pkgs.fetchFromGitHub {
+ owner = "auduchinok";
+ repo = "base16-builder";
+ rev = "51e3ad4d447fc3f1f539d0bfe33c851728fb6b5f";
+ sha256 = "1qir689h38c6jr7fbbqbc3029544zgv41lrrqdcq26kcwxcwjrz1";
+ };
+ nativeBuildInputs = [pkgs.ruby];
+
+ # builds everything
+ buildPhase = "${pkgs.ruby}/bin/ruby base16";
+ installPhase = ''
+ mkdir -p $out
+ cp -r output/* $out
+ '';
+}
diff --git a/pkgs/cmdtree.nix b/pkgs/cmdtree.nix
new file mode 100644
index 0000000..a9a0fec
--- /dev/null
+++ b/pkgs/cmdtree.nix
@@ -0,0 +1,19 @@
+{stdenv, fetchgit, xorg }:
+
+stdenv.mkDerivation {
+ name = "cmdtree";
+ src = fetchgit {
+ url = "https://git.sr.ht/~jb55/cmdtree";
+ rev = "5606078e8fa02462f0208d9f9cad98c7673812e6";
+ sha256 = "sha256-/5f8uxcMmH7/W58if2DIl4R0Emt8jDWeoImOmQL6C7U=";
+ };
+ buildPhase = ''
+ cp ${../lib/cfg.def.h} ./cfg.def.h
+ make
+ '';
+ installPhase = ''
+ mkdir -p $out/bin
+ install -m755 ./cmdtree $out/bin
+ '';
+ buildInputs = [ xorg.libX11 xorg.libXft ];
+}
diff --git a/pkgs/zebra.nix b/pkgs/zebra.nix
new file mode 100644
index 0000000..41f3616
--- /dev/null
+++ b/pkgs/zebra.nix
@@ -0,0 +1,14 @@
+{ stdenv, fetchgit }:
+stdenv.mkDerivation {
+ name = "zebra";
+ src = fetchgit {
+ url = "https://github.com/jb55/zebra";
+ rev = "8fd29bc1c2e9b7b695d61e0f1329c819f57f74bb";
+ sha256 = "sha256-IuI91J1Ms9lZvihbdGv6zRJFKvLo4dgIG9QIC5L3V4U=";
+ };
+ buildPhase = "make";
+ installPhase = ''
+ mkdir -p $out/bin
+ install -m755 ./zebra $out/bin
+ '';
+}
diff --git a/profiles/laptop.nix b/profiles/laptop.nix
index 876b95c..b571c00 100644
--- a/profiles/laptop.nix
+++ b/profiles/laptop.nix
@@ -24,36 +24,50 @@
};
programs.autorandr.profiles = let
- docked = rotate: {
- fingerprint.HDMI-2 = "00ffffffffffff0006b3ba28c0f40300151f0103803e22782ab4a5ad4f449e250f50542308008140818081c081009500b300d1c001014dd000a0f0703e80303035006d552100001a565e00a0a0a02950302035006d552100001e000000fd00283c1ea03c000a202020202020000000fc00415355532056473238390a20200159020359f159010304121305141f100706025d5e5f60610e0f15161d1e20482309070783010000e200d56d030c002000383c20006001020367d85dc401788003681a00000101283ee6e305c301e50f00800100e6060701565500023a801871382d40582c45006d552100001e000000000000000000000000000000000000000063";
+ fingerprint = {
+ # get fingerprints with `autorandr --fingerprint`
+ eDP-1 = "00ffffffffffff000daea814000000002c170104951f11780237459e55539229125054000000010101010101010101010101010101015e358096703814402c1c240034ad10000018000000fe004e3134304847452d4541310a20000000fe00434d4e0a202020202020202020000000fe004e3134304847452d4541310a20001f";
+ HDMI-2 = "00ffffffffffff0006b3ba28c0f40300151f0103803e22782ab4a5ad4f449e250f50542308008140818081c081009500b300d1c001014dd000a0f0703e80303035006d552100001a565e00a0a0a02950302035006d552100001e000000fd00283c1ea03c000a202020202020000000fc00415355532056473238390a20200159020359f159010304121305141f100706025d5e5f60610e0f15161d1e20482309070783010000e200d56d030c002000383c20006001020367d85dc401788003681a00000101283ee6e305c301e50f00800100e6060701565500023a801871382d40582c45006d552100001e000000000000000000000000000000000000000063";
+ };
+
+ externalMonitor = rotate: {
+ enable = true;
+ primary = true;
+ position = "0x0";
+ mode = "3840x2160";
+ dpi = 331;
+ rate = "30.00";
+ inherit rotate;
+ };
+
+ laptopScreen = {
+ enable = true;
+ primary = true;
+ position = "0x0";
+ mode = "1920x1080";
+ rate = "60.00";
+ };
+
+ in {
+ docked-portrait = {
+ fingerprint = { inherit (fingerprint) HDMI-2; };
config = {
eDP-1.enable = false;
- HDMI-2 = {
- enable = true;
- primary = true;
- position = "0x0";
- mode = "3840x2160";
- rate = "30.00";
- inherit rotate;
- };
+ HDMI-2 = externalMonitor "right";
+ };
+ };
+ docked-laptop = {
+ inherit fingerprint;
+ config = {
+ eDP-1 = laptopScreen;
+ HDMI-2 = externalMonitor "right";
};
};
- in {
- # get fingerprints with `autorandr --fingerprint`
- docked-portrait = docked "right";
- #docked-landscape = docked "normal";
laptop = {
- fingerprint.eDP-1 = "00ffffffffffff000daea814000000002c170104951f11780237459e55539229125054000000010101010101010101010101010101015e358096703814402c1c240034ad10000018000000fe004e3134304847452d4541310a20000000fe00434d4e0a202020202020202020000000fe004e3134304847452d4541310a20001f";
+ fingerprint = { inherit (fingerprint) eDP-1; };
config = {
HDMI-2.enable = false;
- # eDP-1 active 31cm/17cm 1920x1080+0+0 60Hz
- eDP-1 = {
- enable = true;
- primary = true;
- position = "0x0";
- mode = "1920x1080";
- rate = "60.00";
- };
+ eDP-1 = laptopScreen;
};
};
};