update, fonts, caffeine

This commit is contained in:
Sridhar Ratnakumar 2021-06-23 10:49:07 -04:00
parent daee60d8c9
commit 74fab4552c
4 changed files with 36 additions and 17 deletions

View file

@ -1,5 +1,21 @@
{ config, pkgs, ... }:
let
caffeine =
pkgs.writeScriptBin "caffeine"
''
#!${pkgs.runtimeShell}
set -xe
HOURS=$*
SECS=`expr 1 + 60 \* 60 \* $HOURS`
date
${pkgs.xautolock}/bin/xautolock -disable
${pkgs.cowsay}/bin/cowsay "Autolock de-activated for next $HOURS hours"
sleep $SECS
date
${pkgs.xautolock}/bin/xautolock -enable
${pkgs.cowsay}/bin/cowsay "Autolock re-activated."
'';
in
{
services.xserver.xautolock = {
enable = true;
@ -28,5 +44,13 @@
${pkgs.xautolock}/bin/xautolock -enable
${pkgs.cowsay}/bin/cowsay "Welcome back!"
'')
# Run this before watching a movie
(pkgs.writeScriptBin "caffeine-2hr"
''
#!${pkgs.runtimeShell}
set -xe
${caffeine} 2
'')
caffeine
];
}

View file

@ -8,13 +8,8 @@
# NOTE: Some fonts may break colour emojis in Chrome
# cf. https://github.com/NixOS/nixpkgs/issues/69073#issuecomment-621982371
# If this happens , keep noto-fonts-emoji and try disabling others (nerdfonts, etc.)
noto-fonts-emoji
nerdfonts
# For fish powerline plugin
powerline-fonts
cascadia-code
emojione
twemoji-color-font
];
};
}

14
flake.lock generated
View file

@ -134,11 +134,11 @@
"windicss": "windicss"
},
"locked": {
"lastModified": 1624291415,
"narHash": "sha256-0OlJhz5OW/QXJ/qvHFSncNfLYyU4vnYmAUkMgv8Hyac=",
"lastModified": 1624417136,
"narHash": "sha256-o/47k1POFGe70HqvjNLk3dFcc2Gv6C5OLThfMpuKgPc=",
"owner": "srid",
"repo": "emanote",
"rev": "5501ae08611c6d21661f332b7a77e23bbf7ab0a5",
"rev": "96fb6d8701e2b50f66784ec0ae3c474e529bbda6",
"type": "github"
},
"original": {
@ -612,17 +612,17 @@
},
"nixpkgs_7": {
"locked": {
"lastModified": 1624024598,
"narHash": "sha256-X++38oH5MKEmPW4/2WdMaHQvwJzO8pJfbnzMD7DbG1E=",
"lastModified": 1624271441,
"narHash": "sha256-26QNDCdRE5mPOWYJrPGpVzgrJ3ZxqvWOONfeMsjryz4=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "33d42ad7cf2769ce6364ed4e52afa8e9d1439d58",
"rev": "7e567a3d092b7de69cdf5deaeb8d9526de230916",
"type": "github"
},
"original": {
"owner": "nixos",
"repo": "nixpkgs",
"rev": "33d42ad7cf2769ce6364ed4e52afa8e9d1439d58",
"rev": "7e567a3d092b7de69cdf5deaeb8d9526de230916",
"type": "github"
}
},

View file

@ -5,8 +5,8 @@
# To update nixpkgs (and thus NixOS), pick the nixos-unstable rev from
# https://status.nixos.org/
#
# This ensures that we always use the official # cache.
nixpkgs.url = "github:nixos/nixpkgs/33d42ad7cf2769ce6364ed4e52afa8e9d1439d58";
# This ensures that we always use the official nix cache.
nixpkgs.url = "github:nixos/nixpkgs/7e567a3d092b7de69cdf5deaeb8d9526de230916";
nixos-hardware.url = github:NixOS/nixos-hardware/master;
home-manager.url = "github:nix-community/home-manager";