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
|
2020-08-15 03:06:11 +00:00
|
|
|
|
./system/current
|
2020-06-01 02:42:32 +00:00
|
|
|
|
./packages.nix
|
|
|
|
|
./fonts.nix
|
|
|
|
|
];
|
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" ];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
console = {
|
|
|
|
|
keyMap = "us";
|
|
|
|
|
earlySetup = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
i18n.defaultLocale = "de_DE.UTF-8";
|
|
|
|
|
|
|
|
|
|
nixpkgs = {
|
|
|
|
|
config.allowUnfree = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
time.timeZone = "Etc/UTC";
|
|
|
|
|
|
|
|
|
|
environment = {
|
|
|
|
|
variables = {
|
|
|
|
|
EDITOR = "nvim";
|
2020-08-15 03:06:11 +00:00
|
|
|
|
TERMINAL = "alacritty";
|
2020-08-15 03:27:08 +00:00
|
|
|
|
|
|
|
|
|
# for Sway
|
2020-08-15 03:06:11 +00:00
|
|
|
|
MOZ_USE_XINPUT2 = "1";
|
2020-04-11 21:47:33 +00:00
|
|
|
|
_JAVA_AWT_WM_NONREPARENTING = "1";
|
2020-08-15 03:06:11 +00:00
|
|
|
|
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";
|
|
|
|
|
};
|
|
|
|
|
printing = {
|
|
|
|
|
enable = true;
|
2020-07-27 03:53:38 +00:00
|
|
|
|
drivers = with pkgs; [ brlaser ];
|
2020-04-11 21:47:33 +00:00
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
xdg.portal = {
|
|
|
|
|
enable = true;
|
2020-05-24 21:03:53 +00:00
|
|
|
|
extraPortals = with pkgs; [
|
|
|
|
|
xdg-desktop-portal-gtk
|
2020-08-15 03:06:11 +00:00
|
|
|
|
xdg-desktop-portal-wlr
|
2020-05-24 21:03:53 +00:00
|
|
|
|
];
|
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"; } ];
|
|
|
|
|
}
|