2017-10-15 16:27:35 +02: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’).
|
|
|
|
|
|
2018-05-25 10:47:56 +02:00
|
|
|
|
{ config, lib, pkgs, ... }:
|
2017-10-15 16:27:35 +02:00
|
|
|
|
|
2017-10-16 22:53:49 +02:00
|
|
|
|
{
|
2017-10-15 16:27:35 +02:00
|
|
|
|
imports =
|
2017-10-16 22:53:49 +02:00
|
|
|
|
[
|
2017-10-15 16:27:35 +02:00
|
|
|
|
./hardware-configuration.nix
|
|
|
|
|
./local-configuration.nix
|
2017-10-16 22:53:49 +02:00
|
|
|
|
./packages.nix
|
2017-10-17 00:32:48 +02:00
|
|
|
|
./desktop.nix
|
2017-10-20 23:22:10 +02:00
|
|
|
|
./dotfiles.nix
|
2017-10-15 16:27:35 +02:00
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
# Use the systemd-boot EFI boot loader.
|
|
|
|
|
boot.loader.systemd-boot.enable = true;
|
|
|
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
2018-05-01 14:08:36 +02:00
|
|
|
|
boot.cleanTmpDir = true;
|
2017-10-15 16:27:35 +02:00
|
|
|
|
hardware.pulseaudio.enable = true;
|
|
|
|
|
time.timeZone = "Europe/Oslo";
|
|
|
|
|
|
2017-11-02 16:50:46 +01:00
|
|
|
|
# Configure audio setup for JACK + Overtone
|
|
|
|
|
boot.kernelModules = [ "snd-seq" "snd-rawmidi" ];
|
|
|
|
|
hardware.pulseaudio.package = pkgs.pulseaudioFull;
|
|
|
|
|
|
2018-05-09 00:58:34 +02:00
|
|
|
|
# Update Intel microcode on boot (both machines have Intel CPUs):
|
|
|
|
|
hardware.cpu.intel.updateMicrocode = true;
|
|
|
|
|
|
2018-04-28 17:53:32 +02:00
|
|
|
|
networking = {
|
|
|
|
|
# Don't use ISP's DNS servers:
|
|
|
|
|
nameservers = [
|
|
|
|
|
"1.1.1.1"
|
|
|
|
|
"1.0.0.1"
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
# Open Chromecast-related ports
|
|
|
|
|
firewall.allowedTCPPorts = [ 5556 5558 ];
|
|
|
|
|
};
|
2018-04-28 17:46:13 +02:00
|
|
|
|
|
2018-05-25 10:47:56 +02:00
|
|
|
|
# Generate an immutable /etc/resolv.conf from the nameserver settings
|
|
|
|
|
# above (otherwise DHCP overwrites it):
|
|
|
|
|
environment.etc."resolv.conf" = with lib; with pkgs; {
|
|
|
|
|
source = writeText "resolv.conf" ''
|
|
|
|
|
${concatStringsSep "\n" (map (ns: "nameserver ${ns}") config.networking.nameservers)}
|
|
|
|
|
options edns0
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
|
2017-10-21 00:33:39 +02:00
|
|
|
|
# Configure emacs:
|
|
|
|
|
# (actually, that's a lie, this only installs emacs!)
|
2018-03-04 00:33:19 +01:00
|
|
|
|
services.emacs = {
|
|
|
|
|
install = true;
|
|
|
|
|
defaultEditor = true;
|
|
|
|
|
package = import ./emacs.nix { inherit pkgs; };
|
|
|
|
|
};
|
2017-10-15 16:27:35 +02:00
|
|
|
|
|
2018-05-07 14:24:07 +02:00
|
|
|
|
services.openssh.enable = true;
|
|
|
|
|
|
2017-10-30 00:30:12 +01:00
|
|
|
|
# Enable GNOME keyring (required for Evolution)
|
|
|
|
|
services.gnome3.gnome-keyring.enable = true;
|
|
|
|
|
|
2018-05-14 12:51:24 +02:00
|
|
|
|
# Enable OfflineIMAP (configuration itself is user-data)
|
|
|
|
|
services.offlineimap = {
|
|
|
|
|
install = true;
|
|
|
|
|
path = with pkgs; [ pass notmuch ];
|
|
|
|
|
};
|
|
|
|
|
|
2017-10-21 00:33:39 +02:00
|
|
|
|
virtualisation = {
|
|
|
|
|
# Configure Docker (with socket activation):
|
|
|
|
|
# Side note: ... why is this in virtualisation? ...
|
|
|
|
|
docker.enable = true;
|
|
|
|
|
docker.autoPrune.enable = true;
|
|
|
|
|
};
|
2017-10-17 16:18:11 +02:00
|
|
|
|
|
2017-10-21 00:33:39 +02:00
|
|
|
|
# Configure various other applications:
|
|
|
|
|
programs = {
|
|
|
|
|
java.enable = true;
|
2018-05-01 15:22:23 +02:00
|
|
|
|
java.package = pkgs.openjdk;
|
|
|
|
|
|
2017-10-21 00:33:39 +02:00
|
|
|
|
fish.enable = true;
|
|
|
|
|
ssh.startAgent = true;
|
|
|
|
|
};
|
2017-10-15 16:27:35 +02:00
|
|
|
|
|
2018-04-22 12:44:09 +02:00
|
|
|
|
services.postgresql.enable = true;
|
|
|
|
|
|
2017-10-15 16:27:35 +02:00
|
|
|
|
# Configure user account
|
|
|
|
|
users.defaultUserShell = pkgs.fish;
|
|
|
|
|
users.extraUsers.vincent = {
|
2017-10-18 00:58:03 +02:00
|
|
|
|
extraGroups = [ "wheel" "docker" ];
|
2017-10-15 16:27:35 +02:00
|
|
|
|
isNormalUser = true;
|
|
|
|
|
uid = 1000;
|
|
|
|
|
shell = pkgs.fish;
|
|
|
|
|
};
|
|
|
|
|
|
2017-10-21 00:33:39 +02:00
|
|
|
|
security.sudo = {
|
|
|
|
|
enable = true;
|
|
|
|
|
extraConfig = "wheel ALL=(ALL:ALL) SETENV: ALL";
|
|
|
|
|
};
|
2017-10-15 16:27:35 +02:00
|
|
|
|
|
|
|
|
|
# This value determines the NixOS release with which your system is to be
|
|
|
|
|
# compatible, in order to avoid breaking some software such as database
|
|
|
|
|
# servers. You should change this only after NixOS release notes say you
|
|
|
|
|
# should.
|
2018-04-04 17:10:12 +02:00
|
|
|
|
system.stateVersion = "18.03"; # Did you read the comment?
|
2017-10-15 16:27:35 +02:00
|
|
|
|
}
|