{ modulesPath, inputs, lib, pkgs, ... }: { imports = [ ./hardware-configuration.nix "${modulesPath}/profiles/qemu-guest.nix" "${modulesPath}/profiles/minimal.nix" ./system-path.nix ./qemu-vm.nix ]; disabledModules = [ "config/system-path.nix" ]; options = { device = lib.mkOption { type = lib.types.str; }; }; config = { # system.nssModules = lib.mkForce [ ]; services.udisks2.enable = false; # services.nscd.enable = false; boot = { loader.systemd-boot.enable = true; kernelPackages = pkgs.linuxPackages_zen; kernelParams = [ "zswap.enabled=0" "quiet" "scsi_mod.use_blk_mq=1" "modeset" "nofb" "pti=off" "spectre_v2=off" "kvm.ignore_msrs=1" ]; }; hardware.opengl.enable = true; zramSwap = { enable = true; algorithm = "zstd"; memoryPercent = 60; numDevices = 1; }; networking.firewall.enable = false; networking.wireless.enable = false; networking.networkmanager.enable = false; networking.hostName = "Wayland-VM"; users.mutableUsers = false; users.users.alukard = { isNormalUser = true; extraGroups = [ "wheel" "video" "input" ]; uid = 1000; hashedPassword = "$6$6n2Grnv11bvhOj8S$cFkS4P/8K5qOgjDRfhvwbWLogcCg0AAQRA4FjzmgthIeKohORtQYif5XvprE7mJfbApo6fbMr0o3ld8pViWx3."; }; nix = { nixPath = lib.mkForce [ "self=/etc/self/compat" "nixpkgs=/etc/nixpkgs" ]; registry.self.flake = inputs.self; registry.nixpkgs.flake = inputs.nixpkgs; optimise.automatic = true; extraOptions = '' experimental-features = nix-command flakes ''; settings.auto-optimise-store = false; }; environment.etc.nixpkgs.source = inputs.nixpkgs; environment.etc.self.source = inputs.self; environment.systemPackages = [ pkgs.labwc.overrideAttrs (old: { mesonFlags = [ "-Dxwayland=disabled" ]; }) pkgs.nano pkgs.foot pkgs.gnused pkgs.ncftp ]; environment.sessionVariables = { LIBSEAT_BACKEND = "logind"; }; i18n.defaultLocale = "en_GB.UTF-8"; console.font = "cyr-sun16"; console.keyMap = "ruwin_cplk-UTF-8"; fonts = { fonts = [ pkgs.ibm-plex ]; fontconfig = { enable = true; defaultFonts = { monospace = [ "IBM Plex Mono 12" ]; sansSerif = [ "IBM Plex Sans 12" ]; serif = [ "IBM Plex Serif 12" ]; }; }; enableDefaultFonts = false; }; environment.noXlibs = lib.mkForce false; security.polkit.enable = true; system.stateVersion = "22.11"; services.getty.autologinUser = "alukard"; environment.etc."gbinder.d/waydroid.conf".source = let waydroidGbinderConf = pkgs.writeText "waydroid.conf" '' [General] ApiLevel = 29 ''; in lib.mkForce waydroidGbinderConf; virtualisation.waydroid.enable = true; environment.loginShellInit = lib.mkAfter '' [[ "$(tty)" == /dev/tty1 ]] && { labwc -s foot } ''; system.userActivationScripts.linktosharedfolder.text = let foot = pkgs.writeText "foot.ini" '' font=IBM Plex Mono:size=12 ''; in '' if [[ ! -d "$HOME/.config/foot" ]]; then mkdir -p $HOME/.config/foot fi if [[ -h "$HOME/.config/foot/foot.ini" ]]; then rm -f "$HOME/.config/foot/foot.ini" fi ln -s "${foot}" "$HOME/.config/foot/foot.ini" ''; environment.etc."xdg/labwc/environment".text = '' XDG_CURRENT_DESKTOP=wlroots XKB_DEFAULT_LAYOUT=us,ru XKB_DEFAULT_OPTIONS=grp:win_space_toggle ''; environment.etc."xdg/labwc/menu.xml".text = '' foot systemctl -i poweroff ''; environment.etc."xdg/labwc/rc.xml".text = '' 10 2 IBM Plex Sans10 foot ''; environment.etc."xdg/labwc/themerc".text = '' # Decorator window.active.title.bg.color: #2f343f window.inactive.title.bg.color: #2f343f window.*.label.text.color: #d8dee8 window.*.button.*.image.color: #d8dee8 # Borders window.handle.width: 0 window.client.padding.width: 0 border.width: 0 # Title padding.width: 10 padding.height: 8 window.*.title.bg: Solid Flat window.*.*.bg: Parentrelative window.label.text.justify: center # Menu menu.border.width: 6 menu.separator.width: 2 menu.separator.padding.width: 10 menu.separator.padding.height: 2 menu.overlap.x: -8 menu.*.bg: flat solid menu.*.bg.color: #2f343f menu.*.color: #2f343f menu.title.text.color: #ffffff menu.items.text.color: #d8dee8 menu.items.active.disabled.text.color: #707070 menu.items.active.text.color: #d8dee8 menu.title.text.justify: center menu.items.active.bg.color: #5294e2 # OSD osd.border.width: 1 osd.border.color: #2f343f osd.bg: flat solid osd.bg.color: #2f343f osd.label.bg: flat solid osd.label.bg.color: #2f343f osd.hilight.bg: flat solid osd.hilight.bg.color: #ef6b7b # Colour Trick window.active.button.close.unpressed.image.color: #ef6b7b window.inactive.button.close.unpressed.image.color: #bf616a ''; }; }