diff --git a/flake.lock b/flake.lock index cbc2d40..8d0aa42 100644 --- a/flake.lock +++ b/flake.lock @@ -166,6 +166,49 @@ "type": "github" } }, + "jovian-nixos": { + "inputs": { + "nix-github-actions": "nix-github-actions", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1761376732, + "narHash": "sha256-wavx9gROyuRZKSvPCCBh78gOur7o88ndRi545njNRrM=", + "owner": "Jovian-Experiments", + "repo": "Jovian-NixOS", + "rev": "8bef482d65425d0cff6b20c11a5f054f85569a38", + "type": "github" + }, + "original": { + "owner": "Jovian-Experiments", + "repo": "Jovian-NixOS", + "type": "github" + } + }, + "nix-github-actions": { + "inputs": { + "nixpkgs": [ + "jovian-nixos", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1729697500, + "narHash": "sha256-VFTWrbzDlZyFHHb1AlKRiD/qqCJIripXKiCSFS8fAOY=", + "owner": "zhaofengli", + "repo": "nix-github-actions", + "rev": "e418aeb728b6aa5ca8c5c71974e7159c2df1d8cf", + "type": "github" + }, + "original": { + "owner": "zhaofengli", + "ref": "matrix-name", + "repo": "nix-github-actions", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1761166759, @@ -250,6 +293,7 @@ "disko": "disko", "firefox-addons": "firefox-addons", "home-manager": "home-manager", + "jovian-nixos": "jovian-nixos", "nixpkgs": "nixpkgs_2", "nixvim": "nixvim" } diff --git a/hosts/nixos/deck/system.nix b/hosts/nixos/deck/system.nix index d117ab5..c7402aa 100644 --- a/hosts/nixos/deck/system.nix +++ b/hosts/nixos/deck/system.nix @@ -4,6 +4,7 @@ imports = [ ./hardware-configuration.nix ../system-default.nix # Common NixOS system configuration + ../../../modules/desktop.nix ]; # Bootloader - standard UEFI setup @@ -73,35 +74,6 @@ }; }; - # GNOME Desktop Environment - services.xserver.enable = true; - services.displayManager.gdm.enable = true; - services.desktopManager.gnome.enable = true; - - # Keyboard layout - services.xserver.xkb = { - layout = "us"; - options = ""; - }; - - # XDG portal for proper desktop integration - xdg.portal = { - enable = true; - extraPortals = with pkgs; [ - xdg-desktop-portal-gnome - xdg-desktop-portal-gtk - ]; - }; - - # Touchscreen configuration - services.libinput = { - enable = true; - touchpad = { - naturalScrolling = true; - tapping = true; - }; - }; - # Host-specific SSH configuration services.openssh = { settings = { @@ -124,10 +96,6 @@ pciutils usbutils unzip - - # Icon themes for GNOME applications - adwaita-icon-theme - hicolor-icon-theme ]; } diff --git a/hosts/nixos/thinkpad/system.nix b/hosts/nixos/thinkpad/system.nix index 5ae300b..05481d8 100644 --- a/hosts/nixos/thinkpad/system.nix +++ b/hosts/nixos/thinkpad/system.nix @@ -4,6 +4,7 @@ imports = [ ./hardware-configuration.nix ../system-default.nix # Common NixOS system configuration + ../../../modules/desktop.nix ../../../modules/wireguard.nix ../../../modules/login-display.nix ]; @@ -85,17 +86,6 @@ pulse.enable = true; }; - # GNOME Desktop Environment - services.xserver.enable = true; - services.displayManager.gdm.enable = true; - services.desktopManager.gnome.enable = true; - - # Keyboard layout - services.xserver.xkb = { - layout = "us"; - options = ""; - }; - # Input method configuration i18n.inputMethod = { enable = true; @@ -106,37 +96,6 @@ ]; }; - # Exclude unwanted GNOME default packages - environment.gnome.excludePackages = with pkgs; [ - gnome-tour - gnome-console # terminal (using Ghostty instead) - gnome-text-editor # text editor (using Neovim instead) - gnome-connections # remote desktop client - gnome-font-viewer # font viewer - seahorse # passwords and keys - baobab # disk usage analyzer - gnome-disk-utility # disks - gnome-logs # logs viewer - gnome-system-monitor # system monitor - decibels # audio player - epiphany # GNOME web browser - file-roller # archive manager - geary # GNOME email client - gnome-music - gnome-photos - gnome-maps - gnome-weather - gnome-contacts - gnome-clocks - gnome-calculator - gnome-calendar - gnome-characters - simple-scan - snapshot # camera - totem # video player - yelp # help viewer - ]; - # Prevent automatic suspend on AC power (GNOME power settings) programs.dconf.profiles.user.databases = [{ settings = { @@ -146,24 +105,10 @@ }; }]; - # XDG portal for proper desktop integration - xdg.portal = { - enable = true; - extraPortals = with pkgs; [ - xdg-desktop-portal-gnome - xdg-desktop-portal-gtk - ]; - }; - - # Touchpad configuration - services.libinput = { - enable = true; - touchpad = { - naturalScrolling = true; - tapping = true; - disableWhileTyping = true; - accelProfile = "adaptive"; - }; + # Touchpad configuration (host-specific overrides) + services.libinput.touchpad = { + disableWhileTyping = true; + accelProfile = "adaptive"; }; # Power management for laptops @@ -271,10 +216,6 @@ # ThinkPad specific lm_sensors # Temperature monitoring smartmontools # Disk health monitoring (SMART) - - # Icon themes for GNOME applications - adwaita-icon-theme - hicolor-icon-theme ]; diff --git a/modules/desktop.nix b/modules/desktop.nix new file mode 100644 index 0000000..28ff625 --- /dev/null +++ b/modules/desktop.nix @@ -0,0 +1,68 @@ +{ config, pkgs, lib, ... }: + +{ + # GNOME Desktop Environment + services.xserver.enable = true; + services.displayManager.gdm.enable = true; + services.desktopManager.gnome.enable = true; + + # Keyboard layout + services.xserver.xkb = { + layout = "us"; + options = ""; + }; + + # Exclude unwanted GNOME default packages + environment.gnome.excludePackages = with pkgs; [ + gnome-tour + gnome-console # terminal (using Ghostty instead) + gnome-text-editor # text editor (using Neovim instead) + gnome-connections # remote desktop client + gnome-font-viewer # font viewer + seahorse # passwords and keys + baobab # disk usage analyzer + gnome-disk-utility # disks + gnome-logs # logs viewer + gnome-system-monitor # system monitor + decibels # audio player + epiphany # GNOME web browser + file-roller # archive manager + geary # GNOME email client + gnome-music + gnome-photos + gnome-maps + gnome-weather + gnome-contacts + gnome-clocks + gnome-calculator + gnome-calendar + gnome-characters + simple-scan + snapshot # camera + totem # video player + yelp # help viewer + ]; + + # XDG portal for proper desktop integration + xdg.portal = { + enable = true; + extraPortals = with pkgs; [ + xdg-desktop-portal-gnome + xdg-desktop-portal-gtk + ]; + }; + + # Touchpad configuration + services.libinput = { + enable = true; + touchpad = { + naturalScrolling = true; + tapping = true; + }; + }; + + # System packages for GNOME + environment.systemPackages = with pkgs; [ + hicolor-icon-theme # Fallback icon theme + ]; +}