Merge remote-tracking branch 'origin/nixos' into nixos-work

This commit is contained in:
Moritz Böhme 2024-10-22 09:26:27 +02:00
commit e193064224
27 changed files with 955 additions and 398 deletions

View file

@ -27,16 +27,19 @@
users.users.moritz.packages = [ pkgs.poetry ];
home-manager.users.moritz.services.kanshi.profiles = {
undocked = {
outputs = [
home-manager.users.moritz.services.kanshi.settings = [
{
profile.name = "undocked";
profile.outputs = [
{
criteria = "eDP-1";
}
];
};
docked = {
outputs = [
}
{
profile.name = "docked";
profile.outputs = [
{
criteria = "eDP-1";
position = "640,1800"; # NOTE: 2160 / 1.2 = 1800
@ -47,8 +50,9 @@
position = "0,0";
}
];
};
};
}
];
services.kanata = {
enable = true;
@ -137,6 +141,7 @@
boot = {
supportedFilesystems = [ "zfs" ];
loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true;
};
# SERVICES

View file

@ -1,4 +1,4 @@
{ lib, ... }:
{ lib, pkgs, ... }:
{
# needed for zfs pool
@ -76,9 +76,27 @@
};
};
# rollback to blank
boot.initrd.postDeviceCommands = lib.mkAfter ''
zfs rollback -r zroot/encrypted/root@blank
'';
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 = [