From cf252e408a5cba41cd383f7e47242220a62326ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Wed, 6 Mar 2024 09:05:22 +0200 Subject: [PATCH] add vm-aarch64 --- flake.nix | 13 +- modules/profiles/desktop/default.nix | 237 ++++++++++++++------------- shared/home/default.nix | 4 +- 3 files changed, 137 insertions(+), 117 deletions(-) diff --git a/flake.nix b/flake.nix index 29a94e2..bba9d84 100644 --- a/flake.nix +++ b/flake.nix @@ -114,7 +114,7 @@ in { nixosConfigurations = { - vm = nixpkgs.lib.nixosSystem { + vm-x86_64 = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ {nixpkgs.overlays = overlays;} @@ -125,6 +125,17 @@ specialArgs = {inherit myData;} // inputs; }; + vm-aarch64 = nixpkgs.lib.nixosSystem { + system = "aarch64-linux"; + modules = [ + {nixpkgs.overlays = overlays;} + home-manager.nixosModules.home-manager + ./hosts/vm/configuration.nix + ./modules + ]; + specialArgs = {inherit myData;} // inputs; + }; + op5p = nixpkgs.lib.nixosSystem { system = "aarch64-linux"; modules = [ diff --git a/modules/profiles/desktop/default.nix b/modules/profiles/desktop/default.nix index cbb145b..a17cffa 100644 --- a/modules/profiles/desktop/default.nix +++ b/modules/profiles/desktop/default.nix @@ -4,6 +4,10 @@ ... }: let username = config.mj.username; + firefox = + if (pkgs.stdenv.hostPlatform.system == "x86_64-linux") + then pkgs.firefox-bin + else pkgs.firefox; in { config = { hardware.bluetooth = { @@ -14,7 +18,7 @@ in { programs = { firefox = { enable = true; - package = pkgs.firefox-bin; + package = firefox; }; wireshark.enable = true; }; @@ -109,125 +113,130 @@ in { }; }; - environment.systemPackages = with pkgs; [ - # packages defined here - nicer - tmuxbash + environment.systemPackages = with pkgs; + lib.mkMerge [ + [ + # packages defined here + nicer + tmuxbash - iw - vlc - i7z - acpi - gimp - qgis - josm - qemu - xclip - pdftk - putty - x11vnc - yt-dlp - ffmpeg - tinycc - scrcpy - arandr - pandoc - evince - gparted - scribus - gnumake - libwebp - calibre - librsvg - neomutt - picocom - inkscape - chromium - hunspell - tigervnc - rtorrent - bsdgames - xss-lock - qpwgraph # for pipewire - audacity - powertop - gpicview - imapsync - trayscale - # TODO why doesn't 'programs.wireshark.enable = true' install the binary? - wireshark - man-pages - rox-filer - distrobox - miniupnpc - evolution - shellcheck - borgbackup - efibootmgr - winetricks - virtualenv - python3Full - libva-utils # intel video tests - pavucontrol - openshot-qt - poppler_utils - rkdeveloptool - squashfsTools - google-chrome - aspellDicts.en - aspellDicts.lt - libreoffice-qt - graphicsmagick - joplin-desktop - signal-desktop - element-desktop - netsurf-browser - man-pages-posix - geoipWithDatabase - wineWowPackages.full - hunspellDicts.en_US - python3Packages.ipython - samsung-unified-linux-driver + iw + vlc + acpi + gimp + qgis + josm + qemu + xclip + pdftk + putty + x11vnc + yt-dlp + ffmpeg + tinycc + scrcpy + arandr + pandoc + evince + gparted + scribus + gnumake + libwebp + calibre + librsvg + neomutt + picocom + inkscape + chromium + hunspell + tigervnc + rtorrent + bsdgames + xss-lock + qpwgraph # for pipewire + audacity + powertop + gpicview + imapsync + trayscale + # TODO why doesn't 'programs.wireshark.enable = true' install the binary? + wireshark + man-pages + rox-filer + distrobox + miniupnpc + evolution + shellcheck + borgbackup + efibootmgr + virtualenv + python3Full + libva-utils # intel video tests + pavucontrol + openshot-qt + poppler_utils + rkdeveloptool + squashfsTools + aspellDicts.en + aspellDicts.lt + libreoffice-qt + graphicsmagick + signal-desktop + element-desktop + netsurf-browser + man-pages-posix + geoipWithDatabase + hunspellDicts.en_US + python3Packages.ipython + samsung-unified-linux-driver - lld - llvm - llvm-manpages - clang-manpages - gcc_latest + lld + llvm + llvm-manpages + clang-manpages + gcc_latest - gnome.cheese - gnome.nautilus - gnome.gnome-calculator - gnome.gnome-calendar + gnome.cheese + gnome.nautilus + gnome.gnome-calculator + gnome.gnome-calendar - xorg.xev - xorg.xeyes - xorg.lndir + xorg.xev + xorg.xeyes + xorg.lndir - intel-gpu-tools - (nvtop.override { - amd = true; - intel = true; - msm = false; - nvidia = false; - }) + (texlive.combine { + inherit + (texlive) + scheme-medium + dvisvgm + dvipng + wrapfig + amsmath + ulem + hyperref + capt-of + lithuanian + hyphen-lithuanian + ; + }) + ] + (lib.mkIf (pkgs.stdenv.hostPlatform.system == "x86_64-linux") [ + i7z + (nvtop.override { + amd = true; + intel = true; + msm = false; + nvidia = false; + }) + google-chrome + joplin-desktop + intel-gpu-tools - (texlive.combine { - inherit - (texlive) - scheme-medium - dvisvgm - dvipng - wrapfig - amsmath - ulem - hyperref - capt-of - lithuanian - hyphen-lithuanian - ; - }) - ]; + winetricks + wineWowPackages.full + ]) + ]; # https://discourse.nixos.org/t/nixos-rebuild-switch-upgrade-networkmanager-wait-online-service-failure/30746 systemd.services.NetworkManager-wait-online.enable = false; diff --git a/shared/home/default.nix b/shared/home/default.nix index 52f6143..b2a96ee 100644 --- a/shared/home/default.nix +++ b/shared/home/default.nix @@ -94,8 +94,8 @@ in { # firefox doesn't need the wrapper on the personal laptop package = if hmOnly - then (glintel pkgs.firefox-bin "firefox") - else pkgs.firefox-bin; + then (glintel firefox "firefox") + else firefox; policies.DisableAppUpdate = true; profiles = { xdefault = {