modularize DE-related system config
This commit is contained in:
parent
9102264fcc
commit
1fa32a8f93
4 changed files with 118 additions and 97 deletions
44
flake.lock
generated
44
flake.lock
generated
|
|
@ -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"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
];
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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,25 +105,11 @@
|
|||
};
|
||||
}];
|
||||
|
||||
# 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;
|
||||
# Touchpad configuration (host-specific overrides)
|
||||
services.libinput.touchpad = {
|
||||
disableWhileTyping = true;
|
||||
accelProfile = "adaptive";
|
||||
};
|
||||
};
|
||||
|
||||
# Power management for laptops
|
||||
powerManagement = {
|
||||
|
|
@ -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
|
||||
];
|
||||
|
||||
|
||||
|
|
|
|||
68
modules/desktop.nix
Normal file
68
modules/desktop.nix
Normal file
|
|
@ -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
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue