summaryrefslogtreecommitdiff
path: root/hosts
diff options
context:
space:
mode:
Diffstat (limited to 'hosts')
-rw-r--r--hosts/sif/default.nix95
-rw-r--r--hosts/sif/greetd/default.nix44
-rw-r--r--hosts/sif/greetd/wallpaper.pngbin0 -> 6073128 bytes
-rw-r--r--hosts/sif/hw.nix3
-rw-r--r--hosts/sif/libvirt/default.nix1
-rw-r--r--hosts/sif/mail/default.nix2
6 files changed, 89 insertions, 56 deletions
diff --git a/hosts/sif/default.nix b/hosts/sif/default.nix
index 6dc6f3a9..32651e14 100644
--- a/hosts/sif/default.nix
+++ b/hosts/sif/default.nix
@@ -12,7 +12,7 @@ let
12in { 12in {
13 imports = with flake.nixosModules.systemProfiles; [ 13 imports = with flake.nixosModules.systemProfiles; [
14 ./hw.nix 14 ./hw.nix
15 ./mail ./libvirt 15 ./mail ./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
17 flakeInputs.nixos-hardware.nixosModules.lenovo-thinkpad-p1 17 flakeInputs.nixos-hardware.nixosModules.lenovo-thinkpad-p1
18 flakeInputs.impermanence.nixosModules.impermanence 18 flakeInputs.impermanence.nixosModules.impermanence
@@ -63,15 +63,20 @@ in {
63 plymouth.enable = true; 63 plymouth.enable = true;
64 64
65 kernelPackages = pkgs.linuxPackages_latest; 65 kernelPackages = pkgs.linuxPackages_latest;
66 extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
67 kernelModules = ["v4l2loopback"];
68 kernelPatches = [ 66 kernelPatches = [
69 { name = "edac-config"; 67 { name = "edac-config";
70 patch = null; 68 patch = null;
71 extraConfig = '' 69 extraStructuredConfig = with lib.kernel; {
72 EDAC y 70 EDAC = yes;
73 EDAC_IE31200 y 71 EDAC_IE31200 = yes;
74 ''; 72 };
73 }
74 { name = "zswap-default";
75 patch = null;
76 extraStructuredConfig = with lib.kernel; {
77 ZSWAP_DEFAULT_ON = yes;
78 ZSWAP_SHRINKER_DEFAULT_ON = yes;
79 };
75 } 80 }
76 ]; 81 ];
77 82
@@ -440,7 +445,7 @@ in {
440 }; 445 };
441 446
442 xserver = { 447 xserver = {
443 enable = true; 448 enable = false;
444 449
445 xkb = { 450 xkb = {
446 layout = "us"; 451 layout = "us";
@@ -466,46 +471,15 @@ in {
466 }; 471 };
467 libinput.enable = true; 472 libinput.enable = true;
468 473
469 greetd = { 474 envfs.enable = false;
470 enable = true;
471 # settings.default_session.command = let
472 # cfg = config.programs.regreet;
473 # in pkgs.writeShellScript "greeter" ''
474 # modprobe -r nvidia_drm
475
476 # exec ${pkgs.dbus}/bin/dbus-run-session ${lib.getExe pkgs.cage} ${lib.escapeShellArgs cfg.cageArgs} -- ${lib.getExe cfg.package}
477 # '';
478 };
479 }; 475 };
480 476
481 programs.regreet = {
482 enable = true;
483 theme = {
484 package = pkgs.equilux-theme;
485 name = "Equilux-compact";
486 };
487 iconTheme = {
488 package = pkgs.paper-icon-theme;
489 name = "Paper-Mono-Dark";
490 };
491 font = {
492 package = pkgs.fira;
493 name = "Fira Sans";
494 # size = 6;
495 };
496 cageArgs = [ "-s" "-m" "last" ];
497 settings = {
498 GTK.application_prefer_dark_theme = true;
499 };
500 };
501 programs.niri.enable = true;
502
503 systemd.tmpfiles.settings = { 477 systemd.tmpfiles.settings = {
504 "10-localtime"."/etc/localtime".L.argument = "/.bcachefs/etc/localtime"; 478 "10-localtime"."/etc/localtime".L.argument = "/.bcachefs/etc/localtime";
505 479
506 "10-regreet"."/var/cache/regreet/cache.toml".C.argument = toString ((pkgs.formats.toml {}).generate "cache.toml" { 480 "10-regreet"."/var/cache/regreet/cache.toml".C.argument = toString ((pkgs.formats.toml {}).generate "cache.toml" {
507 last_user = "gkleen"; 481 last_user = "gkleen";
508 user_to_last_sess.gkleen = "Niri"; 482 user_to_last_sess.gkleen = "niri";
509 }); 483 });
510 }; 484 };
511 485
@@ -615,15 +589,15 @@ in {
615 }; 589 };
616 590
617 nvidia = { 591 nvidia = {
618 open = true; 592 open = false;
619 modesetting.enable = true; 593 modesetting.enable = true;
620 powerManagement.enable = true; 594 powerManagement.enable = true;
621 prime = { 595 # prime = {
622 nvidiaBusId = "PCI:1:0:0"; 596 # nvidiaBusId = "PCI:1:0:0";
623 intelBusId = "PCI:0:2:0"; 597 # intelBusId = "PCI:0:2:0";
624 reverseSync.enable = true; 598 # reverseSync.enable = true;
625 offload.enableOffloadCmd = true; 599 # offload.enableOffloadCmd = true;
626 }; 600 # };
627 }; 601 };
628 602
629 graphics = { 603 graphics = {
@@ -697,6 +671,7 @@ in {
697 671
698 services.dbus.packages = with pkgs; 672 services.dbus.packages = with pkgs;
699 [ dbus dconf 673 [ dbus dconf
674 xdg-desktop-portal-gtk
700 ]; 675 ];
701 676
702 services.udisks2.enable = true; 677 services.udisks2.enable = true;
@@ -705,12 +680,8 @@ in {
705 light.enable = true; 680 light.enable = true;
706 wireshark.enable = true; 681 wireshark.enable = true;
707 dconf.enable = true; 682 dconf.enable = true;
708 }; 683 niri.enable = true;
709 684 fuse.userAllowOther = true;
710 zramSwap = {
711 enable = true;
712 algorithm = "zstd";
713 writebackDevice = "/dev/disk/by-label/swap";
714 }; 685 };
715 686
716 services.pcscd.enable = true; 687 services.pcscd.enable = true;
@@ -730,6 +701,16 @@ in {
730 environment.sessionVariables."GTK_USE_PORTAL" = "1"; 701 environment.sessionVariables."GTK_USE_PORTAL" = "1";
731 xdg.portal = { 702 xdg.portal = {
732 enable = true; 703 enable = true;
704 extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
705 config.niri = {
706 default = ["gnome" "gtk"];
707 "org.freedesktop.impl.portal.FileChooser" = ["gtk"];
708 "org.freedesktop.impl.portal.OpenFile" = ["gtk"];
709 "org.freedesktop.impl.portal.Access" = ["gtk"];
710 "org.freedesktop.impl.portal.Notification" = ["gtk"];
711 "org.freedesktop.impl.portal.Secret" = ["gnome-keyring"];
712 "org.freedesktop.impl.portal.Inhibit" = ["none"];
713 };
733 }; 714 };
734 715
735 environment.persistence."/.bcachefs" = { 716 environment.persistence."/.bcachefs" = {
@@ -737,11 +718,11 @@ in {
737 directories = [ 718 directories = [
738 "/nix" 719 "/nix"
739 "/root" 720 "/root"
721 "/home"
740 "/var/log" 722 "/var/log"
741 "/var/lib/sops-nix" 723 "/var/lib/sops-nix"
742 "/var/lib/nixos" 724 "/var/lib/nixos"
743 "/var/lib/systemd" 725 "/var/lib/systemd"
744 "/home"
745 "/var/lib/chrony" 726 "/var/lib/chrony"
746 "/var/lib/fprint" 727 "/var/lib/fprint"
747 "/var/lib/bluetooth" 728 "/var/lib/bluetooth"
@@ -770,6 +751,10 @@ in {
770 751
771 home-manager.sharedModules = [ flakeInputs.nixVirt.homeModules.default ]; 752 home-manager.sharedModules = [ flakeInputs.nixVirt.homeModules.default ];
772 753
754 environment.pathsToLink = [
755 "share/zsh"
756 ];
757
773 system.stateVersion = "24.11"; 758 system.stateVersion = "24.11";
774 }; 759 };
775} 760}
diff --git a/hosts/sif/greetd/default.nix b/hosts/sif/greetd/default.nix
new file mode 100644
index 00000000..f609fc05
--- /dev/null
+++ b/hosts/sif/greetd/default.nix
@@ -0,0 +1,44 @@
1{ pkgs, ... }:
2{
3 config = {
4 services.greetd = {
5 enable = true;
6 # settings.default_session.command = let
7 # cfg = config.programs.regreet;
8 # in pkgs.writeShellScript "greeter" ''
9 # modprobe -r nvidia_drm
10
11 # exec ${pkgs.dbus}/bin/dbus-run-session ${lib.getExe pkgs.cage} ${lib.escapeShellArgs cfg.cageArgs} -- ${lib.getExe cfg.package}
12 # '';
13 };
14 programs.regreet = {
15 enable = true;
16 theme = {
17 package = pkgs.equilux-theme;
18 name = "Equilux-compact";
19 };
20 iconTheme = {
21 package = pkgs.paper-icon-theme;
22 name = "Paper-Mono-Dark";
23 };
24 font = {
25 package = pkgs.fira;
26 name = "Fira Sans";
27 # size = 6;
28 };
29 cageArgs = [ "-s" "-m" "last" ];
30 settings = {
31 GTK.application_prefer_dark_theme = true;
32 widget.clock.format = "%F %H:%M:%S%:z";
33 background = {
34 path = pkgs.runCommand "wallpaper.png" {
35 buildInputs = with pkgs; [ imagemagick ];
36 } ''
37 magick ${./wallpaper.png} -filter Gaussian -resize 6.25% -define filter:sigma=2.5 -resize 1600% "$out"
38 '';
39 fit = "Cover";
40 };
41 };
42 };
43 };
44}
diff --git a/hosts/sif/greetd/wallpaper.png b/hosts/sif/greetd/wallpaper.png
new file mode 100644
index 00000000..20fc761a
--- /dev/null
+++ b/hosts/sif/greetd/wallpaper.png
Binary files differ
diff --git a/hosts/sif/hw.nix b/hosts/sif/hw.nix
index d1fb2934..1bcf0261 100644
--- a/hosts/sif/hw.nix
+++ b/hosts/sif/hw.nix
@@ -19,6 +19,9 @@
19 "/var/lib/sops-nix".neededForBoot = true; 19 "/var/lib/sops-nix".neededForBoot = true;
20 "/var/lib/systemd".neededForBoot = true; 20 "/var/lib/systemd".neededForBoot = true;
21 }; 21 };
22 swapDevices = [
23 { label = "swap"; }
24 ];
22 # system.etc.overlay.enable = false; 25 # system.etc.overlay.enable = false;
23 26
24 boot.initrd.systemd.packages = [ 27 boot.initrd.systemd.packages = [
diff --git a/hosts/sif/libvirt/default.nix b/hosts/sif/libvirt/default.nix
index d0be7dff..9712d0d9 100644
--- a/hosts/sif/libvirt/default.nix
+++ b/hosts/sif/libvirt/default.nix
@@ -8,6 +8,7 @@ with flakeInputs.nixVirt.lib;
8 qemu.swtpm.enable = true; 8 qemu.swtpm.enable = true;
9 allowedBridges = ["virbr0" "rz-0971" "rz-2403"]; 9 allowedBridges = ["virbr0" "rz-0971" "rz-2403"];
10 }; 10 };
11 virtualisation.spiceUSBRedirection.enable = true;
11 virtualisation.libvirt = { 12 virtualisation.libvirt = {
12 enable = true; 13 enable = true;
13 swtpm.enable = true; 14 swtpm.enable = true;
diff --git a/hosts/sif/mail/default.nix b/hosts/sif/mail/default.nix
index f36cd599..8d6cd705 100644
--- a/hosts/sif/mail/default.nix
+++ b/hosts/sif/mail/default.nix
@@ -1,4 +1,4 @@
1{ config, pkgs, ... }: 1{ config, lib, pkgs, ... }:
2{ 2{
3 services.postfix = { 3 services.postfix = {
4 enable = true; 4 enable = true;