mirror of
https://github.com/caperren/nixos-configs.git
synced 2025-11-08 19:51:14 +00:00
Deduplicate firefox, thunar, xfce, internationalization settings, nix-settings, and pipewire
This commit is contained in:
@@ -13,7 +13,19 @@
|
|||||||
imports = [
|
imports = [
|
||||||
# Include the results of the hardware scan.
|
# Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
|
||||||
|
# System Configuration
|
||||||
|
../../modules/system/internationalization.nix
|
||||||
|
../../modules/system/nix-settings.nix
|
||||||
|
|
||||||
|
../../modules/system/pipewire.nix
|
||||||
|
|
||||||
|
# Application Groups
|
||||||
../../modules/application-groups/gaming.nix
|
../../modules/application-groups/gaming.nix
|
||||||
|
|
||||||
|
# Individual Applications
|
||||||
|
../../modules/applications/firefox.nix
|
||||||
|
../../modules/applications/thunar.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
@@ -40,18 +52,13 @@
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
#
|
#
|
||||||
nix.settings.download-buffer-size = 524288000;
|
|
||||||
|
|
||||||
# Bootloader.
|
# Bootloader.
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
networking.hostName = "cap-nr200p"; # Define your hostname. #-#
|
networking.hostName = "cap-nr200p"; # Define your hostname. #-#
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
|
||||||
|
|
||||||
# Configure network proxy if necessary
|
|
||||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
|
||||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
|
||||||
|
|
||||||
# Enable networking
|
# Enable networking
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
@@ -69,33 +76,7 @@
|
|||||||
# Set your time zone.
|
# Set your time zone.
|
||||||
time.timeZone = "America/Los_Angeles";
|
time.timeZone = "America/Los_Angeles";
|
||||||
|
|
||||||
# Select internationalisation properties.
|
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
|
||||||
|
|
||||||
i18n.extraLocaleSettings = {
|
|
||||||
LC_ADDRESS = "en_US.UTF-8";
|
|
||||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
|
||||||
LC_MEASUREMENT = "en_US.UTF-8";
|
|
||||||
LC_MONETARY = "en_US.UTF-8";
|
|
||||||
LC_NAME = "en_US.UTF-8";
|
|
||||||
LC_NUMERIC = "en_US.UTF-8";
|
|
||||||
LC_PAPER = "en_US.UTF-8";
|
|
||||||
LC_TELEPHONE = "en_US.UTF-8";
|
|
||||||
LC_TIME = "en_US.UTF-8";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Enable the X11 windowing system.
|
|
||||||
# services.xserver.enable = true;
|
|
||||||
|
|
||||||
# Enable the XFCE Desktop Environment.
|
|
||||||
# services.xserver.displayManager.lightdm.enable = true;
|
|
||||||
# services.xserver.desktopManager.xfce.enable = true;
|
|
||||||
|
|
||||||
# Configure keymap in X11
|
|
||||||
services.xserver.xkb = {
|
|
||||||
layout = "us";
|
|
||||||
variant = "";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Enable CUPS to print documents.
|
# Enable CUPS to print documents.
|
||||||
services.printing.enable = true;
|
services.printing.enable = true;
|
||||||
@@ -106,22 +87,6 @@
|
|||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Enable sound with pipewire.
|
|
||||||
services.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;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Enable touchpad support (enabled default in most desktopManager).
|
# Enable touchpad support (enabled default in most desktopManager).
|
||||||
# services.xserver.libinput.enable = true;
|
# services.xserver.libinput.enable = true;
|
||||||
|
|
||||||
@@ -163,12 +128,6 @@
|
|||||||
|
|
||||||
#services.xserver.displayManager.gdm.autoLogin.delay = 60;
|
#services.xserver.displayManager.gdm.autoLogin.delay = 60;
|
||||||
|
|
||||||
# Install firefox.
|
|
||||||
programs.firefox.enable = true; # -#
|
|
||||||
|
|
||||||
# Allow unfree packages
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
|
|
||||||
# List packages installed in system profile. To search, run:
|
# List packages installed in system profile. To search, run:
|
||||||
# $ nix search wget
|
# $ nix search wget
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
@@ -275,12 +234,6 @@
|
|||||||
bs-manager
|
bs-manager
|
||||||
];
|
];
|
||||||
|
|
||||||
services.monado = {
|
|
||||||
enable = true;
|
|
||||||
defaultRuntime = true;
|
|
||||||
highPriority = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
services.hardware.openrgb.enable = true;
|
services.hardware.openrgb.enable = true;
|
||||||
|
|
||||||
services.meshcentral.enable = true;
|
services.meshcentral.enable = true;
|
||||||
@@ -290,14 +243,6 @@
|
|||||||
hardware.logitech.wireless.enable = true;
|
hardware.logitech.wireless.enable = true;
|
||||||
hardware.logitech.wireless.enableGraphical = true;
|
hardware.logitech.wireless.enableGraphical = true;
|
||||||
|
|
||||||
services.sunshine = {
|
|
||||||
enable = true;
|
|
||||||
autoStart = true;
|
|
||||||
capSysAdmin = true;
|
|
||||||
openFirewall = true;
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.bash.shellAliases = {
|
programs.bash.shellAliases = {
|
||||||
nixrebuild = "pushd /etc/nixos && { trap 'popd' EXIT; sudo nixos-rebuild switch --flake .#$(hostname); }";
|
nixrebuild = "pushd /etc/nixos && { trap 'popd' EXIT; sudo nixos-rebuild switch --flake .#$(hostname); }";
|
||||||
nixupdate = "cd /etc/nixos && sudo nix flake update && sudo nixos-rebuild switch --flake .#$(hostname)";
|
nixupdate = "cd /etc/nixos && sudo nix flake update && sudo nixos-rebuild switch --flake .#$(hostname)";
|
||||||
@@ -354,14 +299,6 @@
|
|||||||
nerd-fonts.jetbrains-mono
|
nerd-fonts.jetbrains-mono
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.thunar.enable = true;
|
|
||||||
programs.thunar.plugins = with pkgs.xfce; [
|
|
||||||
thunar-archive-plugin
|
|
||||||
thunar-volman
|
|
||||||
];
|
|
||||||
services.gvfs.enable = true; # Mount, trash, and other functionalities
|
|
||||||
services.tumbler.enable = true; # Thumbnail support for images
|
|
||||||
|
|
||||||
hardware.bluetooth.enable = true; # enables support for Bluetooth
|
hardware.bluetooth.enable = true; # enables support for Bluetooth
|
||||||
hardware.bluetooth.powerOnBoot = true; # powers up the default Bluetooth controller on boot
|
hardware.bluetooth.powerOnBoot = true; # powers up the default Bluetooth controller on boot
|
||||||
services.blueman.enable = true;
|
services.blueman.enable = true;
|
||||||
|
|||||||
@@ -8,25 +8,29 @@
|
|||||||
imports = [
|
imports = [
|
||||||
# Include the results of the hardware scan.
|
# Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
|
||||||
|
# System Configuration
|
||||||
|
../../modules/system/internationalization.nix
|
||||||
|
../../modules/system/nix-settings.nix
|
||||||
|
|
||||||
|
../../modules/system/pipewire.nix
|
||||||
|
|
||||||
|
# Application Groups
|
||||||
../../modules/application-groups/gaming.nix
|
../../modules/application-groups/gaming.nix
|
||||||
|
|
||||||
|
# Individual Applications
|
||||||
|
../../modules/applications/firefox.nix
|
||||||
|
../../modules/applications/thunar.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
#boot.kernelPackages = pkgs.linuxPackages_latest;
|
#boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
#
|
|
||||||
nix.settings.download-buffer-size = 524288000;
|
|
||||||
|
|
||||||
# Bootloader.
|
# Bootloader.
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
boot.loader.grub.configurationLimit = 8;
|
boot.loader.grub.configurationLimit = 8;
|
||||||
|
|
||||||
networking.hostName = "cap-slim7"; # Define your hostname. #-#
|
networking.hostName = "cap-slim7"; # Define your hostname. #-#
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
|
||||||
|
|
||||||
# Configure network proxy if necessary
|
|
||||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
|
||||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
|
||||||
|
|
||||||
#security.sudo.extraConfig = ''
|
#security.sudo.extraConfig = ''
|
||||||
# Defaults timestamp_timeout=15
|
# Defaults timestamp_timeout=15
|
||||||
@@ -57,53 +61,9 @@
|
|||||||
#time.timeZone = "Europe/Oslo";
|
#time.timeZone = "Europe/Oslo";
|
||||||
# services.tzupdate.enable = true;
|
# services.tzupdate.enable = true;
|
||||||
|
|
||||||
# Select internationalisation properties.
|
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
|
||||||
|
|
||||||
i18n.extraLocaleSettings = {
|
|
||||||
LC_ADDRESS = "en_US.UTF-8";
|
|
||||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
|
||||||
LC_MEASUREMENT = "en_US.UTF-8";
|
|
||||||
LC_MONETARY = "en_US.UTF-8";
|
|
||||||
LC_NAME = "en_US.UTF-8";
|
|
||||||
LC_NUMERIC = "en_US.UTF-8";
|
|
||||||
LC_PAPER = "en_US.UTF-8";
|
|
||||||
LC_TELEPHONE = "en_US.UTF-8";
|
|
||||||
LC_TIME = "en_US.UTF-8";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Enable the X11 windowing system.
|
|
||||||
# services.xserver.enable = true;
|
|
||||||
|
|
||||||
# Enable the XFCE Desktop Environment.
|
|
||||||
# services.xserver.displayManager.lightdm.enable = true;
|
|
||||||
# services.xserver.desktopManager.xfce.enable = true;
|
|
||||||
|
|
||||||
# Configure keymap in X11
|
|
||||||
services.xserver.xkb = {
|
|
||||||
layout = "us";
|
|
||||||
variant = "";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Enable CUPS to print documents.
|
# Enable CUPS to print documents.
|
||||||
services.printing.enable = true;
|
services.printing.enable = true;
|
||||||
|
|
||||||
# Enable sound with pipewire.
|
|
||||||
services.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;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Enable touchpad support (enabled default in most desktopManager).
|
# Enable touchpad support (enabled default in most desktopManager).
|
||||||
# services.xserver.libinput.enable = true;
|
# services.xserver.libinput.enable = true;
|
||||||
|
|
||||||
@@ -124,12 +84,6 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Install firefox.
|
|
||||||
programs.firefox.enable = true; # -#
|
|
||||||
|
|
||||||
# Allow unfree packages
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
|
|
||||||
# List packages installed in system profile. To search, run:
|
# List packages installed in system profile. To search, run:
|
||||||
# $ nix search wget
|
# $ nix search wget
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
@@ -248,21 +202,6 @@
|
|||||||
];
|
];
|
||||||
programs.ydotool.enable = true;
|
programs.ydotool.enable = true;
|
||||||
|
|
||||||
#boot.extraModulePackages = with config.boot.kernelPackages; [
|
|
||||||
# v4l2loopback
|
|
||||||
#];
|
|
||||||
#boot.extraModprobeConfig = ''
|
|
||||||
# options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1
|
|
||||||
#'';
|
|
||||||
|
|
||||||
#programs.virt-manager.enable = true;
|
|
||||||
#users.groups.libvirtd.members = [ "caperren" ];
|
|
||||||
#virtualisation.libvirtd.enable = true;
|
|
||||||
#virtualisation.spiceUSBRedirection.enable = true;
|
|
||||||
#services.spice-vdagentd.enable = true;
|
|
||||||
|
|
||||||
# services.automatic-timezoned.enable = true;
|
|
||||||
|
|
||||||
programs.bash.shellAliases = {
|
programs.bash.shellAliases = {
|
||||||
nixrebuild = "pushd /etc/nixos && { trap 'popd' EXIT; sudo nixos-rebuild switch --flake .#$(hostname); }";
|
nixrebuild = "pushd /etc/nixos && { trap 'popd' EXIT; sudo nixos-rebuild switch --flake .#$(hostname); }";
|
||||||
nixupdate = "cd /etc/nixos && sudo nix flake update && sudo nixos-rebuild switch --flake .#$(hostname)";
|
nixupdate = "cd /etc/nixos && sudo nix flake update && sudo nixos-rebuild switch --flake .#$(hostname)";
|
||||||
@@ -271,13 +210,6 @@
|
|||||||
nixlimitfive = "sudo nix-env --list-generations --profile /nix/var/nix/profiles/system | head -n -5 | cut -d ' ' -f2 | xargs -I {} sudo nix-env --delete-generations --profile /nix/var/nix/profiles/system {}";
|
nixlimitfive = "sudo nix-env --list-generations --profile /nix/var/nix/profiles/system | head -n -5 | cut -d ' ' -f2 | xargs -I {} sudo nix-env --delete-generations --profile /nix/var/nix/profiles/system {}";
|
||||||
};
|
};
|
||||||
|
|
||||||
#programs.appimage = {
|
|
||||||
# enable = true;
|
|
||||||
# binfmt = true;
|
|
||||||
#};
|
|
||||||
|
|
||||||
# services.power-profiles-daemon.enable = true;
|
|
||||||
|
|
||||||
services.tlp = {
|
services.tlp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
@@ -363,14 +295,6 @@
|
|||||||
nerd-fonts.jetbrains-mono
|
nerd-fonts.jetbrains-mono
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.thunar.enable = true;
|
|
||||||
programs.thunar.plugins = with pkgs.xfce; [
|
|
||||||
thunar-archive-plugin
|
|
||||||
thunar-volman
|
|
||||||
];
|
|
||||||
services.gvfs.enable = true; # Mount, trash, and other functionalities
|
|
||||||
services.tumbler.enable = true; # Thumbnail support for images
|
|
||||||
|
|
||||||
hardware.bluetooth.enable = true; # enables support for Bluetooth
|
hardware.bluetooth.enable = true; # enables support for Bluetooth
|
||||||
hardware.bluetooth.powerOnBoot = true; # powers up the default Bluetooth controller on boot
|
hardware.bluetooth.powerOnBoot = true; # powers up the default Bluetooth controller on boot
|
||||||
services.blueman.enable = true;
|
services.blueman.enable = true;
|
||||||
|
|||||||
4
modules/applications/firefox.nix
Normal file
4
modules/applications/firefox.nix
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
programs.firefox.enable = true;
|
||||||
|
}
|
||||||
@@ -1,7 +1,9 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
{
|
{
|
||||||
|
# Support steam hardware like the index and steam controller
|
||||||
hardware.steam-hardware.enable = true;
|
hardware.steam-hardware.enable = true;
|
||||||
|
|
||||||
|
# Steam program itself
|
||||||
programs.steam = {
|
programs.steam = {
|
||||||
enable = true;
|
enable = true;
|
||||||
remotePlay.openFirewall = true;
|
remotePlay.openFirewall = true;
|
||||||
@@ -9,9 +11,17 @@
|
|||||||
gamescopeSession.enable = true;
|
gamescopeSession.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Valve's micro-compositor
|
||||||
programs.gamescope = {
|
programs.gamescope = {
|
||||||
enable = true;
|
enable = true;
|
||||||
capSysNice = true;
|
capSysNice = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Open source OpenXR runtime for VR
|
||||||
|
services.monado = {
|
||||||
|
enable = true;
|
||||||
|
defaultRuntime = true;
|
||||||
|
highPriority = true;
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
10
modules/applications/thunar.nix
Normal file
10
modules/applications/thunar.nix
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
programs.thunar.enable = true;
|
||||||
|
programs.thunar.plugins = with pkgs.xfce; [
|
||||||
|
thunar-archive-plugin
|
||||||
|
thunar-volman
|
||||||
|
];
|
||||||
|
services.gvfs.enable = true; # Mount, trash, and other functionalities
|
||||||
|
services.tumbler.enable = true; # Thumbnail support for images
|
||||||
|
}
|
||||||
10
modules/applications/xfce.nix
Normal file
10
modules/applications/xfce.nix
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
# Enable the X11 windowing system.
|
||||||
|
services.xserver.enable = true;
|
||||||
|
|
||||||
|
# Enable the XFCE Desktop Environment.
|
||||||
|
services.xserver.displayManager.lightdm.enable = true;
|
||||||
|
services.xserver.desktopManager.xfce.enable = true;
|
||||||
|
|
||||||
|
}
|
||||||
24
modules/system/internationalization.nix
Normal file
24
modules/system/internationalization.nix
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
# Select internationalisation properties.
|
||||||
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
|
||||||
|
i18n.extraLocaleSettings = {
|
||||||
|
LC_ADDRESS = "en_US.UTF-8";
|
||||||
|
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||||
|
LC_MEASUREMENT = "en_US.UTF-8";
|
||||||
|
LC_MONETARY = "en_US.UTF-8";
|
||||||
|
LC_NAME = "en_US.UTF-8";
|
||||||
|
LC_NUMERIC = "en_US.UTF-8";
|
||||||
|
LC_PAPER = "en_US.UTF-8";
|
||||||
|
LC_TELEPHONE = "en_US.UTF-8";
|
||||||
|
LC_TIME = "en_US.UTF-8";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Configure keymap in X11
|
||||||
|
services.xserver.xkb = {
|
||||||
|
layout = "us";
|
||||||
|
variant = "";
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
9
modules/system/nix-settings.nix
Normal file
9
modules/system/nix-settings.nix
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
# Allow unfree packages
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
# Generally want a larger download buffer
|
||||||
|
nix.settings.download-buffer-size = 524288000;
|
||||||
|
|
||||||
|
}
|
||||||
12
modules/system/pipewire.nix
Normal file
12
modules/system/pipewire.nix
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
services.pulseaudio.enable = false;
|
||||||
|
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
alsa.support32Bit = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user