-
-
Save asheshambasta/1905ff4f2da64d2424bf6cd0675a1a94 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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, lib, ... }: | |
let | |
oldTarball = | |
fetchTarball "https://nixos.org/channels/nixos-18.09/nixexprs.tar.xz"; | |
myPkgs = { termonad = pkgs.callPackage ./myPkgs/termonad.nix { }; }; | |
# all-hies = | |
# import (fetchTarball "https://github.com/infinisil/all-hies/tarball/master") | |
# { }; | |
in { | |
imports = [ | |
# Include the results of the hardware scan. | |
./hardware-configuration.nix | |
./cachix.nix | |
]; | |
# nixpkgs.overlays = [ | |
# (import (builtins.fetchTarball { | |
# url = | |
# "https://github.com/nix-community/emacs-overlay/archive/master.tar.gz"; | |
# })) | |
# ]; | |
nixpkgs.config = { | |
allowUnfree = true; | |
packageOverrides = pkgs: { | |
old = import oldTarball { config = config.nixpkgs.config; }; | |
# lxappearance bug(?) https://github.com/NixOS/nixpkgs/issues/26909 | |
lxappearance = pkgs.lxappearance.overrideAttrs (old: rec { | |
name = "lxappearance-0.6.2"; | |
src = pkgs.fetchurl { | |
url = "mirror://sourceforge/project/lxde/LXAppearance/${name}.tar.xz"; | |
sha256 = "07r0xbi6504zjnbpan7zrn7gi4j0kbsqqfpj8v2x94gr05p16qj4"; | |
}; | |
}); | |
}; | |
}; | |
# Use the systemd-boot EFI boot loader. | |
boot.loader.systemd-boot.enable = true; | |
boot.loader.efi.canTouchEfiVariables = true; | |
# Maybe fixes a reboot-hang issue (commented out since this doesn't really fix the issue: could not repro) | |
# boot.kernelParams = [ ''acpi_osi=! acpi_osi="Windows 2009"'' ]; | |
# boot.kernelPackages = oldpkgs.linuxPackages_5_1; # no longer available on the 19.09 channel (heard on IRC that the non-LTS versions got removed) | |
# boot.kernelPackages = pkgs.linuxPackages_latest; # unstable on TR hardware | |
# does this make fwupd work? | |
hardware.cpu.amd.updateMicrocode = true; | |
hardware.enableRedistributableFirmware = true; | |
# Graphics | |
hardware.opengl.enable = true; | |
hardware.opengl.driSupport = true; | |
networking = { | |
hostName = "quasar-nixos-tr"; | |
wireless = { enable = false; }; | |
networkmanager = { | |
enable = true; | |
unmanaged = [ "enp4s0" ]; | |
}; | |
extraHosts = '' | |
192.168.0.145 home-server | |
127.0.0.1 quasar.localhost | |
127.0.0.1 linkerd.service | |
127.0.0.1 redis.service | |
''; | |
interfaces.enp4s0.ipv4.addresses = [{ | |
address = "192.168.0.200"; | |
prefixLength = 24; | |
}]; | |
defaultGateway = "192.168.0.1"; | |
nameservers = [ "8.8.8.8" "8.8.4.4" ]; | |
}; | |
# Configure network proxy if necessary | |
# networking.proxy.default = "http://user:password@proxy:port/"; | |
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; | |
# Select internationalisation properties. | |
# i18n = { | |
# consoleFont = "Lat2-Terminus16"; | |
# consoleKeyMap = "us"; | |
# defaultLocale = "en_US.UTF-8"; | |
# }; | |
# Set your time zone. | |
time.timeZone = "Europe/Brussels"; | |
# List packages installed in system profile. To search, run: | |
# $ nix search wget | |
environment.systemPackages = (with pkgs; []); | |
fonts.fonts = with pkgs; [ fira-code fira-code-symbols iosevka ]; | |
programs = { | |
light.enable = true; | |
ssh = { | |
# Starts the SSH agent | |
startAgent = true; | |
}; | |
zsh = {}; | |
}; | |
# Some programs need SUID wrappers, can be configured further or are | |
# started in user sessions. | |
# programs.mtr.enable = true; | |
# programs.gnupg.agent = { enable = true; enableSSHSupport = true; }; | |
# List services that you want to enable: | |
# | |
# thermald below fails with "Unsupported cpu model." | |
# Jul 01 12:34:09 quasar-nixos-tr systemd[1]: Started Thermal Daemon Service. | |
# Jul 01 12:34:09 quasar-nixos-tr thermald[80419]: NO RAPL sysfs present | |
# Jul 01 12:34:09 quasar-nixos-tr thermald[80419]: I/O warning : failed to load external entity "/nix/store/hrancdhyvq4afqwzjq5g681rk19s041p-thermald-1.8/etc/thermald/thermal-conf.xml" | |
# Jul 01 12:34:09 quasar-nixos-tr thermald[80419]: error: could not parse file /nix/store/hrancdhyvq4afqwzjq5g681rk19s041p-thermald-1.8/etc/thermald/thermal-conf.xml | |
# Jul 01 12:34:09 quasar-nixos-tr thermald[80419]: Unsupported cpu model, use thermal-conf.xml file or run with --ignore-cpuid-check | |
# Jul 01 12:34:09 quasar-nixos-tr thermald[80419]: THD engine start failed | |
# Jul 01 12:34:09 quasar-nixos-tr systemd[1]: thermald.service: Main process exited, code=exited, status=1/FAILURE | |
# Jul 01 12:34:09 quasar-nixos-tr systemd[1]: thermald.service: Failed with result 'exit-code'. | |
services.compton = { | |
# enable = true; | |
# shadow = true; | |
# fade = true; | |
# inactiveOpacity = "0.8"; | |
}; | |
# Enable the OpenSSH daemon. | |
services.openssh.enable = true; | |
services.clipmenu.enable = true; | |
services.atd = { | |
enable = true; | |
allowEveryone = true; | |
}; | |
# Open ports in the firewall. | |
# networking.firewall.allowedTCPPorts = [ ... ]; | |
# networking.firewall.allowedUDPPorts = [ ... ]; | |
# Or disable the firewall altogether. | |
# networking.firewall.enable = false; | |
# Enable CUPS to print documents. | |
services.printing = { | |
enable = true; | |
drivers = [ pkgs.gutenprint ]; | |
}; | |
services.avahi = { | |
enable = true; | |
nssmdns = true; | |
}; | |
# Enable sound. | |
sound.enable = true; | |
hardware.pulseaudio.enable = true; | |
# nvidia | |
# hardware.nvidia = { | |
# optimus_prime = { | |
# enable = true; | |
# nvidiaBusId = "PCI:2:0:0"; | |
# intelBusId = "PCI:0:2:0"; | |
# }; | |
# }; | |
# hardware.opengl.extraPackages = [ pkgs.linuxPackages.nvidia_x11.out ]; | |
# hardware.opengl.extraPackages32 = [ pkgs.linuxPackages.nvidia_x11.lib32 ]; | |
services.xserver = { | |
enable = true; | |
windowManager.default = "xmonad"; | |
dpi = 157; | |
layout = "us"; | |
libinput.enable = true; | |
videoDrivers = [ "amdgpu" ]; | |
xkbModel = "pc105"; | |
xkbOptions = "ctrl:nocaps, ctrl:lctrl_meta"; | |
windowManager.xmonad = { | |
enable = true; | |
enableContribAndExtras = true; | |
extraPackages = haskellPackages: [ | |
haskellPackages.xmonad-contrib | |
haskellPackages.xmonad-extras | |
haskellPackages.xmonad | |
haskellPackages.xmonad-spotify | |
haskellPackages.protolude | |
]; | |
}; | |
# displayManager.sddm.enable = true; | |
displayManager = { lightdm.enable = true; }; | |
desktopManager.plasma5.enable = true; | |
}; | |
virtualisation = { | |
docker = { | |
enable = true; # storageDriver = "zfs"; | |
autoPrune = { | |
enable = true; | |
dates = "daily"; | |
}; | |
}; | |
}; | |
systemd.services.nginx.wantedBy = lib.mkForce [ ]; | |
# Create a video group | |
users.groups.video = { }; | |
# Define a user account. Don't forget to set a password with ‘passwd’. | |
users.users.ashesh = { | |
isNormalUser = true; | |
extraGroups = [ "wheel" "video" "docker" ]; # Enable ‘sudo’ for the user. | |
shell = "/run/current-system/sw/bin/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 = "19.03"; # Did you read the comment? | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment