You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

186 lines
5.0 KiB
Nix

{ config, pkgs, options, ... }: let
packages = (import ../lib/packages.nix) { config = config.nixpkgs.config; };
callPackageFile = path: (import path) packages;
in {
imports = [
(callPackageFile ../profiles/system/base.nix)
(callPackageFile ../profiles/system/wpa-cli.nix)
(callPackageFile ../profiles/environment/graphical-environment.nix)
/*(callPackageFile ../profiles/environment/xfce4.nix)*/
(callPackageFile ../profiles/environment/plasma5.nix)
(callPackageFile ../profiles/environment/common-software.nix)
(callPackageFile ../profiles/system/efi-boot.nix)
(callPackageFile ../profiles/system/networked.nix)
(callPackageFile ../profiles/system/printing.nix)
(callPackageFile ../profiles/system/scanning.nix)
(callPackageFile ../profiles/system/amd.nix)
(callPackageFile ../profiles/system/pulseaudio.nix)
(callPackageFile ../profiles/system/bluetooth.nix)
(callPackageFile ../profiles/system/virtualization.nix)
(callPackageFile ../profiles/system/service-accounting.nix)
(callPackageFile ../profiles/software/elasticsearch.nix)
/* (callPackageFile ../profiles/software/couchdb.nix) */
(callPackageFile ../profiles/software/games.nix)
/*(callPackageFile ../profiles/software/guake.nix)*/
(callPackageFile ../profiles/software/yakuake.nix)
(callPackageFile ../profiles/software/synergy.nix)
(callPackageFile ../profiles/software/workrave.nix)
];
nix.trustedUsers = ["sven"];
services.xserver = {
xrandrHeads = [
"DFP6"
"CRT1"
];
# The below is a workaround, because SDDM inexplicably results in a masked display-manager.service on this system.
displayManager = {
lightdm = {
enable = true;
};
sddm = {
enable = pkgs.stdenv.lib.mkForce false;
};
};
};
networking = {
hostName = "desktop-home";
firewall = { # FIXME: abstract this out...
allowedTCPPorts = [
25565 # Minecraft
3979 # OpenTTD
];
allowedUDPPorts = [
34197 # Factorio
3979 # OpenTTD
];
};
};
users.extraUsers.sven = {
isNormalUser = true;
uid = 1000;
extraGroups = [
"libvirtd"
"dialout"
];
};
users.groups = {
davfs2 = {};
};
users.extraUsers.davfs2 = {
isNormalUser = true;
};
boot = {
kernelModules = [ "tun" "virtio" "nbd" ];
kernelParams = [ "radeon.dpm=0" ];
};
environment = {
systemPackages = with packages; [
nixpkgs.nixops
nixpkgs.oraclejre8
nixpkgs.devilspie2
nixpkgs.bundix
];
etc = {
"synergy-server.conf" = {
text = ''
section: screens
desktop:
laptop:
end
section: links
desktop:
left = laptop
laptop:
right = desktop
end
section: aliases
desktop:
192.168.178.60
desktop-home
laptop:
192.168.178.41
linux-o82e.site
end
'';
};
};
pathsToLink = [
"/lib/rustlib/src"
];
};
hardware.pulseaudio.extraConfig = ''
load-module module-loopback
load-module module-combine-sink sink_name=all
'';
networking.extraHosts = ''
127.0.0.1 im-project.im
'';
services.mpd = {
enable = true;
};
/* SSHd */
services.openssh = {
enable = true;
passwordAuthentication = false;
challengeResponseAuthentication = false;
};
users.users.root.openssh.authorizedKeys.keys = [
(builtins.readFile ../private/joepie91.pub)
];
/* Hydra */
services.hydra = {
enable = true;
port = 3333;
hydraURL = "http://localhost:3333/";
notificationSender = "hydra@cryto.net";
useSubstitutes = true;
minimumDiskFree = 20;
minimumDiskFreeEvaluator = 20;
buildMachinesFiles = pkgs.lib.mkIf (config.nix.buildMachines == []) [];
extraConfig = ''
store_uri = file:///var/lib/hydra-builds
'';
};
/* morepkgs */
nix.binaryCaches = options.nix.binaryCaches.default ++ [
"https://nix-cache.cryto.net/"
];
nix.binaryCachePublicKeys = [
"hydra.nixos.org-1:CNHJZBh9K4tP3EKF6FkkgeVYsS3ohTl+oS0Qa8bezVs="
"nix-cache.cryto.net:+FTmODNmc5L50krRNZwx93Ti2PM6Tgqj5EVL2CqazC4="
];
}