From a58d7cec519ef4a5d8148ee8ab7d97053a1ccdb0 Mon Sep 17 00:00:00 2001 From: Mel Date: Wed, 24 Sep 2025 18:50:23 +0200 Subject: Define roles for the two 'mineral' types Signed-off-by: Mel --- modules/arm.nix | 4 +++ modules/common.nix | 72 ++++++++++++++++++++++++++++++++++++++++++++++++ modules/packages.nix | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 154 insertions(+) create mode 100644 modules/common.nix create mode 100644 modules/packages.nix (limited to 'modules') diff --git a/modules/arm.nix b/modules/arm.nix index df8e02e..63a448f 100644 --- a/modules/arm.nix +++ b/modules/arm.nix @@ -9,6 +9,10 @@ assert lib.assertMsg ( me.system == "aarch64-linux" ) "arm module included on non-arm (${me.system}) architecture."; { + # disable things that just don't work on arm. + + programs.steam.enable = lib.mkForce false; + # non-machine specific arm package selection. # used to include replacements for necessary programs with no # default support for aarch64. (i.e. discord) diff --git a/modules/common.nix b/modules/common.nix new file mode 100644 index 0000000..e36d4e9 --- /dev/null +++ b/modules/common.nix @@ -0,0 +1,72 @@ +{ + me, + pkgs, + ... +}: + +{ + imports = [ + ./packages.nix + ./nix.nix + ./user.nix + ./locale.nix + ./vim.nix + ./tmux.nix + ./nix-ld.nix + ]; + + services.envfs.enable = true; + + virtualisation = { + libvirtd.enable = true; + docker.enable = true; + }; + + # fish enables this by default, + # it makes every nixos rebuild very slow. + documentation.man.generateCaches = false; + documentation = { + info.enable = true; + doc.enable = true; + dev.enable = true; + nixos = { + enable = true; + includeAllModules = true; + }; + }; + + networking.hostName = me.name; + # use corsac dns server + networking.nameservers = + let + corsacTailnet = "100.64.100.100"; + in + [ corsacTailnet ]; + + services.resolved.enable = true; + + services = { + acpid.enable = true; + sysprof.enable = true; + tailscale = { + enable = true; + useRoutingFeatures = "both"; + extraUpFlags = [ "--ssh" ]; + }; + + # sometimes needed for gnupg + pcscd.enable = true; + }; + + programs = { + fish.enable = true; + git.enable = true; + + gnupg.agent = { + enable = true; + enableSSHSupport = true; + }; + }; + + environment.etc.openvpn.source = "${pkgs.update-resolv-conf}/libexec/openvpn"; +} diff --git a/modules/packages.nix b/modules/packages.nix new file mode 100644 index 0000000..57775f1 --- /dev/null +++ b/modules/packages.nix @@ -0,0 +1,78 @@ +{ + me, + pkgs, + auxiliaryPkgs, + unstablePkgs, + ... +}: + +let + inherit (builtins) filter elem; + + filterUnsupportedPackages = + packages: filter (p: elem me.system (p.meta.platforms or [ me.system ])) packages; +in +{ + # TODO: the filter already does some good work, but we need some way to + # pick out x86-only packages, so it is not as opaque as it currently is. + # (who knows if muse-sounds-manager is actually installed, for example?) + environment.systemPackages = (with pkgs; filterUnsupportedPackages [ + file unzip jq dig htop wget screen dive + gnupg pinentry-gnome3 age agenix minisign openssl cryptsetup pamtester + bitwarden-desktop bitwarden-cli + inetutils pciutils usbutils lshw lsof inxi iw pmutils acpi acpid + minicom miniserve netcat-gnu socat tcpdump nmap iftop iperf mtr arp-scan ethtool + sysprof wireshark seer mitmproxy hardinfo2 btrfs-assistant remmina trayscale + vlc celluloid foliate calibre + yt-dlp ffmpeg_7-full imagemagick handbrake mpv helvum + gimp3 krita mypaint aseprite rnote fontforge-gtk + blender inkscape obs-studio darktable davinci-resolve + orca-slicer + renderdoc + audacity musescore muse-sounds-manager reaper + # bitwigs bubblewrap configuration requires some non-ARM package sets. + # bitwig-studio + ungoogled-chromium librewolf lagrange + senpai signal-desktop alpaca newsflash + qemu_full virtiofsd + + openvpn openvpn3 update-resolv-conf + transmission_4-gtk fragments + + xorg.xeyes wl-clipboard + + ripgrep hyperfine parallel just fzf bat delta eza fd tokei didyoumean + universal-ctags compiledb graphviz + python3 uv ruff + nodejs_22 deno yarn + rustc rustup cargo rustfmt + go gopls delve go-task gotags golangci-lint + meson cmake gnumake ninja gdb gcc clang clang-tools + hare haredoc + jdk maven gradle + nil nixfmt-rfc-style + nixpkgs-review nixpkgs-fmt nixpkgs-lint-community + postgresql + helix alacritty ghostty + androidStudioPackages.dev + + winetricks bottles + scrcpy apfs-fuse nfs-utils + ubootTools dtc cloud-utils + borgbackup pika-backup + + prismlauncher xonotic + + man-pages man-pages-posix + ]) ++ (with unstablePkgs; [ + claude-code gemini-cli + ]) ++ (with auxiliaryPkgs; [ + # TODO: need fixes for 25.05 + # retroarch wine + + # TODO: ngfx (obviously) does not work on ARM, put it somewhere else + # ngfx + ]); + + environment.etc.openvpn.source = "${pkgs.update-resolv-conf}/libexec/openvpn"; +} -- cgit 1.4.1