Compare commits

...

2 Commits

Author SHA1 Message Date
7d1436ac54 1 2026-05-08 14:40:12 +09:00
e81e3be023 add hyprland 2026-05-08 11:41:28 +09:00
5 changed files with 128 additions and 45 deletions

View File

@@ -15,7 +15,38 @@ in {
./programs/hyprland.nix
];
services.logind.lidSwitch = "suspend";
services.logind = {
lidSwitch = "suspend-then-hibernate";
lidSwitchExternalPower = "suspend";
lidSwitchDocked = "ignore";
powerKey = "poweroff";
powerKeyLongPress = "poweroff";
};
systemd.sleep.extraConfig = ''
HibernateDelaySec=30min
SuspendState=mem
'';
services.tlp = {
enable = true;
settings = {
CPU_SCALING_GOVERNOR_ON_AC = "performance";
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
CPU_BOOST_ON_BAT = 0;
CPU_BOOST_ON_AC = 1;
PLATFORM_PROFILE_ON_AC = "performance";
PLATFORM_PROFILE_ON_BAT = "low-power";
START_CHARGE_THRESH_BAT0 = 75;
STOP_CHARGE_THRESH_BAT0 =
80; # remove these two if your laptop doesn't support charge thresholds
};
};
powerManagement.enable = true;
services.power-profiles-daemon.enable = false;
nixpkgs.config.allowUnfree = true;

82
flake.lock generated
View File

