From 943e97045470cccc384d64e5a5d8e02d58fdf923 Mon Sep 17 00:00:00 2001 From: naturallaw77 Date: Fri, 26 Jan 2024 21:15:31 -0800 Subject: [PATCH] Nixpkgs Update; Added 16GB SWAP; Added systmed bitcoin fix --- flake.lock | 6 +++--- for_new_sovran_pros/psp.sh | 28 ++++++++++++++++------------ modules/bitcoinecosystem.nix | 2 ++ 3 files changed, 21 insertions(+), 15 deletions(-) diff --git a/flake.lock b/flake.lock index 18e55bd..8fc69b5 100755 --- a/flake.lock +++ b/flake.lock @@ -157,11 +157,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1705496572, - "narHash": "sha256-rPIe9G5EBLXdBdn9ilGc0nq082lzQd0xGGe092R/5QE=", + "lastModified": 1706191920, + "narHash": "sha256-eLihrZAPZX0R6RyM5fYAWeKVNuQPYjAkCUBr+JNvtdE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "842d9d80cfd4560648c785f8a4e6f3b096790e19", + "rev": "ae5c332cbb5827f6b1f02572496b141021de335f", "type": "github" }, "original": { diff --git a/for_new_sovran_pros/psp.sh b/for_new_sovran_pros/psp.sh index 67322c0..6988c78 100755 --- a/for_new_sovran_pros/psp.sh +++ b/for_new_sovran_pros/psp.sh @@ -8,20 +8,27 @@ ENDCOLOR="\e[0m" lsblk -echo -e "${GREEN}What block for Root drive (usually sda)?${ENDCOLOR}";read commitroot +echo -e "${GREEN}What block for file-tree-root of drive (usually nvme0n1)?${ENDCOLOR}";read commitroot parted /dev/"$commitroot" -- mklabel gpt -parted /dev/"$commitroot" -- mkpart primary 512MB -7MB +parted /dev/"$commitroot" -- mkpart primary 512MB -16GB +parted /dev/"$commitroot" -- mkpart swap linux-swap -16GB 100% parted /dev/"$commitroot" -- mkpart ESP fat32 1MB 512MB -parted /dev/"$commitroot" -- set 2 esp on +parted /dev/"$commitroot" -- set 3 esp on lsblk -echo -e "${GREEN}What partition for Root drive (usually sda1)?${ENDCOLOR}";read commitrootpartition +echo -e "${GREEN}What partition for Boot-Partition (usually nvme0n1p1)?${ENDCOLOR}";read commitbootpartition -echo -e "${GREEN}What partition for Boot drive (usually sda2)?${ENDCOLOR}";read commitbootpartition +echo -e "${GREEN}What partition for Main-Partition (usually nvme0n1p2)?${ENDCOLOR}";read commitmainpartition -mkfs.ext4 -L nixos /dev/"$commitrootpartition" +echo -e "${GREEN}What partition for Swap-Partition (usually nvme0n1p3)?${ENDCOLOR}";read commitswappartition + + + +mkfs.ext4 -L nixos /dev/"$commitmainpartition" + +mkswap -L swap /dev/"$commitswappartition" mkfs.fat -F 32 -n boot /dev/"$commitbootpartition" @@ -31,6 +38,8 @@ mkdir -p /mnt/boot/efi mount /dev/disk/by-label/boot /mnt/boot/efi + + nixos-generate-config --root /mnt rm /mnt/etc/nixos/configuration.nix @@ -48,12 +57,7 @@ cat <> /mnt/etc/nixos/configuration.nix boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.efiSysMountPoint = "/boot/efi"; - nix = { - package = pkgs.nixUnstable; - extraOptions = '' - experimental-features = nix-command flakes - ''; - }; + nix.settings.experimental-features = [ "nix-command" "flakes" ]; users.users = { free = { diff --git a/modules/bitcoinecosystem.nix b/modules/bitcoinecosystem.nix index 99e6ec6..f01fca0 100755 --- a/modules/bitcoinecosystem.nix +++ b/modules/bitcoinecosystem.nix @@ -15,6 +15,8 @@ ''; }; + systemd.services.bitcoind.wants = [ "network-online.target" ]; + nix-bitcoin.onionServices.bitcoind.enable = true; nix-bitcoin.onionServices.electrs.enable = true; nix-bitcoin.onionServices.rtl.enable = true;