nixops: nixos 22.05 (WIP)

This commit is contained in:
Sebastien Bourdeauducq 2022-05-26 13:18:48 +08:00
parent 5f1ff14380
commit 75987781f5
4 changed files with 15 additions and 28 deletions

View File

@ -3,12 +3,6 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
let let
m-labs = import (fetchTarball https://nixbld.m-labs.hk/channel/custom/artiq/full/artiq-full/nixexprs.tar.xz) { inherit pkgs; }; 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 in
{ {
deployment.targetHost = host; deployment.targetHost = host;
@ -46,10 +40,12 @@ in
gimp imagemagick gimp imagemagick
(python3.withPackages(ps: with ps; [ numpy scipy matplotlib qtconsole regex ])) (python3.withPackages(ps: with ps; [ numpy scipy matplotlib qtconsole regex ]))
mosh psmisc libreoffice-fresh mosh psmisc libreoffice-fresh
gtkwave telnet unzip zip gnupg gtkwave unzip zip gnupg
gnome3.gnome-tweaks gnome3.gnome-tweaks
jq sublime3 rink qemu_kvm 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 emacs bat ripgrep
xpra xpra
rust-analyzer rust-analyzer
@ -58,7 +54,7 @@ in
vscode-extensions.matklad.rust-analyzer vscode-extensions.matklad.rust-analyzer
]; ];
}) })
pkgs-unstable.joplin-desktop joplin-desktop
virt-manager spice-gtk virt-manager spice-gtk
any-nix-shell any-nix-shell
]; ];
@ -115,7 +111,6 @@ in
sound.enable = true; sound.enable = true;
hardware.pulseaudio = { hardware.pulseaudio = {
enable = true; enable = true;
extraModules = [ pkgs.pulseaudio-modules-bt ];
package = pkgs.pulseaudioFull; package = pkgs.pulseaudioFull;
}; };
@ -157,15 +152,14 @@ in
users.extraGroups.plugdev = { }; users.extraGroups.plugdev = { };
users.extraUsers = import ./common-users.nix { inherit pkgs; }; users.extraUsers = import ./common-users.nix { inherit pkgs; };
security.sudo.wheelNeedsPassword = false; security.sudo.wheelNeedsPassword = false;
services.udev.packages = [ m-labs.openocd ]; # TODO services.udev.packages = [ m-labs.openocd ];
services.udev.extraRules = (import ./extra-udev.nix); services.udev.extraRules = (import ./extra-udev.nix);
nix.binaryCachePublicKeys = ["nixbld.m-labs.hk-1:5aSRVA5b320xbNvu30tqxVPXpld73bhtOeH6uAjRyHc="]; nix.binaryCachePublicKeys = ["nixbld.m-labs.hk-1:5aSRVA5b320xbNvu30tqxVPXpld73bhtOeH6uAjRyHc="];
nix.binaryCaches = ["https://nixbld.m-labs.hk" "https://cache.nixos.org"]; nix.binaryCaches = ["https://nixbld.m-labs.hk" "https://cache.nixos.org"];
nix.sandboxPaths = ["/opt"]; nix.sandboxPaths = ["/opt"];
nix.package = pkgs.nix_2_4;
nix.extraOptions = '' nix.extraOptions = ''
experimental-features = nix-command flakes experimental-features = nix-command flakes ca-derivations impure-derivations
''; '';
} }

View File

@ -39,7 +39,7 @@ in
evince evince
(python3.withPackages(ps: with ps; [ numpy scipy ])) (python3.withPackages(ps: with ps; [ numpy scipy ]))
psmisc psmisc
telnet unzip zip gnupg unzip zip gnupg
sublime3 rink sublime3 rink
tmux screen tigervnc tmux screen tigervnc
any-nix-shell any-nix-shell
@ -87,7 +87,6 @@ in
sound.enable = true; sound.enable = true;
hardware.pulseaudio = { hardware.pulseaudio = {
enable = true; enable = true;
extraModules = [ pkgs.pulseaudio-modules-bt ];
package = pkgs.pulseaudioFull; package = pkgs.pulseaudioFull;
}; };
@ -127,15 +126,14 @@ in
users.extraUsers = import ./common-users.nix { inherit pkgs; }; users.extraUsers = import ./common-users.nix { inherit pkgs; };
security.sudo.wheelNeedsPassword = false; security.sudo.wheelNeedsPassword = false;
services.udev.packages = [ m-labs.openocd ]; # TODO services.udev.packages = [ m-labs.openocd ];
services.udev.extraRules = (import ./extra-udev.nix); services.udev.extraRules = (import ./extra-udev.nix);
nix.binaryCachePublicKeys = ["nixbld.m-labs.hk-1:5aSRVA5b320xbNvu30tqxVPXpld73bhtOeH6uAjRyHc="]; nix.binaryCachePublicKeys = ["nixbld.m-labs.hk-1:5aSRVA5b320xbNvu30tqxVPXpld73bhtOeH6uAjRyHc="];
nix.binaryCaches = ["https://nixbld.m-labs.hk" "https://cache.nixos.org"]; nix.binaryCaches = ["https://nixbld.m-labs.hk" "https://cache.nixos.org"];
nix.sandboxPaths = ["/opt"]; nix.sandboxPaths = ["/opt"];
nix.package = pkgs.nix_2_4;
nix.extraOptions = '' nix.extraOptions = ''
experimental-features = nix-command flakes experimental-features = nix-command flakes ca-derivations impure-derivations
''; '';
} }

View File

@ -10,10 +10,6 @@
boot.loader.grub.enable = false; boot.loader.grub.enable = false;
boot.loader.generic-extlinux-compatible.enable = true; 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.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.kernelPackages = if rpi4 then pkgs.linuxPackages_rpi4 else pkgs.linuxPackages_rpi3;
boot.initrd.includeDefaultModules = false; boot.initrd.includeDefaultModules = false;
@ -119,7 +115,7 @@
documentation.enable = false; documentation.enable = false;
environment.systemPackages = with pkgs; [ 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 imagemagick
]; ];
programs.fish.enable = true; programs.fish.enable = true;
@ -146,8 +142,7 @@
nix.binaryCaches = ["https://cache.nixos.org" "https://nixbld.m-labs.hk"]; nix.binaryCaches = ["https://cache.nixos.org" "https://nixbld.m-labs.hk"];
nix.trustedUsers = ["root" "nix"]; nix.trustedUsers = ["root" "nix"];
nix.package = pkgs.nix_2_4;
nix.extraOptions = '' nix.extraOptions = ''
experimental-features = nix-command flakes experimental-features = nix-command flakes ca-derivations impure-derivations
''; '';
} }

View File

@ -72,7 +72,8 @@ in
documentation.enable = false; documentation.enable = false;
environment.systemPackages = with pkgs; [ 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.fish.enable = true;
programs.wireshark.enable = true; programs.wireshark.enable = true;
@ -81,8 +82,7 @@ in
nix.binaryCaches = ["https://cache.nixos.org" "https://nixbld.m-labs.hk"]; nix.binaryCaches = ["https://cache.nixos.org" "https://nixbld.m-labs.hk"];
nix.trustedUsers = ["root" "nix" "sb"]; nix.trustedUsers = ["root" "nix" "sb"];
nix.package = pkgs.nix_2_4;
nix.extraOptions = '' nix.extraOptions = ''
experimental-features = nix-command flakes experimental-features = nix-command flakes ca-derivations impure-derivations
''; '';
} }