diff options
author | Patryk Niedzwiedzinski <patryk@niedzwiedzinski.cyou> | 2024-09-29 16:23:16 +0200 |
---|---|---|
committer | Patryk Niedzwiedzinski <patryk@niedzwiedzinski.cyou> | 2024-09-29 16:23:16 +0200 |
commit | 4f591cc9c9663c413e8eb5cd8401a34a3251e30c (patch) | |
tree | dc46f698af4d5ba288e9e6707c2bc960e913bdd8 /machines | |
parent | 4fa1a6efad786affb0729603de846d2034580db2 (diff) | |
download | dots-4f591cc9c9663c413e8eb5cd8401a34a3251e30c.tar.gz dots-4f591cc9c9663c413e8eb5cd8401a34a3251e30c.zip |
Remove old machines
Diffstat (limited to 'machines')
34 files changed, 0 insertions, 1453 deletions
diff --git a/machines/adax/configuration.nix b/machines/adax/configuration.nix deleted file mode 100755 index 388fa60..0000000 --- a/machines/adax/configuration.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ config, pkgs, ... }: - -{ - - imports = [ - ../base.nix - ../pl.nix - #../../modules/larbs.nix - ]; - - - networking.hostName = "adax"; - - environment.systemPackages = with pkgs; [ - ]; - - # https://sgt.hootr.club/molten-matter/nix-distributed-builds/ - boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; - services.openssh.enable = true; - nix.trustedUsers = [ "bob" ]; - users.users.bob = { - description = "Bob the Builder"; - isNormalUser = true; - createHome = true; - shell = "/bin/sh"; - }; - -} diff --git a/machines/adax/default.nix b/machines/adax/default.nix deleted file mode 100755 index 246ffea..0000000 --- a/machines/adax/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - imports = [ - ./configuration.nix - ./hardware-configuration.nix - ]; -} diff --git a/machines/adax/hardware-configuration.nix b/machines/adax/hardware-configuration.nix deleted file mode 100755 index 99b9002..0000000 --- a/machines/adax/hardware-configuration.nix +++ /dev/null @@ -1,38 +0,0 @@ -# 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 = - [ <nixpkgs/nixos/modules/installer/scan/not-detected.nix> - ]; - - boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ata_piix" "usbhid" "usb_storage" "floppy" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - - boot.loader.grub.enable = true; - boot.loader.grub.version = 2; - boot.loader.grub.device = "/dev/sdc"; # or "nodev" for efi only - - networking.useDHCP = false; - networking.interfaces.enp3s0.useDHCP = true; - - fileSystems."/" = - { device = "/dev/disk/by-uuid/6b9e05c9-827e-4a34-bb35-f2a3da149f44"; - fsType = "ext4"; - }; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/7F96-4F40"; - fsType = "vfat"; - }; - - swapDevices = - [ { device = "/dev/disk/by-uuid/cda58eb8-fc1e-4bea-9dca-b119a1da2267"; } - ]; - - nix.maxJobs = lib.mkDefault 2; -} diff --git a/machines/asus/acpi_override b/machines/asus/acpi_override deleted file mode 100755 index ca59c58..0000000 --- a/machines/asus/acpi_override +++ /dev/null Binary files differdiff --git a/machines/asus/brcm.nix b/machines/asus/brcm.nix deleted file mode 100644 index f38306e..0000000 --- a/machines/asus/brcm.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ stdenv, fetchurl }: - -# stdenv.mkDerivation { -# name = "brcmfmac43340"; - -# src = fetchurl { -# url = "https://android.googlesource.com/platform/hardware/broadcom/wlan/+archive/master/bcmdhd/firmware/bcm43341.tar.gz"; -# sha256 = "1nkj8h2fwj83wsswi6p2jf3nxba0r70inanvjcf77cqyx6nvp2pv"; -# }; - -# sourceRoot = "."; - -# installPhase = '' -# mkdir -p $out/lib/firmware/brcm - -# cp fw_bcm43341.bin $out/lib/firmware/brcm/brcmfmac43340-sdio.bin -# cp fw_bcm43341.bin $out/lib/firmware/brcm/brcmfmac43341-sdio.bin -# cp ${./brcm.txt} $out/lib/firmware/brcm/brcmfmac43340-sdio.txt -# cp ${./brcm.txt} $out/lib/firmware/brcm/brcmfmac43341-sdio.txt -# ''; -# } -let - bin = fetchurl { - url = "https://github.com/OpenELEC/wlan-firmware/blob/master/firmware/brcm/brcmfmac43340-sdio.bin"; - sha256 = "1k1xjbkls6hjdwlwcgrvjcvv0vhgdirqvxlyzpssq205qygqskqf"; - }; -in -stdenv.mkDerivation { - name = "brcmfmac43340"; - unpackPhase = "true"; - - installPhase = '' - mkdir -p $out/lib/firmware/brcm - cp ${bin} $out/lib/firmware/brcm/brcmfmac43340-sdio.bin - cp ${./brcm.txt} $out/lib/firmware/brcm/brcmfmac43340-sdio.txt - ''; -} diff --git a/machines/asus/brcm.txt b/machines/asus/brcm.txt deleted file mode 100644 index db22fef..0000000 --- a/machines/asus/brcm.txt +++ /dev/null Binary files differdiff --git a/machines/asus/configuration.nix b/machines/asus/configuration.nix deleted file mode 100755 index a64f9d2..0000000 --- a/machines/asus/configuration.nix +++ /dev/null @@ -1,50 +0,0 @@ -{ config, pkgs, ... }: -let - screen-orient = pkgs.writeScriptBin "screen-orient" '' - #!${pkgs.stdenv.shell} - xrandr --output DSI1 --primary --mode 800x1280 --pos 0x0 --rotate left --output DP1 --off --output HDMI1 --off - -xinput set-prop "SIS0457:00 0457:113D" "Coordinate Transformation Matrix" 0 -1 1 1 0 0 0 0 1 - ''; -in -{ - - imports = [ - ../base.nix - ../pl.nix - ../../modules/larbs.nix - ../../modules/trackpad.nix - ]; - - networking = { - hostName = "asus-t100"; - - networkmanager = { - enable = true; - wifi.backend = "iwd"; - }; - }; - - - environment.systemPackages = with pkgs; [ - libimobiledevice - screen-orient - ]; - - services.usbmuxd.enable = true; - - services.acpid.enable = true; - - # Battery - services.tlp.enable = true; - - services.xserver = { - videoDrivers = [ "intel" ]; - deviceSection = '' - Option "Backlight" "intel_backlight" - Option "DIR" "2" - Option "TearFree" "true" - ''; - }; - -} diff --git a/machines/asus/default.nix b/machines/asus/default.nix deleted file mode 100755 index 246ffea..0000000 --- a/machines/asus/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - imports = [ - ./configuration.nix - ./hardware-configuration.nix - ]; -} diff --git a/machines/asus/hardware-configuration.nix b/machines/asus/hardware-configuration.nix deleted file mode 100644 index 303ebe5..0000000 --- a/machines/asus/hardware-configuration.nix +++ /dev/null @@ -1,63 +0,0 @@ -# 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 = - [ <nixpkgs/nixos/modules/installer/scan/not-detected.nix> - ]; - - boot.initrd.availableKernelModules = [ "xhci_pci" "usb_storage" "usbhid" "sd_mod" "sdhci_acpi" ]; - boot.initrd.kernelModules = [ "brcmfmac" ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - - boot.kernelParams = [ "intel_idle.max_cstate=1" ]; - - boot.initrd.prepend = [ "${./acpi_override}" ]; - boot.kernelPatches = [ - { - name = "acpi_upgrade"; - patch = null; - extraConfig = '' - ACPI_TABLE_UPGRADE y - ''; - } - ]; - - nixpkgs.config.allowUnfree = true; - hardware.enableRedistributableFirmware = true; - hardware.enableAllFirmware = true; - hardware.firmware = [ - (pkgs.callPackage ./brcm.nix {}) - ]; - - boot.loader = { - efi = { - canTouchEfiVariables = true; - efiSysMountPoint = "/boot"; - }; - grub = { - efiSupport = true; - device = "nodev"; - }; - }; - - fileSystems."/" = lib.mkForce - { device = "/dev/disk/by-uuid/7ee757e6-4f50-4681-9b5b-27c2cb1f84e4"; - fsType = "ext4"; - }; - - fileSystems."/boot" = lib.mkForce - { device = "/dev/disk/by-uuid/5386-B9AE"; - fsType = "vfat"; - }; - - swapDevices = lib.mkForce - [ { device = "/dev/disk/by-uuid/8924970e-10bd-4d6f-a137-61d05a886106"; } - ]; - - nix.maxJobs = lib.mkDefault 4; - powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; -} diff --git a/machines/hp-compaq/configuration.nix b/machines/hp-compaq/configuration.nix deleted file mode 100755 index cc61647..0000000 --- a/machines/hp-compaq/configuration.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ config, pkgs, ... }: - -{ - - imports = [ - ../base.nix - ../pl.nix - ../../modules/larbs.nix - ]; - - networking.hostName = "hp-compaq"; - - environment.systemPackages = with pkgs; [ - ]; -} - diff --git a/machines/hp-compaq/default.nix b/machines/hp-compaq/default.nix deleted file mode 100755 index 246ffea..0000000 --- a/machines/hp-compaq/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - imports = [ - ./configuration.nix - ./hardware-configuration.nix - ]; -} diff --git a/machines/hp-compaq/hardware-configuration.nix b/machines/hp-compaq/hardware-configuration.nix deleted file mode 100755 index 6971c39..0000000 --- a/machines/hp-compaq/hardware-configuration.nix +++ /dev/null @@ -1,44 +0,0 @@ -# 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 = - [ <nixpkgs/nixos/modules/installer/scan/not-detected.nix> - ]; - - boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ata_piix" "usb_storage" "usbhid" "sd_mod" "sr_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ ]; - boot.extraModulePackages = [ ]; - - boot.loader.grub.enable = true; - boot.loader.grub.version = 2; - boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only - - networking.useDHCP = false; - networking.interfaces.enp2s0.useDHCP = true; - - fileSystems."/" = - { device = "/dev/disk/by-uuid/ad2775d5-5890-493e-b709-60c1f7f3c63b"; - fsType = "ext4"; - }; - - fileSystems."/nix/store" = - { device = "/nix/store"; - fsType = "none"; - options = [ "bind" ]; - }; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/C6DC-F51D"; - fsType = "vfat"; - }; - - swapDevices = - [ { device = "/dev/disk/by-uuid/ad2b96eb-341c-40e2-bb86-1ed2f03a0713"; } - ]; - - nix.maxJobs = lib.mkDefault 2; -} diff --git a/machines/rpi3-amadeus/README.md b/machines/rpi3-amadeus/README.md deleted file mode 100644 index 4ee0586..0000000 --- a/machines/rpi3-amadeus/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# Installing nixos on rpi - -1. Download img from hydra (aarch64) -2. Flash on sd card and boot it -3. passwd for root! -4. run nixos-rebuild with minimal.nix as config -5. run nixos-rebuild with configuration.nix as config - -## TODO - -- spi - -## Resources - -- https://github.com/hexamon-tech/nixos-lorawan-gateway/blob/master/modules/kernel.nix#L11 diff --git a/machines/rpi3-amadeus/configuration.nix b/machines/rpi3-amadeus/configuration.nix deleted file mode 100644 index ba9ff57..0000000 --- a/machines/rpi3-amadeus/configuration.nix +++ /dev/null @@ -1,64 +0,0 @@ -{ config, pkgs, lib, ... }: -{ - imports = [ - ./hyperion.nix - ]; - # NixOS wants to enable GRUB by default - boot.loader.grub.enable = false; - boot.loader.raspberryPi = { - enable = true; - version = 3; - uboot.enable = true; - firmwareConfig = '' - gpu_mem=256 - ''; - }; - # Enables the generation of /boot/extlinux/extlinux.conf - boot.loader.generic-extlinux-compatible.enable = true; - - # !!! If your board is a Raspberry Pi 3, select not latest (5.8 at the time) - # !!! as it is currently broken (see https://github.com/NixOS/nixpkgs/issues/97064) - boot.kernelPackages = pkgs.linuxPackages; - - # !!! Needed for the virtual console to work on the RPi 3, as the default of 16M doesn't seem to be enough. - # If X.org behaves weirdly (I only saw the cursor) then try increasing this to 256M. - # On a Raspberry Pi 4 with 4 GB, you should either disable this parameter or increase to at least 64M if you want the USB ports to work. - boot.kernelParams = ["cma=32M"]; - - hardware.enableRedistributableFirmware = true; - hardware.firmware = with pkgs; [ raspberrypifw ]; - - # File systems configuration for using the installer's partition layout - fileSystems = { - "/" = { - device = "/dev/disk/by-label/NIXOS_SD"; - fsType = "ext4"; - }; - }; - - services.openssh.enable = true; - services.openssh.permitRootLogin = "yes"; - - nix.gc.automatic = true; - nix.gc.options = "--delete-older-than 30d"; - - # !!! Adding a swap file is optional, but strongly recommended! - swapDevices = [ { device = "/swapfile"; size = 1024; } ]; - - environment.systemPackages = with pkgs; [ - vim git curl wget - libraspberrypi - ]; - - users.users.pi = { - isNormalUser = true; - home = "/home/pi"; - extraGroups = [ "wheel" "networkmanager" ]; - }; - services.xserver = { - enable = true; - displayManager.startx.enable = true; - libinput.enable = true; - }; - -} diff --git a/machines/rpi3-amadeus/configuration.nix.old b/machines/rpi3-amadeus/configuration.nix.old deleted file mode 100644 index 13a19db..0000000 --- a/machines/rpi3-amadeus/configuration.nix.old +++ /dev/null @@ -1,49 +0,0 @@ -{ config, pkgs, lib, ... }: -{ - # NixOS wants to enable GRUB by default - boot.loader.grub.enable = false; - - # if you have a Raspberry Pi 2 or 3, pick this: - boot.kernelPackages = pkgs.linuxPackages_latest; - - # A bunch of boot parameters needed for optimal runtime on RPi 3b+ - boot.kernelParams = ["cma=256M"]; - boot.loader.raspberryPi.enable = true; - boot.loader.raspberryPi.version = 3; - boot.loader.raspberryPi.uboot.enable = true; - boot.loader.raspberryPi.firmwareConfig = '' - gpu_mem=256 - ''; - environment.systemPackages = with pkgs; [ - raspberrypi-tools - ]; - - # File systems configuration for using the installer's partition layout - fileSystems = { - "/" = { - device = "/dev/disk/by-label/NIXOS_SD"; - fsType = "ext4"; - }; - }; - - # Preserve space by sacrificing documentation and history - documentation.nixos.enable = false; - nix.gc.automatic = true; - nix.gc.options = "--delete-older-than 30d"; - boot.cleanTmpDir = true; - - # Configure basic SSH access - services.openssh.enable = true; - services.openssh.permitRootLogin = "yes"; - - # Use 1GB of additional swap memory in order to not run out of memory - # when installing lots of things while running other things at the same time. - swapDevices = [ { device = "/swapfile"; size = 1024; } ]; - - - users.users.pi = { - isNormalUser = true; - home = "/home/pi"; - extraGroups = [ "wheel" "networkmanager" ]; - }; -} diff --git a/machines/rpi3-amadeus/default.nix b/machines/rpi3-amadeus/default.nix deleted file mode 100644 index 8f77b8f..0000000 --- a/machines/rpi3-amadeus/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - imports = [ - # ./hardware-configuration.nix - ./configuration.nix - ]; -} diff --git a/machines/rpi3-amadeus/hyperion-ng.nix b/machines/rpi3-amadeus/hyperion-ng.nix deleted file mode 100644 index ed47d53..0000000 --- a/machines/rpi3-amadeus/hyperion-ng.nix +++ /dev/null @@ -1,80 +0,0 @@ -{ stdenv, fetchurl, fetchzip, autoPatchelfHook, callPackage, -expat, glib, systemd, libX11, libXrandr, fontconfig, tlf, ncurses5, bzip2, -readline70, openssl, db, libglvnd, libusb }: -with stdenv.lib; -let - version = "2.0.0-alpha.9"; - - srcAarch64 = fetchurl { - url = "https://github.com/hyperion-project/hyperion.ng/releases/download/${version}/Hyperion-${version}-Linux-aarch64.tar.gz"; - sha256 = "09wvlhp5c1mkvjsgbsiy402cx8na7qykwgv4waivc7m5ns4sl2mf"; - }; - - srcX86 = fetchurl { - url = "https://github.com/hyperion-project/hyperion.ng/releases/download/${version}/Hyperion-${version}-Linux-x86_64.tar.gz"; - sha256 = "1gkjzqkh6qbwzkrdrg9xmznh6b676kmdlw54drqwfycakb7riad2"; - }; - - mpdecimal = callPackage ./mpdecimal.nix {}; - - bzip2_linked = stdenv.mkDerivation { - name = "bzip2-linked"; - unpackPhase = "true"; - installPhase = '' - mkdir -p $out/lib - cp -r ${bzip2.out}/lib/libbz2.so.1.0.6 $out/lib - ln -s $out/lib/libbz2.so.1.0.6 $out/lib/libbz2.so.1.0 - ''; - }; - - python3 = (import (fetchzip { - url = "https://github.com/nixos/nixpkgs/archive/7731621c81b5cd601a176c2109b44c5295049f20.zip"; - # Please update this hash with the one nix says on the first build attempt - sha256 = "0gdf2kkh3qcn9r300sl4khcg0fnixarjcil9pv9hami3dqjbpngv"; - }) { }).python3; -in -stdenv.mkDerivation { - inherit version; - pname = "hyperion-ng"; - - src = srcAarch64; - - nativeBuildInputs = [ autoPatchelfHook ]; - - buildInputs = [ - python3 - systemd - stdenv.cc.cc.lib - fontconfig.lib - tlf - ncurses5 - mpdecimal - glib - readline70 - openssl - db - libglvnd - libusb - expat - libX11 - libXrandr - - bzip2_linked - ]; - - sourceRoot = "share/hyperion"; - - buildPhase = ""; - installPhase = '' - mkdir -p $out/bin $out/lib - cp -r bin $out - cp -r lib $out - - #ln -s ${bzip2}/lib/libbz2.so.1.0.6 $out/lib/libbz2.so.1.0 - ''; - - meta = { - description = "Hyperion is an open source ambient light software. Feel free to join us and contribute new features!"; - homepage = "https://hyperion-project.org/"; - }; -} diff --git a/machines/rpi3-amadeus/hyperion.nix b/machines/rpi3-amadeus/hyperion.nix deleted file mode 100644 index 094be80..0000000 --- a/machines/rpi3-amadeus/hyperion.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ pkgs, ... }: -let - hyperion = pkgs.callPackage ./hyperion-ng.nix { }; - hyperionConfig = pkgs.fetchurl { - url = "https://gist.githubusercontent.com/pniedzwiedzinski/e1810bc4dd08b97512d28c42daa95326/raw/460febec24390dc90d3b70987f07ef1ab8a77b3a/hyperion.config.json"; - sha256 = "1yaiw8ljy6kaq6vnf5ccq2c4wpjlakd00nmq51v1q2sdnc06jmqq"; - }; -in -{ - imports = [ - ./spi.nix - ]; - - environment.systemPackages = [ - hyperion - ]; - - - # networking.firewall.allowedTCPPorts = [ ]; - networking.firewall.enable = false; #TODO - - systemd.services.hyperion = { - enable = true; - wantedBy = ["multi-user.target"]; - serviceConfig = { - ExecStart = "${hyperion}/bin/hyperiond"; - ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; - Restart = "on-failure"; - User = "root"; - Group = "root"; - Type = "simple"; - UMask = "007"; - TimeoutStopSec = "10"; - }; - }; -} diff --git a/machines/rpi3-amadeus/minimal.nix b/machines/rpi3-amadeus/minimal.nix deleted file mode 100644 index 3f2acc7..0000000 --- a/machines/rpi3-amadeus/minimal.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ config, pkgs, lib, ... }: -{ - # NixOS wants to enable GRUB by default - boot.loader.grub.enable = false; - # Enables the generation of /boot/extlinux/extlinux.conf - boot.loader.generic-extlinux-compatible.enable = true; - - # !!! If your board is a Raspberry Pi 3, select not latest (5.8 at the time) - # !!! as it is currently broken (see https://github.com/NixOS/nixpkgs/issues/97064) - boot.kernelPackages = pkgs.linuxPackages; - - # !!! Needed for the virtual console to work on the RPi 3, as the default of 16M doesn't seem to be enough. - # If X.org behaves weirdly (I only saw the cursor) then try increasing this to 256M. - # On a Raspberry Pi 4 with 4 GB, you should either disable this parameter or increase to at least 64M if you want the USB ports to work. - boot.kernelParams = ["cma=32M"]; - - # File systems configuration for using the installer's partition layout - fileSystems = { - "/" = { - device = "/dev/disk/by-label/NIXOS_SD"; - fsType = "ext4"; - }; - }; - - - services.openssh.enable = true; - services.openssh.permitRootLogin = "yes"; - - - # !!! Adding a swap file is optional, but strongly recommended! - swapDevices = [ { device = "/swapfile"; size = 1024; } ]; -} diff --git a/machines/rpi3-amadeus/mpdecimal.nix b/machines/rpi3-amadeus/mpdecimal.nix deleted file mode 100644 index fee59ee..0000000 --- a/machines/rpi3-amadeus/mpdecimal.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ stdenv, fetchurl, gcc, binutils }: - -let - pname = "mpdecimal"; - version = "2.5.0"; -in -stdenv.mkDerivation { - inherit pname version; - - src = fetchurl { - url = "https://www.bytereef.org/software/${pname}/releases/${pname}-${version}.tar.gz"; - sha256 = "1jm0vzlcsapx9ilrvns4iyws6n5i48zpxykmklfpv98jivf7wh8m"; - }; - - buildPhase = '' - ./configure - - sed -i 's/-Wl,//' libmpdec/Makefile - make - ''; - - installPhase = '' - mkdir -p $out/lib - cp libmpdec/*.so* $out/lib - ''; - -} diff --git a/machines/rpi3-amadeus/spi.dts b/machines/rpi3-amadeus/spi.dts deleted file mode 100644 index db76c4b..0000000 --- a/machines/rpi3-amadeus/spi.dts +++ /dev/null @@ -1,49 +0,0 @@ -/dts-v1/; -/plugin/; - -/ { - compatible = "raspberrypi"; - fragment@0 { - target = <&spi>; - __overlay__ { - cs-gpios = <&gpio 8 1>, <&gpio 7 1>; - status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&spi0_pins &spi0_cs_pins>; - #address-cells = <1>; - #size-cells = <0>; - spidev@0 { - reg = <0>; // CE0 - spi-max-frequency = <500000>; - compatible = "spidev"; - }; - - spidev@1 { - reg = <1>; // CE1 - spi-max-frequency = <500000>; - compatible = "spidev"; - }; - }; - }; - fragment@1 { - target = <&alt0>; - __overlay__ { - // Drop GPIO 7, SPI 8-11 - brcm,pins = <4 5>; - }; - }; - - fragment@2 { - target = <&gpio>; - __overlay__ { - spi0_pins: spi0_pins { - brcm,pins = <9 10 11>; - brcm,function = <4>; // alt0 - }; - spi0_cs_pins: spi0_cs_pins { - brcm,pins = <8 7>; - brcm,function = <1>; // out - }; - }; - }; -}; diff --git a/machines/rpi3-amadeus/spi.nix b/machines/rpi3-amadeus/spi.nix deleted file mode 100644 index 8a8f332..0000000 --- a/machines/rpi3-amadeus/spi.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ pkgs, ... }: -{ - hardware.deviceTree = { - enable = true; - filter = "*rpi*.dtb"; - overlays = [{ - name = "spi"; - dtsFile = ./spi.dts; - }]; - }; -} diff --git a/machines/srv1/baby-yoda.png b/machines/srv1/baby-yoda.png deleted file mode 100644 index 42a200c..0000000 --- a/machines/srv1/baby-yoda.png +++ /dev/null Binary files differdiff --git a/machines/srv1/baby-yoda.png.comp b/machines/srv1/baby-yoda.png.comp deleted file mode 100644 index 26eb247..0000000 --- a/machines/srv1/baby-yoda.png.comp +++ /dev/null Binary files differdiff --git a/machines/srv1/cgit.nix b/machines/srv1/cgit.nix deleted file mode 100644 index 5c0749c..0000000 --- a/machines/srv1/cgit.nix +++ /dev/null @@ -1,99 +0,0 @@ -{ config, lib, pkgs, ... }: - -with lib; - -let - cfg = config.services.lighttpd.pn-cgit; - pathPrefix = if stringLength cfg.subdir == 0 then "" else "/" + cfg.subdir; - configFile = pkgs.writeText "cgitrc" - '' - # default paths to static assets - css=${pathPrefix}/cgit.css - logo=${pathPrefix}/cgit.png - favicon=${pathPrefix}/favicon.ico - # user configuration - ${cfg.configText} - ''; -in -{ - - options.services.lighttpd.pn-cgit = { - - enable = mkOption { - default = false; - type = types.bool; - description = '' - If true, enable cgit (fast web interface for git repositories) as a - sub-service in lighttpd. - ''; - }; - - subdir = mkOption { - default = "cgit"; - example = ""; - type = types.str; - description = '' - The subdirectory in which to serve cgit. The web application will be - accessible at http://yourserver/''${subdir} - ''; - }; - - logo = mkOption { - default = "${pkgs.cgit}/cgit/cgit.png"; - example = ""; - type = types.str; - description = '' - Logo for your cgit server - ''; - }; - - configText = mkOption { - default = ""; - example = '' - source-filter=''${pkgs.cgit}/lib/cgit/filters/syntax-highlighting.py - about-filter=''${pkgs.cgit}/lib/cgit/filters/about-formatting.sh - cache-size=1000 - scan-path=/srv/git - ''; - type = types.lines; - description = '' - Verbatim contents of the cgit runtime configuration file. Documentation - (with cgitrc example file) is available in "man cgitrc". Or online: - http://git.zx2c4.com/cgit/tree/cgitrc.5.txt - ''; - }; - - }; - - config = mkIf cfg.enable { - - # make the cgitrc manpage available - environment.systemPackages = [ pkgs.cgit ]; - - # declare module dependencies - services.lighttpd.enableModules = [ "mod_cgi" "mod_alias" "mod_setenv" ]; - - services.lighttpd.extraConfig = '' - $HTTP["url"] =~ "^/${cfg.subdir}" { - cgi.assign = ( - "cgit.cgi" => "${pkgs.cgit}/cgit/cgit.cgi" - ) - alias.url = ( - "${pathPrefix}/cgit.css" => "${pkgs.cgit}/cgit/cgit.css", - "${pathPrefix}/cgit.png" => "${cfg.logo}", - "${pathPrefix}" => "${pkgs.cgit}/cgit/cgit.cgi" - ) - setenv.add-environment = ( - "CGIT_CONFIG" => "${configFile}" - ) - } - ''; - - systemd.services.lighttpd.preStart = '' - mkdir -p /var/cache/cgit - chown lighttpd:lighttpd /var/cache/cgit - ''; - - }; - -} diff --git a/machines/srv1/configuration.nix b/machines/srv1/configuration.nix deleted file mode 100644 index 30a9b87..0000000 --- a/machines/srv1/configuration.nix +++ /dev/null @@ -1,369 +0,0 @@ -{ config, pkgs, ... }: -let - ModSecurity-nginx = pkgs.callPackage ./modsecurity.nix { }; - crs = pkgs.callPackage ./coreruleset.nix { }; - nvim = (import (pkgs.fetchzip { - url = "https://github.com/nixos/nixpkgs/archive/517c29935b6e4dec12571e7d101e2b0da220263d.zip"; - sha256 = "1s85sz62iykvca90d3cgd981670rnkd5c171wda7wpwdj0d52sf3"; - }) { }).neovim.override { - vimAlias = true; - }; - - www = "/srv/www"; - - mirror = pkgs.writeScriptBin "mirror" '' - #!/bin/sh - - name=`echo "$1" | rev | cut -d'/' -f1 | rev` - - cd /srv/git - sudo -u git ${pkgs.git}/bin/git clone --mirror $1 $name - sudo -u git /run/current-system/sw/bin/chmod -R g+w $name - ''; - - newrepo = pkgs.writeScriptBin "newrepo" '' - #!/bin/sh - - [ -z $1 ] && echo "Pass repo name" && exit 1 - - sudo -u git git init --bare /srv/git/$1 - sudo -u git /run/current-system/sw/bin/chmod -R g+w /srv/git/$1 - ''; - -in - { - imports = - [ - #./hardware-configuration.nix - ./cgit.nix - # ./yggdrasil.nix - ]; - - boot.loader.grub.enable = true; - boot.loader.grub.version = 2; - boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only - - networking.hostName = "srv1"; - networking.extraHosts = '' - 192.168.1.136 srv1.niedzwiedzinski.cyou git.niedzwiedzinski.cyou tmp.niedzwiedzinski.cyou zhr.niedzwiedzinski.cyou help.niedzwiedzinski.cyou niedzwiedzinski.cyou pics.niedzwiedzinski.cyou - 192.168.1.144 srv2.niedzwiedzinski.cyou - '' + pkgs.stdenv.lib.readFile ( pkgs.fetchurl { - url = "https://raw.githubusercontent.com/StevenBlack/hosts/d2be343994aacdec74865ff8d159cf6e46359adf/alternates/fakenews-gambling-porn/hosts"; - sha256 = "1la5rd0znc25q8yd1iwbx22zzqi6941vyzmgar32jx568j856s8j"; - } ); - - services.dnsmasq = { - enable = true; - servers = [ "1.1.1.1" "8.8.8.8" ]; - extraConfig = '' - address=/.srv1.niedzwiedzinski.cyou/192.168.1.136 - address=/.srv2.niedzwiedzinski.cyou/192.168.1.144 - ''; - }; - - time.timeZone = "Europe/Warsaw"; - i18n.defaultLocale = "en_US.UTF-8"; # Less confusing locale than polish one - console.keyMap = "pl"; - - nix.gc = { - automatic = true; - options = "--delete-older-than 30d"; - }; - nix.optimise.automatic = true; - nix.trustedUsers = [ "pn" ]; - system.autoUpgrade = { - enable = true; - allowReboot = true; - }; - - nixpkgs.config = { - packageOverrides = super: { - rss-bridge = super.rss-bridge.overrideDerivation (attrs: { - src = pkgs.fetchFromGitHub { - owner = "RSS-Bridge"; - repo = "rss-bridge"; - rev = "ee5d190391afffd037e09c04418a240f7ac67ecd"; - sha256 = "0sxdl6ycqmhd76hc5r8i1yv8vgl18ssmv1p9dzx8ikp5imvfgakc"; - }; - }); - }; - }; - - # The global useDHCP flag is deprecated, therefore explicitly set to false here. - # Per-interface useDHCP will be mandatory in the future, so this generated config - # replicates the default behaviour. - networking.useDHCP = false; - networking.interfaces.enp4s0.useDHCP = true; - - # Configure network proxy if necessary - # networking.proxy.default = "http://user:password@proxy:port/"; - # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; - - # Select internationalisation properties. - # i18n.defaultLocale = "en_US.UTF-8"; - # console = { - # font = "Lat2-Terminus16"; - # keyMap = "us"; - # }; - - environment.systemPackages = with pkgs; [ - curl wget htop git - nvim lm_sensors - mirror - newrepo - ]; - - services.openssh.enable = true; - services.openssh.passwordAuthentication = false; - services.sshguard = { - enable = true; - whitelist = [ - "192.168.0.0/18" - "201:da2c:2873:5ee3:cc87:79ce:5a12:fff9" - ]; - }; - - services.nginx.enable = true; - services.nginx.package = (pkgs.nginx.override { modules = [ ModSecurity-nginx ]; }); - services.nginx.appendHttpConfig = '' - modsecurity on; - # modsecurity_rules ' - # SecRuleEngine On - # Include ${crs}/crs-setup.conf; - # Include ${crs}/rules/*.conf; - # '; - charset utf-8; - source_charset utf-8; - ''; - services.nginx.virtualHosts = { - "srv1.niedzwiedzinski.cyou" = let - modsec_config = builtins.toFile "modsecurity_rules.conf" '' - SecRuleEngine On - SecRule ARGS:testparam "@contains test" "id:1234,deny,status:403" - ''; - in { - enableACME = true; - forceSSL = true; - extraConfig = '' - location ~ /*.md { - types { } default_type "text/markdown; charset=utf-8"; - } - modsecurity_rules_file ${modsec_config}; - ''; - root = "${www}/srv1.niedzwiedzinski.cyou"; - }; - "pics.srv1.niedzwiedzinski.cyou" = { - enableACME = true; - forceSSL = true; - root = "${www}/pics.srv1.niedzwiedzinski.cyou"; - }; - "pics.niedzwiedzinski.cyou" = { - enableACME = true; - forceSSL = true; - root = "${www}/pics.srv1.niedzwiedzinski.cyou"; - }; - "rss.srv1.niedzwiedzinski.cyou" = { - enableACME = true; - forceSSL = true; - extraConfig = '' - modsecurity_rules ' - SecRuleEngine On - SecRule ARGS:u "@rx life[-_]*hack(s)?" "id:1234,deny,status:403" - '; - ''; - }; - "git.niedzwiedzinski.cyou" = { - locations."/".proxyPass = "http://0.0.0.0:8080/cgit/"; - locations."/cgit/".extraConfig = '' - rewrite ^/cgit/(.*) https://git.niedzwiedzinski.cyou/$1; - ''; - enableACME = true; - forceSSL = true; - }; - "bug.niedzwiedzinski.cyou" = { - locations."/".proxyPass = "http://0.0.0.0:8000/"; - enableACME = true; - forceSSL = true; - }; - "tmp.niedzwiedzinski.cyou" = { - enableACME = true; - addSSL = true; - root = "${www}/tmp.niedzwiedzinski.cyou"; - extraConfig = '' - modsecurity_rules ' - SecRuleEngine On - SecRule ARGS:testparam "@contains test" "id:1234,deny,status:403" - Include ${crs}/crs-setup.conf - Include ${crs}/all-rules.conf - '; - ''; - }; - "niedzwiedzinski.cyou" = { - enableACME = true; - forceSSL = true; - root = "${www}/niedzwiedzinski.cyou"; - }; - "y.niedzwiedzinski.cyou" = { - enableACME = true; - forceSSL = true; - root = "${www}/niedzwiedzinski.cyou"; - locations."/omick.net".proxyPass = "http://omick.net/"; - locations."/suckless.org".proxyPass = "http://suckless.org/"; - locations."/based.cooking".proxyPass = "http://based.cooking/"; - - }; - "zhr.niedzwiedzinski.cyou" = { - enableACME = true; - forceSSL = true; - root = "${www}/zhr.niedzwiedzinski.cyou"; - extraConfig = '' - location /rozkazy/ { - autoindex on; - } - ''; - }; - "help.niedzwiedzinski.cyou" = { - enableACME = true; - forceSSL = true; - root = "${www}/niedzwiedzinski.cyou/help"; - }; - }; - security.acme.email = "pniedzwiedzinski19@gmail.com"; - security.acme.acceptTerms = true; - - networking.firewall.allowedTCPPorts = [ 53 80 443 config.services.molly-brown.settings.Port ]; - networking.firewall.allowedUDPPorts = [ 53 ]; - - services.molly-brown = { - hostName = "niedzwiedzinski.cyou"; - enable = true; - certPath = "/var/lib/acme/niedzwiedzinski.cyou/cert.pem"; - keyPath = "/var/lib/acme/niedzwiedzinski.cyou/key.pem"; - docBase = "${www}/niedzwiedzinski.cyou"; - }; - - systemd = { - services.molly-brown.serviceConfig.SupplementaryGroups = [ config.security.acme.certs."niedzwiedzinski.cyou".group ]; - services.noip = { - enable = true; - after = [ "network.target" "syslog.target" ]; - serviceConfig = { - User = "root"; - ExecStart = "${pkgs.noip}/bin/noip2 -c /etc/noip2.conf"; - Restart = "always"; - Type = "forking"; - }; - }; - services.git-fetch = { - script = '' - #!/bin/sh - cd /srv/git - for f in `find . -name HEAD`; do - cd ''${f%HEAD} - ${pkgs.git}/bin/git fetch - cd /srv/git - done - ''; - serviceConfig = { - Type = "oneshot"; - User = "git"; - }; - }; - timers.git-fetch = { - partOf = [ "git-fetch.service" ]; - wantedBy = ["timers.target" ]; - timerConfig = { - OnCalendar = "hourly"; - Unit = "git-fetch.service"; - }; - }; - - }; - - services.lighttpd = { - enable = true; - port = 8080; - pn-cgit = { - logo = "${./baby-yoda.png.comp}"; - enable = true; - configText = let - aboutFilter = pkgs.writeScriptBin "about-format.sh" '' - #!/bin/sh - ${pkgs.coreutils}/bin/cat << EOF - <style> - .md blockquote { - background: #eee; - font-style: italic; - padding: 0 1em; - } - </style> - <div class="md"> - EOF - ${pkgs.coreutils}/bin/cat /dev/stdin | ${pkgs.lowdown}/bin/lowdown - echo '</div>' - ''; - in '' - # source-filter=${pkgs.cgit}/lib/cgit/filters/syntax-highlighting.sh - about-filter=${aboutFilter}/bin/about-format.sh - #about-filter=${pkgs.discount}/bin/markdown - cache-size=1000 - root-title=git.niedzwiedzinski.cyou - root-desc=Personal git server, because I can - readme=:README.md - snapshots=tar.gz zip - clone-prefix=https://git.niedzwiedzinski.cyou - section-from-path=1 - scan-path=/srv/git/ - ''; - }; - }; - - services.trac = { - enable = true; - }; - - services.rss-bridge = { - enable = true; - virtualHost = "rss.srv1.niedzwiedzinski.cyou"; - whitelist = [ - "Instagram" - "Soundcloud" - "Facebook" - ]; - }; - - users = { - groups = { - git = {}; - }; - users = { - pn = { - isNormalUser = true; - extraGroups = [ "wheel" "git" ]; # Enable ‘sudo’ for the user. - openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIqlCe4ovKa/Gwl5xmgu9nvVPmFXMgwdeLRYW7Gg7RWx pniedzwiedzinski19@gmail.com" - ]; - }; - - git = { - isSystemUser = true; - group = "git"; - description = "git user"; - home = "/srv/git"; - shell = "${pkgs.git}/bin/git-shell"; - openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIqlCe4ovKa/Gwl5xmgu9nvVPmFXMgwdeLRYW7Gg7RWx pniedzwiedzinski19@gmail.com" - ]; - }; - }; - }; - - # This value determines the NixOS release from which the default - # settings for stateful data, like file locations and database versions - # on your system were taken. It‘s perfectly fine and recommended to leave - # this value at the release version of the first install of this system. - # Before changing this value read the documentation for this option - # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). - system.stateVersion = "20.09"; # Did you read the comment? - -} diff --git a/machines/srv1/coreruleset.nix b/machines/srv1/coreruleset.nix deleted file mode 100644 index c52c898..0000000 --- a/machines/srv1/coreruleset.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ stdenv, fetchFromGitHub }: -stdenv.mkDerivation { - pname = "coreruleset"; - version = "3.3.0"; - - src = fetchFromGitHub { - owner = "coreruleset"; - repo = "coreruleset"; - rev = "v3.3.0"; - sha256 = "sha256:10z1051iwna5x8b8cl29frs5nx3s6ip7hc4mjkgh7vkck8ly4pjm"; - }; - - installPhase = '' - mkdir $out - cp crs-setup.conf.example $out/crs-setup.conf - cp -r rules $out - for f in rules/*.conf; do - echo "Include \"$out/$f\"" >> $out/all-rules.conf - done - ''; -} diff --git a/machines/srv1/default.nix b/machines/srv1/default.nix deleted file mode 100644 index cd4010f..0000000 --- a/machines/srv1/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - imports = [ - ./hardware-configuration.nix - ./configuration.nix - ]; -} diff --git a/machines/srv1/hardware-configuration.nix b/machines/srv1/hardware-configuration.nix deleted file mode 100644 index 3631a5d..0000000 --- a/machines/srv1/hardware-configuration.nix +++ /dev/null @@ -1,27 +0,0 @@ -# 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, modulesPath, ... }: - -{ - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; - - boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ata_piix" "usb_storage" "usbhid" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "dme1737" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = - { device = "/dev/disk/by-uuid/7daf3fc2-5800-47f8-a4fd-12a7229f727a"; - fsType = "ext4"; - }; - - swapDevices = [ - { - device = "/swapfile"; size = 2048; - } - ]; - -} diff --git a/machines/srv1/modsecurity.nix b/machines/srv1/modsecurity.nix deleted file mode 100644 index 85dd4d1..0000000 --- a/machines/srv1/modsecurity.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ stdenv, fetchFromGitHub, libmodsecurity }: -let - pname = "ModSecurity-nginx"; - version = "1.0.1"; -in -stdenv.mkDerivation { - inherit pname version; - - src = fetchFromGitHub { - owner = "SpiderLabs"; - repo = "ModSecurity-nginx"; - rev = "v${version}"; - sha256 = "sha256:0cbb3g3g4v6q5zc6an212ia5kjjad62bidnkm8b70i4qv1615pzf"; - }; - - inputs = [ libmodsecurity ]; - -} - diff --git a/machines/srv1/yggdrasil.nix b/machines/srv1/yggdrasil.nix deleted file mode 100644 index 0d0291f..0000000 --- a/machines/srv1/yggdrasil.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ - services.yggdrasil = { - enable = true; - persistentKeys = true; - config = { - Peers = [ - "tcp://51.75.44.73:50001" - "tcp://176.223.130.120:22632" - ]; - }; - }; -} diff --git a/machines/x220/configuration.nix b/machines/x220/configuration.nix deleted file mode 100644 index a4c2c07..0000000 --- a/machines/x220/configuration.nix +++ /dev/null @@ -1,168 +0,0 @@ -{ pkgs, lib, ... }: - -let - signal = pkgs.callPackage ../../pkgs/signal.nix { }; - busybox_utils = pkgs.stdenv.mkDerivation { - name = "strings"; - unpackPhase = "true"; - installPhase = '' - mkdir -p $out/bin - cp ${pkgs.busybox}/bin/strings $out/bin/strings - cp ${pkgs.busybox}/bin/telnet $out/bin/telnet - ''; - }; -in - { - - virtualisation.virtualbox.host.enable = true; - users.extraGroups.vboxusers.members = [ "pn" ]; - - services.yggdrasil = { - enable = false; - persistentKeys = true; - config = { - Peers = [ - "tcp://51.75.44.73:50001" - "tcp://176.223.130.120:22632" - ]; - }; - }; - - imports = [ - ../base.nix - ../pl.nix - ../../modules/larbs.nix - ../../modules/internet.nix - ../../modules/dockd.nix - ../../modules/trackpad.nix - ../../modules/agetty.nix - ]; - - boot.plymouth.enable = true; - # boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; - - networking = { - hostName = "x220"; - firewall.allowedTCPPorts = [ - 6969 # qrcp - ]; - - networkmanager = { - enable = true; - wifi = { - backend = "iwd"; - powersave = true; - }; - }; - }; - - nixpkgs.config.allowUnfree = true; - - nix.extraOptions = '' - show-trace = true - ''; - - environment.variables = { - ELECTRUMDIR="$\{XDG_DATA_HOME:-$HOME/.local/share}/electrum"; - }; - - environment.binsh = "${pkgs.dash}/bin/dash"; - - environment.systemPackages = with pkgs; [ - guvcview - signal - usbutils - discord - # Basic tools - file ssh-ident busybox_utils - - # XORG perfs - dunst - - # UI apps - zathura sxiv pulsemixer - lynx lf arandr wpa_supplicant_gui - system-config-printer libreoffice - abook - - # Audio/Video - mpd mpc_cli mpv ffmpeg youtube-dl - - # CLIs - gitAndTools.gh docker-compose xsel - bc libnotify - pamixer maim killall - ueberzug chafa - - # Thinkpad utils - acpi tpacpi-bat - ]; - - fonts.fonts = with pkgs; [ - liberation_ttf - roboto-slab - ]; - - programs.gnupg = { - agent = { - enable = true; - enableSSHSupport = true; - pinentryFlavor = "gnome3"; - }; - }; - - programs.browserpass.enable = true; - programs.dockd.enable = true; - - - virtualisation.docker.enable = true; - systemd.services.docker.wantedBy = lib.mkForce []; - - services.udev.packages = [ pkgs.libu2f-host ]; - - services.pcscd.enable = true; - - services.agetty = { - defaultUser = "pn"; - }; - - services.printing = { - enable = true; - drivers = [ pkgs.epson_201207w ]; - }; - hardware.sane.enable = true; - hardware.sane.extraBackends = [ pkgs.epkowa ]; - - hardware.bluetooth.powerOnBoot = false; - - services.cron.enable = true; - # services.fcron.enable = true; - - services.acpid.enable = true; - - # Battery - services.tlp.enable = true; - - services.xserver = { - videoDrivers = [ "intel" ]; - deviceSection = '' - Option "DIR" "2" - Option "TearFree" "true" - ''; - }; - - services.xserver.wacom = { - enable = true; - }; - - users.users.pn.extraGroups = [ "docker" "scanner" "lp" ]; - - security.pam.u2f = { - enable = true; - cue = true; - interactive = true; - #control = "required"; - #control = "requisite"; - }; - -} diff --git a/machines/x220/default.nix b/machines/x220/default.nix deleted file mode 100644 index cd4010f..0000000 --- a/machines/x220/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - imports = [ - ./hardware-configuration.nix - ./configuration.nix - ]; -} diff --git a/machines/x220/hardware-configuration.nix b/machines/x220/hardware-configuration.nix deleted file mode 100755 index 4f7b908..0000000 --- a/machines/x220/hardware-configuration.nix +++ /dev/null @@ -1,63 +0,0 @@ -# ThinkPad X220 - -# 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 = - [ <nixpkgs/nixos/modules/installer/scan/not-detected.nix> - ]; - - boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" "tp_smapi" "v4l2loopback" "acpi_call" ]; - boot.extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback tp_smapi acpi_call ]; - - - boot.loader.grub.enable = true; - boot.loader.grub.version = 2; - boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only - - boot.plymouth.enable = true; - - - fileSystems = { - "/" = - { device = "/dev/disk/by-uuid/e00c989b-b3fd-469e-b894-ea609fb4d7fa"; - fsType = "ext4"; - }; - - "/boot" = - { device = "/dev/disk/by-uuid/2f0948cd-a0de-41c0-a341-e9fe01460fd3"; - fsType = "ext3"; - }; - "/home" = { - device = "/dev/disk/by-label/home"; - fsType = "ext4"; - }; - "/nix" = { - device = "/dev/disk/by-label/nix"; - fsType = "ext4"; - }; - "/var/lib/docker" = { - device = "/dev/disk/by-label/docker"; - fsType = "ext4"; - }; - "/mnt/qnap" = { - device = "//192.168.1.119/Patryk"; - fsType = "cifs"; - options = let - # this line prevents hanging on network split - automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,vers=1.0"; - - in ["${automount_opts},credentials=/etc/nixos/smb-secrets"]; - }; - }; - swapDevices = [ { - device = "/dev/sda2"; } ]; - - nix.maxJobs = lib.mkDefault 4; - powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; - } |