nixfmt
This commit is contained in:
parent
4146b5aece
commit
2e10a00830
32 changed files with 2944 additions and 2163 deletions
|
@ -5,8 +5,7 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
imports = [
|
||||
./modules/colors.nix
|
||||
|
||||
# Include the results of the hardware scan.
|
||||
|
@ -32,9 +31,7 @@
|
|||
services.openssh.enable = true;
|
||||
networking.firewall.enable = true;
|
||||
|
||||
nixpkgs.config.permittedInsecurePackages = [
|
||||
"openssl-1.0.2u"
|
||||
];
|
||||
nixpkgs.config.permittedInsecurePackages = [ "openssl-1.0.2u" ];
|
||||
|
||||
system.autoUpgrade.enable = true;
|
||||
system.stateVersion = "20.03"; # We can stay here
|
||||
|
|
|
@ -3,30 +3,28 @@
|
|||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
let
|
||||
unstable = import <nixos-unstable> { config.allowUnfree = true; };
|
||||
let unstable = import <nixos-unstable> { config.allowUnfree = true; };
|
||||
in {
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.availableKernelModules =
|
||||
[ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "tank/root/nixos";
|
||||
fileSystems."/" = {
|
||||
device = "tank/root/nixos";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
fileSystems."/home" =
|
||||
{ device = "tank/root/home";
|
||||
fileSystems."/home" = {
|
||||
device = "tank/root/home";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/587C-36F9";
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/587C-36F9";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
|
|
|
@ -4,40 +4,37 @@
|
|||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
let
|
||||
tuxedo-keyboard = pkgs.callPackage (import ../packages/tuxedo-keyboard.nix) {};
|
||||
tuxedo-cc = pkgs.callPackage (import ../packages/tuxedo-control-center/default.nix) {};
|
||||
tuxedo-keyboard =
|
||||
pkgs.callPackage (import ../packages/tuxedo-keyboard.nix) { };
|
||||
tuxedo-cc =
|
||||
pkgs.callPackage (import ../packages/tuxedo-control-center/default.nix) { };
|
||||
in {
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.availableKernelModules =
|
||||
[ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [
|
||||
tuxedo-keyboard
|
||||
];
|
||||
environment.systemPackages = with pkgs; [
|
||||
tuxedo-cc
|
||||
];
|
||||
boot.extraModulePackages = [ tuxedo-keyboard ];
|
||||
environment.systemPackages = with pkgs; [ tuxedo-cc ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "private/root/nixos";
|
||||
fileSystems."/" = {
|
||||
device = "private/root/nixos";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
fileSystems."/home" =
|
||||
{ device = "private/root/home";
|
||||
fileSystems."/home" = {
|
||||
device = "private/root/home";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
fileSystems."/tmp" =
|
||||
{ device = "private/root/tmp";
|
||||
fileSystems."/tmp" = {
|
||||
device = "private/root/tmp";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/7E36-C774";
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/7E36-C774";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
|
|
|
@ -3,30 +3,35 @@
|
|||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
unstable = import <nixos-unstable> { config.allowUnfree = true; };
|
||||
let unstable = import <nixos-unstable> { config.allowUnfree = true; };
|
||||
in {
|
||||
imports =
|
||||
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
|
||||
];
|
||||
imports = [ <nixpkgs/nixos/modules/installer/scan/not-detected.nix> ];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"ehci_pci"
|
||||
"ahci"
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
"rtsx_pci_sdmmc"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "cube/root/nixos";
|
||||
fileSystems."/" = {
|
||||
device = "cube/root/nixos";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
fileSystems."/home" =
|
||||
{ device = "cube/home";
|
||||
fileSystems."/home" = {
|
||||
device = "cube/home";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/2AD7-4F18";
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/2AD7-4F18";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
|
|
|
@ -3,8 +3,7 @@
|
|||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
unstable = import <nixos-unstable> { config.allowUnfree = true; };
|
||||
let unstable = import <nixos-unstable> { config.allowUnfree = true; };
|
||||
in {
|
||||
imports = [
|
||||
<nixpkgs/nixos/modules/installer/scan/not-detected.nix>
|
||||
|
@ -19,14 +18,8 @@ in {
|
|||
"w /sys/class/drm/card0/device/power_dpm_force_performance_level - - - - low"
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"nvme"
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
"rtsx_pci_sdmmc"
|
||||
];
|
||||
boot.initrd.availableKernelModules =
|
||||
[ "nvme" "xhci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
|
@ -35,7 +28,6 @@ in {
|
|||
boot.kernelPackages = unstable.linuxPackages_latest;
|
||||
#boot.kernelPackages = unstable.linux_testing;
|
||||
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
|
@ -45,18 +37,18 @@ in {
|
|||
networking.interfaces.wlo1.useDHCP = true;
|
||||
networking.resolvconf.useLocalResolver = true;
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "tank/root/nixos";
|
||||
fileSystems."/" = {
|
||||
device = "tank/root/nixos";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
fileSystems."/home" =
|
||||
{ device = "tank/home";
|
||||
fileSystems."/home" = {
|
||||
device = "tank/home";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/B048-FBC8";
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/B048-FBC8";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
|
|
|
@ -3,15 +3,13 @@
|
|||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
unstable = import <nixos-unstable> { config.allowUnfree = true; };
|
||||
let unstable = import <nixos-unstable> { config.allowUnfree = true; };
|
||||
in {
|
||||
imports =
|
||||
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
|
||||
];
|
||||
imports = [ <nixpkgs/nixos/modules/installer/scan/not-detected.nix> ];
|
||||
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||
boot.initrd.availableKernelModules =
|
||||
[ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.kernelParams = [ "intel_pstate=active" ];
|
||||
|
@ -32,18 +30,18 @@ in {
|
|||
];
|
||||
};
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "tank/work/nixos";
|
||||
fileSystems."/" = {
|
||||
device = "tank/work/nixos";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
fileSystems."/home" =
|
||||
{ device = "tank/work/home";
|
||||
fileSystems."/home" = {
|
||||
device = "tank/work/home";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/DC7B-5E2D";
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/DC7B-5E2D";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
|
|
|
@ -4,13 +4,12 @@ stdenv.mkDerivation rec {
|
|||
name = "cert-manager";
|
||||
version = "v1.7.1";
|
||||
src = fetchurl {
|
||||
url = "https://github.com/cert-manager/cert-manager/releases/download/${version}/cmctl-linux-amd64.tar.gz";
|
||||
url =
|
||||
"https://github.com/cert-manager/cert-manager/releases/download/${version}/cmctl-linux-amd64.tar.gz";
|
||||
sha256 = "1z5n2rcfhrl1vm5vxqa1759m3prlv08mmg96n16p4gwkdxycznx4";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoPatchelfHook
|
||||
];
|
||||
nativeBuildInputs = [ autoPatchelfHook ];
|
||||
|
||||
unpackPhase = ''
|
||||
tar xvpzf $src
|
||||
|
|
|
@ -1,22 +1,14 @@
|
|||
{ stdenv
|
||||
, buildFHSUserEnv
|
||||
, fetchurl
|
||||
, lib
|
||||
, pkgs
|
||||
, writeScript
|
||||
}:
|
||||
{ stdenv, buildFHSUserEnv, fetchurl, lib, pkgs, writeScript }:
|
||||
|
||||
let
|
||||
version = "4.3.3";
|
||||
release = "4469";
|
||||
cloudstation = stdenv.mkDerivation rec {
|
||||
name = "cloudstation-unpack";
|
||||
buildInputs = [
|
||||
pkgs.dpkg
|
||||
pkgs.qt5.qtbase
|
||||
];
|
||||
buildInputs = [ pkgs.dpkg pkgs.qt5.qtbase ];
|
||||
src = fetchurl {
|
||||
url = "https://global.download.synology.com/download/Tools/CloudStationDrive/${version}-${release}/Ubuntu/Installer/x86_64/synology-cloud-station-drive-${release}.x86_64.deb";
|
||||
url =
|
||||
"https://global.download.synology.com/download/Tools/CloudStationDrive/${version}-${release}/Ubuntu/Installer/x86_64/synology-cloud-station-drive-${release}.x86_64.deb";
|
||||
sha256 = "0v84yb70knmmjzp7lyn6jgy5bnfsfd47wmqh29phybqg4zk3d47j";
|
||||
};
|
||||
unpackPhase = ''
|
||||
|
@ -35,11 +27,12 @@ let
|
|||
dontWrapQtApps = true;
|
||||
};
|
||||
|
||||
|
||||
in buildFHSUserEnv {
|
||||
name = "cloudstation";
|
||||
|
||||
targetPkgs = pkgs: with pkgs; with xorg; [
|
||||
targetPkgs = pkgs:
|
||||
with pkgs;
|
||||
with xorg; [
|
||||
cloudstation
|
||||
curl
|
||||
dbus_libs
|
||||
|
|
|
@ -8,9 +8,7 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "38614a665859c0f01c9c1d84fa9a5027364f936814d1e47839b05327e400bf55";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoPatchelfHook
|
||||
];
|
||||
nativeBuildInputs = [ autoPatchelfHook ];
|
||||
|
||||
unpackPhase = ''
|
||||
tar xvpzf $src
|
||||
|
|
|
@ -5,20 +5,14 @@ rustPlatform.buildRustPackage rec {
|
|||
version = "0.3.0";
|
||||
|
||||
src = fetchTarball {
|
||||
url = https://ghom.niij.org/eaon/notcoal/archive/v0.3.0.tar.gz;
|
||||
url = "https://ghom.niij.org/eaon/notcoal/archive/v0.3.0.tar.gz";
|
||||
sha256 = "19gaba6asid5vplcy9q0ama40dvwwxglc40ks5240lydrvgfrimq";
|
||||
};
|
||||
cargoPatches = [
|
||||
./Cargo.lock.patch
|
||||
];
|
||||
cargoPatches = [ ./Cargo.lock.patch ];
|
||||
cargoSha256 = "0kgjxq2319l2gh1xc0f3ir1pa6z7p62z3fccswwxrz7gbn7nc07c";
|
||||
cargoBuildFlags = [ "--features=standalone" ];
|
||||
|
||||
buildInputs = [
|
||||
bash
|
||||
notmuch
|
||||
];
|
||||
|
||||
buildInputs = [ bash notmuch ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "An email tagger for notmuch";
|
||||
|
|
|
@ -4,13 +4,12 @@ stdenv.mkDerivation {
|
|||
name = "oc311";
|
||||
version = "3.11";
|
||||
src = fetchurl {
|
||||
url = "https://github.com/openshift/origin/releases/download/v3.11.0/openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit.tar.gz";
|
||||
url =
|
||||
"https://github.com/openshift/origin/releases/download/v3.11.0/openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit.tar.gz";
|
||||
sha256 = "4b0f07428ba854174c58d2e38287e5402964c9a9355f6c359d1242efd0990da3";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoPatchelfHook
|
||||
];
|
||||
nativeBuildInputs = [ autoPatchelfHook ];
|
||||
|
||||
unpackPhase = ''
|
||||
tar xvpzf $src --strip-components=1
|
||||
|
|
|
@ -4,13 +4,12 @@ stdenv.mkDerivation rec {
|
|||
name = "oc46";
|
||||
version = "4.6";
|
||||
src = fetchurl {
|
||||
url = "https://github.com/openshift/okd/releases/download/4.6.0-0.okd-2021-02-14-205305/openshift-client-linux-4.6.0-0.okd-2021-02-14-205305.tar.gz";
|
||||
url =
|
||||
"https://github.com/openshift/okd/releases/download/4.6.0-0.okd-2021-02-14-205305/openshift-client-linux-4.6.0-0.okd-2021-02-14-205305.tar.gz";
|
||||
sha256 = "741c456f1d5227eb40722b0dac328c78dceba5103fd306cf7fe57a9474eb3d35";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoPatchelfHook
|
||||
];
|
||||
nativeBuildInputs = [ autoPatchelfHook ];
|
||||
|
||||
unpackPhase = ''
|
||||
tar xvpzf $src
|
||||
|
|
|
@ -5,13 +5,12 @@ stdenv.mkDerivation rec {
|
|||
version = "4.5.0-0";
|
||||
release = "2020-10-03-012432";
|
||||
src = fetchurl {
|
||||
url = "https://github.com/openshift/okd/releases/download/${version}.okd-${release}/openshift-install-linux-${version}.okd-${release}.tar.gz";
|
||||
url =
|
||||
"https://github.com/openshift/okd/releases/download/${version}.okd-${release}/openshift-install-linux-${version}.okd-${release}.tar.gz";
|
||||
sha256 = "f497193e8918840a4fd3267839affdc91ec166c5fd2ae3fdc64f498b5fc56f55";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoPatchelfHook
|
||||
];
|
||||
nativeBuildInputs = [ autoPatchelfHook ];
|
||||
|
||||
unpackPhase = ''
|
||||
tar xvpzf $src
|
||||
|
|
|
@ -4,13 +4,12 @@ stdenv.mkDerivation rec {
|
|||
name = "skaffold";
|
||||
version = "1.17.2";
|
||||
src = fetchurl {
|
||||
url = "https://github.com/GoogleContainerTools/skaffold/releases/download/v${version}/skaffold-linux-amd64";
|
||||
url =
|
||||
"https://github.com/GoogleContainerTools/skaffold/releases/download/v${version}/skaffold-linux-amd64";
|
||||
sha256 = "55dea8be16fa3abd81820a6a03f5d708beb5e152fe71e00f00744a4dd321c55a";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoPatchelfHook
|
||||
];
|
||||
nativeBuildInputs = [ autoPatchelfHook ];
|
||||
|
||||
unpackPhase = ''
|
||||
cp $src skaffold
|
||||
|
|
|
@ -1,36 +1,8 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, makeWrapper
|
||||
, fetchurl
|
||||
, rpmextract
|
||||
, autoPatchelfHook
|
||||
, alsa-lib
|
||||
, cups
|
||||
, gdk-pixbuf
|
||||
, glib
|
||||
, gtk3
|
||||
, libnotify
|
||||
, libuuid
|
||||
, libX11
|
||||
, libXScrnSaver
|
||||
, libXcomposite
|
||||
, libXcursor
|
||||
, libXdamage
|
||||
, libXext
|
||||
, libXfixes
|
||||
, libXi
|
||||
, libXrandr
|
||||
, libXrender
|
||||
, libXtst
|
||||
, libxcb
|
||||
, libxshmfence
|
||||
, mesa
|
||||
, nspr
|
||||
, nss
|
||||
, pango
|
||||
, systemd
|
||||
, libappindicator-gtk3
|
||||
, libdbusmenu
|
||||
{ lib, stdenv, makeWrapper, fetchurl, rpmextract, autoPatchelfHook, alsa-lib
|
||||
, cups, gdk-pixbuf, glib, gtk3, libnotify, libuuid, libX11, libXScrnSaver
|
||||
, libXcomposite, libXcursor, libXdamage, libXext, libXfixes, libXi, libXrandr
|
||||
, libXrender, libXtst, libxcb, libxshmfence, mesa, nspr, nss, pango, systemd
|
||||
, libappindicator-gtk3, libdbusmenu
|
||||
|
||||
}:
|
||||
|
||||
|
@ -39,11 +11,11 @@ stdenv.mkDerivation rec {
|
|||
version = "1.1.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://rpm.tuxedocomputers.com/opensuse/15.2/x86_64/tuxedo-control-center_${version}.rpm";
|
||||
url =
|
||||
"https://rpm.tuxedocomputers.com/opensuse/15.2/x86_64/tuxedo-control-center_${version}.rpm";
|
||||
sha256 = "0rqhfi1slnh0kkn1vnxqynxm6yb4w1mhk4vi92vj0lrxlwdxf80c";
|
||||
};
|
||||
|
||||
|
||||
nativeBuildInputs = [
|
||||
rpmextract
|
||||
makeWrapper
|
||||
|
@ -112,9 +84,9 @@ stdenv.mkDerivation rec {
|
|||
runHook postInstall
|
||||
'';
|
||||
|
||||
|
||||
meta = with lib; {
|
||||
description = "A tool to help you control performance, energy, fan and comfort settings on TUXEDO laptops.";
|
||||
description =
|
||||
"A tool to help you control performance, energy, fan and comfort settings on TUXEDO laptops.";
|
||||
homepage = "github.com/tuxedocomputers/tuxedo-control-center";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ ];
|
||||
|
|
|
@ -2,8 +2,7 @@
|
|||
|
||||
python,
|
||||
|
||||
makeWrapper, nodejs, electron_9, fetchFromGitHub
|
||||
}:
|
||||
makeWrapper, nodejs, electron_9, fetchFromGitHub }:
|
||||
|
||||
let
|
||||
baseName = "tuxedo-control-center";
|
||||
|
@ -44,9 +43,8 @@ let
|
|||
icon = "tuxedo-control-center";
|
||||
categories = "System;";
|
||||
};
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
in stdenv.mkDerivation rec {
|
||||
name = "${baseName}-${version}";
|
||||
src = "${nodePackages}/lib/node_modules/tuxedo-control-center/";
|
||||
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
# This file has been generated by node2nix 1.9.0. Do not edit!
|
||||
|
||||
{pkgs ? import <nixpkgs> {
|
||||
inherit system;
|
||||
}, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-14_x"}:
|
||||
{ pkgs ? import <nixpkgs> { inherit system; }, system ? builtins.currentSystem
|
||||
, nodejs ? pkgs."nodejs-14_x" }:
|
||||
|
||||
let
|
||||
nodeEnv = import ./node-env.nix {
|
||||
|
@ -10,8 +9,7 @@ let
|
|||
inherit pkgs nodejs;
|
||||
libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
|
||||
};
|
||||
in
|
||||
import ./node-packages.nix {
|
||||
in import ./node-packages.nix {
|
||||
inherit (pkgs) fetchurl nix-gitignore stdenv lib fetchgit;
|
||||
inherit nodeEnv;
|
||||
}
|
||||
|
|
|
@ -21,8 +21,7 @@ let
|
|||
'';
|
||||
|
||||
# Function that generates a TGZ file from a NPM project
|
||||
buildNodeSourceDist =
|
||||
{ name, version, src, ... }:
|
||||
buildNodeSourceDist = { name, version, src, ... }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "node-tarball-${name}-${version}";
|
||||
|
@ -41,9 +40,8 @@ let
|
|||
};
|
||||
|
||||
includeDependencies = { dependencies }:
|
||||
lib.optionalString (dependencies != [])
|
||||
(lib.concatMapStrings (dependency:
|
||||
''
|
||||
lib.optionalString (dependencies != [ ]) (lib.concatMapStrings
|
||||
(dependency: ''
|
||||
# Bundle the dependencies of the package
|
||||
mkdir -p node_modules
|
||||
cd node_modules
|
||||
|
@ -55,8 +53,7 @@ let
|
|||
fi
|
||||
|
||||
cd ..
|
||||
''
|
||||
) dependencies);
|
||||
'') dependencies);
|
||||
|
||||
# Recursively composes the dependencies of a package
|
||||
composePackage = { name, packageName, src, dependencies ? [ ], ... }@args:
|
||||
|
@ -160,16 +157,20 @@ let
|
|||
fs.writeFileSync("package.json", JSON.stringify(packageObj, null, 2));
|
||||
'';
|
||||
};
|
||||
in
|
||||
''
|
||||
node ${pinpointDependenciesFromPackageJSON} ${if production then "production" else "development"}
|
||||
in ''
|
||||
node ${pinpointDependenciesFromPackageJSON} ${
|
||||
if production then "production" else "development"
|
||||
}
|
||||
|
||||
${lib.optionalString (dependencies != [])
|
||||
''
|
||||
${lib.optionalString (dependencies != [ ]) ''
|
||||
if [ -d node_modules ]
|
||||
then
|
||||
cd node_modules
|
||||
${lib.concatMapStrings (dependency: pinpointDependenciesOfPackage dependency) dependencies}
|
||||
${
|
||||
lib.concatMapStrings
|
||||
(dependency: pinpointDependenciesOfPackage dependency)
|
||||
dependencies
|
||||
}
|
||||
cd ..
|
||||
fi
|
||||
''}
|
||||
|
@ -179,14 +180,17 @@ let
|
|||
# dependencies in the package.json file to the versions that are actually
|
||||
# being used.
|
||||
|
||||
pinpointDependenciesOfPackage = { packageName, dependencies ? [], production ? true, ... }@args:
|
||||
''
|
||||
pinpointDependenciesOfPackage =
|
||||
{ packageName, dependencies ? [ ], production ? true, ... }@args: ''
|
||||
if [ -d "${packageName}" ]
|
||||
then
|
||||
cd "${packageName}"
|
||||
${pinpointDependencies { inherit dependencies production; }}
|
||||
cd ..
|
||||
${lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
|
||||
${
|
||||
lib.optionalString (builtins.substring 0 1 packageName == "@")
|
||||
"cd .."
|
||||
}
|
||||
fi
|
||||
'';
|
||||
|
||||
|
@ -320,11 +324,14 @@ let
|
|||
'';
|
||||
};
|
||||
|
||||
prepareAndInvokeNPM = {packageName, bypassCache, reconstructLock, npmFlags, production}:
|
||||
prepareAndInvokeNPM =
|
||||
{ packageName, bypassCache, reconstructLock, npmFlags, production }:
|
||||
let
|
||||
forceOfflineFlag = if bypassCache then "--offline" else "--registry http://www.example.com";
|
||||
in
|
||||
''
|
||||
forceOfflineFlag = if bypassCache then
|
||||
"--offline"
|
||||
else
|
||||
"--registry http://www.example.com";
|
||||
in ''
|
||||
# Pinpoint the versions of all dependencies to the ones that are actually being used
|
||||
echo "pinpointing versions of dependencies..."
|
||||
source $pinpointDependenciesScriptPath
|
||||
|
@ -364,49 +371,50 @@ let
|
|||
node ${addIntegrityFieldsScript}
|
||||
''}
|
||||
|
||||
npm ${forceOfflineFlag} --nodedir=${nodeSources} ${npmFlags} ${lib.optionalString production "--production"} rebuild
|
||||
npm ${forceOfflineFlag} --nodedir=${nodeSources} ${npmFlags} ${
|
||||
lib.optionalString production "--production"
|
||||
} rebuild
|
||||
|
||||
if [ "''${dontNpmInstall-}" != "1" ]
|
||||
then
|
||||
# NPM tries to download packages even when they already exist if npm-shrinkwrap is used.
|
||||
rm -f npm-shrinkwrap.json
|
||||
|
||||
npm ${forceOfflineFlag} --nodedir=${nodeSources} ${npmFlags} ${lib.optionalString production "--production"} install
|
||||
npm ${forceOfflineFlag} --nodedir=${nodeSources} ${npmFlags} ${
|
||||
lib.optionalString production "--production"
|
||||
} install
|
||||
fi
|
||||
'';
|
||||
|
||||
# Builds and composes an NPM package including all its dependencies
|
||||
buildNodePackage =
|
||||
{ name
|
||||
, packageName
|
||||
, version
|
||||
, dependencies ? []
|
||||
, buildInputs ? []
|
||||
, production ? true
|
||||
, npmFlags ? ""
|
||||
, dontNpmInstall ? false
|
||||
, bypassCache ? false
|
||||
, reconstructLock ? false
|
||||
, preRebuild ? ""
|
||||
, dontStrip ? true
|
||||
, unpackPhase ? "true"
|
||||
, buildPhase ? "true"
|
||||
, meta ? {}
|
||||
, ... }@args:
|
||||
buildNodePackage = { name, packageName, version, dependencies ? [ ]
|
||||
, buildInputs ? [ ], production ? true, npmFlags ? ""
|
||||
, dontNpmInstall ? false, bypassCache ? false, reconstructLock ? false
|
||||
, preRebuild ? "", dontStrip ? true, unpackPhase ? "true"
|
||||
, buildPhase ? "true", meta ? { }, ... }@args:
|
||||
|
||||
let
|
||||
extraArgs = removeAttrs args [ "name" "dependencies" "buildInputs" "dontStrip" "dontNpmInstall" "preRebuild" "unpackPhase" "buildPhase" "meta" ];
|
||||
in
|
||||
stdenv.mkDerivation ({
|
||||
extraArgs = removeAttrs args [
|
||||
"name"
|
||||
"dependencies"
|
||||
"buildInputs"
|
||||
"dontStrip"
|
||||
"dontNpmInstall"
|
||||
"preRebuild"
|
||||
"unpackPhase"
|
||||
"buildPhase"
|
||||
"meta"
|
||||
];
|
||||
in stdenv.mkDerivation ({
|
||||
name = "${name}-${version}";
|
||||
buildInputs = [ tarWrapper python nodejs ]
|
||||
++ lib.optional (stdenv.isLinux) utillinux
|
||||
++ lib.optional (stdenv.isDarwin) libtool
|
||||
++ buildInputs;
|
||||
++ lib.optional (stdenv.isDarwin) libtool ++ buildInputs;
|
||||
|
||||
inherit nodejs;
|
||||
|
||||
inherit dontStrip; # Stripping may fail a build for some package deployments
|
||||
inherit
|
||||
dontStrip; # Stripping may fail a build for some package deployments
|
||||
inherit dontNpmInstall preRebuild unpackPhase buildPhase;
|
||||
|
||||
compositionScript = composePackage args;
|
||||
|
@ -422,7 +430,9 @@ let
|
|||
# Compose the package and all its dependencies
|
||||
source $compositionScriptPath
|
||||
|
||||
${prepareAndInvokeNPM { inherit packageName bypassCache reconstructLock npmFlags production; }}
|
||||
${prepareAndInvokeNPM {
|
||||
inherit packageName bypassCache reconstructLock npmFlags production;
|
||||
}}
|
||||
|
||||
# Create symlink to the deployed executable folder, if applicable
|
||||
if [ -d "$out/lib/node_modules/.bin" ]
|
||||
|
@ -455,35 +465,21 @@ let
|
|||
} // extraArgs);
|
||||
|
||||
# Builds a node environment (a node_modules folder and a set of binaries)
|
||||
buildNodeDependencies =
|
||||
{ name
|
||||
, packageName
|
||||
, version
|
||||
, src
|
||||
, dependencies ? []
|
||||
, buildInputs ? []
|
||||
, production ? true
|
||||
, npmFlags ? ""
|
||||
, dontNpmInstall ? false
|
||||
, bypassCache ? false
|
||||
, reconstructLock ? false
|
||||
, dontStrip ? true
|
||||
, unpackPhase ? "true"
|
||||
, buildPhase ? "true"
|
||||
, ... }@args:
|
||||
buildNodeDependencies = { name, packageName, version, src, dependencies ? [ ]
|
||||
, buildInputs ? [ ], production ? true, npmFlags ? ""
|
||||
, dontNpmInstall ? false, bypassCache ? false, reconstructLock ? false
|
||||
, dontStrip ? true, unpackPhase ? "true", buildPhase ? "true", ... }@args:
|
||||
|
||||
let
|
||||
extraArgs = removeAttrs args [ "name" "dependencies" "buildInputs" ];
|
||||
in
|
||||
stdenv.mkDerivation ({
|
||||
let extraArgs = removeAttrs args [ "name" "dependencies" "buildInputs" ];
|
||||
in stdenv.mkDerivation ({
|
||||
name = "node-dependencies-${name}-${version}";
|
||||
|
||||
buildInputs = [ tarWrapper python nodejs ]
|
||||
++ lib.optional (stdenv.isLinux) utillinux
|
||||
++ lib.optional (stdenv.isDarwin) libtool
|
||||
++ buildInputs;
|
||||
++ lib.optional (stdenv.isDarwin) libtool ++ buildInputs;
|
||||
|
||||
inherit dontStrip; # Stripping may fail a build for some package deployments
|
||||
inherit
|
||||
dontStrip; # Stripping may fail a build for some package deployments
|
||||
inherit dontNpmInstall unpackPhase buildPhase;
|
||||
|
||||
includeScript = includeDependencies { inherit dependencies; };
|
||||
|
@ -509,13 +505,17 @@ let
|
|||
|
||||
# Go to the parent folder to make sure that all packages are pinpointed
|
||||
cd ..
|
||||
${lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
|
||||
${lib.optionalString (builtins.substring 0 1 packageName == "@")
|
||||
"cd .."}
|
||||
|
||||
${prepareAndInvokeNPM { inherit packageName bypassCache reconstructLock npmFlags production; }}
|
||||
${prepareAndInvokeNPM {
|
||||
inherit packageName bypassCache reconstructLock npmFlags production;
|
||||
}}
|
||||
|
||||
# Expose the executables that were installed
|
||||
cd ..
|
||||
${lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
|
||||
${lib.optionalString (builtins.substring 0 1 packageName == "@")
|
||||
"cd .."}
|
||||
|
||||
mv ${packageName} lib
|
||||
ln -s $out/lib/node_modules/.bin $out/bin
|
||||
|
@ -523,30 +523,17 @@ let
|
|||
} // extraArgs);
|
||||
|
||||
# Builds a development shell
|
||||
buildNodeShell =
|
||||
{ name
|
||||
, packageName
|
||||
, version
|
||||
, src
|
||||
, dependencies ? []
|
||||
, buildInputs ? []
|
||||
, production ? true
|
||||
, npmFlags ? ""
|
||||
, dontNpmInstall ? false
|
||||
, bypassCache ? false
|
||||
, reconstructLock ? false
|
||||
, dontStrip ? true
|
||||
, unpackPhase ? "true"
|
||||
, buildPhase ? "true"
|
||||
, ... }@args:
|
||||
buildNodeShell = { name, packageName, version, src, dependencies ? [ ]
|
||||
, buildInputs ? [ ], production ? true, npmFlags ? ""
|
||||
, dontNpmInstall ? false, bypassCache ? false, reconstructLock ? false
|
||||
, dontStrip ? true, unpackPhase ? "true", buildPhase ? "true", ... }@args:
|
||||
|
||||
let
|
||||
nodeDependencies = buildNodeDependencies args;
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
let nodeDependencies = buildNodeDependencies args;
|
||||
in stdenv.mkDerivation {
|
||||
name = "node-shell-${name}-${version}";
|
||||
|
||||
buildInputs = [ python nodejs ] ++ lib.optional (stdenv.isLinux) utillinux ++ buildInputs;
|
||||
buildInputs = [ python nodejs ] ++ lib.optional (stdenv.isLinux) utillinux
|
||||
++ buildInputs;
|
||||
buildCommand = ''
|
||||
mkdir -p $out/bin
|
||||
cat > $out/bin/shell <<EOF
|
||||
|
@ -564,8 +551,7 @@ let
|
|||
export PATH="${nodeDependencies}/bin:$PATH"
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
in {
|
||||
buildNodeSourceDist = lib.makeOverridable buildNodeSourceDist;
|
||||
buildNodePackage = lib.makeOverridable buildNodePackage;
|
||||
buildNodeDependencies = lib.makeOverridable buildNodeDependencies;
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -3,9 +3,8 @@
|
|||
let
|
||||
kernel = linuxPackages.kernel;
|
||||
kernelDir = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build";
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
in stdenv.mkDerivation rec {
|
||||
name = "tuxedo-keyboard";
|
||||
version = "v3.0.8";
|
||||
|
||||
|
@ -33,7 +32,8 @@ stdenv.mkDerivation rec {
|
|||
'';
|
||||
|
||||
meta = {
|
||||
homepage = https://github.com/tuxedocomputers/tuxedo-keyboard/blob/master/Makefile;
|
||||
homepage =
|
||||
"https://github.com/tuxedocomputers/tuxedo-keyboard/blob/master/Makefile";
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -4,13 +4,12 @@ stdenv.mkDerivation rec {
|
|||
name = "vaultsink";
|
||||
version = "0.1.8";
|
||||
src = fetchurl {
|
||||
url = "https://github.com/cookiefactory/vault-sink/releases/download/v${version}/vault-sink-linux-amd64";
|
||||
url =
|
||||
"https://github.com/cookiefactory/vault-sink/releases/download/v${version}/vault-sink-linux-amd64";
|
||||
sha256 = "057799e7f907186993b591e3b2f743b69d7a9fed";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoPatchelfHook
|
||||
];
|
||||
nativeBuildInputs = [ autoPatchelfHook ];
|
||||
|
||||
installPhase = ''
|
||||
install -m 755 -D vault-sink-linux-amd64 $out/bin/sink
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
{ pkgs, options, ... }:
|
||||
|
||||
let
|
||||
unstable = import <nixos-unstable> {};
|
||||
let unstable = import <nixos-unstable> { };
|
||||
in {
|
||||
environment.systemPackages = with pkgs; [
|
||||
cryptsetup
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
unstable = import <nixos-unstable> {};
|
||||
let unstable = import <nixos-unstable> { };
|
||||
in {
|
||||
environment.systemPackages = with pkgs; [
|
||||
acpi
|
||||
|
@ -42,9 +41,7 @@ in {
|
|||
];
|
||||
|
||||
environment = {
|
||||
etc = {
|
||||
"starship.toml".source = ../dotfiles/starship.toml;
|
||||
};
|
||||
etc = { "starship.toml".source = ../dotfiles/starship.toml; };
|
||||
|
||||
variables = {
|
||||
BAT_THEME = "ansi";
|
||||
|
|
|
@ -26,21 +26,15 @@ in {
|
|||
wf-recorder
|
||||
xwayland
|
||||
];
|
||||
extraSessionCommands = ''
|
||||
'';
|
||||
extraSessionCommands = "";
|
||||
};
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
gtkUsePortal = true;
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-gtk
|
||||
xdg-desktop-portal-wlr
|
||||
];
|
||||
extraPortals = with pkgs; [ xdg-desktop-portal-gtk xdg-desktop-portal-wlr ];
|
||||
};
|
||||
boot.extraModulePackages = with config.boot.kernelPackages; [
|
||||
v4l2loopback
|
||||
];
|
||||
boot.extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
|
||||
|
||||
colors = {
|
||||
background = "#282a36";
|
||||
|
@ -105,9 +99,7 @@ key_bindings:
|
|||
jack.enable = true;
|
||||
|
||||
config.pipewire = {
|
||||
"context.properties" = {
|
||||
"default.clock.rate" = 48000;
|
||||
};
|
||||
"context.properties" = { "default.clock.rate" = 48000; };
|
||||
};
|
||||
};
|
||||
services.udev.packages = [
|
||||
|
@ -128,9 +120,7 @@ key_bindings:
|
|||
fira-code
|
||||
noto-fonts
|
||||
noto-fonts-emoji
|
||||
(nerdfonts.override {
|
||||
fonts = [ "CascadiaCode" "Meslo" ];
|
||||
})
|
||||
(nerdfonts.override { fonts = [ "CascadiaCode" "Meslo" ]; })
|
||||
];
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
@ -194,8 +184,7 @@ key_bindings:
|
|||
xfce.thunar
|
||||
xfce.thunar-volman
|
||||
ydotool
|
||||
(
|
||||
pkgs.writeTextFile {
|
||||
(pkgs.writeTextFile {
|
||||
name = "startsway";
|
||||
destination = "/bin/startsway";
|
||||
executable = true;
|
||||
|
@ -217,8 +206,7 @@ key_bindings:
|
|||
|
||||
${pkgs.dbus}/bin/dbus-run-session ${pkgs.sway}/bin/sway
|
||||
'';
|
||||
}
|
||||
)
|
||||
})
|
||||
];
|
||||
|
||||
hardware.bluetooth.enable = true;
|
||||
|
@ -233,14 +221,9 @@ key_bindings:
|
|||
};
|
||||
|
||||
services.printing.enable = true;
|
||||
services.printing.drivers = [
|
||||
pkgs.gutenprint
|
||||
];
|
||||
services.printing.drivers = [ pkgs.gutenprint ];
|
||||
services.avahi.enable = true;
|
||||
services.avahi.nssmdns = true;
|
||||
|
||||
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
};
|
||||
hardware.opengl = { enable = true; };
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
unstable = import <nixos-unstable> {};
|
||||
let unstable = import <nixos-unstable> { };
|
||||
in {
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
@ -15,12 +14,8 @@ in {
|
|||
#unstable.esphome
|
||||
|
||||
nodePackages.pyright
|
||||
(python39.withPackages(python-packages: with python-packages; [
|
||||
black
|
||||
pyyaml
|
||||
requests
|
||||
black
|
||||
]))
|
||||
(python39.withPackages
|
||||
(python-packages: with python-packages; [ black pyyaml requests black ]))
|
||||
|
||||
mariadb-client
|
||||
musl
|
||||
|
@ -35,6 +30,12 @@ in {
|
|||
tig
|
||||
unstable.bazel
|
||||
|
||||
openssl pkg-config nasm cmake zlib gcc binutils-unwrapped
|
||||
openssl
|
||||
pkg-config
|
||||
nasm
|
||||
cmake
|
||||
zlib
|
||||
gcc
|
||||
binutils-unwrapped
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
unstable = import <nixos-unstable> { config.allowUnfree = true; };
|
||||
let unstable = import <nixos-unstable> { config.allowUnfree = true; };
|
||||
in {
|
||||
|
||||
networking.networkmanager.enable = true;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
unstable = import <nixos-unstable> {};
|
||||
let unstable = import <nixos-unstable> { };
|
||||
in {
|
||||
environment.systemPackages = with pkgs; [
|
||||
environment.systemPackages = with pkgs;
|
||||
[
|
||||
# embedded
|
||||
#arduino
|
||||
#avrdude
|
||||
|
|
|
@ -2,7 +2,5 @@
|
|||
|
||||
{
|
||||
networking.wireguard.enable = true;
|
||||
environment.systemPackages = with pkgs; [
|
||||
wireguard
|
||||
];
|
||||
environment.systemPackages = with pkgs; [ wireguard ];
|
||||
}
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
let
|
||||
unstable = import <nixos-unstable> { config.allowUnfree = true; };
|
||||
cloudstation = pkgs.callPackage (import ../packages/cloudstation.nix) { };
|
||||
nagstamon = pkgs.libsForQt5.callPackage (import ../packages/nagstamon.nix) {};
|
||||
nagstamon =
|
||||
pkgs.libsForQt5.callPackage (import ../packages/nagstamon.nix) { };
|
||||
in {
|
||||
|
||||
security.pki.certificateFiles = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue