From e02c35d76e993e8ce5105cab61150b9e3e840dca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Fri, 5 Jul 2019 23:11:21 +0100 Subject: [PATCH] Add foureighty --- nixos/boxes/foureighty.nix | 32 ++++++++++++++++++++++++++++++++ nixos/common.nix | 5 +++-- nixos/gfx.nix | 3 ++- nixos/up.sh | 2 ++ 4 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 nixos/boxes/foureighty.nix diff --git a/nixos/boxes/foureighty.nix b/nixos/boxes/foureighty.nix new file mode 100644 index 00000000..789b6120 --- /dev/null +++ b/nixos/boxes/foureighty.nix @@ -0,0 +1,32 @@ + +{ config, pkgs, ... }: +{ + + networking.hostName = "foureighty"; + boot = { + initrd.kernelModules = [ "i915" ]; + initrd.luks.devices = [ + { + name = "root"; + device = "/dev/disk/by-uuid/a9e8a44f-15be-4844-a0a1-46892cc5e44e"; + preLVM = true; + allowDiscards = true; + }]; + loader.grub = { + device = "nodev"; + efiSupport = true; + }; + loader.efi.canTouchEfiVariables = true; + }; + + time.timeZone = "Europe/London"; + + hardware.bumblebee.enable = true; + hardware.bumblebee.connectDisplay = true; + + imports = [ + /etc/nixos/hardware-configuration.nix + ../boot.nix + ../common.nix + ]; +} diff --git a/nixos/common.nix b/nixos/common.nix index 75375594..8626059e 100644 --- a/nixos/common.nix +++ b/nixos/common.nix @@ -26,7 +26,7 @@ in }; environment.systemPackages = with pkgs; [ - wget git zsh gnupg curl tmux python36Packages.glances vim htop atop + wget git zsh gnupg curl tmux python36Packages.glances vim htop atop firefox ]; i18n.defaultLocale = "en_GB.UTF-8"; @@ -85,6 +85,7 @@ in security.pam.services.gdm.enableGnomeKeyring = true; sound.enable = true; + networking.networkmanager.enable = true; hardware.pulseaudio.enable = true; hardware.u2f.enable = true; hardware.brightnessctl.enable = true; @@ -93,6 +94,6 @@ in nix.gc.automatic = true; system.autoUpgrade.enable = true; - system.stateVersion = "18.09"; + system.stateVersion = "19.03"; } diff --git a/nixos/gfx.nix b/nixos/gfx.nix index 14eb87ec..d06db93a 100644 --- a/nixos/gfx.nix +++ b/nixos/gfx.nix @@ -1,5 +1,6 @@ { config, pkgs, ... }: { + services.xserver.videoDrivers = [ "intel" ]; hardware.opengl = { enable = true; @@ -19,4 +20,4 @@ }; }; -} \ No newline at end of file +} diff --git a/nixos/up.sh b/nixos/up.sh index cfd0c0d6..362955b9 100755 --- a/nixos/up.sh +++ b/nixos/up.sh @@ -17,6 +17,8 @@ echo "using $DIR as the top level directory" cd $DIR git submodule update --init --recursive +ln -vfs "$DIR/.gitconfig.linux.private" ~/.gitconfig + mkdir -p ~/.config/Code/User ln -vfs "$DIR/.config/Code/User/settings.json" ~/.config/Code/User/settings.json ln -vfs "$DIR/.config/Code/User/keybindings.json" ~/.config/Code/User/keybindings.json