Compare commits

..

3 commits

Author SHA1 Message Date
14007ca4f8
fix: boot issues 2024-10-24 11:50:09 +02:00
4d2577e8eb
refactor: fix renamed options 2024-10-24 11:50:08 +02:00
32cc39c400
feat: add lazygit 2024-10-24 11:50:07 +02:00
4 changed files with 45 additions and 13 deletions

View file

@ -29,8 +29,6 @@
services.wallpaper.enable = true;
};
virtualisation.containers.cdi.dynamic.nvidia.enable = true;
home-manager.users.moritz.home.packages = with pkgs; [
anki
stable.calibre # NOTE: breaks often in unstable
@ -38,10 +36,14 @@
hardware = {
keyboard.qmk.enable = true;
nvidia.modesetting.enable = true;
opengl = {
nvidia = {
modesetting.enable = true;
open = true;
};
nvidia-container-toolkit.enable = true;
graphics = {
enable = true;
driSupport32Bit = true;
enable32Bit = true;
};
# sensors
@ -50,9 +52,6 @@
};
boot = {
# KERNEL
kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages; # NOTE: use latest zfs compatible kernel
# BOOT
supportedFilesystems = [ "zfs" "btrfs" "ntfs" ];
loader = {

View file

@ -1,4 +1,4 @@
{ lib, ... }:
{ lib, pkgs, ... }:
{
# needed for zfs pool
@ -83,9 +83,27 @@
};
};
# rollback to blank
boot.initrd.postDeviceCommands = lib.mkAfter ''
zfs rollback -r zroot/encrypted/root@blank && echo "rollback complete"
'';
boot.initrd.systemd.services.rollback = {
description = "Rollback ZFS datasets to a pristine state";
wantedBy = [
"initrd.target"
];
after = [
"zfs-import-zroot.service"
];
before = [
"sysroot.mount"
];
path = with pkgs; [
zfs
];
unitConfig.DefaultDependencies = "no";
serviceConfig.Type = "oneshot";
script = ''
zfs rollback -r zroot/encrypted/root@blank && echo "rollback complete"
'';
};
boot.initrd.systemd.enable = true;
fileSystems."/persist".neededForBoot = true;
# HACK: to fix issue of agenix running before impermanence
age.identityPaths = [

View file

@ -241,15 +241,16 @@ in
which-nix
# utils
(viu.override { withSixel = true; })
bat
cht-sh
f
fd
gi
lazygit
parallel
ripgrep
vim
(viu.override { withSixel = true; })
wget
];

View file

@ -0,0 +1,14 @@
_:
{
home-manager.users.moritz.programs.nixvim = {
keymaps = [
{ key = "<leader>g"; action = "<cmd>LazyGit<cr>"; options.desc = "Lazygit"; }
];
plugins.lazygit = {
enable = true;
settings = { };
};
};
}