mirror of
https://codeberg.org/muon/home.git
synced 2026-03-09 11:53:12 +00:00
Add murk and impermanence
This commit is contained in:
parent
a8668c1a44
commit
b4f998d455
17 changed files with 354 additions and 6 deletions
|
|
@ -8,6 +8,7 @@ in {
|
|||
./sops
|
||||
|
||||
./xdg.nix
|
||||
./impermanence.nix
|
||||
];
|
||||
|
||||
# Let Home Manager install and manage itself
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
lib.mkEnableOption "enables gui development tools";
|
||||
|
||||
config = lib.mkIf config.mods.desktop.development.enable {
|
||||
home.packages = with pkgs; [ godot ];
|
||||
programs.qutebrowser = {
|
||||
enable = true;
|
||||
|
||||
|
|
|
|||
50
modules/home/impermanence.nix
Normal file
50
modules/home/impermanence.nix
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
{ pkgs, lib, config, osConfig, ... }:
|
||||
let
|
||||
fs-diff = with pkgs;
|
||||
writeShellApplication {
|
||||
name = "fs-diff";
|
||||
runtimeInputs = [ flameshot curl xsel ];
|
||||
text = ''
|
||||
#!/usr/bin/env bash
|
||||
# fs-diff.sh
|
||||
set -euo pipefail
|
||||
|
||||
OLD_TRANSID=$(sudo btrfs subvolume find-new /mnt/root-blank 9999999)
|
||||
OLD_TRANSID=${OLD_TRANSID}
|
||||
|
||||
sudo mkdir /mnt
|
||||
sudo mount -o subvol=/ /dev/mapper/crypted /mnt
|
||||
sudo btrfs subvolume find-new "/mnt/root" "$OLD_TRANSID" |
|
||||
sed \'$d\' |
|
||||
cut -f17- -d' ' |
|
||||
sort |
|
||||
uniq |
|
||||
while read path; do
|
||||
path="/$path"
|
||||
if [ -L "$path" ]; then
|
||||
: # The path is a symbolic link, so is probably handled by NixOS already
|
||||
elif [ -d "$path" ]; then
|
||||
: # The path is a directory, ignore
|
||||
else
|
||||
echo "$path"
|
||||
fi
|
||||
done
|
||||
sudo umount /mnt
|
||||
'';
|
||||
};
|
||||
in with lib; {
|
||||
config = mkIf osConfig.mods.impermanence.enable {
|
||||
home.packages = [ fs-diff ];
|
||||
home.persistence."/persistent/home/muon" = {
|
||||
directories = [
|
||||
"documents"
|
||||
"downloads"
|
||||
"src"
|
||||
".gnupg"
|
||||
".ssh"
|
||||
".config/sops"
|
||||
".local/share/direnv"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -2,7 +2,10 @@
|
|||
let
|
||||
cfg = config.mods.terminal;
|
||||
|
||||
aliases = { la = "ls -lah"; };
|
||||
aliases = with lib; {
|
||||
la = "ls -lah";
|
||||
xc = "${getExe pkgs.xclip} -selection clipboard";
|
||||
};
|
||||
|
||||
in {
|
||||
options.mods.terminal = { zsh.enable = lib.mkEnableOption "enables zsh"; };
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ in with lib; {
|
|||
"bottom"
|
||||
"htop"
|
||||
"vifm"
|
||||
"rbw"
|
||||
]);
|
||||
|
||||
home.packages = with pkgs; [
|
||||
|
|
@ -40,10 +41,14 @@ in with lib; {
|
|||
dua
|
||||
fdupes
|
||||
vifm
|
||||
|
||||
# programs
|
||||
fend
|
||||
unzip
|
||||
|
||||
# security
|
||||
pinentry-tty
|
||||
|
||||
# utilities
|
||||
fend
|
||||
xclip
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue