summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/elfeed.org3
-rw-r--r--config/nix.org86
m---------nix0
3 files changed, 59 insertions, 30 deletions
diff --git a/config/elfeed.org b/config/elfeed.org
index ff172d8..8ff8387 100644
--- a/config/elfeed.org
+++ b/config/elfeed.org
@@ -30,6 +30,9 @@ My own mailing list feed.
I like to get new information about recent studies related to technology.
*** [[http://www.nature.com/nmat/current_issue/rss/][Nature]]
Nature is a prestigious journal with a good bit of good content.
+*** HuggingFace Feeds :huggingface:
+**** [[https://github.com/huangboming/huggingface-daily-paper-feed/blob/main/feed.xml][HuggingFace Daily Feed]]
+Notifies me on new AI papers that I can read.
*** NASA :nasa:
This is a list of NASA feeds:
**** [[https://www.nasa.gov/technology/feed/][NASA Tech]]
diff --git a/config/nix.org b/config/nix.org
index 9c92f06..83f06dc 100644
--- a/config/nix.org
+++ b/config/nix.org
@@ -1206,11 +1206,9 @@ in
};
rtc = {
- use_external_ip = true;
+ node_ip = "66.42.84.130";
tcp_port = 7881;
udp_port = 7882;
- port_range_start = 50000;
- port_range_end = 60000;
};
};
};
@@ -2280,7 +2278,7 @@ This is a service that bans bots that try to sign in on my server.
** Impermanence
This is my impermanence profile, which removes all files on reboot except for the ones listed below.
#+begin_src nix :tangle ../nix/modules/impermanence.nix
-{ lib, config, ... }:
+{ config, pkgs, ... }:
{
assertions = [
{
@@ -2289,30 +2287,57 @@ This is my impermanence profile, which removes all files on reboot except for th
}
];
- boot.initrd.postResumeCommands = (if config.monorepo.profiles.impermanence.enable then lib.mkAfter ''
- mkdir /btrfs_tmp
- mount -t btrfs -n -o subvol=/ /dev/mapper/crypted /btrfs_tmp
- if [[ -e /btrfs_tmp/root ]]; then
- mkdir -p /btrfs_tmp/old_roots
- timestamp=$(date --date="@$(stat -c %Y /btrfs_tmp/root)" "+%Y-%m-%-d_%H:%M:%S")
- mv /btrfs_tmp/root "/btrfs_tmp/old_roots/$timestamp"
- fi
+ # Systemd Stage 1 replacement for postResumeCommands
+ boot.initrd.systemd.services = if config.monorepo.profiles.impermanence.enable then {
+ impermanence-root-wipe = {
+ description = "Wipe Btrfs root filesystem for impermanence";
+ wantedBy = [ "initrd.target" ];
+
+ # Wait for the LUKS decryption of "crypted" to finish
+ after = [ "systemd-cryptsetup@crypted.service" ];
+ wants = [ "systemd-cryptsetup@crypted.service" ];
+
+ # Run before the actual root filesystem is mounted
+ before = [ "sysroot.mount" ];
+
+ unitConfig.DefaultDependencies = "no";
+ serviceConfig.Type = "oneshot";
+
+ # Inject required tools into the minimal systemd initrd
+ path = with pkgs; [
+ coreutils
+ util-linux
+ btrfs-progs
+ findutils
+ ];
- delete_subvolume_recursively() {
- IFS=$'\n'
- for i in $(btrfs subvolume list -o "$1" | cut -f 9- -d ' '); do
- delete_subvolume_recursively "/btrfs_tmp/$i"
- done
- btrfs subvolume delete "$1"
- }
+ script = ''
+ mkdir -p /btrfs_tmp
+ mount -t btrfs -n -o subvol=/ /dev/mapper/crypted /btrfs_tmp
+
+ if [[ -e /btrfs_tmp/root ]]; then
+ mkdir -p /btrfs_tmp/old_roots
+ timestamp=$(date --date="@$(stat -c %Y /btrfs_tmp/root)" "+%Y-%m-%-d_%H:%M:%S")
+ mv /btrfs_tmp/root "/btrfs_tmp/old_roots/$timestamp"
+ fi
- for i in $(find /btrfs_tmp/old_roots/ -maxdepth 1 -mtime +30); do
- delete_subvolume_recursively "$i"
- done
+ delete_subvolume_recursively() {
+ IFS=$'\n'
+ for i in $(btrfs subvolume list -o "$1" | cut -f 9- -d ' '); do
+ delete_subvolume_recursively "/btrfs_tmp/$i"
+ done
+ btrfs subvolume delete "$1"
+ }
- btrfs subvolume create /btrfs_tmp/root
- umount -n /btrfs_tmp
- '' else "");
+ for i in $(find /btrfs_tmp/old_roots/ -maxdepth 1 -mtime +30); do
+ delete_subvolume_recursively "$i"
+ done
+
+ btrfs subvolume create /btrfs_tmp/root
+ umount -n /btrfs_tmp
+ '';
+ };
+ } else {};
boot.initrd.luks.devices = (if (config.monorepo.vars.fileSystem == "btrfs") then {
crypted = {
@@ -3506,6 +3531,11 @@ be straightforward.
''
config.load_autoconfig()
setup(c, "mocha", True)
+
+c.content.blocking.hosts.lists.append('https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social-only/hosts')
+c.content.blocking.hosts.lists.append('https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social-only/hosts')
+c.content.blocking.hosts.lists.append('https://raw.githubusercontent.com/gieljnssns/Social-media-Blocklists/refs/heads/master/adguard-youtube.txt')
+c.content.blocking.hosts.lists.append('${../../data/youtube-blocklist}')
'';
};
}
@@ -4134,7 +4164,6 @@ standard.
};
shellAliases = {
- ret2pop-serve = "devd -ol ~/website_html/";
clone-secrets = "git clone ssh://\"$1\"/home/preston/secrets \"$HOME/secrets\"";
get-channel-id = "yt-dlp --print \"%(channel_id)s\" --playlist-end 1 \"$1\"";
se = "sops edit";
@@ -4147,9 +4176,6 @@ standard.
build-installer = "nix build $HOME/monorepo/nix#nixosConfigurations.installer.config.system.build.isoImage";
rb = "sudo nixos-rebuild switch --flake $HOME/monorepo/nix#${systemHostName}";
nfu = "cd ~/monorepo/nix && git add . && git commit -m \"new flake lock\" && nix flake update";
- usync = "rsync -azvP --chmod=\"Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r\" ~/monorepo/result/ root@${super.monorepo.vars.remoteHost}:/var/www/${super.monorepo.vars.internetName}-website/";
- usite
- = "cd ~/src/publish-org-roam-ui && bash local.sh && rm -rf ~/website_html/graph_view; cp -r ~/src/publish-org-roam-ui/out ~/website_html/graph_view && rsync -azvP --chmod=\"Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r\" ~/website_html/ root@${super.monorepo.vars.remoteHost}:/var/www/${super.monorepo.vars.internetName}-website/";
sai = "eval \"$(ssh-agent -s)\" && ssh-add ~/.ssh/id_ed25519 && ssh-add -l";
};
loginExtra = ''
@@ -4220,7 +4246,7 @@ for these configurations.
# Apps
# octaveFull
- grim swww vim element-desktop signal-desktop signal-cli thunderbird jami imv slurp wl-clipboard
+ grim swww vim element-desktop signal-desktop signal-cli imv slurp wl-clipboard
# Sound/media
pavucontrol alsa-utils imagemagick ffmpeg pulseaudio
diff --git a/nix b/nix
-Subproject f05aa8eb4f2cfb9d35b05d0b0f842f78dd7299b
+Subproject fdb5ae36cc411784bfda9622f5bd2b054342e75