diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2021-03-27 18:46:45 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2021-03-27 18:46:45 +0100 |
commit | 6021a9e22f99bb9b19134e2cb443bdeba852edc6 (patch) | |
tree | 398720cbb8a601553900866031ba3f093e051106 | |
parent | e203311de813949dec992b76b04410068768eaf5 (diff) | |
download | nixos-6021a9e22f99bb9b19134e2cb443bdeba852edc6.tar nixos-6021a9e22f99bb9b19134e2cb443bdeba852edc6.tar.gz nixos-6021a9e22f99bb9b19134e2cb443bdeba852edc6.tar.bz2 nixos-6021a9e22f99bb9b19134e2cb443bdeba852edc6.tar.xz nixos-6021a9e22f99bb9b19134e2cb443bdeba852edc6.zip |
…
-rw-r--r-- | accounts/gkleen@sif/xmonad/xmonad.hs | 2 | ||||
-rw-r--r-- | accounts/gkleen@sif/zshrc | 17 | ||||
-rw-r--r-- | hosts/sif/default.nix | 11 | ||||
-rw-r--r-- | hosts/sif/hw.nix | 1 | ||||
-rw-r--r-- | overlays/v4l2loopback.nix | 37 |
5 files changed, 61 insertions, 7 deletions
diff --git a/accounts/gkleen@sif/xmonad/xmonad.hs b/accounts/gkleen@sif/xmonad/xmonad.hs index 425beaf4..8282ed3f 100644 --- a/accounts/gkleen@sif/xmonad/xmonad.hs +++ b/accounts/gkleen@sif/xmonad/xmonad.hs | |||
@@ -199,7 +199,7 @@ hostFromName h | |||
199 | , assign' ["work", "uni"] $ className =? "jetbrains-idea-ce" | 199 | , assign' ["work", "uni"] $ className =? "jetbrains-idea-ce" |
200 | , assign "read" $ className =? "llpp" | 200 | , assign "read" $ className =? "llpp" |
201 | , assign "read" $ className =? "Evince" | 201 | , assign "read" $ className =? "Evince" |
202 | , assign "read" $ fmap ("zathura" `isInfixOf`) title | 202 | , assign "read" $ className =? "Zathura" |
203 | , assign "read" $ className =? "MuPDF" | 203 | , assign "read" $ className =? "MuPDF" |
204 | , assign "read" $ className =? "Xournal" | 204 | , assign "read" $ className =? "Xournal" |
205 | , assign "read" $ appName =? "com-trollworks-gcs-app-GCS" | 205 | , assign "read" $ appName =? "com-trollworks-gcs-app-GCS" |
diff --git a/accounts/gkleen@sif/zshrc b/accounts/gkleen@sif/zshrc index c65e35f9..fd1f1002 100644 --- a/accounts/gkleen@sif/zshrc +++ b/accounts/gkleen@sif/zshrc | |||
@@ -1,9 +1,20 @@ | |||
1 | filebin() { | 1 | filebin() { |
2 | basePath=/srv/www/files | 2 | basePath=/srv/www/files |
3 | ssh ymir find "${basePath}" -type f -print0 \ | 3 | ssh ymir find /srv/www/files -type f -printf "$'%T@ %TY-%Tm-%TdT%TH:%TM %P\\\\0'" | sort -zn | cut -z -d ' ' -f 2- \ |
4 | | while IFS= read -r -d $'\0' p; do | 4 | | while IFS= read -r -d $'\0' l; do |
5 | printf "https://f.141.li/%s\n" "${p#${basePath}/}" | 5 | IFS=' ' read -r t p <<<"${l}" |
6 | printf "%s https://f.141.li/%s\n" "${t}" "${p}" | ||
7 | done | ||
8 | } | ||
9 | |||
10 | push2bin() { | ||
11 | if [[ ${#@} -eq 1 && ! -r ${1} ]]; then | ||
12 | uux -p 'ymir!push2bin' $(echo -n "${1:t}" | tr -c $'[:alnum:]+-=.' '_') | ||
13 | else | ||
14 | for f (${@}); do | ||
15 | uux -p 'ymir!push2bin' $(echo -n "${f:t}" | tr -c $'[:alnum:]+-=.' '_') <${f} | ||
6 | done | 16 | done |
17 | fi | ||
7 | } | 18 | } |
8 | 19 | ||
9 | genmail() { | 20 | genmail() { |
diff --git a/hosts/sif/default.nix b/hosts/sif/default.nix index 2c3c9e3d..737dad36 100644 --- a/hosts/sif/default.nix +++ b/hosts/sif/default.nix | |||
@@ -38,6 +38,7 @@ | |||
38 | kernelPackages = pkgs.linuxPackages_latest; | 38 | kernelPackages = pkgs.linuxPackages_latest; |
39 | kernelParams = [ "i915.fastboot=1" "intel_pstate=no_hwp" "acpi_backlight=vendor" "thinkpad-acpi.brightness_enable=1" "quiet" ]; | 39 | kernelParams = [ "i915.fastboot=1" "intel_pstate=no_hwp" "acpi_backlight=vendor" "thinkpad-acpi.brightness_enable=1" "quiet" ]; |
40 | extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ]; | 40 | extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ]; |
41 | kernelModules = ["v4l2loopback"]; | ||
41 | 42 | ||
42 | tmpOnTmpfs = true; | 43 | tmpOnTmpfs = true; |
43 | }; | 44 | }; |
@@ -54,6 +55,8 @@ | |||
54 | allowedTCPPorts = [ 22 # ssh | 55 | allowedTCPPorts = [ 22 # ssh |
55 | 8000 # quickserve | 56 | 8000 # quickserve |
56 | ]; | 57 | ]; |
58 | allowedUDPPorts = [ 8554 # gopro webcam | ||
59 | ]; | ||
57 | }; | 60 | }; |
58 | 61 | ||
59 | networkmanager = { | 62 | networkmanager = { |
@@ -81,10 +84,14 @@ | |||
81 | ''; | 84 | ''; |
82 | }; | 85 | }; |
83 | 86 | ||
84 | powerManagement.enable = true; | 87 | powerManagement = { |
88 | enable = true; | ||
89 | |||
90 | cpuFreqGovernor = "schedutil"; | ||
91 | }; | ||
85 | 92 | ||
86 | environment.systemPackages = with pkgs; [ | 93 | environment.systemPackages = with pkgs; [ |
87 | nvtop brightnessctl | 94 | nvtop brightnessctl config.boot.kernelPackages.v4l2loopback s-tui |
88 | ]; | 95 | ]; |
89 | 96 | ||
90 | services = { | 97 | services = { |
diff --git a/hosts/sif/hw.nix b/hosts/sif/hw.nix index 4a3e6c86..92afb7c9 100644 --- a/hosts/sif/hw.nix +++ b/hosts/sif/hw.nix | |||
@@ -26,7 +26,6 @@ | |||
26 | ]; | 26 | ]; |
27 | 27 | ||
28 | nix.maxJobs = 12; | 28 | nix.maxJobs = 12; |
29 | powerManagement.cpuFreqGovernor = "powersave"; | ||
30 | # High-DPI console | 29 | # High-DPI console |
31 | console.font = "${pkgs.terminus_font}/share/consolefonts/ter-u28n.psf.gz"; | 30 | console.font = "${pkgs.terminus_font}/share/consolefonts/ter-u28n.psf.gz"; |
32 | 31 | ||
diff --git a/overlays/v4l2loopback.nix b/overlays/v4l2loopback.nix new file mode 100644 index 00000000..335f86a3 --- /dev/null +++ b/overlays/v4l2loopback.nix | |||
@@ -0,0 +1,37 @@ | |||
1 | final: prev: { | ||
2 | linuxPackages_latest = prev.linuxPackages_latest.extend (self: super: { | ||
3 | v4l2loopback = super.stdenv.mkDerivation rec { | ||
4 | name = "v4l2loopback-${version}-${self.kernel.version}"; | ||
5 | version = "f62fb9076b6313e5eb82fdcaceadb6b3052f346e"; | ||
6 | |||
7 | src = prev.fetchFromGitHub { | ||
8 | owner = "umlaeute"; | ||
9 | repo = "v4l2loopback"; | ||
10 | rev = "${version}"; | ||
11 | sha256 = "VRFtimQQtT8vd1dx5KtUDkmXo3DSOybhNLcAIxQba44="; | ||
12 | fetchSubmodules = true; | ||
13 | }; | ||
14 | |||
15 | hardeningDisable = [ "format" "pic" ]; | ||
16 | |||
17 | preBuild = '' | ||
18 | substituteInPlace Makefile --replace "modules_install" "INSTALL_MOD_PATH=$out modules_install" | ||
19 | sed -i '/depmod/d' Makefile | ||
20 | export PATH=${final.kmod}/sbin:$PATH | ||
21 | ''; | ||
22 | |||
23 | nativeBuildInputs = self.kernel.moduleBuildDependencies; | ||
24 | buildInputs = [ final.kmod ]; | ||
25 | |||
26 | makeFlags = [ | ||
27 | "KERNELRELEASE=${self.kernel.modDirVersion}" | ||
28 | "KERNEL_DIR=${self.kernel.dev}/lib/modules/${self.kernel.modDirVersion}/build" | ||
29 | ]; | ||
30 | |||
31 | postInstall = '' | ||
32 | mkdir -p $out/bin | ||
33 | install -m0755 utils/v4l2loopback-ctl $out/bin | ||
34 | ''; | ||
35 | }; | ||
36 | }); | ||
37 | } | ||