Compare commits
3 Commits
feature/ol
...
00af4d57aa
| Author | SHA1 | Date | |
|---|---|---|---|
|
00af4d57aa
|
|||
|
0fdd9efff2
|
|||
|
d7c234db82
|
0
.gitignore
vendored
Normal file
0
.gitignore
vendored
Normal file
8
.idea/.gitignore
generated
vendored
Normal file
8
.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
5
.idea/codeStyles/codeStyleConfig.xml
generated
Normal file
5
.idea/codeStyles/codeStyleConfig.xml
generated
Normal file
@@ -0,0 +1,5 @@
|
||||
<component name="ProjectCodeStyleConfiguration">
|
||||
<state>
|
||||
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
|
||||
</state>
|
||||
</component>
|
||||
6
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
6
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
</profile>
|
||||
</component>
|
||||
6
.idea/inspectionProfiles/profiles_settings.xml
generated
Normal file
6
.idea/inspectionProfiles/profiles_settings.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<settings>
|
||||
<option name="USE_PROJECT_PROFILE" value="false" />
|
||||
<version value="1.0" />
|
||||
</settings>
|
||||
</component>
|
||||
7
.idea/misc.xml
generated
Normal file
7
.idea/misc.xml
generated
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Black">
|
||||
<option name="sdkName" value="Python 3.12" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.12" project-jdk-type="Python SDK" />
|
||||
</project>
|
||||
8
.idea/modules.xml
generated
Normal file
8
.idea/modules.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/nix-conf.iml" filepath="$PROJECT_DIR$/.idea/nix-conf.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
8
.idea/nix-conf.iml
generated
Normal file
8
.idea/nix-conf.iml
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="PYTHON_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="jdk" jdkName="Python 3.12" jdkType="Python SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
7
.idea/vcs.xml
generated
Normal file
7
.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
250
configuration-vm.nix
Normal file
250
configuration-vm.nix
Normal file
@@ -0,0 +1,250 @@
|
||||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ lib, config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration-vm.nix
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.plymouth.enable = true;
|
||||
boot.plymouth.theme = "breeze";
|
||||
boot.kernelParams = [
|
||||
"sysrq_always_enabled=1"
|
||||
];
|
||||
|
||||
boot.loader.timeout = 3;
|
||||
boot.loader.systemd-boot.configurationLimit = 5;
|
||||
boot.kernelPackages = pkgs.linuxKernel.packages.linux_6_12;
|
||||
boot.extraModulePackages = with config.boot.kernelPackages; [ zfs ];
|
||||
|
||||
environment.etc.hosts.mode = "0644";
|
||||
|
||||
networking.hostName = "nixos"; # Define your hostname.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Los_Angeles";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NAME = "en_US.UTF-8";
|
||||
LC_NUMERIC = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
};
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
# You can disable this if you're only using the Wayland session.
|
||||
services.xserver.enable = false;
|
||||
|
||||
# Enable the KDE Plasma Desktop Environment.
|
||||
services.displayManager.sddm.enable = true;
|
||||
services.displayManager.sddm.wayland.enable = true;
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver.xkb = {
|
||||
layout = "us";
|
||||
variant = "";
|
||||
};
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
services.qemuGuest.enable = true;
|
||||
services.spice-vdagentd.enable = true;
|
||||
services.sshd.enable = true;
|
||||
services.flatpak.enable = true;
|
||||
|
||||
services.xserver.xkb.extraLayouts = {
|
||||
minimak-4 = {
|
||||
description = "English (US, Minimak-4)";
|
||||
languages = [ "eng" ];
|
||||
# symbolsFile = /etc/nixos/minimak;
|
||||
symbolsFile = ./minimak;
|
||||
};
|
||||
minimak-8 = {
|
||||
description = "English (US, Minimak-8)";
|
||||
languages = [ "eng" ];
|
||||
# symbolsFile = /etc/nixos/minimak;
|
||||
symbolsFile = ./minimak;
|
||||
};
|
||||
minimak-12 = {
|
||||
description = "English (US, Minimak-12)";
|
||||
languages = [ "eng" ];
|
||||
# symbolsFile = /etc/nixos/minimak;
|
||||
symbolsFile = ./minimak;
|
||||
};
|
||||
};
|
||||
|
||||
i18n.inputMethod = {
|
||||
type = "fcitx5";
|
||||
enable = true;
|
||||
fcitx5.waylandFrontend = true;
|
||||
fcitx5.plasma6Support = true;
|
||||
fcitx5.addons = with pkgs; [
|
||||
fcitx5-mozc
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.groups = {
|
||||
cazzzer = {
|
||||
gid = 1000;
|
||||
};
|
||||
};
|
||||
users.users.cazzzer = {
|
||||
isNormalUser = true;
|
||||
description = "Yura";
|
||||
uid = 1000;
|
||||
group = "cazzzer";
|
||||
extraGroups = [ "networkmanager" "wheel" "docker" "wireshark" ];
|
||||
packages = with pkgs; [
|
||||
# Python
|
||||
# python3
|
||||
# poetry
|
||||
|
||||
# Haskell
|
||||
# haskellPackages.ghc
|
||||
# haskellPackages.stack
|
||||
|
||||
# Node
|
||||
# nodejs_22
|
||||
# pnpm
|
||||
# bun
|
||||
];
|
||||
};
|
||||
|
||||
# Install firefox.
|
||||
programs.firefox.enable = true;
|
||||
programs.fish.enable = true;
|
||||
programs.git.enable = true;
|
||||
programs.lazygit.enable = true;
|
||||
programs.neovim.enable = true;
|
||||
|
||||
# https://discourse.nixos.org/t/firefox-does-not-use-kde-window-decorations-and-cursor/32132/3
|
||||
# programs.dconf.enable = true;
|
||||
# programs.firefox = {
|
||||
# enable = true;
|
||||
# preferences = {
|
||||
# "widget.use-xdg-desktop-portal.file-picker" = 1;
|
||||
# "widget.use-xdg-desktop-portal.mime-handler" = 1;
|
||||
# };
|
||||
# };
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
|
||||
# https://github.com/flatpak/flatpak/issues/2861
|
||||
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||
|
||||
workarounds.flatpak.enable = true;
|
||||
fonts.packages = with pkgs; [ nerd-fonts.fantasque-sans-mono ];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
bat
|
||||
# bluez
|
||||
darkman
|
||||
dust
|
||||
efibootmgr
|
||||
eza
|
||||
fastfetch
|
||||
fd
|
||||
# flatpak
|
||||
host-spawn # for flatpaks
|
||||
kdePackages.flatpak-kcm
|
||||
kdePackages.filelight
|
||||
kdePackages.kate
|
||||
kdePackages.yakuake
|
||||
# git
|
||||
gnumake
|
||||
helix
|
||||
htop
|
||||
mediainfo
|
||||
micro
|
||||
mpv
|
||||
neofetch
|
||||
# neovim
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-cjk-serif
|
||||
ripgrep
|
||||
starship
|
||||
tealdeer
|
||||
tela-circle-icon-theme
|
||||
fantasque-sans-mono
|
||||
jetbrains-mono
|
||||
waypipe
|
||||
whois
|
||||
# wireshark
|
||||
yt-dlp
|
||||
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||
# wget
|
||||
];
|
||||
|
||||
# nix.package = pkgs.nixFlakes;
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
environment.etc."current-system-packages".text =
|
||||
let
|
||||
packages = builtins.map (p: "${p.name}") config.environment.systemPackages;
|
||||
sortedUnique = builtins.sort builtins.lessThan (pkgs.lib.lists.unique packages);
|
||||
formatted = builtins.concatStringsSep "\n" sortedUnique;
|
||||
in
|
||||
formatted;
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
# programs.gnupg.agent = {
|
||||
# enable = true;
|
||||
# enableSSHSupport = true;
|
||||
# };
|
||||
|
||||
# List services that you want to enable:
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
# services.openssh.enable = true;
|
||||
|
||||
# Open ports in the firewall.
|
||||
# networking.firewall.allowedTCPPorts = [ 8080 ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
# networking.firewall.enable = false;
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "24.11"; # Did you read the comment?
|
||||
|
||||
}
|
||||
@@ -24,33 +24,9 @@
|
||||
|
||||
boot.loader.timeout = 3;
|
||||
boot.loader.systemd-boot.configurationLimit = 5;
|
||||
|
||||
# boot.kernelPackages = pkgs.linuxKernel.kernels.linux_6_8;
|
||||
# boot.kernelPackages = pkgs.linuxPackages_6_8;
|
||||
# boot.kernelPackages = pkgs.linuxKernel.packages.linux_6_6;
|
||||
boot.kernelPackages = pkgs.linuxKernel.packages.linux_zen;
|
||||
# nix-prefetch-git --url https://github.com/zen-kernel/zen-kernel.git --rev v6.8.9-zen1 --fetch-submodules
|
||||
# boot.kernelPackages = let
|
||||
# version = "6.8.9";
|
||||
# suffix = "zen1"; # use "lqx1" for linux_lqx
|
||||
# in pkgs.linuxKernel.packagesFor (pkgs.linux_zen.override {
|
||||
# inherit version suffix;
|
||||
# modDirVersion = lib.versions.pad 3 "${version}-${suffix}";
|
||||
# src = pkgs.fetchFromGitHub {
|
||||
# owner = "zen-kernel";
|
||||
# repo = "zen-kernel";
|
||||
# rev = "v${version}-${suffix}";
|
||||
# sha256 = "1wva92wk0pxii4f6hn27kssgrz8yy38kk38w2wm5hh1qyz3ij1vj";
|
||||
# };
|
||||
# });
|
||||
|
||||
boot.kernelPackages = pkgs.linuxKernel.packages.linux_6_12;
|
||||
boot.extraModulePackages = with config.boot.kernelPackages; [ zfs ];
|
||||
|
||||
# https://discourse.nixos.org/t/dev-zfs-has-the-wrong-permissions-after-rebooting/48737
|
||||
# environment.etc."tmpfiles.d/zfs.conf".text = ''
|
||||
# z /dev/zfs 0666 - - -
|
||||
# '';
|
||||
|
||||
# https://nixos.wiki/wiki/Accelerated_Video_Playback
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
@@ -58,7 +34,8 @@
|
||||
intel-media-driver # LIBVA_DRIVER_NAME=iHD
|
||||
];
|
||||
};
|
||||
# environment.sessionVariables = { LIBVA_DRIVER_NAME = "iHD"; }; # Force intel-media-driver
|
||||
|
||||
environment.etc.hosts.mode = "0644";
|
||||
|
||||
networking.hostName = "Yura-PC"; # Define your hostname.
|
||||
networking.hostId = "110a2814"; # Required for ZFS.
|
||||
@@ -108,7 +85,7 @@
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable sound with pipewire.
|
||||
hardware.pulseaudio.enable = false;
|
||||
services.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
@@ -181,7 +158,6 @@
|
||||
group = "cazzzer";
|
||||
extraGroups = [ "networkmanager" "wheel" "docker" "wireshark" "geoclue" ];
|
||||
packages = with pkgs; [
|
||||
python312Packages.torch
|
||||
|
||||
kdePackages.kate
|
||||
kdePackages.yakuake
|
||||
@@ -196,24 +172,17 @@
|
||||
nodejs_22
|
||||
pnpm
|
||||
bun
|
||||
|
||||
# yin_yang deps, f*** this packaging s***
|
||||
python312Packages.systemd
|
||||
python312Packages.pyside6
|
||||
python312Packages.dateutils
|
||||
python312Packages.psutil
|
||||
libnotify
|
||||
# thunderbird
|
||||
];
|
||||
};
|
||||
|
||||
hardware.bluetooth.enable = true;
|
||||
hardware.bluetooth.powerOnBoot = false;
|
||||
# Install firefox.
|
||||
programs.firefox.enable = true;
|
||||
# programs.firefox.enable = true;
|
||||
programs.kdeconnect.enable = true;
|
||||
programs.fish.enable = true;
|
||||
programs.git.enable = true;
|
||||
programs.git.lfs.enable = true;
|
||||
# https://nixos.wiki/wiki/Git
|
||||
programs.git.package = pkgs.git.override { withLibsecret = true; };
|
||||
programs.lazygit.enable = true;
|
||||
@@ -283,29 +252,33 @@
|
||||
zlib
|
||||
];
|
||||
|
||||
# attempt to fix flatpak firefox cjk fonts
|
||||
# attempt to fix flatpak firefox cjk fonts
|
||||
# fonts.fontconfig.defaultFonts.serif = [
|
||||
# "Noto Serif"
|
||||
# "DejaVu Serif"
|
||||
# ];
|
||||
# fonts.fontconfig.defaultFonts.sansSerif = [
|
||||
# "Noto Sans"
|
||||
# "DejaVu Sans"
|
||||
# ];
|
||||
|
||||
workarounds.flatpak.enable = true;
|
||||
fonts.packages = with pkgs; [ nerd-fonts.fantasque-sans-mono ];
|
||||
# fonts.fontDir.enable = true;
|
||||
# fonts.fontconfig.allowBitmaps = false;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
level-zero
|
||||
oneDNN
|
||||
python312Packages.torch
|
||||
# zfs
|
||||
# fish
|
||||
|
||||
bat
|
||||
# bluez
|
||||
# docker_27
|
||||
# docker-compose
|
||||
darkman
|
||||
dust
|
||||
efibootmgr
|
||||
eza
|
||||
fastfetch
|
||||
fd
|
||||
ffmpeg
|
||||
# flatpak
|
||||
host-spawn # for flatpaks
|
||||
kdePackages.flatpak-kcm
|
||||
kdePackages.filelight
|
||||
# git
|
||||
@@ -318,6 +291,7 @@
|
||||
# jetbrains.rust-rover
|
||||
# jetbrains.pycharm-professional
|
||||
# jetbrains.webstorm
|
||||
android-studio
|
||||
mediainfo
|
||||
micro
|
||||
mpv
|
||||
@@ -370,7 +344,7 @@
|
||||
# services.openssh.enable = true;
|
||||
|
||||
# Open ports in the firewall.
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
networking.firewall.allowedTCPPorts = [ 8080 ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
# networking.firewall.enable = false;
|
||||
|
||||
6
flake.lock
generated
6
flake.lock
generated
@@ -2,11 +2,11 @@
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1734424634,
|
||||
"narHash": "sha256-cHar1vqHOOyC7f1+tVycPoWTfKIaqkoe1Q6TnKzuti4=",
|
||||
"lastModified": 1735834308,
|
||||
"narHash": "sha256-dklw3AXr3OGO4/XT1Tu3Xz9n/we8GctZZ75ZWVqAVhk=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "d3c42f187194c26d9f0309a8ecc469d6c878ce33",
|
||||
"rev": "6df24922a1400241dae323af55f30e4318a6ca65",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -13,9 +13,17 @@
|
||||
Yura-PC = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./modules
|
||||
./configuration.nix
|
||||
];
|
||||
};
|
||||
VM = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./modules
|
||||
./configuration-vm.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
37
hardware-configuration-vm.nix
Normal file
37
hardware-configuration-vm.nix
Normal file
@@ -0,0 +1,37 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ahci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/da85e220-e2b0-443a-9a0c-a9516b8e5030";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/3F96-8974";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp6s18.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
||||
5
modules/default.nix
Normal file
5
modules/default.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{...}: {
|
||||
imports = [
|
||||
./workarounds
|
||||
];
|
||||
}
|
||||
5
modules/workarounds/default.nix
Normal file
5
modules/workarounds/default.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
imports = [
|
||||
./flatpak.nix
|
||||
];
|
||||
}
|
||||
44
modules/workarounds/flatpak.nix
Normal file
44
modules/workarounds/flatpak.nix
Normal file
@@ -0,0 +1,44 @@
|
||||
# https://github.com/knightpp/nixos-cfg/blob/main/modules/workarounds/flatpak.nix
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.workarounds.flatpak;
|
||||
in {
|
||||
options = {
|
||||
workarounds.flatpak = {
|
||||
enable = lib.mkEnableOption "flatpak workaround";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
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 = builtins.attrValues {
|
||||
inherit (pkgs.libsForQt5) breeze-qt5;
|
||||
inherit
|
||||
(pkgs)
|
||||
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";
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user