2023-10-03 11:52:44 -05:00
|
|
|
{
|
2023-10-03 13:18:12 -05:00
|
|
|
inputs,
|
|
|
|
outputs,
|
2023-10-03 11:52:44 -05:00
|
|
|
lib,
|
2023-10-04 13:49:48 -05:00
|
|
|
# config,
|
2024-02-05 14:25:07 -06:00
|
|
|
pkgs,
|
2023-10-03 11:52:44 -05:00
|
|
|
...
|
|
|
|
}: {
|
2023-10-03 13:18:12 -05:00
|
|
|
networking.hostName = "thinker";
|
2023-10-03 11:52:44 -05:00
|
|
|
|
2024-01-17 09:19:07 -06:00
|
|
|
imports = with outputs.nixosModules; [
|
2024-02-16 16:10:36 -06:00
|
|
|
outputs.diskoConfigurations.thinker
|
2024-01-17 09:19:07 -06:00
|
|
|
inputs.hardware.nixosModules.lenovo-thinkpad-t480
|
|
|
|
inputs.hardware.nixosModules.common-pc-laptop-ssd
|
|
|
|
desktop-usage
|
2024-05-15 19:29:46 -05:00
|
|
|
music-production
|
2024-01-17 09:19:07 -06:00
|
|
|
podman
|
2024-03-30 15:43:19 -05:00
|
|
|
# gnome
|
|
|
|
kde-plasma
|
2024-01-17 09:19:07 -06:00
|
|
|
postgres
|
|
|
|
wifi
|
|
|
|
];
|
|
|
|
|
2024-02-05 14:25:07 -06:00
|
|
|
environment = {
|
|
|
|
systemPackages = with pkgs; [
|
|
|
|
spotify
|
|
|
|
discord
|
|
|
|
slack
|
2024-03-30 15:43:19 -05:00
|
|
|
godot_4
|
|
|
|
fractal
|
|
|
|
prismlauncher
|
|
|
|
variety
|
|
|
|
radeontop
|
|
|
|
sops
|
|
|
|
obs-studio
|
|
|
|
xh
|
2024-02-05 14:25:07 -06:00
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2024-01-17 09:19:07 -06:00
|
|
|
boot = {
|
|
|
|
loader = {
|
|
|
|
efi.canTouchEfiVariables = true;
|
|
|
|
systemd-boot.enable = true;
|
|
|
|
};
|
|
|
|
# sudo filefrag -v /swap/swapfile | awk '$1=="0:" {print substr($4, 1, length($4)-2)}'
|
|
|
|
# the above won't work for btrfs, instead you need
|
|
|
|
# btrfs inspect-internal map-swapfile -r /swap/swapfile
|
|
|
|
# https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Hibernation_into_swap_file
|
|
|
|
kernelParams = ["boot.shell_on_fail" "resume_offset=22816000"];
|
|
|
|
initrd.availableKernelModules = ["xhci_pci" "nvme" "ahci"];
|
|
|
|
};
|
2024-04-04 09:24:03 -05:00
|
|
|
services.tlp = {
|
2024-05-15 19:29:46 -05:00
|
|
|
enable = false;
|
2024-04-04 09:24:03 -05:00
|
|
|
};
|
2024-05-15 19:29:46 -05:00
|
|
|
services.power-profiles-daemon.enable = true;
|
2024-01-17 09:19:07 -06:00
|
|
|
hardware.bluetooth.enable = true;
|
|
|
|
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
|
|
|
services.printing.enable = true; # I own a printer in the year of our Lord 2023
|
|
|
|
|
|
|
|
home-manager.users.daniel = {
|
|
|
|
imports = with outputs.homeManagerModules; [
|
|
|
|
sway
|
2024-07-10 09:57:10 -05:00
|
|
|
password-manager
|
2024-02-05 14:25:07 -06:00
|
|
|
firefox-no-tabs
|
2024-03-30 15:43:19 -05:00
|
|
|
# wallpaper-manager
|
2024-01-17 09:19:07 -06:00
|
|
|
# sway-laptop
|
|
|
|
# hyprland
|
|
|
|
];
|
|
|
|
|
|
|
|
home = {
|
|
|
|
stateVersion = "24.05";
|
|
|
|
};
|
2024-03-30 15:43:19 -05:00
|
|
|
|
|
|
|
services.mako.enable = lib.mkForce false; # don't use mako when using plasma
|
2024-01-17 09:19:07 -06:00
|
|
|
};
|
|
|
|
|
2023-11-21 10:14:58 -06:00
|
|
|
swapDevices = [
|
|
|
|
# TODO: move this to disko?
|
|
|
|
# sudo btrfs subvolume create /swap
|
|
|
|
# sudo btrfs filesystem mkswapfile --size 32g --uuid clear /swap/swapfile
|
|
|
|
# sudo swapon /swap/swapfile
|
|
|
|
{device = "/swap/swapfile";}
|
|
|
|
];
|
|
|
|
|
|
|
|
# findmnt -no UUID -T /swap/swapfile
|
|
|
|
boot.resumeDevice = "/dev/disk/by-uuid/aacd6814-a5a2-457a-bf65-8d970cb1f03d";
|
|
|
|
|
2024-04-04 09:24:03 -05:00
|
|
|
# services.logind = {
|
|
|
|
# lidSwitch = "suspend-then-hibernate";
|
|
|
|
# extraConfig = ''
|
|
|
|
# HandlePowerKey=suspend-then-hibernate
|
|
|
|
# IdleAction=suspend-then-hibernate
|
|
|
|
# IdleActionSec=10m
|
|
|
|
# HandleLidSwitchDocked=ignore
|
|
|
|
# '';
|
|
|
|
# };
|
|
|
|
# systemd.sleep.extraConfig = "HibernateDelaySec=30m";
|
2023-11-21 10:14:58 -06:00
|
|
|
|
2023-09-22 12:56:48 -05:00
|
|
|
networking = {
|
|
|
|
firewall = {
|
|
|
|
enable = true;
|
|
|
|
allowPing = true;
|
2023-10-03 11:52:44 -05:00
|
|
|
allowedTCPPorts = [22];
|
|
|
|
allowedUDPPorts = [];
|
2023-09-22 12:56:48 -05:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-10-06 20:11:44 -05:00
|
|
|
# networking.networkmanager.enable = false;
|
|
|
|
# systemd.services.NetworkManager-wait-online.enable = lib.mkDefault false;
|
|
|
|
# networking.wireless.iwd.enable = true;
|
|
|
|
|
2023-09-29 16:57:26 -05:00
|
|
|
system.stateVersion = "23.11";
|
2023-09-04 11:40:30 -05:00
|
|
|
}
|