nixos-config/configuration.nix

185 lines
4.3 KiB
Nix
Raw Normal View History

2020-04-11 21:47:33 +00:00
# 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, ... }:
{
imports =
[
2020-06-01 02:42:32 +00:00
./private
./system/current
2020-06-01 02:42:32 +00:00
./packages.nix
./fonts.nix
2020-11-01 20:27:07 +00:00
./sets/neovim.nix
2020-06-01 02:42:32 +00:00
];
2020-04-11 21:47:33 +00:00
nix = {
daemonNiceLevel = 5;
daemonIONiceLevel = 1;
autoOptimiseStore = true;
gc = {
automatic = true;
dates = "00:00";
options = "--delete-older-than 14d";
};
trustedUsers = [ "artemis" ];
2020-04-11 21:47:33 +00:00
};
console = {
keyMap = "us";
earlySetup = true;
};
2020-04-11 21:47:33 +00:00
i18n.defaultLocale = "de_DE.UTF-8";
2020-04-11 21:47:33 +00:00
nixpkgs = {
config.allowUnfree = true;
};
2020-04-11 21:47:33 +00:00
time.timeZone = "Etc/UTC";
2020-04-11 21:47:33 +00:00
environment = {
variables = {
TERMINAL = "alacritty";
2020-08-15 03:27:08 +00:00
# for Sway
MOZ_USE_XINPUT2 = "1";
2020-04-11 21:47:33 +00:00
_JAVA_AWT_WM_NONREPARENTING = "1";
GTK_THEME = "Adwaita-dark";
2020-04-11 21:47:33 +00:00
};
enableDebugInfo = true;
shellAliases = {
vim = "nvim";
};
};
sound.enable = true;
virtualisation = {
docker.enable = true;
lxd = {
enable = true;
recommendedSysctlSettings = true;
};
};
2020-08-15 03:27:08 +00:00
security.polkit.enable = true;
2020-04-11 21:47:33 +00:00
2020-06-01 02:42:32 +00:00
services = {
2020-04-11 21:47:33 +00:00
avahi = {
enable = true;
nssmdns = true;
publish = {
enable = true;
userServices = true;
};
};
accounts-daemon.enable = true;
chrony.enable = true;
flatpak.enable = true;
fwupd.enable = true;
kbfs.enable = true;
keybase.enable = true;
logind.extraConfig = "HandlePowerKey=suspend";
pcscd.enable = true;
2020-05-04 15:53:17 +00:00
tor = {
enable = true;
client.enable = true;
};
2020-04-11 21:47:33 +00:00
syncthing = {
enable = true;
user = "artemis";
dataDir = "/home/artemis";
};
2020-09-21 01:32:44 +00:00
udev.packages = [
pkgs.openocd
pkgs.android-udev-rules
(pkgs.callPackage ./externals/rules/adafruit.nix { })
(pkgs.callPackage ./externals/rules/fpga.nix { })
(pkgs.callPackage ./externals/rules/limesuite.nix { })
(pkgs.callPackage ./externals/rules/uhk.nix { })
];
2020-04-11 21:47:33 +00:00
printing = {
enable = true;
drivers = [ (pkgs.brlaser.overrideAttrs (old: {
patches = [ (pkgs.fetchpatch {
name = "l2300d-fix.patch";
url = "https://patch-diff.githubusercontent.com/raw/pdewacht/brlaser/pull/68.patch";
sha256 = "07iqv048q0iplghn0aamjslyixw1p5jbk004i20xnl1vs95nyqzy";
}) ];
})) ];
2020-04-11 21:47:33 +00:00
};
};
xdg.portal = {
enable = true;
extraPortals = with pkgs; [
xdg-desktop-portal-gtk
xdg-desktop-portal-wlr
];
2020-04-11 21:47:33 +00:00
};
2020-06-01 02:42:32 +00:00
hardware = {
2020-04-11 21:47:33 +00:00
cpu.amd.updateMicrocode = true;
bluetooth.enable = true;
2020-06-01 02:42:32 +00:00
opengl = {
2020-04-11 21:47:33 +00:00
extraPackages = [ pkgs.vaapiVdpau pkgs.libvdpau-va-gl ];
driSupport32Bit = true;
};
pulseaudio = {
enable = true;
package = pkgs.pulseaudioFull;
support32Bit = true;
daemon.config.flat-volumes = "no";
};
};
networking = {
firewall.enable = false;
networkmanager = {
enable = true;
ethernet.macAddress = "random";
wifi.macAddress = "random";
};
};
programs = {
adb.enable = true;
java = {
enable = true;
package = pkgs.adoptopenjdk-bin;
};
gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
sway = {
enable = true;
wrapperFeatures.gtk = true;
};
wireshark = {
enable = true;
package = pkgs.wireshark-qt;
};
fish.enable = true;
};
users = {
users.artemis = {
isNormalUser = true;
description = "Artemis Tosini";
uid = 1000;
2020-06-01 02:42:32 +00:00
extraGroups = [ "networkmanager" "wheel" "adbusers" "wireshark" "video" "docker" "lxd" "plugdev" "dialout" ];
2020-04-11 21:47:33 +00:00
# hashedPassword set in private
};
2020-06-01 02:42:32 +00:00
extraGroups.plugdev = {};
2020-04-11 21:47:33 +00:00
users.root = {
subUidRanges = [ { startUid = 16777216; count = 16777216; } { startUid = config.users.users.artemis.uid; count = 1; } ];
subGidRanges = [ { startGid = 16777216; count = 16777216; } { startGid = 100; count = 1; } ];
};
mutableUsers = false;
};
systemd.extraConfig = "DefaultLimitCORE=infinity";
security.pam.loginLimits = [ { domain = "*"; item = "core"; type = "hard"; value = "infinity"; } ];
}