summaryrefslogtreecommitdiff
path: root/configuration.nix
diff options
context:
space:
mode:
authorJulian T <julian@jtle.dk>2020-09-15 22:31:27 +0200
committerJulian T <julian@jtle.dk>2020-09-15 22:31:27 +0200
commit073cd547a42537a64f008b7775262b2012a7b3da (patch)
treed709785b88ed15ccf2cc0e267149dda9173be9c9 /configuration.nix
parent18070592550b0fa994f841e617d70c7f6f102feb (diff)
Better indentation and moved to 20.03
Diffstat (limited to 'configuration.nix')
-rw-r--r--configuration.nix313
1 files changed, 144 insertions, 169 deletions
diff --git a/configuration.nix b/configuration.nix
index 1e071b5..0e24ab4 100644
--- a/configuration.nix
+++ b/configuration.nix
@@ -5,176 +5,151 @@
{ config, pkgs, ... }:
{
- imports =
- [ # Include the results of the hardware scan.
- ./hardware-configuration.nix
+ imports =
+ [ # Include the results of the hardware scan.
+ ./hardware-configuration.nix
+ ];
+
+ # Use the GRUB 2 boot loader.
+ boot.loader.grub.enable = true;
+ boot.loader.grub.version = 2;
+ boot.tmpOnTmpfs = true;
+
+ # Define on which hard drive you want to install Grub.
+ boot.loader.grub.device = "/dev/sda";
+
+ networking = {
+ # Hostname and wireless enabled
+ hostName = "jx230";
+ # wireless.enable = true;
+
+ # The global useDHCP flag is deprecated, therefore explicitly set to false here.
+ # Per-interface useDHCP will be mandatory in the future, so this generated config
+ # replicates the default behaviour.
+ interfaces.enp0s25.useDHCP = true;
+ interfaces.wlp3s0.useDHCP = true;
+
+ # Firewall configuration
+ firewall.enable = true;
+
+ networkmanager = {
+ enable = true;
+ };
+ };
+
+ # Select internationalisation properties.
+ i18n = {
+ consoleFont = "Lat2-Terminus16";
+ consoleKeyMap = "us";
+ defaultLocale = "en_DK.UTF-8";
+ };
+
+ # Set your time zone.
+ time.timeZone = "Europe/Copenhagen";
+
+ # Enabled services
+
+ # Enable the OpenSSH daemon.
+ # services.openssh.enable = true;
+
+ # Enable CUPS to print documents.
+ services.printing.enable = true;
+
+ # Enable sound.
+ sound.enable = true;
+ hardware.pulseaudio.enable = true;
+ # Stupid but need it to control sound from acpid
+ # hardware.pulseaudio.systemWide = true;
+
+ # Turn down sound when inserting headphones
+ services.acpid.handlers = {
+ headphone = {
+ action =
+ ''
+ vals=($1)
+ case ''${vals[2]} in
+ plug)
+ whoami >> /tmp/acpi.log
+ amixer set Master 10%
+ ;;
+ esac
+ '';
+ event = "jack/headphone.*";
+ };
+ };
+
+ # Enable the X11 windowing system.
+ services.xserver = {
+ enable = true;
+ layout = "us";
+ xkbVariant = "altgr-intl";
+ exportConfiguration = true;
+
+ windowManager = {
+ default = "i3";
+ i3.enable = true;
+ };
+
+ # Touchpad studd
+ libinput.enable = true;
+
+ # Start dbus?
+ startDbusSession = true;
+ };
+
+ services.gvfs.enable = true;
+
+ # Yubikey
+ services.pcscd.enable = true;
+
+ # Thinkpad stuff
+ hardware.acpilight.enable = true;
+ services.acpid.enable = true;
+ services.tlp.enable = true;
+
+ # Passwords
+ services.gnome3.gnome-keyring.enable = true;
+
+ # Define a user account. Don't forget to set a password with ‘passwd’.
+ users.users.julian = {
+ isNormalUser = true;
+ shell = pkgs.zsh;
+ extraGroups = [ "wheel" "video" ];
+ };
+
+ # 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 = "20.03"; # Did you read the comment?
+
+ fonts.fonts = with pkgs; [
+ noto-fonts noto-fonts-emoji liberation_ttf ubuntu_font_family
];
- # Use the GRUB 2 boot loader.
- boot.loader.grub.enable = true;
- boot.loader.grub.version = 2;
- boot.tmpOnTmpfs = true;
-
- # Define on which hard drive you want to install Grub.
- boot.loader.grub.device = "/dev/sda";
-
- networking = {
- # Hostname and wireless enabled
- hostName = "jx230";
- # wireless.enable = true;
-
- # The global useDHCP flag is deprecated, therefore explicitly set to false here.
- # Per-interface useDHCP will be mandatory in the future, so this generated config
- # replicates the default behaviour.
- interfaces.enp0s25.useDHCP = true;
- interfaces.wlp3s0.useDHCP = true;
- interfaces.wwp0s20u4i6.useDHCP = true;
-
- # Firewall configuration
- firewall.enable = true;
-
- networkmanager = {
- enable = true;
- };
- };
-
- # Select internationalisation properties.
- i18n = {
- consoleFont = "Lat2-Terminus16";
- consoleKeyMap = "us";
- defaultLocale = "en_DK.UTF-8";
- };
-
- # Set your time zone.
- time.timeZone = "Europe/Copenhagen";
-
- environment.shellInit = ''
- export GPG_TTY="$(tty)"
- gpg-connect-agent /bye
- export SSH_AUTH_SOCK="/run/user/$UID/gnupg/S.gpg-agent.ssh"
- '';
-
- # Enabled services
-
- # Enable the OpenSSH daemon.
- # services.openssh.enable = true;
-
- # Enable CUPS to print documents.
- services.printing.enable = true;
-
- # Enable sound.
- sound.enable = true;
- hardware.pulseaudio.enable = true;
- # Stupid but need it to control sound from acpid
- # hardware.pulseaudio.systemWide = true;
-
- # Turn down sound when inserting headphones
- services.acpid.handlers = {
- headphone = {
- action =
- ''
- vals=($1)
- case ''${vals[2]} in
- plug)
- whoami >> /tmp/acpi.log
- amixer set Master 10%
- ;;
- esac
- '';
- event = "jack/headphone.*";
- };
- };
-
- # Enable the X11 windowing system.
- services.xserver = {
- enable = true;
- layout = "us";
- xkbVariant = "altgr-intl";
- exportConfiguration = true;
-
- desktopManager = {
- default = "none";
- xterm.enable = false;
- xfce = {
- enable = true;
- };
- };
- windowManager = {
- default = "i3";
- bspwm.enable = true;
- i3.enable = true;
- };
-
- # Touchpad studd
- libinput.enable = true;
-
- # Start dbus?
- startDbusSession = true;
- };
-
- services.gvfs.enable = true;
-
- # Yubikey
- services.pcscd.enable = true;
-
- # Thinkpad stuff
- hardware.acpilight.enable = true;
- services.acpid.enable = true;
- services.tlp.enable = true;
-
- # Xfce panel stuff
- environment.pathsToLink = [
- "/share/xfce4"
- "/lib/xfce4"
- ];
-
- # Passwords
- services.gnome3.gnome-keyring.enable = true;
-
- # Define a user account. Don't forget to set a password with ‘passwd’.
- users.users.julian = {
- isNormalUser = true;
- shell = pkgs.zsh;
- extraGroups = [ "wheel" "video" ]; # Enable ‘sudo’ for the user.
- };
-
- # 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.09"; # Did you read the comment?
-
- fonts.fonts = with pkgs; [
- noto-fonts noto-fonts-emoji liberation_ttf ubuntu_font_family
- ];
- # List packages installed in system profile. To search, run:
- # $ nix search wget
- environment.systemPackages = with pkgs; [
- # General stuff
- wget vim neovim git htop zsh stow pass python tree python3 dnsutils
-
- # Other stuff
- networkmanagerapplet
-
- # X stuff
- bspwm sxhkd feh xscreensaver dmenu rofi xfce.xfce4-icon-theme autorandr xfce.xfce4-panel
- xcape xorg.xmodmap xss-lock xfce.terminal xfce.xfconf acpilight xdotool
- dunst
- # Panel plugins
- xfce.xfce4-battery-plugin xfce.xfce4-datetime-plugin xfce.xfce4-pulseaudio-plugin
- xfce.xfce4-settings xfce.xfce4-appfinder
-
- # Gui applications
- firefox gnome3.evolution pavucontrol okular leafpad inkscape gimp meld pinentry
- gnome3.gnome-system-monitor gnome3.dconf pcmanfm
- # (st.override { conf = builtins.readFile ./st-config.h; })
-
- # Other stuff
- texlive.combined.scheme-full biber
- nodePackages.typescript
-
- # Hardware stuff. X230
- linuxPackages.acpi_call
- ];
+ # List packages installed in system profile. To search, run:
+ # $ nix search wget
+ environment.systemPackages = with pkgs; [
+ # General stuff
+ wget vim neovim git htop zsh stow pass python tree python3 dnsutils
+
+ # Other stuff
+ networkmanagerapplet
+
+ # X stuff
+ feh xscreensaver dmenu rofi xorg.xmodmap xss-lock xfce.terminal
+ acpilight xdotool dunst
+
+ # Gui applications
+ firefox gnome3.evolution pavucontrol okular leafpad inkscape gimp meld
+ pinentry gnome3.gnome-system-monitor gnome3.dconf pcmanfm
+ # (st.override { conf = builtins.readFile ./st-config.h; })
+
+ # Other stuff
+ texlive.combined.scheme-full biber
+
+ # Hardware stuff. X230
+ linuxPackages.acpi_call
+ ];
}