This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MIT License | |
// | |
// Copyright (c) 2021 Matthijs Steen | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is | |
// furnished to do so, subject to the following conditions: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'set' | |
# Change the path here: | |
# ARCHIVE = '~/Archive/' | |
ARCHIVE = '/admin/fork/The-Archive-Demo-Notes' | |
EXTENSIONS = %w{.md .txt .markdown .mdown .text} | |
################################################################# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ # Limits | |
# We increase to inotify limits since the defaults are easily exceeded. | |
boot.kernel.sysctl = { | |
"fs.inotify.max_user_instances" = 4096; | |
"fs.inotify.max_user_watches" = 524288; | |
}; | |
# Be very generous with resource restrictions. | |
# Should be lower than the value defined in /proc/sys/fs/file-max. | |
# The domain * excludes root, so we need repeat it for root. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
environment.systemPackages = with pkgs; [ nodejs-12_x ]; | |
environment.shellInit = '' | |
# Workaround for not being able to install packages globally. | |
export PATH="/opt/npm/bin:$PATH" | |
''; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ config, lib, ... }: | |
with lib; | |
{ | |
# Add support for Grub secrets | |
config = mkIf (config.boot.loader.grub.enable && config.boot.initrd.secrets != {}) { | |
boot.loader = { | |
supportsInitrdSecrets = mkForce true; | |
grub.extraInitrd = "/boot/grub/secrets-initrd.gz"; |