summaryrefslogtreecommitdiff
path: root/hosts/sif/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/sif/default.nix')
-rw-r--r--hosts/sif/default.nix71
1 files changed, 32 insertions, 39 deletions
diff --git a/hosts/sif/default.nix b/hosts/sif/default.nix
index 6214569a..258a83f7 100644
--- a/hosts/sif/default.nix
+++ b/hosts/sif/default.nix
@@ -13,9 +13,8 @@ in {
13 imports = with flake.nixosModules.systemProfiles; [ 13 imports = with flake.nixosModules.systemProfiles; [
14 ./hw.nix 14 ./hw.nix
15 ./email ./libvirt ./greetd 15 ./email ./libvirt ./greetd
16 tmpfs-root bcachefs initrd-all-crypto-modules default-locale openssh rebuild-machines niri-unstable networkmanager 16 tmpfs-root bcachefs initrd-all-crypto-modules default-locale openssh rebuild-machines niri-unstable networkmanager lanzaboote
17 flakeInputs.nixos-hardware.nixosModules.lenovo-thinkpad-p1 17 flakeInputs.nixos-hardware.nixosModules.lenovo-thinkpad-p1
18 flakeInputs.impermanence.nixosModules.impermanence
19 flakeInputs.nixVirt.nixosModules.default 18 flakeInputs.nixVirt.nixosModules.default
20 ]; 19 ];
21 20
@@ -34,6 +33,10 @@ in {
34 initrd = { 33 initrd = {
35 systemd = { 34 systemd = {
36 emergencyAccess = config.users.users.root.hashedPassword; 35 emergencyAccess = config.users.users.root.hashedPassword;
36 extraBin = {
37 "vim" = lib.getExe pkgs.vim;
38 "grep" = lib.getExe pkgs.gnugrep;
39 };
37 }; 40 };
38 luks.devices = { 41 luks.devices = {
39 nvm0 = { device = "/dev/disk/by-uuid/bef17e86-d929-4a60-97cb-6bfa133face7"; bypassWorkqueues = true; }; 42 nvm0 = { device = "/dev/disk/by-uuid/bef17e86-d929-4a60-97cb-6bfa133face7"; bypassWorkqueues = true; };
@@ -47,13 +50,8 @@ in {
47 50
48 blacklistedKernelModules = [ "nouveau" ]; 51 blacklistedKernelModules = [ "nouveau" ];
49 52
50 # Use the systemd-boot EFI boot loader. 53 lanzaboote.configurationLimit = 15;
51 loader = { 54 loader = {
52 systemd-boot = {
53 enable = true;
54 configurationLimit = 15;
55 netbootxyz.enable = true;
56 };
57 efi.canTouchEfiVariables = true; 55 efi.canTouchEfiVariables = true;
58 timeout = null; 56 timeout = null;
59 }; 57 };
@@ -64,19 +62,27 @@ in {
64 kernelPatches = [ 62 kernelPatches = [
65 { name = "edac-config"; 63 { name = "edac-config";
66 patch = null; 64 patch = null;
67 extraStructuredConfig = with lib.kernel; { 65 structuredExtraConfig = with lib.kernel; {
68 EDAC = yes; 66 EDAC = yes;
69 EDAC_IE31200 = yes; 67 EDAC_IE31200 = yes;
70 }; 68 };
71 } 69 }
72 { name = "zswap-default"; 70 { name = "zswap-default";
73 patch = null; 71 patch = null;
74 extraStructuredConfig = with lib.kernel; { 72 structuredExtraConfig = with lib.kernel; {
75 ZSWAP_DEFAULT_ON = yes; 73 ZSWAP_DEFAULT_ON = yes;
76 ZSWAP_SHRINKER_DEFAULT_ON = yes; 74 ZSWAP_SHRINKER_DEFAULT_ON = yes;
77 }; 75 };
78 } 76 }
79 ]; 77 ];
78 consoleLogLevel = 3;
79 kernelParams = [
80 "quiet"
81 "boot.shell_on_fail"
82 "udev.log_priority=3"
83 "rd.systemd.show_status=auto"
84 "plymouth.use-simpledrm"
85 ];
80 86
81 tmp.useTmpfs = true; 87 tmp.useTmpfs = true;
82 88
@@ -98,6 +104,8 @@ in {
98 server ptbtime2.ptb.de prefer iburst nts 104 server ptbtime2.ptb.de prefer iburst nts
99 server ptbtime3.ptb.de prefer iburst nts 105 server ptbtime3.ptb.de prefer iburst nts
100 server ptbtime4.ptb.de prefer iburst nts 106 server ptbtime4.ptb.de prefer iburst nts
107 pool ntppool1.time.nl prefer iburst nts
108 pool ntppool2.time.nl prefer iburst nts
101 109
102 authselectmode require 110 authselectmode require
103 minsources 3 111 minsources 3
@@ -394,10 +402,10 @@ in {
394 402
395 thinkfan.enable = true; 403 thinkfan.enable = true;
396 404
397 logind = { 405 logind.settings.Login = {
398 lidSwitch = "suspend"; 406 HandleLidSwitch = "suspend";
399 lidSwitchDocked = "ignore"; 407 HandleLidSwitchDocked = "ignore";
400 lidSwitchExternalPower = "ignore"; 408 HandleLidSwitchExternalPower = "ignore";
401 }; 409 };
402 410
403 atd = { 411 atd = {
@@ -439,11 +447,6 @@ in {
439 447
440 systemd.tmpfiles.settings = { 448 systemd.tmpfiles.settings = {
441 "10-localtime"."/etc/localtime".L.argument = "/.bcachefs/etc/localtime"; 449 "10-localtime"."/etc/localtime".L.argument = "/.bcachefs/etc/localtime";
442
443 # "10-regreet"."/var/cache/regreet/cache.toml".C.argument = toString ((pkgs.formats.toml {}).generate "cache.toml" {
444 # last_user = "gkleen";
445 # user_to_last_sess.gkleen = "Niri";
446 # });
447 }; 450 };
448 451
449 users = { 452 users = {
@@ -569,10 +572,9 @@ in {
569 # setLdLibraryPath = true; 572 # setLdLibraryPath = true;
570 }; 573 };
571 574
572 firmware = [ pkgs.firmwareLinuxNonfree ]; 575 firmware = [ pkgs.linux-firmware ];
573 576
574 keyboard.uhk.enable = true; 577 keyboard.uhk.enable = true;
575 nitrokey.enable = true;
576 }; 578 };
577 579
578 # sound.enable = true; 580 # sound.enable = true;
@@ -626,6 +628,10 @@ in {
626 dconf.enable = true; 628 dconf.enable = true;
627 niri.enable = true; 629 niri.enable = true;
628 fuse.userAllowOther = true; 630 fuse.userAllowOther = true;
631 captive-browser = {
632 enable = true;
633 interface = "wlp82s0";
634 };
629 }; 635 };
630 636
631 services.pcscd.enable = true; 637 services.pcscd.enable = true;
@@ -637,11 +643,6 @@ in {
637 group = "users"; 643 group = "users";
638 }; 644 };
639 645
640 i18n.inputMethod = {
641 enable = true;
642 type = "ibus";
643 };
644
645 environment.sessionVariables."GTK_USE_PORTAL" = "1"; 646 environment.sessionVariables."GTK_USE_PORTAL" = "1";
646 xdg.portal = { 647 xdg.portal = {
647 enable = true; 648 enable = true;
@@ -652,7 +653,7 @@ in {
652 "org.freedesktop.impl.portal.OpenFile" = ["gtk"]; 653 "org.freedesktop.impl.portal.OpenFile" = ["gtk"];
653 "org.freedesktop.impl.portal.Access" = ["gtk"]; 654 "org.freedesktop.impl.portal.Access" = ["gtk"];
654 "org.freedesktop.impl.portal.Notification" = ["gtk"]; 655 "org.freedesktop.impl.portal.Notification" = ["gtk"];
655 "org.freedesktop.impl.portal.Secret" = ["gnome-keyring"]; 656 "org.freedesktop.impl.portal.Secret" = ["none"];
656 "org.freedesktop.impl.portal.Inhibit" = ["none"]; 657 "org.freedesktop.impl.portal.Inhibit" = ["none"];
657 }; 658 };
658 }; 659 };
@@ -672,24 +673,16 @@ in {
672 "/var/lib/bluetooth" 673 "/var/lib/bluetooth"
673 "/var/lib/upower" 674 "/var/lib/upower"
674 "/var/lib/postfix" 675 "/var/lib/postfix"
676 "/var/lib/regreet"
675 "/etc/NetworkManager/system-connections" 677 "/etc/NetworkManager/system-connections"
678 config.boot.lanzaboote.pkiBundle
676 ]; 679 ];
677 files = [ 680 files = [
678 ]; 681 ];
682 timezone = true;
679 }; 683 };
680 684
681 systemd.services.timezone = { 685 security.pam.services.quickshell = {};
682 wantedBy = [ "multi-user.target" ];
683 serviceConfig = {
684 Type = "oneshot";
685 RemainAfterExit = true;
686 ExecStart = "${pkgs.coreutils}/bin/cp -vP /.bcachefs/etc/localtime /etc/localtime";
687 ExecStop = "${pkgs.coreutils}/bin/cp -vP /etc/localtime /.bcachefs/etc/localtime";
688 };
689 };
690 services.tzupdate.enable = true;
691
692 security.pam.services.gtklock = {};
693 686
694 home-manager.sharedModules = [ flakeInputs.nixVirt.homeModules.default ]; 687 home-manager.sharedModules = [ flakeInputs.nixVirt.homeModules.default ];
695 688