Last active
December 17, 2021 16:33
-
-
Save AcouBass/4f5bcb3410f14bd5063a718b1d53bc4c to your computer and use it in GitHub Desktop.
NixOS configuration for my laptop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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’). | |
{ config, pkgs, lib, ... }: | |
{ | |
imports = | |
[ # Include the results of the hardware scan. | |
./hardware-configuration.nix | |
./musnix | |
]; | |
fonts.fonts = [ pkgs.open-dyslexic ]; | |
#musnix = { | |
# enable = true; | |
# alsaSeq.enable = true; | |
# soundcardPciId = "00:1b.0"; | |
# rtirq.enable = true; | |
# kernel = { | |
# realtime = true; | |
# optimize = true; | |
# }; | |
#}; | |
boot = { | |
initrd.luks.devices."cryptroot" = { | |
keyFile = "/dev/sdb"; | |
keyFileSize = 4096; | |
}; | |
loader = { | |
grub = { | |
enable = true; | |
version = 2; | |
# Define on which hard drive you want to install Grub. | |
device = "/dev/sda"; | |
}; | |
}; | |
plymouth = { | |
# enable = true; | |
# theme = breeze-plymouth; | |
themePackages = with pkgs; [ plasma5.breeze-plymouth ]; | |
}; | |
}; | |
swapDevices = [ { device = "/swapfile"; size = 4096; } ]; | |
networking = { | |
hostName = "nixlaptop"; | |
wireless.enable = false; | |
useDHCP = false; | |
networkmanager.enable = true; | |
#wicd.enable = true; | |
# proxy.default = "http://127.0.0.1:8118"; | |
}; | |
# Select internationalisation properties. | |
i18n = { | |
consoleFont = "Lat2-Terminus16"; | |
consoleKeyMap = "uk"; | |
defaultLocale = "en_GB.UTF-8"; | |
}; | |
# Set your time zone. | |
time.timeZone = "Europe/London"; | |
# List services that you want to enable: | |
services = { | |
# Enable the OpenSSH daemon. | |
openssh = { | |
enable = true; | |
startWhenNeeded = true; | |
passwordAuthentication = false; | |
}; | |
# Enable CUPS to print documents. | |
# Enable the X11 windowing system. | |
xserver = { | |
enable = true; | |
layout = "uk"; | |
#displayManager.slim.enable = true; | |
#desktopManager.xfce.enable = true; | |
displayManager.sddm.enable = true; | |
desktopManager.plasma5.enable = true; | |
windowManager.exwm.enable = true; | |
synaptics.enable = true; | |
videoDrivers = [ "intel" ]; | |
}; | |
# Syncthing service config | |
syncthing = { | |
enable = true; | |
useInotify = true; | |
all_proxy = null; | |
dataDir = "/home/eddie/.syncthing"; | |
user = "eddie"; | |
}; | |
## DNSCrypt + DNSMasq | |
dnscrypt-proxy = { | |
enable = true; | |
localPort = 43; | |
}; | |
dnsmasq = { | |
enable = true; | |
servers = [ "127.0.0.1#43" ]; | |
}; | |
## Tor + Privoxy | |
privoxy.enable = true; | |
tor = { | |
enable = true; | |
client = { | |
enable = true; | |
privoxy.enable = true; | |
}; | |
tsocks.enable = true; | |
}; | |
# Redshift | |
redshift = { | |
enable = true; | |
latitude = "53.5615"; | |
longitude = ".3268"; | |
}; | |
tlp.enable = true; | |
udisks2.enable = true; | |
printing.enable = true; | |
}; | |
security.apparmor.enable = true; | |
system = { | |
autoUpgrade.enable = true; | |
stateVersion = "17.03"; | |
}; | |
hardware = { | |
opengl = { | |
enable = true; | |
}; | |
pulseaudio = { | |
enable = true; | |
package = pkgs.pulseaudioFull; | |
}; | |
}; | |
# Define a user account. Don't forget to set a password with ‘passwd’. | |
users.extraUsers = { | |
eddie = { | |
isNormalUser = true; | |
extraGroups = [ "networkmanager" "audio" "wheel" ]; | |
}; | |
dave = { | |
isNormalUser = true; | |
extraGroups = [ "networkmanager" "wheel" "audio" ]; | |
}; | |
}; | |
nixpkgs.config = { | |
allowUnfree = true; | |
allowBroken = true; | |
}; | |
# system packages | |
environment.systemPackages = with pkgs; with qt5; with libsForQt5; with plasma5; with kdeApplications; [ | |
# general desktop stuff | |
firefox claws-mail qutebrowser midori | |
xscreensaver | |
# music stuff | |
guitarix qjackctl jack2Full | |
# themes | |
theme-vertex numix-gtk-theme | |
tango-icon-theme numix-icon-theme numix-icon-theme-circle | |
] | |
++builtins.filter lib.isDerivation (builtins.attrValues pkgs.plasma5) | |
++builtins.filter lib.isDerivation (builtins.attrValues pkgs.kdeApplications); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What does 182 and 183 accomplish? I've been trying to add all linux kernel module packages as systempackages in some way (since some bundle userspace tools) w/o any success. Functional programming (and Nix) is hard!