From 4a77b9acbd2cec3fc4305c7206e3ddc15f8f0996 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thea=20Sch=C3=B6bl?= Date: Fri, 10 May 2024 13:39:47 +0200 Subject: [PATCH] feat: update system --- flake.lock | 48 ++++++++++++++--------------- hosts/MONSTER/default.nix | 4 +-- modules/nixos/default.nix | 1 + modules/nixos/hardware/cc1-thea | 19 ++++++------ modules/nixos/hardware/q3279vwf.nix | 34 ++++++++++++++++++++ modules/nixos/shell/waybar.nix | 2 +- 6 files changed, 72 insertions(+), 36 deletions(-) create mode 100644 modules/nixos/hardware/q3279vwf.nix diff --git a/flake.lock b/flake.lock index edec74e..bdb5d2a 100644 --- a/flake.lock +++ b/flake.lock @@ -102,11 +102,11 @@ ] }, "locked": { - "lastModified": 1712014858, - "narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=", + "lastModified": 1714641030, + "narHash": "sha256-yzcRNDoyVP7+SCNX0wmuDju1NUCt8Dz9+lyUXEI0dbI=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "9126214d0a59633752a136528f5f3b9aa8565b7d", + "rev": "e5d10a24b66c3ea8f150e47dfdb0416ab7c3390e", "type": "github" }, "original": { @@ -180,11 +180,11 @@ ] }, "locked": { - "lastModified": 1714042918, - "narHash": "sha256-4AItZA3EQIiSNAxliuYEJumw/LaVfrMv84gYyrs0r3U=", + "lastModified": 1714679908, + "narHash": "sha256-KzcXzDvDJjX34en8f3Zimm396x6idbt+cu4tWDVS2FI=", "owner": "nix-community", "repo": "home-manager", - "rev": "0c5704eceefcb7bb238a958f532a86e3b59d76db", + "rev": "9036fe9ef8e15a819fa76f47a8b1f287903fb848", "type": "github" }, "original": { @@ -201,11 +201,11 @@ ] }, "locked": { - "lastModified": 1713992342, - "narHash": "sha256-bW7K4WPo6jhYMo4ZUGoJfog6xJV0XZh8adXqZKunRoc=", + "lastModified": 1714679908, + "narHash": "sha256-KzcXzDvDJjX34en8f3Zimm396x6idbt+cu4tWDVS2FI=", "owner": "nix-community", "repo": "home-manager", - "rev": "2f072c127c041eec36621b8e38a531fe0fe07961", + "rev": "9036fe9ef8e15a819fa76f47a8b1f287903fb848", "type": "github" }, "original": { @@ -220,11 +220,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1714427480, - "narHash": "sha256-m6iICMLTIfcD6BQMR03Y946f+tmb6pseew+ZVwqY/YI=", + "lastModified": 1714427782, + "narHash": "sha256-Wn9klbm8qK4cH3IAqf0lfSQMLVFQlWNSVi9lA7rzgjY=", "owner": "Theaninova", "repo": "matugen", - "rev": "1d4cb4ee1b407df5cb9eec89e54a8e9912ea5a5b", + "rev": "37196e2f5372be6eb278db9a66eb6dcf812bb3f6", "type": "github" }, "original": { @@ -273,11 +273,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1714076141, - "narHash": "sha256-Drmja/f5MRHZCskS6mvzFqxEaZMeciScCTFxWVLqWEY=", + "lastModified": 1714635257, + "narHash": "sha256-4cPymbty65RvF1DWQfc+Bc8B233A1BWxJnNULJKQ1EY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "7bb2ccd8cdc44c91edba16c48d2c8f331fb3d856", + "rev": "63c3a29ca82437c87573e4c6919b09a24ea61b0f", "type": "github" }, "original": { @@ -300,11 +300,11 @@ "pre-commit-hooks": "pre-commit-hooks" }, "locked": { - "lastModified": 1714142618, - "narHash": "sha256-0ijCe5k7Q569PO/hP/yryh9aB33zJyjs4NKbPQxVW8c=", + "lastModified": 1714730761, + "narHash": "sha256-TjxlzjUl+wf3xw1+NKJSMZ/yWO+HE7X8aP1Qey77R2o=", "owner": "nix-community", "repo": "nixvim", - "rev": "0fc190144f9acf72ae8705ea304577e90389da20", + "rev": "c05fba47c733445098847399b61ddfd81ecbde55", "type": "github" }, "original": { @@ -315,11 +315,11 @@ }, "nur": { "locked": { - "lastModified": 1714153552, - "narHash": "sha256-+3CdMPm0E4fExxj3xZ8nZY/TW/Tc0BczK4DopNdr6gY=", + "lastModified": 1714822436, + "narHash": "sha256-QnWfY6LlKBi5asOFaAe86A1rejF2LFzIRCzWZUUZvMc=", "owner": "nix-community", "repo": "NUR", - "rev": "8f0f28c3bf4fb66368ecf10fd742a44c7f816d35", + "rev": "33f7913ac4b94015e465b9be78f90c5df6bfa498", "type": "github" }, "original": { @@ -343,11 +343,11 @@ ] }, "locked": { - "lastModified": 1713954846, - "narHash": "sha256-RWFafuSb5nkWGu8dDbW7gVb8FOQOPqmX/9MlxUUDguw=", + "lastModified": 1714478972, + "narHash": "sha256-q//cgb52vv81uOuwz1LaXElp3XAe1TqrABXODAEF6Sk=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "6fb82e44254d6a0ece014ec423cb62d92435336f", + "rev": "2849da033884f54822af194400f8dff435ada242", "type": "github" }, "original": { diff --git a/hosts/MONSTER/default.nix b/hosts/MONSTER/default.nix index cba0846..60ebbd7 100644 --- a/hosts/MONSTER/default.nix +++ b/hosts/MONSTER/default.nix @@ -3,7 +3,7 @@ imports = [ ./hardware-configuration.nix ]; nix = { - package = pkgs.nixVersions.unstable; + package = pkgs.nixVersions.git; settings.experimental-features = [ "nix-command" "flakes" @@ -63,7 +63,7 @@ amdgpu.preset.default.enable = true; audio.preset.pipewire.enable = true; cc1.enable = true; - fv43u.enable = true; + q3279vwf.enable = true; virtual-camera.enable = true; hid-fanatecff.enable = true; diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 11a978e..183888e 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -18,6 +18,7 @@ ./hardware/amdgpu.nix ./hardware/cc1.nix ./hardware/fv43u.nix + ./hardware/q3279vwf.nix ./hardware/virtual-camera.nix ./locales/theaninova.nix diff --git a/modules/nixos/hardware/cc1-thea b/modules/nixos/hardware/cc1-thea index dd4c3f7..f42a2c6 100644 --- a/modules/nixos/hardware/cc1-thea +++ b/modules/nixos/hardware/cc1-thea @@ -4,13 +4,13 @@ xkb_symbols "cc1-thea" include "level3(ralt_switch)" key {[minus, underscore, at]}; - key {[equal, question, ssharp]}; + key {[equal, plus, mu]}; key {[q, Q, asterisk]}; key {[w, W, 9]}; key {[e, E, braceleft]}; key {[r, R, 1]}; key {[t, T, braceright]}; - key {[y, Y, bar]}; + key {[y, Y, ssharp]}; key {[u, U, 5]}; key {[i, I, exclam]}; key {[o, O, 3]}; @@ -21,19 +21,20 @@ xkb_symbols "cc1-thea" key {[f, F, 6]}; key {[g, G, asciicircum]}; key {[h, H, bracketright]}; - key {[j, J, percent]}; + key {[j, J, EuroSign]}; key {[k, K, 7]}; - key {[l, L, slash]}; - key {[semicolon, colon, dollar, EuroSign]}; + key {[l, L, percent]}; + key {[semicolon, colon, dollar]}; key {[apostrophe, quotedbl, ampersand]}; key {[z, Z, dead_diaeresis]}; - key {[x, X, plus]}; + key {[x, X, numbersign]}; key {[c, C, parenleft]}; key {[v, V, less]}; key {[b, B, 8]}; key {[n, N, 2]}; - key {[m, M, bracketleft, mu]}; - key {[comma, numbersign, grave]}; - key {[period, asciitilde, backslash]}; + key {[m, M, bracketleft]}; + key {[comma, degree, grave]}; + key {[period, asciitilde, bar]}; + key {[slash, question, backslash]}; }; diff --git a/modules/nixos/hardware/q3279vwf.nix b/modules/nixos/hardware/q3279vwf.nix new file mode 100644 index 0000000..2723ed2 --- /dev/null +++ b/modules/nixos/hardware/q3279vwf.nix @@ -0,0 +1,34 @@ +{ + lib, + config, + username, + ... +}: +with lib; + +let + cfg = config.hardware.q3279vwf; +in +{ + options.hardware.q3279vwf = { + enable = mkEnableOption "Enable optimisations for the AOC Q3279VWF monitor"; + }; + + config = mkIf cfg.enable { + fonts.fontconfig.subpixel.rgba = "bgr"; + boot.kernelParams = [ "video=2560x1440@75" ]; + + home-manager.users.${username}.wayland.windowManager.hyprland.settings = { + general.layout = "master"; + master = { + orientation = "center"; + new_is_master = true; + always_center_master = true; + mfact = 0.4; + }; + monitor = [ "DP-1,highrr,0x0,1" ]; + xwayland.force_zero_scaling = true; + misc.vrr = 2; # VA suffers from VRR flicker + }; + }; +} diff --git a/modules/nixos/shell/waybar.nix b/modules/nixos/shell/waybar.nix index 761d1bf..cceeadb 100644 --- a/modules/nixos/shell/waybar.nix +++ b/modules/nixos/shell/waybar.nix @@ -21,7 +21,7 @@ in mainBar = { height = 24; reload_style_on_change = true; - exclusive = false; + exclusive = true; modules-center = [ "clock"