2024-03-12 22:14:08 -04:00
|
|
|
# Framework Laptop 13 with AMD Ryzen 7640U, 32GB RAM, 1TB SSD.
|
2024-03-12 22:08:02 -04:00
|
|
|
{
|
2024-04-07 22:16:33 -04:00
|
|
|
config,
|
2024-08-14 12:57:09 -04:00
|
|
|
lib,
|
2024-10-16 01:00:10 -04:00
|
|
|
pkgs,
|
2024-05-24 09:37:37 -04:00
|
|
|
self,
|
2024-04-07 22:16:33 -04:00
|
|
|
...
|
|
|
|
}: {
|
2024-03-24 14:06:24 -04:00
|
|
|
imports = [
|
2024-05-24 09:37:37 -04:00
|
|
|
./home.nix
|
2024-07-22 19:56:56 -04:00
|
|
|
./secrets.nix
|
2024-08-15 15:55:39 -04:00
|
|
|
./stylix.nix
|
2024-09-23 23:59:07 -04:00
|
|
|
(import ./../../disko/luks-btrfs-subvolumes.nix {disks = ["/dev/nvme0n1"];})
|
2024-08-22 07:46:19 -04:00
|
|
|
self.nixosModules.common-auto-upgrade
|
|
|
|
self.nixosModules.common-base
|
2024-08-22 09:09:30 -04:00
|
|
|
self.nixosModules.common-locale
|
2024-08-22 07:46:19 -04:00
|
|
|
self.nixosModules.common-mauville-share
|
|
|
|
self.nixosModules.common-nix
|
|
|
|
self.nixosModules.common-overlays
|
|
|
|
self.nixosModules.common-pkgs
|
|
|
|
self.nixosModules.common-tailscale
|
|
|
|
self.nixosModules.common-wifi-profiles
|
2024-09-27 10:21:18 -04:00
|
|
|
self.nixosModules.hw-framework-13-amd-7000
|
2024-03-24 14:06:24 -04:00
|
|
|
];
|
2024-03-12 22:08:02 -04:00
|
|
|
|
2024-08-14 12:57:09 -04:00
|
|
|
boot = {
|
2024-08-24 15:25:41 -04:00
|
|
|
initrd.systemd.enable = true;
|
2024-08-14 12:57:09 -04:00
|
|
|
|
2024-08-24 15:25:41 -04:00
|
|
|
lanzaboote = {
|
|
|
|
enable = true;
|
|
|
|
pkiBundle = "/etc/secureboot";
|
|
|
|
};
|
|
|
|
|
2024-08-14 12:57:09 -04:00
|
|
|
loader = {
|
|
|
|
efi.canTouchEfiVariables = true;
|
2024-08-24 15:25:41 -04:00
|
|
|
systemd-boot.enable = lib.mkForce false;
|
2024-08-14 12:57:09 -04:00
|
|
|
};
|
2024-03-28 16:13:46 -04:00
|
|
|
};
|
2024-03-12 22:17:57 -04:00
|
|
|
|
2024-09-08 15:59:35 -04:00
|
|
|
environment.variables.GDK_SCALE = "2";
|
2024-06-22 12:10:36 -04:00
|
|
|
networking.hostName = "lavaridge";
|
2024-10-16 01:00:10 -04:00
|
|
|
|
|
|
|
services.udev.extraRules = let
|
|
|
|
hyprlandDynamicRes = pkgs.writeShellScript "hyprland-dynamic-resolution" ''
|
|
|
|
MON="eDP-1"
|
|
|
|
RES="2880x1920"
|
|
|
|
|
|
|
|
for dir in /run/user/*; do
|
|
|
|
for hypr_dir in "$dir/hypr/"*/; do
|
|
|
|
socket="''${hypr_dir}.socket.sock"
|
|
|
|
if [[ -S $socket ]]; then
|
|
|
|
monitor_info=$(echo -e "monitors" | ${lib.getExe pkgs.socat} - UNIX-CONNECT:"$socket")
|
|
|
|
|
|
|
|
if echo "$monitor_info" | grep -q "$MON"; then
|
|
|
|
echo -e "keyword monitor $MON, $RES@$1, 0x0, 2, vrr, $2" | ${lib.getExe pkgs.socat} - UNIX-CONNECT:"$socket"
|
|
|
|
fi
|
|
|
|
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
in ''
|
|
|
|
SUBSYSTEM=="power_supply", ATTR{online}=="1", ACTION=="change", RUN+="${hyprlandDynamicRes} 120 1"
|
|
|
|
SUBSYSTEM=="power_supply", ATTR{online}=="0", ACTION=="change", RUN+="${hyprlandDynamicRes} 60 0"
|
|
|
|
'';
|
|
|
|
|
2024-06-22 12:10:36 -04:00
|
|
|
system.stateVersion = "24.05";
|
2024-03-15 00:02:03 -04:00
|
|
|
|
2024-06-26 22:13:02 -04:00
|
|
|
ar = {
|
2024-06-22 12:10:36 -04:00
|
|
|
apps = {
|
2024-06-28 21:07:20 -04:00
|
|
|
firefox.enable = true;
|
2024-06-22 12:10:36 -04:00
|
|
|
podman.enable = true;
|
2024-06-28 21:07:20 -04:00
|
|
|
steam.enable = true;
|
2024-06-22 12:10:36 -04:00
|
|
|
virt-manager.enable = true;
|
2024-04-18 14:21:33 -04:00
|
|
|
};
|
2024-06-22 12:10:36 -04:00
|
|
|
|
2024-04-18 14:21:33 -04:00
|
|
|
desktop = {
|
2024-08-24 15:25:41 -04:00
|
|
|
greetd.enable = true;
|
2024-05-26 02:30:20 -04:00
|
|
|
hyprland.enable = true;
|
2024-07-25 21:03:26 -04:00
|
|
|
sway.enable = true;
|
2024-04-18 14:21:33 -04:00
|
|
|
};
|
2024-06-22 12:10:36 -04:00
|
|
|
|
2024-08-19 21:40:31 -04:00
|
|
|
laptopMode = true;
|
|
|
|
|
2024-06-22 12:10:36 -04:00
|
|
|
users.aly = {
|
|
|
|
enable = true;
|
|
|
|
password = "$y$j9T$NSS7QcEtN4yiigPyofwlI/$nxdgz0lpySa0heDMjGlHe1gX3BWf48jK6Tkfg4xMEs6";
|
2024-07-08 01:29:09 -04:00
|
|
|
syncthing = {
|
|
|
|
enable = true;
|
|
|
|
certFile = config.age.secrets.syncthingCert.path;
|
|
|
|
keyFile = config.age.secrets.syncthingKey.path;
|
|
|
|
};
|
2024-06-22 12:10:36 -04:00
|
|
|
};
|
|
|
|
};
|
2024-03-12 22:08:02 -04:00
|
|
|
}
|