minor changes

This commit is contained in:
Dmitriy Kholkin 2022-12-07 22:21:07 +03:00
parent bf7995067d
commit 79d105b24b
7 changed files with 129 additions and 34 deletions

View File

@ -6,6 +6,8 @@
nixosProfiles.stable-diffusion nixosProfiles.stable-diffusion
nixosProfiles.a2ln-server nixosProfiles.a2ln-server
nixosProfiles.sunshine nixosProfiles.sunshine
# nixosModules.passthrough
]; ];
deviceSpecific.devInfo = { deviceSpecific.devInfo = {

View File

@ -1,8 +1,8 @@
{ modulesPath, inputs, lib, pkgs, ... }: { { modulesPath, inputs, lib, pkgs, ... }: {
imports = [ imports = [
# ./hardware-configuration.nix # ./hardware-configuration.nix
"${modulesPath}/profiles/qemu-guest.nix" "${toString modulesPath}/profiles/qemu-guest.nix"
"${modulesPath}/profiles/minimal.nix" "${toString modulesPath}/profiles/minimal.nix"
./imports/system-path.nix ./imports/system-path.nix
./imports/qemu-vm.nix ./imports/qemu-vm.nix
]; ];
@ -14,13 +14,13 @@
config = { config = {
# system.nssModules = lib.mkForce [ ]; # system.nssModules = lib.mkForce [ ];
services.udisks2.enable = false; # services.udisks2.enable = false;
# services.nscd.enable = false; # services.nscd.enable = false;
boot = { boot = {
loader.systemd-boot.enable = true; loader.systemd-boot.enable = true;
kernelPackages = pkgs.linuxPackages_zen; kernelPackages = pkgs.linuxPackages_lqx;
kernelParams = [ kernelParams = [
"zswap.enabled=0" "quiet" "scsi_mod.use_blk_mq=1" "modeset" "nofb" "zswap.enabled=0" "quiet" "scsi_mod.use_blk_mq=1" "modeset" "nofb"
@ -30,6 +30,15 @@
]; ];
}; };
services.pipewire = {
enable = true;
alsa.enable = false;
alsa.support32Bit = false;
pulse.enable = true;
};
# security.rtkit.enable = true;
hardware.pulseaudio.enable = lib.mkForce false;
services.jack.jackd.enable = lib.mkForce false;
hardware.opengl.enable = true; hardware.opengl.enable = true;
zramSwap = { zramSwap = {
@ -83,8 +92,8 @@
src = super.fetchFromGitHub { src = super.fetchFromGitHub {
repo = "waydroid_script"; repo = "waydroid_script";
owner = "AlukardBF"; owner = "AlukardBF";
rev = "d8eaf667220c5ef72519280354d373a149e041a3"; rev = "3e7e97f162f5f3fa21b4ca9673c4e3ebc66fae89";
sha256 = "1m15x87c7pc7ag624zccjjb19ixki01c0pfr78myc8nbavi56lfz"; sha256 = "0w2g5gbffppsygan4pryffczr2cbw3kn8n0zrqw5y3mr2ilf1mq0";
}; };
nativeBuildInputs = [ super.makeBinaryWrapper ]; nativeBuildInputs = [ super.makeBinaryWrapper ];
installPhase = '' installPhase = ''
@ -101,11 +110,15 @@
environment.systemPackages = [ environment.systemPackages = [
# pkgs.util-linux # pkgs.util-linux
pkgs.labwc pkgs.labwc
pkgs.weston
pkgs.sway
pkgs.foot
pkgs.nano pkgs.nano
pkgs.havoc pkgs.havoc
pkgs.gnused pkgs.procps
pkgs.ncftp
pkgs.waydroid-script pkgs.waydroid-script
pkgs.wl-clipboard
pkgs.gnused
]; ];
environment.sessionVariables = { environment.sessionVariables = {
@ -124,20 +137,35 @@
services.getty.autologinUser = "alukard"; services.getty.autologinUser = "alukard";
environment.shellAliases = {
ws = "waydroid show-full-ui";
wl = "doas waydroid logcat";
};
environment.etc."gbinder.d/waydroid.conf".source = let environment.etc."gbinder.d/waydroid.conf".source = let
waydroidGbinderConf = pkgs.writeText "waydroid.conf" '' waydroidGbinderConf = pkgs.writeText "waydroid.conf" ''
[General] [General]
ApiLevel = 29 ApiLevel = 30
''; '';
in lib.mkForce waydroidGbinderConf; in lib.mkForce waydroidGbinderConf;
virtualisation.waydroid.enable = true; virtualisation.waydroid.enable = true;
environment.loginShellInit = lib.mkAfter '' environment.loginShellInit = lib.mkAfter ''
[[ "$(tty)" == /dev/tty1 ]] && { [[ "$(tty)" == /dev/tty1 ]] && {
labwc -s havoc sway
} }
''; '';
# environment.loginShellInit = lib.mkAfter ''
# [[ "$(tty)" == /dev/tty1 ]] && {
# labwc -s havoc
# }
# '';
# services.xserver.enable = true;
# services.xserver.displayManager.sddm.enable = true;
# services.xserver.desktopManager.plasma5.enable = true;
system.userActivationScripts.linktosharedfolder.text = let system.userActivationScripts.linktosharedfolder.text = let
havoc = pkgs.writeText "havoc.cfg" '' havoc = pkgs.writeText "havoc.cfg" ''
[child] [child]
@ -146,6 +174,81 @@
size=18 size=18
path=${pkgs.ibm-plex}/share/fonts/truetype/VictorMono-Regular.ttf path=${pkgs.ibm-plex}/share/fonts/truetype/VictorMono-Regular.ttf
''; '';
sway = pkgs.writeText "config" ''
set $mod Alt
set $foreground #c0caf5
set $highlight #bb9af7
set $term havoc
client.focused $highlight $highlight $foreground
seat * hide_cursor 8000
bindsym $mod+Return exec $term
# Kill focused window
bindsym $mod+q kill
# Reload the configuration file
bindsym $mod+Shift+c reload
# Move focus around
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
# Move the focused window with the same, but add Shift
bindsym $mod+Shift+h move left
bindsym $mod+Shift+j move down
bindsym $mod+Shift+k move up
bindsym $mod+Shift+l move right
# Switch to workspace
bindsym $mod+1 workspace number 1
bindsym $mod+2 workspace number 2
bindsym $mod+3 workspace number 3
bindsym $mod+4 workspace number 4
bindsym $mod+5 workspace number 5
bindsym $mod+6 workspace number 6
bindsym $mod+7 workspace number 7
bindsym $mod+8 workspace number 8
bindsym $mod+9 workspace number 9
bindsym $mod+0 workspace number 10
bindsym $mod+tab workspace back_and_forth
# Move focused container to workspace
bindsym $mod+Shift+1 move container to workspace number 1; workspace number 1
bindsym $mod+Shift+2 move container to workspace number 2; workspace number 2
bindsym $mod+Shift+3 move container to workspace number 3; workspace number 3
bindsym $mod+Shift+4 move container to workspace number 4; workspace number 4
bindsym $mod+Shift+5 move container to workspace number 5; workspace number 5
bindsym $mod+Shift+6 move container to workspace number 6; workspace number 6
bindsym $mod+Shift+7 move container to workspace number 7; workspace number 7
bindsym $mod+Shift+8 move container to workspace number 8; workspace number 8
bindsym $mod+Shift+9 move container to workspace number 9; workspace number 9
bindsym $mod+Shift+0 move container to workspace number 10
# Splitting direction
bindsym $mod+b split toggle
# Make current focus fullscreen
bindsym $mod+f fullscreen
# Resizing containers
bindsym $mod+r mode 'resize'
mode 'resize' {
# Resizing keys
bindsym h resize shrink width 10px
bindsym j resize grow height 10px
bindsym k resize shrink height 10px
bindsym l resize grow width 10px
# Return to default mode
bindsym Escape mode 'default'
}
# Hide window title bars and borders
default_border pixel
hide_edge_borders smart
exec havoc
include /etc/sway/config.d/*
'';
in '' in ''
if [[ ! -d "$HOME/.config" ]]; then if [[ ! -d "$HOME/.config" ]]; then
mkdir -p $HOME/.config mkdir -p $HOME/.config
@ -153,7 +256,14 @@
if [[ -h "$HOME/.config/havoc.cfg" ]]; then if [[ -h "$HOME/.config/havoc.cfg" ]]; then
rm -f "$HOME/.config/havoc.cfg" rm -f "$HOME/.config/havoc.cfg"
fi fi
if [[ ! -d "$HOME/.config/sway" ]]; then
mkdir -p $HOME/.config/sway
fi
if [[ -h "$HOME/.config/sway/config" ]]; then
rm -f "$HOME/.config/sway/config"
fi
ln -s "${havoc}" "$HOME/.config/havoc.cfg" ln -s "${havoc}" "$HOME/.config/havoc.cfg"
ln -s "${sway}" "$HOME/.config/sway/config"
''; '';
environment.etc."xdg/labwc/environment".text = '' environment.etc."xdg/labwc/environment".text = ''

View File

@ -1,17 +1,17 @@
{ modulesPath, config, ... }: { { modulesPath, config, ... }: {
imports = [ imports = [
"${modulesPath}/virtualisation/qemu-vm.nix" "${toString modulesPath}/virtualisation/qemu-vm.nix"
]; ];
virtualisation = { virtualisation = {
qemu.options = [ "-vga none" "-device virtio-vga-gl" "-display gtk,gl=on" ]; qemu.options = [ "-vga none" "-device virtio-vga-gl" "-display gtk,gl=on" ];
cores = 4; cores = 2;
memorySize = 6044; memorySize = 4096;
msize = 131072; msize = 65536;
diskSize = 20480; diskSize = 20480;
diskImage = "/media/libvirt/vm-images/${config.device}.qcow2"; diskImage = "/media/libvirt/vm-images/${config.device}.qcow2";
# resolution = { x = 1920; y = 1080; }; # resolution = { x = 1920; y = 1080; };
useNixStoreImage = true; #useNixStoreImage = true;
writableStore = false; writableStore = false;
}; };
} }

View File

@ -57,6 +57,7 @@
builtins.mapAttrs (name: value: builtins.mapAttrs (name: value:
if value ? desktop then [ "${value.desktop}.desktop" ] else value) { if value ? desktop then [ "${value.desktop}.desktop" ] else value) {
"text/html" = browser; "text/html" = browser;
"inode/directory" = fm;
"image/*" = { desktop = "org.gnome.eog"; }; "image/*" = { desktop = "org.gnome.eog"; };
"application/x-bittorrent" = torrent; "application/x-bittorrent" = torrent;
"application/zip" = archive; "application/zip" = archive;

View File

@ -11,10 +11,6 @@
# Wants = After; # Wants = After;
# }; # };
# Install.WantedBy = [ "multi-user.target" ]; # Install.WantedBy = [ "multi-user.target" ];
# # Unit = {
# # PartOf = [ "graphical-session-pre.target" ];
# # };
# # Install.WantedBy = [ "graphical-session-pre.target" ];
# }; # };
}; };
} }

View File

@ -5,19 +5,4 @@
(builtins.readFile ./Bluetooth.json); (builtins.readFile ./Bluetooth.json);
home-manager.users.alukard.services.easyeffects.enable = true; home-manager.users.alukard.services.easyeffects.enable = true;
# home-manager.users.alukard.home.packages = [ pkgs.easyeffects ];
# systemd.user.services."easyeffects" = {
# after = [ "sound.target" "pipewire.service" ];
# description = "EasyEffects daemon";
# wantedBy = [ "multi-user.target" ];
# path = [ pkgs.easyeffects ];
# serviceConfig = {
# Type = "oneshot";
# ExecStart = "${pkgs.easyeffects}/bin/easyeffects --gapplication-service";
# ExecStop = "${pkgs.easyeffects}/bin/easyeffects --quit";
# Restart = "on-failure";
# };
# };
} }

View File

@ -3,6 +3,7 @@
./base.nix ./base.nix
inputs.base16.hmModule inputs.base16.hmModule
seadrive
xray xray
applications-setup applications-setup