From 75987781f5439e01d27463b0ae515583d902c126 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 26 May 2022 13:18:48 +0800 Subject: [PATCH] nixops: nixos 22.05 (WIP) --- nixops/desktop.nix | 20 +++++++------------- nixops/light.nix | 8 +++----- nixops/rpi-server.nix | 9 ++------- nixops/rpi.nix | 6 +++--- 4 files changed, 15 insertions(+), 28 deletions(-) diff --git a/nixops/desktop.nix b/nixops/desktop.nix index f4455fd5..1c417f3c 100644 --- a/nixops/desktop.nix +++ b/nixops/desktop.nix @@ -3,12 +3,6 @@ { config, pkgs, ... }: let m-labs = import (fetchTarball https://nixbld.m-labs.hk/channel/custom/artiq/full/artiq-full/nixexprs.tar.xz) { inherit pkgs; }; - pkgs-unstable = import (pkgs.fetchFromGitHub { - owner = "nixos"; - repo = "nixpkgs"; - rev = "2ec0c698eaf3e7a4d13988538f08d65b3d006f40"; - sha256 = "137py5fhmjs3p1dgqmd7cxsxzzs67nrqqijxmflb0ck1fnfzrij7"; - }) {}; in { deployment.targetHost = host; @@ -46,10 +40,12 @@ in gimp imagemagick (python3.withPackages(ps: with ps; [ numpy scipy matplotlib qtconsole regex ])) mosh psmisc libreoffice-fresh - gtkwave telnet unzip zip gnupg + gtkwave unzip zip gnupg gnome3.gnome-tweaks jq sublime3 rink qemu_kvm - tmux xc3sprog m-labs.openocd screen gdb minicom picocom tigervnc + tmux screen gdb minicom picocom tigervnc + # TODO m-labs.openocd + # TODO xc3sprog emacs bat ripgrep xpra rust-analyzer @@ -58,7 +54,7 @@ in vscode-extensions.matklad.rust-analyzer ]; }) - pkgs-unstable.joplin-desktop + joplin-desktop virt-manager spice-gtk any-nix-shell ]; @@ -115,7 +111,6 @@ in sound.enable = true; hardware.pulseaudio = { enable = true; - extraModules = [ pkgs.pulseaudio-modules-bt ]; package = pkgs.pulseaudioFull; }; @@ -157,15 +152,14 @@ in users.extraGroups.plugdev = { }; users.extraUsers = import ./common-users.nix { inherit pkgs; }; security.sudo.wheelNeedsPassword = false; - services.udev.packages = [ m-labs.openocd ]; + # TODO services.udev.packages = [ m-labs.openocd ]; services.udev.extraRules = (import ./extra-udev.nix); nix.binaryCachePublicKeys = ["nixbld.m-labs.hk-1:5aSRVA5b320xbNvu30tqxVPXpld73bhtOeH6uAjRyHc="]; nix.binaryCaches = ["https://nixbld.m-labs.hk" "https://cache.nixos.org"]; nix.sandboxPaths = ["/opt"]; - nix.package = pkgs.nix_2_4; nix.extraOptions = '' - experimental-features = nix-command flakes + experimental-features = nix-command flakes ca-derivations impure-derivations ''; } diff --git a/nixops/light.nix b/nixops/light.nix index d55afd0c..88611102 100644 --- a/nixops/light.nix +++ b/nixops/light.nix @@ -39,7 +39,7 @@ in evince (python3.withPackages(ps: with ps; [ numpy scipy ])) psmisc - telnet unzip zip gnupg + unzip zip gnupg sublime3 rink tmux screen tigervnc any-nix-shell @@ -87,7 +87,6 @@ in sound.enable = true; hardware.pulseaudio = { enable = true; - extraModules = [ pkgs.pulseaudio-modules-bt ]; package = pkgs.pulseaudioFull; }; @@ -127,15 +126,14 @@ in users.extraUsers = import ./common-users.nix { inherit pkgs; }; security.sudo.wheelNeedsPassword = false; - services.udev.packages = [ m-labs.openocd ]; + # TODO services.udev.packages = [ m-labs.openocd ]; services.udev.extraRules = (import ./extra-udev.nix); nix.binaryCachePublicKeys = ["nixbld.m-labs.hk-1:5aSRVA5b320xbNvu30tqxVPXpld73bhtOeH6uAjRyHc="]; nix.binaryCaches = ["https://nixbld.m-labs.hk" "https://cache.nixos.org"]; nix.sandboxPaths = ["/opt"]; - nix.package = pkgs.nix_2_4; nix.extraOptions = '' - experimental-features = nix-command flakes + experimental-features = nix-command flakes ca-derivations impure-derivations ''; } diff --git a/nixops/rpi-server.nix b/nixops/rpi-server.nix index d02c663d..5c377585 100644 --- a/nixops/rpi-server.nix +++ b/nixops/rpi-server.nix @@ -10,10 +10,6 @@ boot.loader.grub.enable = false; boot.loader.generic-extlinux-compatible.enable = true; - boot.loader.raspberryPi = pkgs.lib.mkIf rpi4 { - enable = true; - version = 4; - }; boot.kernelParams = ["cma=64M"]; # work around https://github.com/raspberrypi/linux/issues/3208 boot.kernelPackages = if rpi4 then pkgs.linuxPackages_rpi4 else pkgs.linuxPackages_rpi3; boot.initrd.includeDefaultModules = false; @@ -119,7 +115,7 @@ documentation.enable = false; environment.systemPackages = with pkgs; [ - psmisc wget vim git sshfs usbutils lm_sensors file telnet mosh tmux + psmisc wget vim git sshfs usbutils lm_sensors file mosh tmux imagemagick ]; programs.fish.enable = true; @@ -146,8 +142,7 @@ nix.binaryCaches = ["https://cache.nixos.org" "https://nixbld.m-labs.hk"]; nix.trustedUsers = ["root" "nix"]; - nix.package = pkgs.nix_2_4; nix.extraOptions = '' - experimental-features = nix-command flakes + experimental-features = nix-command flakes ca-derivations impure-derivations ''; } diff --git a/nixops/rpi.nix b/nixops/rpi.nix index 5aca52b8..eef2a9fb 100644 --- a/nixops/rpi.nix +++ b/nixops/rpi.nix @@ -72,7 +72,8 @@ in documentation.enable = false; environment.systemPackages = with pkgs; [ - psmisc wget vim git sshfs usbutils uhubctl lm_sensors file telnet mosh tmux xc3sprog m-labs.openocd screen gdb minicom picocom + psmisc wget vim git sshfs usbutils uhubctl lm_sensors file mosh tmux m-labs.openocd screen gdb minicom picocom + # TODO xc3sprog ]; programs.fish.enable = true; programs.wireshark.enable = true; @@ -81,8 +82,7 @@ in nix.binaryCaches = ["https://cache.nixos.org" "https://nixbld.m-labs.hk"]; nix.trustedUsers = ["root" "nix" "sb"]; - nix.package = pkgs.nix_2_4; nix.extraOptions = '' - experimental-features = nix-command flakes + experimental-features = nix-command flakes ca-derivations impure-derivations ''; }