@@ -77,11 +77,11 @@
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1759850138,
"narHash": "sha256-fYHIxjTvVIAEDWzenUROuzDPxy1rBCXZNPgh4b1dfgo=",
"lastModified": 1777776915,
"narHash": "sha256-okg6j5wIwTZmdrNhB1TOxpyLtJN9/fV6qXobWGpp+Y8=",
"owner": "helix-editor",
"repo": "helix",
"rev": "5b0563419eeeaf0595c848865c46be4abad246a7",
"rev": "87d5c05c4432a079d3b7aaa10cda1cfe1803c18c",
"type": "github"
},
"original": {
@@ -98,11 +98,11 @@
]
},
"locked": {
"lastModified": 1758463745,
"narHash": "sha256-uhzsV0Q0I9j2y/rfweWeGif5AWe0MGrgZ/3TjpDYdGA=",
"lastModified": 1763992789,
"narHash": "sha256-WHkdBlw6oyxXIra/vQPYLtqY+3G8dUVZM8bEXk0t8x4=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "3b955f5f0a942f9f60cdc9cacb7844335d0f21c3",
"rev": "44831a7eaba4360fb81f2acc5ea6de5fde90aaa3",
"type": "github"
},
"original": {
@@ -187,11 +187,11 @@
"xdph": "xdph"
},
"locked": {
"lastModified": 1778151950,
"narHash": "sha256-iPVgukP0AgXJBD9d8M0yX35oTE//kaAos6Ux+zPC/tw=",
"lastModified": 1778199997,
"narHash": "sha256-vmCYnK7/iRQGWj+s0l3+cf/IVoUcCTrlFtgUCTwRdjU=",
"owner": "hyprwm",
"repo": "Hyprland",
"rev": "6b8b20100253c083227e611be20360f4d8e7794e",
"rev": "de9f8dc9831d921cd1ee30d5d14f45f0e345a8ca",
"type": "github"
},
"original": {
@@ -364,11 +364,11 @@
]
},
"locked": {
"lastModified": 1777492286,
"narHash": "sha256-PwuoEJQcjSKJNP5T55qhfDwIP0tw5zxEhfu8GDfKfeg=",
"lastModified": 1778179779,
"narHash": "sha256-Ri6rVf54CRD3aISHLhSY6H4tBScVjm9ebkv7rF2lcZM=",
"owner": "hyprwm",
"repo": "hyprutils",
"rev": "ec5c0c709706bad5b82f667fd8758eae442577ce",
"rev": "3e170e5ad010602671f5f25b327e8bdb8fdd532c",
"type": "github"
},
"original": {
@@ -431,13 +431,28 @@
"type": "github"
}
},
"nix-filter": {
"locked": {
"lastModified": 1693833173,
"narHash": "sha256-hlMABKrGbEiJD5dwUSfnw1CQ3bG7KKwDV+Nx3bEZd7U=",
"owner": "numtide",
"repo": "nix-filter",
"rev": "ac030bd9ba98e318e1f4c4328d60766ade8ebe8b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "nix-filter",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1759381078,
"narHash": "sha256-gTrEEp5gEspIcCOx9PD8kMaF1iEmfBcTbO0Jag2QhQs=",
"lastModified": 1775036866,
"narHash": "sha256-ZojAnPuCdy657PbTq5V0Y+AHKhZAIwSIT2cb8UgAz/U=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "7df7ff7d8e00218376575f0acdcc5d66741351ee",
"rev": "6201e203d09599479a3b3450ed24fa81537ebc4e",
"type": "github"
},
"original": {
@@ -465,11 +480,11 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1759994382,
"narHash": "sha256-wSK+3UkalDZRVHGCRikZ//CyZUJWDJkBDTQX1+G77Ow=",
"lastModified": 1767313136,
"narHash": "sha256-16KkgfdYqjaeRGBaYsNrhPRRENs0qzkQVUooNHtoy2w=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5da4a26309e796daa7ffca72df93dbe53b8164c7",
"rev": "ac62194c3917d5f474c1a844b6fd6da2db95077d",
"type": "github"
},
"original": {
@@ -507,7 +522,8 @@
"helix": "helix",
"home-manager": "home-manager",
"hyprland": "hyprland",
"nixpkgs": "nixpkgs_3"
"nixpkgs": "nixpkgs_3",
"split-monitor-workspaces": "split-monitor-workspaces"
}
},
"rust-overlay": {
@@ -518,11 +534,11 @@
]
},
"locked": {
"lastModified": 1759631821,
"narHash": "sha256-V8A1L0FaU/aSXZ1QNJScxC12uP4hANeRBgI4YdhHeRM=",
"lastModified": 1775358767,
"narHash": "sha256-f2eC+WIfhjevCPQILuV08i/kmKZzYZpUvkom/33VxCA=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "1d7cbdaad90f8a5255a89a6eddd8af24dc89cafe",
"rev": "20fd44bc663daa53a2575e01293e24e681d62244",
"type": "github"
},
"original": {
@@ -531,6 +547,28 @@
"type": "github"
}
},
"split-monitor-workspaces": {
"inputs": {
"hyprland": [
"hyprland"
],
"nix-filter": "nix-filter"
},
"locked": {
"lastModified": 1778019879,
"narHash": "sha256-E4P1ieHBhshPBWn5/OZvsPLsTbXfjUOQ/9/M1IbYYwk=",
"owner": "zjeffer",
"repo": "split-monitor-workspaces",
"rev": "d55750b18d9cc9b8b8a10e650d29950578471398",
"type": "github"
},
"original": {
"owner": "zjeffer",
"ref": "feat/zjeffer/lua",
"repo": "split-monitor-workspaces",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1689347949,

View File

@@ -4,11 +4,10 @@
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ];
boot.initrd.availableKernelModules =
[ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.kernelParams = [ "quiet" "modprobe.blacklist=dvb_usb_rtl28xxu" ];
@@ -20,26 +19,28 @@
options = [ "size=8G" "mode=1777" ];
};
fileSystems."/" =
{ device = "/dev/disk/by-uuid/f4bf5b26-3959-4087-ad60-b5eaaf9c7cd5";
fsType = "ext4";
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/f4bf5b26-3959-4087-ad60-b5eaaf9c7cd5";
fsType = "ext4";
};
boot.initrd.luks.devices."luks-28e5a617-073a-4385-9fc2-f0620a8ead08".device = "/dev/disk/by-uuid/28e5a617-073a-4385-9fc2-f0620a8ead08";
boot.initrd.luks.devices."luks-28e5a617-073a-4385-9fc2-f0620a8ead08".device =
"/dev/disk/by-uuid/28e5a617-073a-4385-9fc2-f0620a8ead08";
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/40B6-4877";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/40B6-4877";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
fileSystems."/mnt/share" =
{ device = "/dev/disk/by-uuid/0D608CA53E06CE7A";
fsType = "ntfs-3g";
options = [ "rw" "uid=1000" "gid=100" "umask=022" ];
};
fileSystems."/mnt/share" = {
device = "/dev/disk/by-uuid/0D608CA53E06CE7A";
fsType = "ntfs-3g";
options = [ "rw" "uid=1000" "gid=100" "umask=022" ];
};
swapDevices = [ ];
swapDevices = [{ device = "/dev/disk/by-label/nix-swap"; }];
boot.resumeDevice = "/dev/disk/by-label/nix-swap";
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
@@ -51,5 +52,6 @@
services.udev.packages = [ pkgs.rtl-sdr ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.cpu.intel.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View File

@@ -73,4 +73,7 @@ with pkgs; [
openocd
probe-rs-tools
cachix
hyprpolkitagent
mako
parted
]

View File

@@ -1,6 +1,6 @@
# X display system config
{ ... }: {
{ pkgs, ... }: {
hardware.graphics.enable = true;
services.xserver.enable = true;
services.xserver.wacom.enable = true;
@@ -11,6 +11,15 @@
user = "allen";
};
xdg.portal = {
enable = true;
extraPortals = with pkgs; [
xdg-desktop-portal-gtk
xdg-desktop-portal-gnome
];
config.common.default = "*";
};
services.xserver.desktopManager.gnome.enable = true;
services.xserver.xkb.layout = "us";
}