diff options
-rwxr-xr-x | install.sh | 13 | ||||
-rw-r--r-- | lib/common.nix | 1 | ||||
-rw-r--r-- | lib/emacs-packages.nix | 2 | ||||
-rw-r--r-- | lib/linux.nix (renamed from linux.nix) | 32 | ||||
-rw-r--r-- | lib/packages.nix | 1 | ||||
-rw-r--r-- | profiles/darwin.nix (renamed from darwin.nix) | 0 | ||||
-rw-r--r-- | profiles/groq.nix (renamed from groq.nix) | 0 | ||||
-rw-r--r-- | profiles/workshop.nix | 16 | ||||
-rw-r--r-- | server.nix | 9 |
9 files changed, 51 insertions, 23 deletions
@@ -2,16 +2,21 @@ # set -euxo pipefail # -[[ -z "$1" ]] && echo "usage: install.sh <file.nix>" && exit 1 +[[ -z "$1" ]] \ + && echo "usage: install.sh <file.nix>" \ + && echo "where <file.nix> is something from the 'profiles' directory" \ + && exit 1 # mkdir -p ~/.config/nixpkgs NIXDIR="$HOME/.config/nixpkgs" HOMEFILE="$NIXDIR/home.nix" NIXFILE="$(pwd)/$1" # -# -[[ -e "$HOMEFILE" ]] || ln -s "$NIXFILE" "$HOMEFILE" -[[ -e "$NIXDIR/config.nix" ]] || ln -s "$(pwd)/lib/config.nix" "$NIXDIR/config.nix" +# start from scratch +rm "$HOMEFILE" +ln -s "$NIXFILE" "$HOMEFILE" +rm "$NIXDIR/config.nix" +ln -s "$(pwd)/lib/config.nix" "$NIXDIR/config.nix" # # the notmuch config location is by default ~/.notmuch-config, but home-manager # puts it at ~/.config/notmuch/notmuchrc (which makes sense) and then sets diff --git a/lib/common.nix b/lib/common.nix index 197d8de..cbe0d25 100644 --- a/lib/common.nix +++ b/lib/common.nix @@ -111,6 +111,7 @@ in chainreplyto = false; composeencoding = "UTF-8"; annotate = "yes"; + cccmd = "git-contacts"; }; log = { date = "local"; diff --git a/lib/emacs-packages.nix b/lib/emacs-packages.nix index 09061b3..b8dc912 100644 --- a/lib/emacs-packages.nix +++ b/lib/emacs-packages.nix @@ -30,7 +30,7 @@ emojify eww-lnum flycheck flycheck-haskell -geiser +# geiser # broken? general melpaStablePackages.git-timemachine haskell-mode diff --git a/linux.nix b/lib/linux.nix index 0e600d7..6823c8e 100644 --- a/linux.nix +++ b/lib/linux.nix @@ -12,7 +12,7 @@ let rev = "5606078e8fa02462f0208d9f9cad98c7673812e6"; }; buildPhase = '' - cp ${./lib/cfg.def.h} ./cfg.def.h + cp ${./cfg.def.h} ./cfg.def.h make ''; installPhase = '' @@ -60,8 +60,8 @@ let in { imports = [ - ./lib/common.nix - ./lib/email.nix + ./common.nix + ./email.nix ]; home = { keyboard.options = [ "caps:ctrl_modifier" ]; @@ -70,16 +70,16 @@ in }; file = { mutt = { - text = (builtins.readFile ./lib/muttrc) + - (builtins.readFile ./lib/mutt/solarized.muttrc); + text = (builtins.readFile ./muttrc) + + (builtins.readFile ./mutt/solarized.muttrc); target = ".muttrc"; }; mailcap = { - source = ./lib/mailcap; + source = ./mailcap; target = ".mailcap"; }; xbindkeys = { - source = ./lib/xbindkeysrc; + source = ./xbindkeysrc; target = ".xbindkeysrc"; }; }; @@ -403,7 +403,7 @@ in enable = true; extraPackages = xmonadPackages; enableContribAndExtras = true; - config = ./lib/xmonad.hs; + config = ./xmonad.hs; }; }; }; @@ -416,7 +416,7 @@ in "colors.webpage.darkmode.enabled" = if theme == "dark" then true else false; - "content.user_stylesheets" = "~/.userstyles.css"; # generated in lib/common.nix + "content.user_stylesheets" = "~/.userstyles.css"; # generated in common.nix # attempting to fix gl rendering "qt.force_software_rendering" = "qt-quick"; @@ -439,12 +439,26 @@ in # make it the same as 'systemctl show mpd | grep LimitMEMLOCK" # might not be necessary? #mpd.Service.LimitMEMLOCK = "2085444096"; + "get-calendars".Service = { + Type = "oneshot"; + ExecStart = + map + ({id, name}: "${pkgs.curl}/bin/curl -s --netrc https://cal.simatime.com/ben/${id} --output ${homedir}/calendars/${name}.ical") + [ + {id = "D2A3E843-2D61-4F77-8BF9-D2A90C291B78"; name = "schedule";} + {id = "7b8c1220-fdda-b77c-4b1a-b805fdec7aac"; name = "calendar";} + ]; + }; }; timers = { "gpg-refresh" = { Install.WantedBy = ["timers.target"]; Timer.OnCalendar = "daily"; }; + "get-calendars" = { + Install.WantedBy = ["timers.target"]; + Timer.OnCalendar = "minutely"; + }; }; }; } diff --git a/lib/packages.nix b/lib/packages.nix index e74697a..680eccd 100644 --- a/lib/packages.nix +++ b/lib/packages.nix @@ -35,6 +35,7 @@ entr eternal-terminal expect fd +figlet file font-awesome_5 git-lfs diff --git a/darwin.nix b/profiles/darwin.nix index c221e9e..c221e9e 100644 --- a/darwin.nix +++ b/profiles/darwin.nix diff --git a/groq.nix b/profiles/groq.nix index d1214b3..d1214b3 100644 --- a/groq.nix +++ b/profiles/groq.nix diff --git a/profiles/workshop.nix b/profiles/workshop.nix new file mode 100644 index 0000000..b4cf4c1 --- /dev/null +++ b/profiles/workshop.nix @@ -0,0 +1,16 @@ +# lithium server +{ pkgs, lib, ... }: + +{ + imports = [ + ../lib/linux.nix + ]; + programs.git.signing.signByDefault = true; + systemd.user.services = { + "shop-music".Service = { + RestartSec = "3s"; + Restart = "always"; + ExecStart = "${pkgs.mplayer}/bin/mplayer http://localhost:8097"; + }; + }; +} diff --git a/server.nix b/server.nix deleted file mode 100644 index eba99db..0000000 --- a/server.nix +++ /dev/null @@ -1,9 +0,0 @@ -# lithium server -{ pkgs, lib, ... }: - -{ - imports = [ - ./linux.nix - ]; - programs.git.signing.signByDefault = true; -} |