From fa7654144a8752561270c7a3811c76c507ae3613 Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Thu, 7 Nov 2024 12:12:53 +0300 Subject: [PATCH] Pocket: Create a new host. --- home/config/sway/default.nix | 2 +- host/x86_64-linux/dasha/default.nix | 2 +- host/x86_64-linux/desktop/default.nix | 2 +- host/x86_64-linux/home/default.nix | 2 +- host/x86_64-linux/laptop/default.nix | 2 +- host/x86_64-linux/pocket/default.nix | 36 +++++++++++++++++++++++++++ host/x86_64-linux/work/default.nix | 2 +- module/Bluetooth.nix | 4 +-- module/Brightness.nix | 4 +-- module/DisplayManager.nix | 4 +-- module/Gnome.nix | 6 ++--- module/Polkit.nix | 4 +-- module/Portal.nix | 4 +-- module/Sound.nix | 4 +-- module/Sway.nix | 20 +++++++-------- module/Waybar.nix | 4 +-- module/Wayland.nix | 4 +-- 17 files changed, 70 insertions(+), 36 deletions(-) create mode 100644 host/x86_64-linux/pocket/default.nix diff --git a/home/config/sway/default.nix b/home/config/sway/default.nix index 30e96fe..a7d3864 100644 --- a/home/config/sway/default.nix +++ b/home/config/sway/default.nix @@ -32,6 +32,6 @@ in { include /etc/sway/config.d/* '') + swayRc - + config.module.desktop.sway.extraConfig or "" + + config.module.sway.extraConfig or "" ; } diff --git a/host/x86_64-linux/dasha/default.nix b/host/x86_64-linux/dasha/default.nix index 7c8ebc6..07fd8a3 100644 --- a/host/x86_64-linux/dasha/default.nix +++ b/host/x86_64-linux/dasha/default.nix @@ -9,7 +9,7 @@ amd.gpu.enable = true; autoupdate.enable = true; builder.client.enable = true; - desktop.sway.enable = true; + sway.enable = true; kernel.enable = true; keyd.enable = true; print.enable = true; diff --git a/host/x86_64-linux/desktop/default.nix b/host/x86_64-linux/desktop/default.nix index 1009f87..278603c 100644 --- a/host/x86_64-linux/desktop/default.nix +++ b/host/x86_64-linux/desktop/default.nix @@ -21,7 +21,7 @@ powersave = true; }; }; - desktop.sway = { + sway = { enable = true; extraConfig = '' output "ASUSTek COMPUTER INC ASUS VA24E R2LMTF127165" mode 1920x1080@74.986Hz transform 180 pos 780,0 diff --git a/host/x86_64-linux/home/default.nix b/host/x86_64-linux/home/default.nix index 282994c..14a8ddb 100644 --- a/host/x86_64-linux/home/default.nix +++ b/host/x86_64-linux/home/default.nix @@ -7,7 +7,7 @@ module = { builder.server.enable = true; - desktop.sway.enable = true; + sway.enable = true; kernel.enable = true; keyd.enable = true; amd = { diff --git a/host/x86_64-linux/laptop/default.nix b/host/x86_64-linux/laptop/default.nix index d32981a..aae6544 100644 --- a/host/x86_64-linux/laptop/default.nix +++ b/host/x86_64-linux/laptop/default.nix @@ -9,7 +9,7 @@ module = { autoupdate.enable = true; builder.client.enable = true; - desktop.sway.enable = true; + sway.enable = true; kernel.enable = true; keyd.enable = true; print.enable = true; diff --git a/host/x86_64-linux/pocket/default.nix b/host/x86_64-linux/pocket/default.nix new file mode 100644 index 0000000..930693c --- /dev/null +++ b/host/x86_64-linux/pocket/default.nix @@ -0,0 +1,36 @@ +{ ... }: { + home.nixos.enable = true; + user = { + root.enable = true; + voronind.enable = true; + }; + + module = { + autoupdate.enable = true; + builder.client.enable = true; + sway.enable = true; + keyd.enable = true; + print.enable = true; + kernel = { + enable = true; + latest = true; + }; + hwmon = { + file = "temp1_input"; + path = "/sys/devices/platform/coretemp.0/hwmon"; + }; + intel.cpu = { + enable = true; + powersave = true; + }; + package = { + common.enable = true; + core.enable = true; + creative.enable = true; + desktop.enable = true; + dev.enable = true; + extra.enable = true; + gaming.enable = true; + }; + }; +} diff --git a/host/x86_64-linux/work/default.nix b/host/x86_64-linux/work/default.nix index c13081d..8182fce 100644 --- a/host/x86_64-linux/work/default.nix +++ b/host/x86_64-linux/work/default.nix @@ -12,7 +12,7 @@ module = { autoupdate.enable = true; builder.client.enable = true; - desktop.sway.enable = true; + sway.enable = true; kernel.enable = true; keyd.enable = true; powerlimit.thinkpad.enable = true; diff --git a/module/Bluetooth.nix b/module/Bluetooth.nix index 64bcce4..3ada1da 100644 --- a/module/Bluetooth.nix +++ b/module/Bluetooth.nix @@ -3,9 +3,9 @@ lib, ... }: let - cfg = config.module.desktop.bluetooth; + cfg = config.module.bluetooth; in { - options.module.desktop.bluetooth.enable = lib.mkEnableOption "the bluetooth support."; + options.module.bluetooth.enable = lib.mkEnableOption "the bluetooth support."; config = lib.mkIf cfg.enable { services.blueman.enable = true; diff --git a/module/Brightness.nix b/module/Brightness.nix index 3272254..2e1c0e8 100644 --- a/module/Brightness.nix +++ b/module/Brightness.nix @@ -3,9 +3,9 @@ config, ... }: let - cfg = config.module.desktop.brightness; + cfg = config.module.brightness; in { - options.module.desktop.brightness.enable = lib.mkEnableOption "the brightness control."; + options.module.brightness.enable = lib.mkEnableOption "the brightness control."; config = lib.mkIf cfg.enable { programs.light.enable = true; diff --git a/module/DisplayManager.nix b/module/DisplayManager.nix index 1c59511..293780d 100644 --- a/module/DisplayManager.nix +++ b/module/DisplayManager.nix @@ -3,9 +3,9 @@ lib, ... }: let - cfg = config.module.desktop.dm; + cfg = config.module.dm; in { - options.module.desktop.dm.enable = lib.mkEnableOption "the display manager."; + options.module.dm.enable = lib.mkEnableOption "the display manager."; config = lib.mkIf cfg.enable { services.xserver = { diff --git a/module/Gnome.nix b/module/Gnome.nix index d17e4bb..bc06715 100644 --- a/module/Gnome.nix +++ b/module/Gnome.nix @@ -5,12 +5,12 @@ pkgs, ... }: let - cfg = config.module.desktop.gnome; + cfg = config.module.gnome; in { - options.module.desktop.gnome.enable = lib.mkEnableOption "the Gnome DE."; + options.module.gnome.enable = lib.mkEnableOption "the Gnome DE."; config = lib.mkIf cfg.enable { - module.desktop = { + module = { dm.enable = true; sound.enable = true; wayland.enable = true; diff --git a/module/Polkit.nix b/module/Polkit.nix index c27006b..d664311 100644 --- a/module/Polkit.nix +++ b/module/Polkit.nix @@ -5,9 +5,9 @@ pkgs, ... }: let - cfg = config.module.desktop.polkit; + cfg = config.module.polkit; in { - options.module.desktop.polkit.enable = lib.mkEnableOption "the polkit."; + options.module.polkit.enable = lib.mkEnableOption "the polkit."; config = lib.mkIf cfg.enable { security.polkit.enable = true; diff --git a/module/Portal.nix b/module/Portal.nix index 56cdeab..1c1fa81 100644 --- a/module/Portal.nix +++ b/module/Portal.nix @@ -5,9 +5,9 @@ pkgs, ... }: let - cfg = config.module.desktop.portal; + cfg = config.module.portal; in { - options.module.desktop.portal.enable = lib.mkEnableOption "the portals."; + options.module.portal.enable = lib.mkEnableOption "the portals."; config = lib.mkIf cfg.enable { xdg.portal = { diff --git a/module/Sound.nix b/module/Sound.nix index b345236..8a54e9a 100644 --- a/module/Sound.nix +++ b/module/Sound.nix @@ -3,9 +3,9 @@ lib, ... }: let - cfg = config.module.desktop.sound; + cfg = config.module.sound; in { - options.module.desktop.sound.enable = lib.mkEnableOption "the sound."; + options.module.sound.enable = lib.mkEnableOption "the sound."; config = lib.mkIf cfg.enable { hardware.pulseaudio.enable = false; diff --git a/module/Sway.nix b/module/Sway.nix index cae4b6f..2190bfe 100644 --- a/module/Sway.nix +++ b/module/Sway.nix @@ -4,9 +4,9 @@ pkgs, ... }: let - cfg = config.module.desktop.sway; + cfg = config.module.sway; in { - options.module.desktop.sway = { + options.module.sway = { enable = lib.mkEnableOption "the Sway WM."; extraConfig = lib.mkOption { default = ""; @@ -18,15 +18,13 @@ in { services.gnome.gnome-keyring.enable = lib.mkForce false; environment.variables.XDG_CURRENT_DESKTOP = "sway"; module = { - desktop = { - bluetooth.enable = true; - brightness.enable = true; - portal.enable = true; - sound.enable = true; - waybar.enable = true; - wayland.enable = true; - }; - realtime.enable = true; + bluetooth.enable = true; + brightness.enable = true; + portal.enable = true; + realtime.enable = true; + sound.enable = true; + waybar.enable = true; + wayland.enable = true; }; programs.sway = { enable = true; diff --git a/module/Waybar.nix b/module/Waybar.nix index 8ec87e9..7e83722 100644 --- a/module/Waybar.nix +++ b/module/Waybar.nix @@ -4,9 +4,9 @@ pkgs, ... }: let - cfg = config.module.desktop.waybar; + cfg = config.module.waybar; in { - options.module.desktop.waybar.enable = lib.mkEnableOption "the Waybar."; + options.module.waybar.enable = lib.mkEnableOption "the Waybar."; config = lib.mkIf cfg.enable { environment.systemPackages = with pkgs; [ diff --git a/module/Wayland.nix b/module/Wayland.nix index 390891c..d9389e8 100644 --- a/module/Wayland.nix +++ b/module/Wayland.nix @@ -4,9 +4,9 @@ pkgs, ... }: let - cfg = config.module.desktop.wayland; + cfg = config.module.wayland; in { - options.module.desktop.wayland.enable = lib.mkEnableOption "the wayland."; + options.module.wayland.enable = lib.mkEnableOption "the wayland."; config = { programs.xwayland.enable = true;