mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
nix: waydroid
This commit is contained in:
parent
c9ce831415
commit
0c6d0edb42
9 changed files with 142 additions and 59 deletions
|
|
@ -1,7 +1,6 @@
|
|||
{pkgs, ...}:
|
||||
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
gcc
|
||||
llvmPackages_21.clang-tools
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,54 +2,71 @@
|
|||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
maple-mono.NF
|
||||
sarasa-gothic
|
||||
lxgw-wenkai
|
||||
lxgw-neoxihei
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts
|
||||
noto-fonts-emoji
|
||||
nerd-fonts.jetbrains-mono
|
||||
}:
|
||||
let
|
||||
fontPkgs = [
|
||||
pkgs.maple-mono.NF
|
||||
pkgs.sarasa-gothic
|
||||
pkgs.lxgw-wenkai
|
||||
pkgs.lxgw-neoxihei
|
||||
pkgs.noto-fonts-cjk-sans
|
||||
pkgs.noto-fonts
|
||||
pkgs.noto-fonts-emoji
|
||||
pkgs.nerd-fonts.jetbrains-mono
|
||||
];
|
||||
in
|
||||
{
|
||||
environment.systemPackages = fontPkgs;
|
||||
|
||||
fonts = {
|
||||
enableDefaultPackages = true;
|
||||
packages = fontPkgs;
|
||||
|
||||
fontconfig = {
|
||||
enable = true;
|
||||
defaultFonts = {
|
||||
monospace = ["Maple Mono NF" "JetBrainsMono Nerd Font"];
|
||||
serif = ["LXGW WenKai"];
|
||||
sansSerif = ["LXGW Neo XiHei"];
|
||||
monospace = [
|
||||
"Maple Mono NF"
|
||||
"JetBrainsMono Nerd Font"
|
||||
];
|
||||
serif = [ "LXGW WenKai" ];
|
||||
sansSerif = [ "LXGW Neo XiHei" ];
|
||||
};
|
||||
};
|
||||
fontDir.enable = true;
|
||||
};
|
||||
|
||||
system.fsPackages = [pkgs.bindfs];
|
||||
fileSystems = let
|
||||
mkRoSymBind = path: {
|
||||
device = path;
|
||||
fsType = "fuse.bindfs";
|
||||
options = ["ro" "resolve-symlinks" "x-gvfs-hide"];
|
||||
};
|
||||
aggregated = pkgs.buildEnv {
|
||||
name = "system-fonts-and-icons";
|
||||
paths = with pkgs; [
|
||||
libsForQt5.breeze-qt5
|
||||
system.fsPackages = [ pkgs.bindfs ];
|
||||
fileSystems =
|
||||
let
|
||||
mkRoSymBind = path: {
|
||||
device = path;
|
||||
fsType = "fuse.bindfs";
|
||||
options = [
|
||||
"ro"
|
||||
"resolve-symlinks"
|
||||
"x-gvfs-hide"
|
||||
];
|
||||
};
|
||||
aggregated = pkgs.buildEnv {
|
||||
name = "system-fonts-and-icons";
|
||||
paths = fontPkgs; # with pkgs; [
|
||||
# libsForQt5.breeze-qt5
|
||||
|
||||
noto-fonts
|
||||
noto-fonts-emoji
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-cjk-serif
|
||||
];
|
||||
pathsToLink = ["/share/fonts" "/share/icons"];
|
||||
# noto-fonts
|
||||
# noto-fonts-emoji
|
||||
# noto-fonts-cjk-sans
|
||||
# noto-fonts-cjk-serif
|
||||
# ];
|
||||
pathsToLink = [
|
||||
"/share/fonts"
|
||||
"/share/icons"
|
||||
];
|
||||
};
|
||||
in
|
||||
{
|
||||
# Create an FHS mount to support flatpak host icons/fonts
|
||||
"/usr/share/icons" = mkRoSymBind "${aggregated}/share/icons";
|
||||
"/usr/share/fonts" = mkRoSymBind "${aggregated}/share/fonts";
|
||||
};
|
||||
in {
|
||||
# Create an FHS mount to support flatpak host icons/fonts
|
||||
"/usr/share/icons" = mkRoSymBind "${aggregated}/share/icons";
|
||||
"/usr/share/fonts" = mkRoSymBind "${aggregated}/share/fonts";
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
# ~/.config/nix-config/common/packages-headless.nix
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
# nixpkgs.config.allowUnfree = true;
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim
|
||||
|
|
@ -9,5 +8,6 @@
|
|||
git
|
||||
tmux
|
||||
wl-clipboard
|
||||
nix-index
|
||||
];
|
||||
}
|
||||
|
|
|
|||
22
nixcfgs/modules/nixos/waydroid.nix
Normal file
22
nixcfgs/modules/nixos/waydroid.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{ pkgs, inputs, ... }:
|
||||
{
|
||||
virtualisation.waydroid.enable = true;
|
||||
nixpkgs.overlays = [
|
||||
inputs.nur.overlays.default
|
||||
];
|
||||
# waydroid-script: Tool to install libhoudini (arm support), magisk, ...
|
||||
# usage: sudo waydroid-script
|
||||
environment.systemPackages = with pkgs; [
|
||||
nur.repos.ataraxiasjel.waydroid-script
|
||||
waydroid-helper
|
||||
];
|
||||
systemd = {
|
||||
packages = [ pkgs.waydroid-helper ];
|
||||
services.waydroid-mount = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.waydroid-helper}/bin/waydroid-helper --start-mount";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue