Skip to content

Instantly share code, notes, and snippets.

@jD91mZM2
Created August 14, 2018 18:13
Show Gist options
  • Save jD91mZM2/1a87c47a5f98650ca5e8b854e91b074d to your computer and use it in GitHub Desktop.
Save jD91mZM2/1a87c47a5f98650ca5e8b854e91b074d to your computer and use it in GitHub Desktop.
--- /etc/nixos/configuration.nix 2018-08-13 06:48:07.290286307 +0200
+++ fmt.nix 2018-08-14 20:09:52.544743270 +0200
@@ -1,13 +1,9 @@
# 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, ... }:
-
-{
+({ config, pkgs, ... }: {
# :(
nixpkgs.config.allowUnfree = true;
-
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
@@ -22,48 +18,44 @@
# VPN killswitch
./killswitch.nix
];
-
# systemd-boot
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
-
# Intel microcode
hardware.cpu.intel.updateMicrocode = true;
-
# TTY settings
i18n = {
consoleFont = "Lat2-Terminus16";
consoleKeyMap = "us";
defaultLocale = "en_US.UTF-8";
};
-
# Time
time.timeZone = "Europe/Stockholm";
-
# Networking
networking.hostName = "compotar";
networking.networkmanager.enable = true;
- networking.nameservers = ["1.1.1.1" "1.0.0.1"];
+ networking.nameservers = [
+ "1.1.1.1"
+ "1.0.0.1"
+ ];
## Manually overwrite /etc/resolv.conf because openresolv tries to add my ISP's DNS
environment.etc."resolv.conf".text = ''
- ${builtins.concatStringsSep
- "\n"
- (map (ip: "nameserver " + ip) config.networking.nameservers)}
+ ${((builtins.concatStringsSep "n") ((map (ip: "nameserver " + ip)) config.networking.nameservers))}
'';
-
# Sound
sound.enable = true;
hardware.pulseaudio.enable = true;
-
# 32-bit support
hardware.opengl.driSupport32Bit = true;
hardware.pulseaudio.support32Bit = true;
-
## Required by xfce4-panel
- environment.pathsToLink = [ "/share/xfce4" ];
+ environment.pathsToLink = [
+ "/share/xfce4"
+ ];
## https://github.com/NixOS/nixpkgs/issues/33231
- environment.variables.GDK_PIXBUF_MODULE_FILE = "${pkgs.librsvg.out}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache";
-
+ environment.variables.GDK_PIXBUF_MODULE_FILE = ''
+ ${pkgs.librsvg.out}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
+ '';
# Program configuration
programs.bash = {
enableCompletion = true;
@@ -88,19 +80,18 @@
autoPrune.enable = true;
};
virtualisation.libvirtd.enable = true;
-
# Graphics! X11! Much wow!
services.xserver = {
enable = true;
layout = "us";
xkbOptions = "compose:ralt";
-
# Touchpad:
# libinput.enable = true;
-
displayManager.lightdm = {
enable = true;
- background = "${pkgs.adapta-backgrounds}/share/backgrounds/adapta/tealized.jpg";
+ background = ''
+ ${pkgs.adapta-backgrounds}/share/backgrounds/adapta/tealized.jpg
+ '';
greeters.gtk = {
enable = true;
theme = {
@@ -114,17 +105,19 @@
enableContribAndExtras = true;
};
};
-
# User settings
users.extraUsers.user = {
isNormalUser = true;
- extraGroups = ["wheel" "docker" "libvirtd"];
+ extraGroups = [
+ "wheel"
+ "docker"
+ "libvirtd"
+ ];
shell = pkgs.zsh;
};
-
# 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.
- system.stateVersion = "18.03"; # Did you read the comment?
-}
+ system.stateVersion = "18.03";
+})
\ No newline at end of file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment