diff --git a/disko/default.nix b/disko/default.nix index fae8a8e..04577ef 100644 --- a/disko/default.nix +++ b/disko/default.nix @@ -3,9 +3,9 @@ ESP = size: { priority = 1; start = "1M"; - end = size; label = "EFI"; name = "ESP"; + end = size; type = "EF00"; content = { type = "filesystem"; @@ -37,20 +37,7 @@ in { content = { type = "gpt"; partitions = { - ESP = { - label = "EFI"; - name = "ESP"; - size = "4G"; - type = "EF00"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - mountOptions = [ - "defaults" - ]; - }; - }; + ESP = ESP "4G"; swap = { size = swapSize; content = { @@ -64,7 +51,6 @@ in { content = { type = "luks"; name = "crypted"; - extraOpenArgs = ["--allow-discards"]; # if you want to use the key for interactive login be sure there is no trailing newline # for example use `echo -n "password" > /tmp/secret.key` keyFile = "/tmp/secret.key"; # Interactive @@ -73,10 +59,9 @@ in { content = { type = "btrfs"; extraArgs = ["-f"]; - mountpoint = "/partition-root"; subvolumes = { "/rootfs" = { - mountpoint = "/rootfs"; + mountpoint = "/"; mountOptions = ["compress=zstd"]; }; "/home" = { @@ -108,26 +93,12 @@ in { content = { type = "gpt"; partitions = { - ESP = { - label = "EFI"; - name = "ESP"; - size = "4G"; - type = "EF00"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - mountOptions = [ - "defaults" - ]; - }; - }; + ESP = ESP "4G"; luks = { size = "100%"; content = { type = "luks"; name = "crypted"; - extraOpenArgs = ["--allow-discards"]; # if you want to use the key for interactive login be sure there is no trailing newline # for example use `echo -n "password" > /tmp/secret.key` keyFile = "/tmp/secret.key"; # Interactive @@ -136,7 +107,6 @@ in { content = { type = "btrfs"; extraArgs = ["-f"]; - mountpoint = "/partition-root"; subvolumes = { "/root" = { mountpoint = "/"; diff --git a/flake.nix b/flake.nix index 28bb7f1..4b98250 100644 --- a/flake.nix +++ b/flake.nix @@ -461,7 +461,7 @@ modules = with nixosModules; [ home-manager-unstable-defaults - outputs.diskoConfigurations.standard + outputs.diskoConfigurations.standardWithHibernateSwap hardware.nixosModules.framework-13-7040-amd common @@ -595,7 +595,7 @@ swapSize = "32G"; }; } - outputs.diskoConfigurations.standardWithHibernateSwap + outputs.diskoConfigurations.standard hardware.nixosModules.lenovo-thinkpad-t480 hardware.nixosModules.common-pc-laptop-ssd @@ -603,7 +603,7 @@ common password-manager graphical-workstation - plasma6 + # plasma6 laptop gaming diff --git a/nixos/foxtrot.nix b/nixos/foxtrot.nix index 3bdd03b..5bd1820 100644 --- a/nixos/foxtrot.nix +++ b/nixos/foxtrot.nix @@ -1,248 +1,8 @@ -{pkgs, ...}: -/* -## source: https://community.frame.work/t/speakers-sound-quality/1078/82 -let - pipewire-speakers-profile-json = ''{ - "output": { - "blocklist": [], - "equalizer": { - "balance": 0.0, - "bypass": false, - "input-gain": 0.0, - "left": { - "band0": { - "frequency": 100.0, - "gain": 0.0, - "mode": "RLC (BT)", - "mute": false, - "q": 1.0, - "slope": "x4", - "solo": false, - "type": "Hi-pass" - }, - "band1": { - "frequency": 150.0, - "gain": 4.02, - "mode": "RLC (BT)", - "mute": false, - "q": 3.0, - "slope": "x1", - "solo": false, - "type": "Bell" - }, - "band2": { - "frequency": 600.0, - "gain": -5.07, - "mode": "RLC (BT)", - "mute": false, - "q": 4.000000000000008, - "slope": "x1", - "solo": false, - "type": "Bell" - }, - "band3": { - "frequency": 1200.0, - "gain": -3.49, - "mode": "RLC (BT)", - "mute": false, - "q": 4.17, - "slope": "x1", - "solo": false, - "type": "Bell" - }, - "band4": { - "frequency": 2000.0, - "gain": 1.43, - "mode": "RLC (BT)", - "mute": false, - "q": 4.0, - "slope": "x1", - "solo": false, - "type": "Bell" - }, - "band5": { - "frequency": 5300.0, - "gain": 3.84, - "mode": "RLC (BT)", - "mute": false, - "q": 2.64, - "slope": "x1", - "solo": false, - "type": "Bell" - }, - "band6": { - "frequency": 6000.0, - "gain": 4.02, - "mode": "RLC (BT)", - "mute": false, - "q": 4.36, - "slope": "x1", - "solo": false, - "type": "Hi-shelf" - }, - "band7": { - "frequency": 7500.0, - "gain": -2.09, - "mode": "RLC (BT)", - "mute": false, - "q": 3.0, - "slope": "x1", - "solo": false, - "type": "Bell" - }, - "band8": { - "frequency": 8000.0, - "gain": 2.01, - "mode": "RLC (BT)", - "mute": false, - "q": 4.36, - "slope": "x1", - "solo": false, - "type": "Bell" - }, - "band9": { - "frequency": 900.0, - "gain": -4.12, - "mode": "RLC (BT)", - "mute": false, - "q": 5.909999999999967, - "slope": "x1", - "solo": false, - "type": "Bell" - } - }, - "mode": "IIR", - "num-bands": 10, - "output-gain": -1.5, - "pitch-left": 0.0, - "pitch-right": 0.0, - "right": { - "band0": { - "frequency": 100.0, - "gain": 0.0, - "mode": "RLC (BT)", - "mute": false, - "q": 1.0, - "slope": "x4", - "solo": false, - "type": "Hi-pass" - }, - "band1": { - "frequency": 150.0, - "gain": 4.02, - "mode": "RLC (BT)", - "mute": false, - "q": 3.0, - "slope": "x1", - "solo": false, - "type": "Bell" - }, - "band2": { - "frequency": 600.0, - "gain": -5.07, - "mode": "RLC (BT)", - "mute": false, - "q": 4.000000000000008, - "slope": "x1", - "solo": false, - "type": "Bell" - }, - "band3": { - "frequency": 1200.0, - "gain": -3.49, - "mode": "RLC (BT)", - "mute": false, - "q": 4.17, - "slope": "x1", - "solo": false, - "type": "Bell" - }, - "band4": { - "frequency": 2000.0, - "gain": 1.43, - "mode": "RLC (BT)", - "mute": false, - "q": 4.0, - "slope": "x1", - "solo": false, - "type": "Bell" - }, - "band5": { - "frequency": 5300.0, - "gain": 3.84, - "mode": "RLC (BT)", - "mute": false, - "q": 2.64, - "slope": "x1", - "solo": false, - "type": "Bell" - }, - "band6": { - "frequency": 6000.0, - "gain": 4.02, - "mode": "RLC (BT)", - "mute": false, - "q": 4.36, - "slope": "x1", - "solo": false, - "type": "Hi-shelf" - }, - "band7": { - "frequency": 7500.0, - "gain": -2.09, - "mode": "RLC (BT)", - "mute": false, - "q": 3.0, - "slope": "x1", - "solo": false, - "type": "Bell" - }, - "band8": { - "frequency": 8000.0, - "gain": 2.01, - "mode": "RLC (BT)", - "mute": false, - "q": 4.36, - "slope": "x1", - "solo": false, - "type": "Bell" - }, - "band9": { - "frequency": 900.0, - "gain": -4.12, - "mode": "RLC (BT)", - "mute": false, - "q": 5.909999999999967, - "slope": "x1", - "solo": false, - "type": "Bell" - } - }, - "split-channels": false - }, - "loudness": { - "bypass": false, - "clipping": false, - "clipping-range": 6.0, - "fft": "4096", - "input-gain": 0.0, - "output-gain": 0.0, - "std": "ISO226-2003", - "volume": 6.999999999999991 - }, - "plugins_order": [ - "loudness", - "equalizer" - ] - } -}''; -in -*/ -{ +{pkgs, ...}: { imports = [ { - system.stateVersion = "24.05"; - home-manager.users.daniel.home.stateVersion = "24.05"; + system.stateVersion = "24.11"; + home-manager.users.daniel.home.stateVersion = "24.11"; networking.hostName = "foxtrot"; } { @@ -254,10 +14,9 @@ in 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/81c3354a-f629-4b6b-a249-7705aeb9f0d5"; + # boot.resumeDevice = "/dev/disk/by-uuid/81c3354a-f629-4b6b-a249-7705aeb9f0d5"; # systemd.sleep.extraConfig = "HibernateDelaySec=180m"; services.fwupd.enable = true; services.fwupd.extraRemotes = ["lvfs-testing"]; diff --git a/nixos/thinker.nix b/nixos/thinker.nix index 3fd7a1b..a695440 100644 --- a/nixos/thinker.nix +++ b/nixos/thinker.nix @@ -12,9 +12,59 @@ 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"]; + # kernelParams = ["boot.shell_on_fail"]; initrd.availableKernelModules = ["xhci_pci" "nvme" "ahci"]; }; + home-manager.users.daniel = { + programs.hyprlock.settings = { + label = [ + { + monitor = ""; + font_size = 32; + + halign = "center"; + valign = "center"; + text_align = "center"; + color = "rgba(255, 255, 255, 0.5)"; + + position = "0 -500"; + font_family = "IosevkaLyteTerm"; + text = "cmd[update:30000] acpi"; + + shadow_passes = 3; + shadow_size = 1; + shadow_color = "rgba(0, 0, 0, 1.0)"; + shadow_boost = 1.0; + } + ]; + }; + services.hypridle = let + secondsPerMinute = 60; + lockSeconds = 10 * secondsPerMinute; + in { + settings = { + listener = [ + { + timeout = lockSeconds + 55; + on-timeout = ''systemctl suspend''; + } + ]; + }; + }; + + wayland.windowManager.hyprland = { + settings = { + exec-once = [ + "eww open bar0" + ]; + # See https://wiki.hyprland.org/Configuring/Keywords/ for more + monitor = [ + "eDP-1,1920x1080@60Hz,0x0,1.0" + ]; + }; + }; + }; + hardware.bluetooth.enable = true; }