Refactor to set up specific desktop-based configs.
This commit is contained in:
parent
f14e4e8727
commit
764ed1d075
|
@ -2,6 +2,5 @@
|
|||
imports = [
|
||||
./git.nix
|
||||
./pkgs.nix
|
||||
./desktop-packages.nix
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# Desktop-specific packages.
|
||||
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
|
|
|
@ -0,0 +1,78 @@
|
|||
# Baseline configuration for all desktop-class systems (including
|
||||
# laptops).
|
||||
|
||||
{ ... }: {
|
||||
imports = [
|
||||
./desktop-packages.nix
|
||||
];
|
||||
|
||||
services.xserver = {
|
||||
displayManager = {
|
||||
gdm = {
|
||||
enable = true;
|
||||
wayland = false;
|
||||
};
|
||||
};
|
||||
enable = true;
|
||||
windowManager = {
|
||||
stumpwm.enable = true;
|
||||
};
|
||||
xkb = {
|
||||
layout = "us";
|
||||
options = "ctrl:swapcaps,compose:ralt";
|
||||
};
|
||||
};
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
services.libinput = {
|
||||
enable = true;
|
||||
mouse.naturalScrolling = true;
|
||||
touchpad.naturalScrolling = true;
|
||||
};
|
||||
|
||||
console.useXkbConfig = true;
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable sound with pipewire.
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
|
||||
# Enable Bluetooth.
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
settings = {
|
||||
General = {
|
||||
# Shows battery charge of connected devices on supported
|
||||
# Bluetooth adapters. Defaults to 'false'.
|
||||
Experimental = true;
|
||||
# When enabled other devices can connect faster to us, however
|
||||
# the tradeoff is increased power consumption. Defaults to
|
||||
# 'false'.
|
||||
FastConnectable = true;
|
||||
};
|
||||
Policy = {
|
||||
# Enable all controllers when they are found. This includes
|
||||
# adapters present on start as well as adapters that are plugged
|
||||
# in later on. Defaults to 'true'.
|
||||
AutoEnable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
services.blueman.enable = true;
|
||||
|
||||
|
||||
services.udev.extraRules = ''
|
||||
ACTION=="add", SUBSYSTEM=="backlight", GROUP="video", MODE="0660"
|
||||
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="3434", MODE="0660", GROUP="users", TAG+="uaccess", TAG+="udev-acl"
|
||||
'';
|
||||
}
|
|
@ -1,16 +1,8 @@
|
|||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
# Baseline configuration for all systems.
|
||||
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
# this allows you to access `pkgsUnstable` anywhere in your config
|
||||
#_module.args.pkgsUnstable = import inputs.nixpkgs-unstable {
|
||||
# inherit (pkgs.stdenv.hostPlatform) system;
|
||||
# inherit (config.nixpkgs) config;
|
||||
#};
|
||||
|
||||
imports =
|
||||
[
|
||||
./configs
|
||||
|
@ -81,32 +73,6 @@
|
|||
|
||||
services.cron.enable = true;
|
||||
|
||||
services.xserver = {
|
||||
displayManager = {
|
||||
gdm = {
|
||||
enable = true;
|
||||
wayland = false;
|
||||
};
|
||||
};
|
||||
enable = true;
|
||||
windowManager = {
|
||||
stumpwm.enable = true;
|
||||
};
|
||||
xkb = {
|
||||
layout = "us";
|
||||
options = "ctrl:swapcaps,compose:ralt";
|
||||
};
|
||||
};
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
services.libinput = {
|
||||
enable = true;
|
||||
mouse.naturalScrolling = true;
|
||||
touchpad.naturalScrolling = true;
|
||||
};
|
||||
|
||||
console.useXkbConfig = true;
|
||||
|
||||
users.users.kyle = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
|
@ -129,53 +95,8 @@
|
|||
# here, NOT in environment.systemPackages
|
||||
];
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable Bluetooth.
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
settings = {
|
||||
General = {
|
||||
# Shows battery charge of connected devices on supported
|
||||
# Bluetooth adapters. Defaults to 'false'.
|
||||
Experimental = true;
|
||||
# When enabled other devices can connect faster to us, however
|
||||
# the tradeoff is increased power consumption. Defaults to
|
||||
# 'false'.
|
||||
FastConnectable = true;
|
||||
};
|
||||
Policy = {
|
||||
# Enable all controllers when they are found. This includes
|
||||
# adapters present on start as well as adapters that are plugged
|
||||
# in later on. Defaults to 'true'.
|
||||
AutoEnable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Enable sound with pipewire.
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
# If you want to use JACK applications, uncomment this
|
||||
#jack.enable = true;
|
||||
|
||||
# use the example session manager (no others are packaged yet so this is enabled by default,
|
||||
# no need to redefine it in your config for now)
|
||||
#media-session.enable = true;
|
||||
};
|
||||
|
||||
services.udisks2.enable = true;
|
||||
|
||||
# Install firefox.
|
||||
programs.firefox.enable = true;
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
|
@ -196,11 +117,6 @@
|
|||
services.tailscale.enable = true;
|
||||
services.syncthing.enable = true;
|
||||
|
||||
services.udev.extraRules = ''
|
||||
ACTION=="add", SUBSYSTEM=="backlight", GROUP="video", MODE="0660"
|
||||
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="3434", MODE="0660", GROUP="users", TAG+="uaccess", TAG+="udev-acl"
|
||||
'';
|
||||
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../configs/desktop.nix
|
||||
];
|
||||
|
||||
services.blueman.enable = true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue