From da03f9687879ab30f20183f88dde25a364595576 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Mon, 19 Jun 2023 06:53:21 +0100 Subject: [PATCH] Move dconf setup to desktop/default.nix, make some more sway options sensible defaults --- .gitmodules | 0 .rsyncignore | 1 - desktop/default.nix | 4 ++++ desktop/hyprland.nix | 1 + desktop/xfce-bspwm.nix | 5 +---- desktop/xfce.nix | 5 +---- desktop/xserver.nix | 3 +-- home/desktop/sway.nix | 9 ++++++++- machines/J0162/elitherl.nix | 12 +++++++++--- machines/Vanguard/xenia.nix | 19 +++---------------- 10 files changed, 28 insertions(+), 31 deletions(-) delete mode 100644 .gitmodules create mode 100644 desktop/default.nix diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index e69de29b..00000000 diff --git a/.rsyncignore b/.rsyncignore index 350d8ad7..c806e2f8 100644 --- a/.rsyncignore +++ b/.rsyncignore @@ -2,4 +2,3 @@ .pre-commit-config.yaml .stylua.toml Makefile -nvim/ diff --git a/desktop/default.nix b/desktop/default.nix new file mode 100644 index 00000000..e41b5947 --- /dev/null +++ b/desktop/default.nix @@ -0,0 +1,4 @@ +{...}: { + console.keyMap = "uk"; + programs.dconf.enable = true; +} diff --git a/desktop/hyprland.nix b/desktop/hyprland.nix index 03508969..de910413 100644 --- a/desktop/hyprland.nix +++ b/desktop/hyprland.nix @@ -1,4 +1,5 @@ {pkgs, ...}: { + imports = [./default.nix]; nixpkgs.overlays = [ (self: super: { waybar = super.waybar.overrideAttrs (oldAttrs: { diff --git a/desktop/xfce-bspwm.nix b/desktop/xfce-bspwm.nix index 87cff369..fd2ec0cd 100644 --- a/desktop/xfce-bspwm.nix +++ b/desktop/xfce-bspwm.nix @@ -1,8 +1,5 @@ {pkgs, ...}: { - imports = [ - ./xserver.nix - ./sddm.nix - ]; + imports = [./sddm.nix]; services.xserver = { enable = true; desktopManager = { diff --git a/desktop/xfce.nix b/desktop/xfce.nix index 02280f09..f4e623bb 100644 --- a/desktop/xfce.nix +++ b/desktop/xfce.nix @@ -1,8 +1,5 @@ {pkgs, ...}: { - imports = [ - ./xserver.nix - ./sddm.nix - ]; + imports = [./sddm.nix]; services.xserver = { enable = true; desktopManager.xfce.enable = true; diff --git a/desktop/xserver.nix b/desktop/xserver.nix index 38cbc16b..7624c0c7 100644 --- a/desktop/xserver.nix +++ b/desktop/xserver.nix @@ -1,9 +1,8 @@ {...}: { + imports = [./default.nix]; services.xserver = { enable = true; layout = "gb"; xkbVariant = ""; }; - console.keyMap = "uk"; - programs.dconf.enable = true; } diff --git a/home/desktop/sway.nix b/home/desktop/sway.nix index c81bf343..82e596fb 100644 --- a/home/desktop/sway.nix +++ b/home/desktop/sway.nix @@ -8,7 +8,7 @@ term = config.wayland.windowManager.sway.config.terminal; in { imports = [ - # ./swaylock.nix + ./swaylock.nix # ./eww.nix ./waybar.nix ./gtk.nix @@ -27,11 +27,18 @@ in { wayland.windowManager.sway = { enable = true; config = { + input."*".xkb_layout = "gb"; + output."*".bg = "~/nixos/wallpaper.jpg fill"; fonts = { names = ["FiraCode Nerd Font" "FiraCode Nerd Font Mono"]; size = 12.0; }; + gaps = { + inner = lib.mkDefault 5; + outer = lib.mkDefault 20; + }; bars = []; + startup = [{command = "dunst";} {command = "waybar";}]; modifier = lib.mkDefault "Mod4"; terminal = lib.mkDefault "${pkgs.wezterm}/bin/wezterm"; keybindings = lib.mkOptionDefault { diff --git a/machines/J0162/elitherl.nix b/machines/J0162/elitherl.nix index 862fbcd2..5cc3985f 100644 --- a/machines/J0162/elitherl.nix +++ b/machines/J0162/elitherl.nix @@ -1,5 +1,9 @@ {pkgs, ...}: { - imports = [../../home/work.nix ../../home/gui ../../home/desktop/hyprland.nix]; + imports = [ + ../../home/work.nix + ../../home/gui + ../../home/desktop/hyprland.nix + ]; home.username = "elitherl"; home.homeDirectory = "/home/elitherl"; home.stateVersion = "22.11"; @@ -11,9 +15,11 @@ zoom-us ]; - wayland.windowManager.hyprland.extraConfig = ''source=./common.conf - monitor=eDP-1,preferred,auto,1.00 + wayland.windowManager.hyprland.extraConfig = '' + source=./common.conf + monitor=eDP-1,preferred,auto,1.00 ''; + # wayland.windowManager.sway.config.output.eDP-1.scale = "1.0"; programs.waybar.settings.main = { "modules-left" = ["wlr/workspaces"]; "modules-center" = ["clock"]; diff --git a/machines/Vanguard/xenia.nix b/machines/Vanguard/xenia.nix index d027b27a..347aa05a 100644 --- a/machines/Vanguard/xenia.nix +++ b/machines/Vanguard/xenia.nix @@ -12,22 +12,9 @@ # source=./common.conf # monitor=HDMI-A-2,preferred,auto,2.00 # ''; - wayland.windowManager.sway = { - config = { - input = {"*" = {xkb_layout = "gb";};}; - modifier = "Mod4"; - output = { - HDMI-A-2 = { - scale = "2.0"; - bg = "~/nixos/wallpaper.jpg fill"; - }; - }; - gaps = { - inner = 5; - outer = 20; - }; - startup = [{command = "dunst";} {command = "waybar";} {command = "steam";}]; - }; + wayland.windowManager.sway.config = { + output.HDMI-A-2.scale = "2.0"; + startup = [{command = "steam";}]; }; programs.waybar.settings.main = { "modules-left" = ["sway/workspaces"];