Compare commits
3 Commits
5f9aa7aa22
...
14007ca4f8
Author | SHA1 | Date |
---|---|---|
Moritz Böhme | 14007ca4f8 | |
Moritz Böhme | 4d2577e8eb | |
Moritz Böhme | 32cc39c400 |
|
@ -29,8 +29,6 @@
|
||||||
services.wallpaper.enable = true;
|
services.wallpaper.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
virtualisation.containers.cdi.dynamic.nvidia.enable = true;
|
|
||||||
|
|
||||||
home-manager.users.moritz.home.packages = with pkgs; [
|
home-manager.users.moritz.home.packages = with pkgs; [
|
||||||
anki
|
anki
|
||||||
stable.calibre # NOTE: breaks often in unstable
|
stable.calibre # NOTE: breaks often in unstable
|
||||||
|
@ -38,10 +36,14 @@
|
||||||
|
|
||||||
hardware = {
|
hardware = {
|
||||||
keyboard.qmk.enable = true;
|
keyboard.qmk.enable = true;
|
||||||
nvidia.modesetting.enable = true;
|
nvidia = {
|
||||||
opengl = {
|
modesetting.enable = true;
|
||||||
|
open = true;
|
||||||
|
};
|
||||||
|
nvidia-container-toolkit.enable = true;
|
||||||
|
graphics = {
|
||||||
enable = true;
|
enable = true;
|
||||||
driSupport32Bit = true;
|
enable32Bit = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# sensors
|
# sensors
|
||||||
|
@ -50,9 +52,6 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
# KERNEL
|
|
||||||
kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages; # NOTE: use latest zfs compatible kernel
|
|
||||||
|
|
||||||
# BOOT
|
# BOOT
|
||||||
supportedFilesystems = [ "zfs" "btrfs" "ntfs" ];
|
supportedFilesystems = [ "zfs" "btrfs" "ntfs" ];
|
||||||
loader = {
|
loader = {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, ... }:
|
{ lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
# needed for zfs pool
|
# needed for zfs pool
|
||||||
|
@ -83,9 +83,27 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
# rollback to blank
|
# rollback to blank
|
||||||
boot.initrd.postDeviceCommands = lib.mkAfter ''
|
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"
|
zfs rollback -r zroot/encrypted/root@blank && echo "rollback complete"
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
|
boot.initrd.systemd.enable = true;
|
||||||
fileSystems."/persist".neededForBoot = true;
|
fileSystems."/persist".neededForBoot = true;
|
||||||
# HACK: to fix issue of agenix running before impermanence
|
# HACK: to fix issue of agenix running before impermanence
|
||||||
age.identityPaths = [
|
age.identityPaths = [
|
||||||
|
|
|
@ -241,15 +241,16 @@ in
|
||||||
which-nix
|
which-nix
|
||||||
|
|
||||||
# utils
|
# utils
|
||||||
|
(viu.override { withSixel = true; })
|
||||||
bat
|
bat
|
||||||
cht-sh
|
cht-sh
|
||||||
f
|
f
|
||||||
fd
|
fd
|
||||||
gi
|
gi
|
||||||
|
lazygit
|
||||||
parallel
|
parallel
|
||||||
ripgrep
|
ripgrep
|
||||||
vim
|
vim
|
||||||
(viu.override { withSixel = true; })
|
|
||||||
wget
|
wget
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -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 = { };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue