From 41d62a174e91c55bb2c24a129290089bb28cbc4e Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Thu, 30 Jun 2022 11:25:53 -0500 Subject: [PATCH] adding audacity and fixing mem script --- README.org | 40 +++++++++++++++++++---- scripts/mem | 2 +- system/kaladin/configuration.nix | 8 +++-- system/kaladin/hardware-configuration.nix | 30 ++++++++++++++--- system/syl/configuration.nix | 1 + 5 files changed, 66 insertions(+), 15 deletions(-) diff --git a/README.org b/README.org index c13a5e8..7ec3b09 100644 --- a/README.org +++ b/README.org @@ -256,6 +256,7 @@ ark dash light kget +audacity krename kwallet-pam plasma5Packages.kwallet @@ -641,6 +642,7 @@ Now in the =hardware-configuration.nix= file, I didn't change much because I wan ** Kaladin Kaladin is my desktop machine. A powerhouse for the most part with a recent i7 and 64gb of memory and an Nvidia 1080. Basically I use this for video editing, animation, and some other things. Here is it's configuration. +*** config #+begin_src nix :tangle system/kaladin/configuration.nix :noweb yes { config, pkgs, ... }: @@ -685,7 +687,10 @@ Kaladin is my desktop machine. A powerhouse for the most part with a recent i7 a # NVIDIA services.xserver.videoDrivers = [ "nvidia" ]; - hardware.opengl.enable = true; + hardware = { + opengl.enable = true; + nvidia.modesettings.enable = true; + }; <> @@ -757,7 +762,7 @@ Kaladin is my desktop machine. A powerhouse for the most part with a recent i7 a (import (builtins.fetchTarball { url = https://github.com/nix-community/emacs-overlay/archive/master.tar.gz; - sha256 = "1rhmvww15mkix7fg8gd7r5hwlszi4zlwzxyr02yfwfsf5hh0n0d9"; + sha256 = "07nj3ab2jbcmr66krxy6wli23srw0vgx1jhjg2b89amzllnzbi93"; })) <> @@ -796,6 +801,7 @@ Kaladin is my desktop machine. A powerhouse for the most part with a recent i7 a } #+end_src +*** hardware And here is it's hardware config. #+begin_src nix :tangle system/kaladin/hardware-configuration.nix { config, lib, pkgs, modulesPath, ... }: @@ -811,24 +817,44 @@ And here is it's hardware config. boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/nvme0n1p2"; + { device = "/dev/disk/by-uuid/9b5a1a62-0de6-4e07-a541-634736980d10"; fsType = "btrfs"; - options = [ "subvol=root" "noatime" "ssd" "space_cache" "compress=zstd" ]; + options = [ "subvol=@" "noatime" "ssd" "space_cache" "clear_cache" "compress=zstd" ]; }; fileSystems."/home" = - { device = "/dev/nvme0n1p2"; + { device = "/dev/disk/by-uuid/9b5a1a62-0de6-4e07-a541-634736980d10"; fsType = "btrfs"; - options = [ "subvol=home" "noatime" "ssd" "space_cache" "compress=zstd" ]; + options = [ "subvol=@home" "noatime" "ssd" "space_cache" "clear_cache" "compress=zstd" ]; + }; + + fileSystems."/nix" = + { device = "/dev/disk/by-uuid/9b5a1a62-0de6-4e07-a541-634736980d10"; + fsType = "btrfs"; + options = [ "subvol=@nix" "noatime" "ssd" "space_cache" "clear_cache" "compress=zstd" ]; + }; + + fileSystems."/var/log" = + { device = "/dev/disk/by-uuid/9b5a1a62-0de6-4e07-a541-634736980d10"; + fsType = "btrfs"; + options = [ "subvol=@log" "noatime" "ssd" "space_cache" "clear_cache" "compress=zstd" ]; }; fileSystems."/boot" = - { device = "/dev/disk/by-uuid/F9BD-D185"; + { device = "/dev/disk/by-uuid/35A0-C1F1"; fsType = "vfat"; }; swapDevices = [ ]; + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp7s0.useDHCP = lib.mkDefault true; + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/scripts/mem b/scripts/mem index 4db3e58..e1ea2a4 100755 --- a/scripts/mem +++ b/scripts/mem @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash # Get the percentage of used memory and print it read used total <<< $(free -m | awk '/Mem/{printf $2" "$3}') diff --git a/system/kaladin/configuration.nix b/system/kaladin/configuration.nix index 56d0dc3..9c670a6 100644 --- a/system/kaladin/configuration.nix +++ b/system/kaladin/configuration.nix @@ -48,7 +48,10 @@ # NVIDIA services.xserver.videoDrivers = [ "nvidia" ]; - hardware.opengl.enable = true; + hardware = { + opengl.enable = true; + nvidia.modesettings.enable = true; + }; services.xserver = { enable = true; @@ -167,6 +170,7 @@ dash light kget + audacity krename kwallet-pam plasma5Packages.kwallet @@ -280,7 +284,7 @@ (import (builtins.fetchTarball { url = https://github.com/nix-community/emacs-overlay/archive/master.tar.gz; - sha256 = "1rhmvww15mkix7fg8gd7r5hwlszi4zlwzxyr02yfwfsf5hh0n0d9"; + sha256 = "07nj3ab2jbcmr66krxy6wli23srw0vgx1jhjg2b89amzllnzbi93"; })) (self: super: diff --git a/system/kaladin/hardware-configuration.nix b/system/kaladin/hardware-configuration.nix index 1c94260..808de52 100644 --- a/system/kaladin/hardware-configuration.nix +++ b/system/kaladin/hardware-configuration.nix @@ -11,24 +11,44 @@ boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/nvme0n1p2"; + { device = "/dev/disk/by-uuid/9b5a1a62-0de6-4e07-a541-634736980d10"; fsType = "btrfs"; - options = [ "subvol=root" "noatime" "ssd" "space_cache" "compress=zstd" ]; + options = [ "subvol=@" "noatime" "ssd" "space_cache" "clear_cache" "compress=zstd" ]; }; fileSystems."/home" = - { device = "/dev/nvme0n1p2"; + { device = "/dev/disk/by-uuid/9b5a1a62-0de6-4e07-a541-634736980d10"; fsType = "btrfs"; - options = [ "subvol=home" "noatime" "ssd" "space_cache" "compress=zstd" ]; + options = [ "subvol=@home" "noatime" "ssd" "space_cache" "clear_cache" "compress=zstd" ]; + }; + + fileSystems."/nix" = + { device = "/dev/disk/by-uuid/9b5a1a62-0de6-4e07-a541-634736980d10"; + fsType = "btrfs"; + options = [ "subvol=@nix" "noatime" "ssd" "space_cache" "clear_cache" "compress=zstd" ]; + }; + + fileSystems."/var/log" = + { device = "/dev/disk/by-uuid/9b5a1a62-0de6-4e07-a541-634736980d10"; + fsType = "btrfs"; + options = [ "subvol=@log" "noatime" "ssd" "space_cache" "clear_cache" "compress=zstd" ]; }; fileSystems."/boot" = - { device = "/dev/disk/by-uuid/F9BD-D185"; + { device = "/dev/disk/by-uuid/35A0-C1F1"; fsType = "vfat"; }; swapDevices = [ ]; + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp7s0.useDHCP = lib.mkDefault true; + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/system/syl/configuration.nix b/system/syl/configuration.nix index 64f3a60..077b4ef 100644 --- a/system/syl/configuration.nix +++ b/system/syl/configuration.nix @@ -184,6 +184,7 @@ dash light kget + audacity krename kwallet-pam plasma5Packages.kwallet