From f839796dc29027420ed704f229f63424f3dee9b3 Mon Sep 17 00:00:00 2001 From: Tristan Date: Thu, 8 Feb 2024 10:47:28 +0000 Subject: [PATCH] remove laptop module, sort out displays --- hardware/fcs-tristan-nixbook.nix | 54 ++++++++++++++++++-------------- home/programs/hyprland.nix | 1 - nixos/default.nix | 2 -- nixos/modules/laptop.nix | 38 ---------------------- 4 files changed, 30 insertions(+), 65 deletions(-) delete mode 100644 nixos/modules/laptop.nix diff --git a/hardware/fcs-tristan-nixbook.nix b/hardware/fcs-tristan-nixbook.nix index a56eea0..98d130f 100644 --- a/hardware/fcs-tristan-nixbook.nix +++ b/hardware/fcs-tristan-nixbook.nix @@ -76,7 +76,7 @@ in { ]; }; - roles.laptop.enable = true; + hardware.keyboard.zsa.enable = true; networking.hostName = "FCS-Tristan-Nixbook"; @@ -86,6 +86,9 @@ in { home.stateVersion = "22.05"; wayland.windowManager.hyprland.settings = { + bind = [ + "SUPER_SHIFT, Q, killactive," + ]; "device:at-translated-set-2-keyboard" = { kb_variant = "dvorak,"; kb_layout = "gb,gb"; @@ -95,31 +98,34 @@ in { } ]; - displays.displays = { - "asus" = { - enable = false; - }; - "hp" = { - enable = true; - name = "HDMI-A-1"; - wallpaper = ../images/nier2.jpg; - workspaces = { - start = 6; - end = 10; + displays = { + enable = true; + displays = { + "hdmi" = { + enable = true; + name = "HDMI-A-1"; + wallpaper = ../images/nier2.jpg; + workspaces = { + start = 6; + end = 10; + }; + position = { + x = 0; + y = 0; + }; }; - }; - "internal" = { - enable = true; - name = "eDP-1"; - description = "BOE 0x07D8"; - workspaces = { - start = 1; + "internal" = { + enable = true; + name = "eDP-1"; + workspaces = { + start = 1; + }; + position = { + x = 0; + y = 1080; + }; + wallpaper = ../images/nix-soft.png; }; - position = { - x = 0; - y = 1420; - }; - wallpaper = ../images/nix-soft.png; }; }; } diff --git a/home/programs/hyprland.nix b/home/programs/hyprland.nix index 9119e08..84f44d5 100644 --- a/home/programs/hyprland.nix +++ b/home/programs/hyprland.nix @@ -10,7 +10,6 @@ in { (import ./swaylock.nix) (import ./swayidle.nix) (import ./waybar.nix) - (import ./hycov.nix) ]; xdg.portal = { enable = true; diff --git a/nixos/default.nix b/nixos/default.nix index 51cf647..9e25aa3 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -10,8 +10,6 @@ in { imports = [ ./modules/display.nix - ./modules/laptop.nix - ../hardware/displays.nix ]; nix = { diff --git a/nixos/modules/laptop.nix b/nixos/modules/laptop.nix deleted file mode 100644 index 11e1dfd..0000000 --- a/nixos/modules/laptop.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ - lib, - config, - ... -}: -with lib; let - cfg = config.roles.laptop; - user = config.user; -in { - options.roles = { - laptop = { - enable = mkEnableOption "is a laptop"; - displays = mkEnableOption "laptop display defaults"; - }; - }; - - config = mkIf cfg.enable { - displays = mkIf cfg.displays { - enable = true; - displays.internal = { - name = "eDP-1"; - scaling = 1.2; - }; - }; - - home-manager.users.${user}.imports = [ - { - wayland.windowManager.hyprland = { - settings = { - bind = [ - "SUPER_SHIFT, Q, killactive," - ]; - }; - }; - } - ]; - }; -}