From fe6c5cf1ad2d58e577c053fcb8d0b652ba1e59f4 Mon Sep 17 00:00:00 2001 From: Craige McWhirter Date: Tue, 21 Apr 2020 18:23:43 +1000 Subject: [PATCH] Migrated to NixOS 20.03 --- roles/desktop_common.nix | 52 ++++++++++++++++++++++++---------------- roles/host_common.nix | 12 ++++++---- roles/iohk.nix | 6 +---- roles/tmux.nix | 2 +- roles/xmonad.nix | 48 ++++++++++++++++++++----------------- 5 files changed, 68 insertions(+), 52 deletions(-) diff --git a/roles/desktop_common.nix b/roles/desktop_common.nix index a7ac536..3755279 100644 --- a/roles/desktop_common.nix +++ b/roles/desktop_common.nix @@ -37,22 +37,33 @@ networking.networkmanager.enable = true; # Enables network support via NetworkManager. # Enable common desktop services - services.acpid.enable = true; - services.blueman.enable = true; + services = { + acpid.enable = true; # A daemon for delivering ACPI events to userspace programs + blueman.enable = true; # GTK-based Bluetooth Manager + devmon.enable = true; # Enable external device automounting.` + udev.packages = [ + pkgs.android-udev-rules # Android udev rules list + ]; + udisks2.enable = true; # Enable udisks2 + + xserver = { + enable = true; + desktopManager = { + gnome3.enable = true; # Enable GNOME desktop environment + }; + displayManager = { + defaultSession = "gnome"; # Set GNOME as the default session + gdm.enable = true; # Enable the GNOME display manager + }; + libinput.enable = true; # Enable touchpad support. + }; + }; + powerManagement.enable = true; - services.udisks2.enable = true; # Enable udisks2 - services.devmon.enable = true; # Enable external device automounting.` - services.udev.packages = [ - pkgs.android-udev-rules # Android udev rules list - ]; - - services.xserver.enable = true; - services.xserver.libinput.enable = true; # Enable touchpad support. - services.xserver.displayManager.sddm.enable = true; # Enable SDDM - services.xserver.desktopManager.plasma5.enable = true; # Enable KDE - sound.enable = true; # Enable sound. + + # Configure common hardware settings hardware = { pulseaudio = { enable = true; @@ -61,13 +72,14 @@ }; bluetooth = { enable = true; # Enable bluetooth - extraConfig = " - [General] - Enable=Source,Sink,Media,Socket - - [Policy] - AutoEnable=true - "; + config = { + General = { + Enable = "Source,Sink,Media,Socket"; + }; + Policy = { + AutoEnable = "true"; + }; + }; }; opengl.enable = true; }; diff --git a/roles/host_common.nix b/roles/host_common.nix index f08b670..dcfb43d 100644 --- a/roles/host_common.nix +++ b/roles/host_common.nix @@ -11,9 +11,13 @@ # Select internationalisation properties. i18n = { - consoleFont = "ter-powerline-v16Rv"; - consoleKeyMap = "us"; - defaultLocale = "en_AU.UTF-8"; + defaultLocale = "en_AU.UTF-8"; # Set the default locale + }; + + # Set the defaul console properties + console = { + keyMap = "us"; # Set the default console key map + font = "ter-powerline-v16Rv"; # Set the default console font }; time.timeZone = "Australia/Brisbane"; # Set your preferred timezone: @@ -47,7 +51,7 @@ lsof # list open files direnv # A shell extension that manages your environment killall # kill processes by name - openssl # A cryptographic library that implements the SSL and TLS protocols + #openssl # A cryptographic library that implements the SSL and TLS protocols ( import ../roles/vim.nix ) diff --git a/roles/iohk.nix b/roles/iohk.nix index 92d7f03..4a0b4e6 100644 --- a/roles/iohk.nix +++ b/roles/iohk.nix @@ -18,10 +18,6 @@ "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" ]; - imports = [ - ./crystal0.32.nix - ]; - # Set the system-wide environment environment = { systemPackages = with pkgs; [ @@ -31,7 +27,7 @@ freerdp # A Remote Desktop Protocol Client, xfreerdp gnupg # GNU Privacy Guard, a GPL OpenPGP implementation go-jira # Simple command line client for Atlassian's Jira service written in Go - icr # Interactive console for the Crystal programming languag + #icr # Interactive console for the Crystal programming languag jq # A lightweight and flexible command-line JSON processor scry # Code analysis server for the Crystal programming language shards # Dependency manager for the Crystal language diff --git a/roles/tmux.nix b/roles/tmux.nix index d1c35d8..282c203 100644 --- a/roles/tmux.nix +++ b/roles/tmux.nix @@ -9,7 +9,7 @@ enable = true; aggressiveResize = true; clock24 = true; - extraTmuxConf = '' + extraConfig = '' POWERLINE_COMMAND="/run/current-system/sw/bin/powerline" POWERLINE_CONFIG_COMMAND="/run/current-system/sw/bin/powerline-config" run-shell "/run/current-system/sw/bin/powerline-daemon -q" diff --git a/roles/xmonad.nix b/roles/xmonad.nix index 50a520e..ff270ec 100644 --- a/roles/xmonad.nix +++ b/roles/xmonad.nix @@ -4,30 +4,34 @@ { - services.xserver.enable = true; # Enable the X11 windowing system. - services.xserver.layout = "us"; # Set your preferred keyboard layout. - services.xserver.desktopManager.default = "none"; # Unset the default desktop manager. - services.xserver.windowManager = { # Open configuration for the window manager. - xmonad.enable = true; # Enable xmonad. - xmonad.enableContribAndExtras = true; # Enable xmonad contrib and extras. - xmonad.extraPackages = hpkgs: [ # Open configuration for additional Haskell packages. - hpkgs.xmonad-contrib # Install xmonad-contrib. - hpkgs.xmonad-extras # Install xmonad-extras. - hpkgs.xmonad # Install xmonad itself. - ]; - default = "xmonad"; # Set xmonad as the default window manager. + services = { + devmon.enable = true; # Enable external device automounting. + udisks2.enable = true; # Enable udisks2. + + xserver = { + enable = true; # Enable the X11 windowing system. + desktopManager = { + xterm.enable = false; # Disable NixOS default desktop manager. + gnome3.enable = true; # Enable GNOME desktop environment + }; + displayManager = { + defaultSession = "none+xmonad"; # Set xmonad as the default window manager. + gdm.enable = true; # Enable the GNOME display manager + }; + layout = "us"; # Set your preferred keyboard layout. + libinput.enable = true; # Enable touchpad support. + windowManager = { # Open configuration for the window manager. + xmonad.enable = true; # Enable xmonad. + xmonad.enableContribAndExtras = true; # Enable xmonad contrib and extras. + xmonad.extraPackages = hpkgs: [ # Open configuration for additional Haskell packages. + hpkgs.xmonad-contrib # Install xmonad-contrib. + hpkgs.xmonad-extras # Install xmonad-extras. + hpkgs.xmonad # Install xmonad itself. + ]; + }; + }; }; - services.xserver.desktopManager.xterm.enable = false; # Disable NixOS default desktop manager. - - services.xserver.libinput.enable = true; # Enable touchpad support. - - services.udisks2.enable = true; # Enable udisks2. - services.devmon.enable = true; # Enable external device automounting. - - services.xserver.displayManager.gdm.enable = true; # Enable the GNOME display manager - services.xserver.desktopManager.gnome3.enable = true; # Enable GNOME desktop environment - sound = { mediaKeys = { enable = true;