modularise config
This commit is contained in:
parent
ae44502f36
commit
79bba316c2
28 changed files with 407 additions and 432 deletions
35
common/base-hardware.nix
Normal file
35
common/base-hardware.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
boot.initrd.luks.devices = [
|
||||
{
|
||||
name = "root";
|
||||
device = "/dev/disk/by-partlabel/nixos";
|
||||
preLVM = true;
|
||||
allowDiscards = true;
|
||||
}
|
||||
];
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# Bluetooth
|
||||
hardware.bluetooth.enable = true;
|
||||
hardware.bluetooth.extraConfig = "
|
||||
[General]
|
||||
Enable=Source,Sink,Media,Socket
|
||||
";
|
||||
|
||||
# Sound.
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio = {
|
||||
enable = true;
|
||||
support32Bit = true;
|
||||
extraModules = [ pkgs.pulseaudio-modules-bt ];
|
||||
package = pkgs.pulseaudioFull;
|
||||
};
|
||||
|
||||
# USB devices
|
||||
hardware.u2f.enable = true;
|
||||
}
|
||||
|
9
common/docker.nix
Normal file
9
common/docker.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
docker-compose
|
||||
];
|
||||
|
||||
virtualisation.docker.enable = true;
|
||||
}
|
25
common/gnome.nix
Normal file
25
common/gnome.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
gnome3.dconf-editor
|
||||
gnome3.gnome-tweaks
|
||||
gnomeExtensions.dash-to-panel
|
||||
gnomeExtensions.topicons-plus
|
||||
];
|
||||
|
||||
# Enable Gnome 3
|
||||
services.xserver.displayManager.gdm.enable = true;
|
||||
services.xserver.displayManager.gdm.wayland = false;
|
||||
services.xserver.desktopManager.gnome3.enable = true;
|
||||
environment.gnome3.excludePackages = with pkgs; [
|
||||
gnome3.geary
|
||||
gnome3.gnome-weather
|
||||
gnome3.gnome-calendar
|
||||
gnome3.gnome-maps
|
||||
gnome3.gnome-contacts
|
||||
gnome3.gnome-software
|
||||
gnome3.gnome-packagekit
|
||||
gnome3.epiphany
|
||||
];
|
||||
}
|
7
common/gpu-bumblebee.nix
Normal file
7
common/gpu-bumblebee.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Graphics drivers
|
||||
hardware.bumblebee.enable = true;
|
||||
hardware.opengl.driSupport32Bit = true;
|
||||
}
|
7
common/gpu-nvidia.nix
Normal file
7
common/gpu-nvidia.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Graphics drivers
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
hardware.opengl.driSupport32Bit = true;
|
||||
}
|
9
common/gpu-optimus.nix
Normal file
9
common/gpu-optimus.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Graphics drivers
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
hardware.nvidia.optimus_prime.enable = true;
|
||||
hardware.nvidia.optimus_prime.nvidiaBusId = "PCI:2:0:0";
|
||||
hardware.nvidia.optimus_prime.intelBusId = "PCI:0:2:0";
|
||||
}
|
7
common/gtk.nix
Normal file
7
common/gtk.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.dbus.packages = with pkgs; [
|
||||
gnome3.dconf gnome2.GConf
|
||||
];
|
||||
}
|
15
common/i18n.nix
Normal file
15
common/i18n.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Select internationalisation properties.
|
||||
i18n = {
|
||||
consoleFont = "Lat2-Terminus16";
|
||||
consoleKeyMap = "uk";
|
||||
defaultLocale = "en_GB.UTF-8";
|
||||
inputMethod.enabled = "ibus";
|
||||
inputMethod.ibus.engines = with pkgs.ibus-engines; [ uniemoji ];
|
||||
};
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Berlin";
|
||||
}
|
9
common/ledger.nix
Normal file
9
common/ledger.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
hardware.ledger.enable = true;
|
||||
services.udev.extraRules = ''
|
||||
# Nano S
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0001|1000|1001|1002|1003|1004|1005|1006|1007|1008|1009|100a|100b|100c|100d|100e|100f|1010|1011|1012|1013|1014|1015|1016|1017|1018|1019|101a|101b|101c|101d|101e|101f", TAG+="uaccess", TAG+="udev-acl"
|
||||
'';
|
||||
}
|
10
common/nix.nix
Normal file
10
common/nix.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
nix.autoOptimiseStore = true;
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 30d";
|
||||
};
|
||||
}
|
14
common/system.nix
Normal file
14
common/system.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
wget
|
||||
curl
|
||||
networkmanager
|
||||
neovim
|
||||
];
|
||||
|
||||
fonts.enableDefaultFonts = true;
|
||||
|
||||
services.printing.enable = true;
|
||||
}
|
8
common/x11.nix
Normal file
8
common/x11.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
services.xserver.layout = "gb";
|
||||
services.xserver.xkbOptions = "eurosign:e";
|
||||
}
|
8
common/xmonad.nix
Normal file
8
common/xmonad.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Enable xmonad
|
||||
services.xserver.displayManager.lightdm.enable = true;
|
||||
services.xserver.windowManager.default = "xmonad";
|
||||
services.xserver.windowManager.xmonad.enable = true;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue