From 5f09255caf1a58325c8ccb4be4796c45a975d331 Mon Sep 17 00:00:00 2001 From: Adam0 Date: Sat, 23 May 2026 18:10:00 +0200 Subject: [PATCH] basically finished --- flake.lock | 116 +++++++++++------- flake.nix | 4 + lib/hyprland.nix | 13 -- modules/desktop/hyprland/gestures.nix | 6 +- .../desktop/hyprland/keybinds/cursor-zoom.nix | 64 ---------- modules/desktop/hyprland/keybinds/system.nix | 3 +- modules/desktop/noctalia/general.nix | 3 +- modules/desktop/noctalia/plugins.nix | 4 +- modules/desktop/tablet.nix | 47 +++++++ modules/nix/determinate.nix | 10 +- modules/nix/home-manager.nix | 12 +- modules/profiles/common/tweaks.nix | 11 +- modules/profiles/partitioning/default.nix | 5 + modules/profiles/partitioning/ext4.nix | 59 +++++++++ modules/profiles/personal.nix | 34 ++--- .../programs/tui/television/nix-search.nix | 8 +- modules/services/tmp.nix | 5 + todo.md | 4 +- 18 files changed, 245 insertions(+), 163 deletions(-) delete mode 100644 modules/desktop/hyprland/keybinds/cursor-zoom.nix create mode 100644 modules/desktop/tablet.nix create mode 100644 modules/profiles/partitioning/default.nix create mode 100644 modules/profiles/partitioning/ext4.nix create mode 100644 modules/services/tmp.nix diff --git a/flake.lock b/flake.lock index 073018e..3b7d2c6 100644 --- a/flake.lock +++ b/flake.lock @@ -172,12 +172,12 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1778179392, - "narHash": "sha256-W6zorvjBYbzMNvqKIqCdpDF4rq3gj50Xximl56YM9/I=", - "rev": "efd54faa68be8cd777b5c28cab11e638998a0853", - "revCount": 416, + "lastModified": 1779475417, + "narHash": "sha256-7/U/+X66C7XmLnt5JVJVtpx8wVDRU//Awaeqkq9+NNc=", + "rev": "8a9c57ea6b458a40589df60f26200b7d305354d1", + "revCount": 417, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/determinate/3.20.0/019e03c3-7dc0-7873-a333-9ab02d6f690c/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/determinate/3.21.0/019e5103-0940-7a50-bac6-f1c621bf31ff/source.tar.gz" }, "original": { "type": "tarball", @@ -187,37 +187,58 @@ "determinate-nixd-aarch64-darwin": { "flake": false, "locked": { - "narHash": "sha256-z4mCqKI3Qd6weuHrlfzGccJG0giym/VJhKv20ijRSs0=", + "narHash": "sha256-LNvx0qZsH8tbdgNfaig/x5Cf4r4UrXfU1m+0bO3D0E4=", "type": "file", - "url": "https://install.determinate.systems/determinate-nixd/tag/v3.20.0/macOS" + "url": "https://install.determinate.systems/determinate-nixd/tag/v3.21.0/macOS" }, "original": { "type": "file", - "url": "https://install.determinate.systems/determinate-nixd/tag/v3.20.0/macOS" + "url": "https://install.determinate.systems/determinate-nixd/tag/v3.21.0/macOS" } }, "determinate-nixd-aarch64-linux": { "flake": false, "locked": { - "narHash": "sha256-yW+VNepSRytzfanSssPMJPvwioCcmlZYaBX8++UFkAk=", + "narHash": "sha256-rKg7uVAEK8X3TTFGaWp8CVZuCAr3wHkMnuJOndhXJF0=", "type": "file", - "url": "https://install.determinate.systems/determinate-nixd/tag/v3.20.0/aarch64-linux" + "url": "https://install.determinate.systems/determinate-nixd/tag/v3.21.0/aarch64-linux" }, "original": { "type": "file", - "url": "https://install.determinate.systems/determinate-nixd/tag/v3.20.0/aarch64-linux" + "url": "https://install.determinate.systems/determinate-nixd/tag/v3.21.0/aarch64-linux" } }, "determinate-nixd-x86_64-linux": { "flake": false, "locked": { - "narHash": "sha256-+L102C3Hhkd1GlXmRm2eLTLsZKBxEvooiQZFqQRlBf0=", + "narHash": "sha256-vBCUEVPfY4+nxGDM62evpxJYEVqLTqdBGbCkmZ2sQhk=", "type": "file", - "url": "https://install.determinate.systems/determinate-nixd/tag/v3.20.0/x86_64-linux" + "url": "https://install.determinate.systems/determinate-nixd/tag/v3.21.0/x86_64-linux" }, "original": { "type": "file", - "url": "https://install.determinate.systems/determinate-nixd/tag/v3.20.0/x86_64-linux" + "url": "https://install.determinate.systems/determinate-nixd/tag/v3.21.0/x86_64-linux" + } + }, + "disko": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1768920986, + "narHash": "sha256-CNzzBsRhq7gg4BMBuTDObiWDH/rFYHEuDRVOwCcwXw4=", + "owner": "nix-community", + "repo": "disko", + "rev": "de5708739256238fb912c62f03988815db89ec9a", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "latest", + "repo": "disko", + "type": "github" } }, "eh": { @@ -550,11 +571,11 @@ ] }, "locked": { - "lastModified": 1779336838, - "narHash": "sha256-n1+l78hJRABp4cQHKeD0BVByT0vZLPqd09Tvoq8Q+d8=", + "lastModified": 1779507042, + "narHash": "sha256-7wOwi8B6D0BYsieZCnHZZj2sNUzgJhLoIVSfkwB7lxQ=", "owner": "nix-community", "repo": "home-manager", - "rev": "928d72376949e222ea4f07b44828a55b0136422e", + "rev": "509ed3c603349a9d43de9e2ae6613baea6bd5b34", "type": "github" }, "original": { @@ -1057,12 +1078,12 @@ "nixpkgs-regression": "nixpkgs-regression" }, "locked": { - "lastModified": 1778177425, - "narHash": "sha256-oyHvP5HDRe59opmjTrq2ED9lh+R9FrHyaCGPPNfBqWM=", - "rev": "f0ccb960d3ad5bff28acd9cabf8bdef885b5d52f", - "revCount": 25858, + "lastModified": 1779472733, + "narHash": "sha256-nV5OHwivEf392cB5MDwoVdDHSvy6Q+rRYZBHd9sePj4=", + "rev": "11f3aff904f84ae612e36e8bc578ac421fca74fa", + "revCount": 25967, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nix-src/3.20.0/019e03bc-3f83-7833-aba3-b691ef4956c7/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nix-src/3.21.0/019e50fb-8633-73d0-b673-b2e265950490/source.tar.gz" }, "original": { "type": "tarball", @@ -1078,11 +1099,11 @@ "nixpkgs": "nixpkgs_4" }, "locked": { - "lastModified": 1779306729, - "narHash": "sha256-ccC0CMMW6a4sz1L9Ze9uskiT3nvGMbRA5/ZAfUkYsZ0=", + "lastModified": 1779477384, + "narHash": "sha256-lByanSWg/pKyDJ2pMuphIxMuCMy7qpYG2/gGjp//UFk=", "owner": "xddxdd", "repo": "nix-cachyos-kernel", - "rev": "ac9f02824490d781e39e252d1fab0114fed1d9c7", + "rev": "86d7051a5694db99f4db6165bcaf15e7bba8672a", "type": "github" }, "original": { @@ -1137,11 +1158,11 @@ "nixpkgs-nixcord": "nixpkgs-nixcord" }, "locked": { - "lastModified": 1779412729, - "narHash": "sha256-BVySKNgjQk2JRD4hfs9UbFZzf8rfPOIEj3Pvi+GWXAE=", + "lastModified": 1779498537, + "narHash": "sha256-6LQjFDS69JufrN4sVsMNsXxeSF6BbDzMSbN7sVApsaA=", "owner": "kaylorben", "repo": "nixcord", - "rev": "396dd1b987be282e9957f418879ff241a157470e", + "rev": "45a98c17b0d9e695bdee92ab00c76657eddf47e7", "type": "github" }, "original": { @@ -1255,12 +1276,12 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1777826146, - "narHash": "sha256-wQ/iN5Zp5VIa3ebBibijPnLyKhor+xEbDy4d0goa9Zs=", - "rev": "73c703c22422b8951895a960959dbbaca7296492", - "revCount": 991389, + "lastModified": 1778869304, + "narHash": "sha256-30sZNZoA1cqF5JNO9fVX+wgiQYjB7HJqqJ4ztCDeBZE=", + "rev": "d233902339c02a9c334e7e593de68855ad26c4cb", + "revCount": 998534, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nixpkgs-weekly/0.1.991389%2Brev-73c703c22422b8951895a960959dbbaca7296492/019df6c8-934b-7d40-b402-027bb5def30f/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nixpkgs-weekly/0.1.998534%2Brev-d233902339c02a9c334e7e593de68855ad26c4cb/019e3efc-e09a-7ff1-b05f-0c8f85ba7441/source.tar.gz" }, "original": { "type": "tarball", @@ -1285,11 +1306,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1779273561, - "narHash": "sha256-O3UFKrh5oDyOwqD4Njdf7+SIxptOl3gHZyesYvNsIbw=", + "lastModified": 1779436535, + "narHash": "sha256-jJ8YPw+bnLy1c8oI0hO4NKvbCQOt9V1aSUzhpLPs3Cw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8e72e9888e67ce593df16546cd31e0d75544ad0d", + "rev": "d04de155b837ea2ba199ec83851b9dbffe57af08", "type": "github" }, "original": { @@ -1317,11 +1338,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1779414690, - "narHash": "sha256-N5FzTQ6c0ZFX4b7LeOMqYHccvQZTVMx5RBxrDeLgWYo=", - "rev": "6dedf69f94d03cbe7bdde106f2d4c23ae2a853bf", + "lastModified": 1779475168, + "narHash": "sha256-5kB9V6f63Htxk/O8vzfXXw/mOCrR6F75GO7fJvQ9pJA=", + "rev": "a0991c886dc83e6e9de01d5266e4842985b1850e", "type": "tarball", - "url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.05pre1003183.6dedf69f94d0/nixexprs.tar.xz" + "url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.05pre1003446.a0991c886dc8/nixexprs.tar.xz" }, "original": { "type": "tarball", @@ -1384,11 +1405,11 @@ ] }, "locked": { - "lastModified": 1779453694, - "narHash": "sha256-BXocsahzv3FY42jOX+Eq1LkIzziMF5mdrThX4I8y/ZQ=", + "lastModified": 1779551213, + "narHash": "sha256-CBWXFb//njiA2vB5CFuknX6HVhPGKMxLQ2w9K1fWQsI=", "owner": "nix-community", "repo": "NUR", - "rev": "c5ba1f764d8ffde01cab7a7ad79d77eedc66de4d", + "rev": "7f189705ebb1497af89b57c479f602fa69501f95", "type": "github" }, "original": { @@ -1504,6 +1525,7 @@ "root": { "inputs": { "determinate": "determinate", + "disko": "disko", "eh": "eh", "flake-file": "flake-file", "flake-parts": "flake-parts_2", @@ -1579,11 +1601,11 @@ "secrets": { "flake": false, "locked": { - "lastModified": 1779288886, - "narHash": "sha256-XLE3h3x93AJARUwOkjt9JZ5g8S91zRFYDCmZTA3GGFk=", + "lastModified": 1779478615, + "narHash": "sha256-AdsgPi/RA9eQWQFCn3iNyRoUzlkRfOkMsd6ndoRsUtk=", "ref": "refs/heads/main", - "rev": "b98e951cce0f1882e43516121318437cb62f07a3", - "revCount": 1, + "rev": "bf2aad377f3cf16f87172760b8e24f05011667de", + "revCount": 2, "type": "git", "url": "ssh://git@github.com/adam01110/secrets.git" }, diff --git a/flake.nix b/flake.nix index c6f8126..3bb931f 100644 --- a/flake.nix +++ b/flake.nix @@ -5,6 +5,10 @@ inputs = { determinate.url = "https://flakehub.com/f/DeterminateSystems/determinate/3"; + disko = { + url = "github:nix-community/disko?ref=latest"; + inputs.nixpkgs.follows = "nixpkgs"; + }; eh = { url = "github:NotAShelf/eh"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/lib/hyprland.nix b/lib/hyprland.nix index 0400a05..bdb54b7 100644 --- a/lib/hyprland.nix +++ b/lib/hyprland.nix @@ -60,17 +60,4 @@ in { hyprlandGroupNumbers = genList (index: index + 1) 5; hyprlandWorkspaceNumbers = genList (index: index + 1) 8; # keep-sorted end - - hyprlandResetCursorZoomLua = '' - function() - hl.config({ cursor = { zoom_factor = 1.0 } }) - end - ''; - - hyprlandCursorZoomLua = delta: '' - function() - local current = hl.get_config("cursor.zoom_factor") - hl.config({ cursor = { zoom_factor = math.max(1.0, current + ${delta}) } }) - end - ''; } diff --git a/modules/desktop/hyprland/gestures.nix b/modules/desktop/hyprland/gestures.nix index 9a24a76..2f5d08d 100644 --- a/modules/desktop/hyprland/gestures.nix +++ b/modules/desktop/hyprland/gestures.nix @@ -20,10 +20,12 @@ noctalia = "${getExe' config.programs.noctalia-shell.package "noctalia-shell"} ipc call"; overzicht = getExe config.programs.overzicht.package; # keep-sorted end + + cfg = config.programs.nixhypr.touch.enable; in { - options.hyprland.touch.enable = mkEnableOption "Enable touch-specific configuration"; + options.programs.nixhypr.touch.enable = mkEnableOption "Enable touch-specific configuration"; - config = mkIf config.hyprland.touch.enable { + config = mkIf cfg { programs.nixhypr = { gestures = [ { diff --git a/modules/desktop/hyprland/keybinds/cursor-zoom.nix b/modules/desktop/hyprland/keybinds/cursor-zoom.nix deleted file mode 100644 index 6a275ad..0000000 --- a/modules/desktop/hyprland/keybinds/cursor-zoom.nix +++ /dev/null @@ -1,64 +0,0 @@ -_: { - flake.modules.homeManager.hyprland = {lib, ...}: let - inherit - (lib.self) - # keep-sorted start - hyprlandCursorZoomLua - hyprlandResetCursorZoomLua - mkNixhyprBindGroup - # keep-sorted end - ; - in { - config.programs.nixhypr.bindGroups = [ - (mkNixhyprBindGroup "Cursor Zoom" [ - # keep-sorted start block=yes newline_separated=yes - { - description = "Reset zoom"; - - keys = ["SUPER" "SHIFT" "minus"]; - lua = hyprlandResetCursorZoomLua; - } - - { - description = "Reset zoom"; - - keys = ["SUPER" "SHIFT" "mouse_down"]; - lua = hyprlandResetCursorZoomLua; - } - - { - description = "Zoom in"; - - keys = ["SUPER" "equal"]; - lua = hyprlandCursorZoomLua "0.1"; - - options.repeating = true; - } - - { - description = "Zoom in"; - - keys = ["SUPER" "mouse_down"]; - lua = hyprlandCursorZoomLua "0.1"; - } - - { - description = "Zoom out"; - - keys = ["SUPER" "minus"]; - lua = hyprlandCursorZoomLua "-0.1"; - - options.repeating = true; - } - - { - description = "Zoom out"; - - keys = ["SUPER" "mouse_up"]; - lua = hyprlandCursorZoomLua "-0.1"; - } - # keep-sorted end - ]) - ]; - }; -} diff --git a/modules/desktop/hyprland/keybinds/system.nix b/modules/desktop/hyprland/keybinds/system.nix index f62e432..9272acd 100644 --- a/modules/desktop/hyprland/keybinds/system.nix +++ b/modules/desktop/hyprland/keybinds/system.nix @@ -3,7 +3,6 @@ _: { # keep-sorted start config, lib, - self, # keep-sorted end ... }: let @@ -21,7 +20,7 @@ _: { overzicht = "${getExe config.programs.overzicht.package} ipc call"; # keep-sorted end in { - imports = [ + imports = [ # keep-sorted start noctalia overzicht diff --git a/modules/desktop/noctalia/general.nix b/modules/desktop/noctalia/general.nix index 589e92a..9c11823 100644 --- a/modules/desktop/noctalia/general.nix +++ b/modules/desktop/noctalia/general.nix @@ -4,8 +4,7 @@ # Use sharp corners (no rounding) for consistent design. radius = 0; - # TODO: Replace with actual option. - cfgTouch = config.hyprland.touch.enable; + cfgTouch = config.programs.nixhypr.touch.enable; in { # keep-sorted start animationSpeed = 2; diff --git a/modules/desktop/noctalia/plugins.nix b/modules/desktop/noctalia/plugins.nix index 82fab58..6114318 100644 --- a/modules/desktop/noctalia/plugins.nix +++ b/modules/desktop/noctalia/plugins.nix @@ -73,8 +73,6 @@ pluginSettings = { # keep-sorted start block=yes newline_separated=yes - github-feed = mkOutOfStoreSymlink config.sops.templates."noctalia-github-config".path; - battery-monitor-plus = { # keep-sorted start hideIfNotDetected = false; @@ -84,6 +82,8 @@ # keep-sorted end }; + github-feed = mkOutOfStoreSymlink config.sops.templates."noctalia-github-config".path; + nvim-session-provider.sessionDir = "${stateHome}/nvf/sessions"; screen-recorder = { diff --git a/modules/desktop/tablet.nix b/modules/desktop/tablet.nix new file mode 100644 index 0000000..6fcb0e4 --- /dev/null +++ b/modules/desktop/tablet.nix @@ -0,0 +1,47 @@ +{self, ...}: { + flake.modules.homeManager.tablet = { + # keep-sorted start + config, + lib, + # keep-sorted end + ... + }: let + inherit + (lib) + # keep-sorted start + attrNames + filter + head + mkIf + # keep-sorted end + ; + + monitors = config.hyprland.monitors or {}; + candidates = filter ( + name: (monitors.${name}.position or null) == "0x0" + ) (attrNames monitors); + in { + imports = [self.modules.homeManager.hyprland]; + + config = mkIf (candidates != []) { + programs.nixhypr.devices = [ + { + name = "opentabletdriver-virtual-artist-tablet"; + output = head candidates; + transform = 0; + } + ]; + }; + }; + + flake.modules.nixos.tablet = { + hardware = { + # keep-sorted start newline_separated=yes + opentabletdriver.enable = true; + + # Required by opentabletdriver. + uinput.enable = true; + # keep-sorted end + }; + }; +} diff --git a/modules/nix/determinate.nix b/modules/nix/determinate.nix index d37417a..3bc56d4 100644 --- a/modules/nix/determinate.nix +++ b/modules/nix/determinate.nix @@ -1,4 +1,8 @@ -{inputs, ...}: { +{ + inputs, + self, + ... +}: { flake-file.inputs = { determinate.url = "https://flakehub.com/f/DeterminateSystems/determinate/3"; }; @@ -9,7 +13,9 @@ nix = inputs.determinate.packages.${system}.default; }; - flake.modules.nixos.determinate = { + flake.modules.generic.determinate = { + nixpkgs.overlays = [self.overlays.determinate]; + nix.settings = let cache = "https://install.determinate.systems"; in { diff --git a/modules/nix/home-manager.nix b/modules/nix/home-manager.nix index 0064f89..7769473 100644 --- a/modules/nix/home-manager.nix +++ b/modules/nix/home-manager.nix @@ -1,4 +1,12 @@ -{inputs, ...}: { +{ + inputs, + self, + ... +}: { + imports = [inputs.home-manager.flakeModules.home-manager]; + + flake.homeModules = self.modules.homeManager; + flake-file.inputs = { home-manager = { url = "github:nix-community/home-manager"; @@ -6,8 +14,6 @@ }; }; - imports = [inputs.home-manager.flakeModules.home-manager]; - flake.modules.nixos.home-manager = { # keep-sorted start config, diff --git a/modules/profiles/common/tweaks.nix b/modules/profiles/common/tweaks.nix index 93ce277..2e439ce 100644 --- a/modules/profiles/common/tweaks.nix +++ b/modules/profiles/common/tweaks.nix @@ -17,7 +17,7 @@ # keep-sorted end ; in { - options.optTweaks.rcuLazy.enable = mkEnableOption "Enable RCU lazy mode."; + options.tweaks.rcuLazy.enable = mkEnableOption "Enable RCU lazy mode."; config = { # keep-sorted start block=yes newline_separated=yes @@ -37,13 +37,11 @@ # Memory and system tuning for desktop responsiveness. kernel.sysctl = { - # Prefer compressed swap sooner to keep file cache and anonymous memory flexible. # keep-sorted start "vm.swappiness" = 100; "vm.vfs_cache_pressure" = 50; # keep-sorted end - # Cap dirty data in bytes so writeback starts predictably across ram sizes. # keep-sorted start "vm.dirty_background_bytes" = 67108864; "vm.dirty_bytes" = 268435456; @@ -51,20 +49,17 @@ "vm.page-cluster" = 0; # keep-sorted end - # Drop watchdog and console noise that can add scheduler jitter. # keep-sorted start "kernel.nmi_watchdog" = 0; "kernel.printk" = "3 3 3 3"; "kernel.unprivileged_userns_clone" = 1; # keep-sorted end - # Keep kernel address exposure and kexec locked down despite the performance focus. # keep-sorted start "kernel.kexec_load_disabled" = 1; "kernel.kptr_restrict" = 2; # keep-sorted end - # Leave headroom for heavier desktop and gaming network bursts. # keep-sorted start "fs.file-max" = 2097152; "net.core.netdev_max_backlog" = 4096; @@ -84,7 +79,7 @@ "lru_gen=y" ] # Optionally enable rcu lazy mode for battery life on laptops. - ++ optional config.optTweaks.rcuLazy.enable "rcutree.enable_rcu_lazy=1"; + ++ optional config.tweaks.rcuLazy.enable "rcutree.enable_rcu_lazy=1"; }; # Assorted low-level tweaks and helper tools. @@ -98,6 +93,8 @@ # Systemd limits and tmpfiles overrides. systemd = { + coredump.settings.Coredump.Storage = "journal"; + tmpfiles.rules = [ "e /var/lib/systemd/coredump - - - 3d" diff --git a/modules/profiles/partitioning/default.nix b/modules/profiles/partitioning/default.nix new file mode 100644 index 0000000..c7b8adf --- /dev/null +++ b/modules/profiles/partitioning/default.nix @@ -0,0 +1,5 @@ +{inputs, ...}: { + flake.modules.nixos.disko = { + imports = [inputs.disko.nixosModules.disko]; + }; +} diff --git a/modules/profiles/partitioning/ext4.nix b/modules/profiles/partitioning/ext4.nix new file mode 100644 index 0000000..443a91a --- /dev/null +++ b/modules/profiles/partitioning/ext4.nix @@ -0,0 +1,59 @@ +{inputs, ...}: { + flake-file.inputs.disko = { + url = "github:nix-community/disko?ref=latest"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + imports = [inputs.disko.flakeModules.disko]; + + flake.diskoConfigurations.ext4 = { + disko.devices = { + disk = { + main = { + type = "disk"; + device = "/dev/nvme0n1"; + content = { + type = "gpt"; + partitions = { + ESP = { + size = "256M"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = ["umask=0077"]; + }; + }; + + nixos = { + size = "100%"; + content = { + type = "luks"; + name = "crypted"; + settings.allowDiscards = true; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + mountOptions = [ + # #keep-sorted start + "commit=8" + "data=writeback" + "defaults" + "errors=remount-ro" + "fast_commit" + "journal_async_commit" + "noatime" + # keep-sorted end + ]; + }; + }; + }; + }; + }; + }; + }; + }; + }; +} diff --git a/modules/profiles/personal.nix b/modules/profiles/personal.nix index 726fcba..da09d8b 100644 --- a/modules/profiles/personal.nix +++ b/modules/profiles/personal.nix @@ -1,21 +1,27 @@ {self, ...}: { flake.modules.nixos.personal = { - imports = with self.modules.nixos; [ - capabilities + imports = + (with self.modules.nixos; [ + # keep-sorted start + capabilities + disko + tmp + # keep-sorted end - # Profile common. - # keep-sorted start - home-manager - locale - slim - stylixPersonal - timezone - tweaks - users - # keep-sorted end - ]; + # Profile common. + # keep-sorted start + home-manager + locale + slim + stylixPersonal + timezone + tweaks + users + # keep-sorted end + ]) + ++ [self.modules.generic.determinate]; - nixpkgs.overlays = [self.overlays.determinate]; + disko.devices = self.diskoConfigurations.ext4.disko.devices; }; flake.modules.homeManager.personal = { diff --git a/modules/programs/tui/television/nix-search.nix b/modules/programs/tui/television/nix-search.nix index fda1c18..76283a8 100644 --- a/modules/programs/tui/television/nix-search.nix +++ b/modules/programs/tui/television/nix-search.nix @@ -104,7 +104,6 @@ + "/options.json"; # Keep only sources with stable namespaces. - # TODO: This entire list. sources = { # Home Manager-backed sources. # keep-sorted start block=yes newline_separated=yes @@ -126,7 +125,11 @@ prefixes = ["programs.nixcord"]; }; - # TODO: Enable after migrating the noctalia flake input. + nixhypr = { + rawDoc = mkHomeManagerDoc inputs.nixhypr.homeManagerModules.default; + prefixes = ["programs.nixhypr"]; + }; + noctalia = { rawDoc = mkHomeManagerDoc inputs.noctalia.homeModules.default; prefixes = ["programs.noctalia-shell"]; @@ -165,7 +168,6 @@ # NixOS-backed sources. # keep-sorted start block=yes newline_separated=yes - # TODO: Enable after migrating the disko flake input. disko = { rawDoc = mkNixosDoc inputs.disko.nixosModules.disko; prefixes = ["disko"]; diff --git a/modules/services/tmp.nix b/modules/services/tmp.nix new file mode 100644 index 0000000..8373a5a --- /dev/null +++ b/modules/services/tmp.nix @@ -0,0 +1,5 @@ +{ + flake.modules.nixos.tmp = { + boot.tmp.useTmpfs = true; + }; +} diff --git a/todo.md b/todo.md index 025597c..7963589 100644 --- a/todo.md +++ b/todo.md @@ -488,7 +488,7 @@ ## modules/system/ - [x] default.nix -- [ ] disk.nix +- [x] disk.nix - [x] locale.nix (moved to modules/profiles/locale.nix) - [x] nix.nix - [x] slim.nix (moved to modules/profiles/slim.nix) @@ -511,7 +511,7 @@ - [x] hyprland.nix (merged into hyprland/default.nix) - [x] stylix.nix -- [ ] tablet.nix +- [x] tablet.nix - [x] tuigreet.nix - [x] xdg-portal.nix -- 2.51.2