From 9558872ffb3d4f69b7546f8906e46d1cedff1c6d Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Sun, 29 Nov 2020 18:09:07 -0800 Subject: [PATCH 1/2] [NixOS] Add ryzen-shine --- .gitignore | 2 + nixos/configuration.nix | 2 - nixos/machines/ivanm-dfinity-razer.nix | 1 + nixos/machines/ryzen-shine.nix | 65 ++++++++++++++++++++++++++ 4 files changed, 68 insertions(+), 2 deletions(-) create mode 100644 nixos/machines/ryzen-shine.nix diff --git a/.gitignore b/.gitignore index e33ad5ea..a1efb0e8 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,5 @@ /dotfiles/vim/bundle/* /dotfiles/wemo/cache gotools +/dotfiles/config/xmonad/result +/dotfiles/config/taffybar/result diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 069b256f..1e94d270 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -397,6 +397,4 @@ in }; }; nix.trustedUsers = ["imalison"]; - - system.stateVersion = "18.03"; } diff --git a/nixos/machines/ivanm-dfinity-razer.nix b/nixos/machines/ivanm-dfinity-razer.nix index 80f0c113..7f33bc06 100644 --- a/nixos/machines/ivanm-dfinity-razer.nix +++ b/nixos/machines/ivanm-dfinity-razer.nix @@ -64,4 +64,5 @@ nix.maxJobs = lib.mkDefault 12; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; + system.stateVersion = "18.03"; } diff --git a/nixos/machines/ryzen-shine.nix b/nixos/machines/ryzen-shine.nix new file mode 100644 index 00000000..bf7e65b9 --- /dev/null +++ b/nixos/machines/ryzen-shine.nix @@ -0,0 +1,65 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, ... }: + +{ + imports = + [ + ../configuration.nix + ../dfinity.nix + ]; + + networking.interfaces.enp5s0.useDHCP = true; + networking.interfaces.wlp4s0.useDHCP = true; + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; + boot.initrd.luks.devices."cryptroot".device = "/dev/nvme0n1p5"; + boot.initrd.kernelModules = [ "dm-snapshot" ]; + + # install nvidia drivers in addition to intel one + hardware.opengl.extraPackages = [ pkgs.linuxPackages.nvidia_x11.out ]; + hardware.opengl.extraPackages32 = [ pkgs.linuxPackages.nvidia_x11.lib32 ]; + services.xserver = { + screenSection = '' + DefaultDepth 24 + Option "RegistryDwords" "PerfLevelSrc=0x3322; PowerMizerDefaultAC=0x1" + Option "TripleBuffer" "True" + Option "Stereo" "0" + Option "nvidiaXineramaInfoOrder" "DFP-0" + Option "metamodes" "DVI-D-0: nvidia-auto-select +0+2160 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}, HDMI-0: nvidia-auto-select +640+0 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}, HDMI-1: nvidia-auto-select +2560+2160 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}" + Option "SLI" "Off" + Option "MultiGPU" "Off" + Option "BaseMosaic" "off" + ''; + videoDrivers = [ "nvidia" ]; + }; + + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/356173ab-d076-43e0-aeb6-6a6829c4402b"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/B270-C7E6"; + fsType = "vfat"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/f719b44e-295a-4909-9a60-84f87acb7f77"; } + ]; + + networking.hostName = "ryzen-shine"; + + nix.maxJobs = lib.mkDefault 16; + # High-DPI console + console.font = lib.mkDefault "${pkgs.terminus_font}/share/consolefonts/ter-u28n.psf.gz"; + + system.stateVersion = "20.03"; # Did you read the comment? +} From f6fe5e9341b95c2baf68c319727d756d4b591c40 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Sun, 29 Nov 2020 18:09:57 -0800 Subject: [PATCH 2/2] [taffybar] Ryzen-shine css config --- dotfiles/config/taffybar/taffybar.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/dotfiles/config/taffybar/taffybar.hs b/dotfiles/config/taffybar/taffybar.hs index 4895be5b..e2599a8e 100644 --- a/dotfiles/config/taffybar/taffybar.hs +++ b/dotfiles/config/taffybar/taffybar.hs @@ -114,6 +114,7 @@ cssFileByHostname = [ ("uber-loaner", "uber-loaner.css") , ("imalison-home", "taffybar.css") , ("ivanm-dfinity-razer", "ivanm-dfinity-razer.css") + , ("ryzen-shine", "taffybar.css") ] main = do