diff --git a/config/scripts/idle-switcher.nix b/config/scripts/idle-switcher.nix index c2d867c..4967d14 100644 --- a/config/scripts/idle-switcher.nix +++ b/config/scripts/idle-switcher.nix @@ -3,12 +3,10 @@ pkgs.writeShellScriptBin "idle-switcher" '' IDLECOMMAND=$(swayidle -w timeout 5 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on') - if [ $SWAYIDLESTATE == "1" ]; then - SWAYIDLESTATE="2" + if [[ ! $@ ]]; then notify-send -t 2500 "Killing SwayIdle Sir." killall swayidle else - SWAYIDLESTATE="1" notify-send -t 2500 "Starting SwayIdle Sir." $IDLECOMMAND fi diff --git a/config/system/packages.nix b/config/system/packages.nix new file mode 100644 index 0000000..16983cd --- /dev/null +++ b/config/system/packages.nix @@ -0,0 +1,33 @@ +{ pkgs, config, ... }: + +{ + # Allow unfree packages + nixpkgs.config.allowUnfree = true; + + # List System Programs + environment.systemPackages = with pkgs; [ + wget curl git cmatrix lolcat neofetch htop btop libvirt + polkit_gnome lm_sensors unzip unrar libnotify + v4l-utils ydotool wl-clipboard socat cowsay lsd + pkg-config meson hugo gnumake ninja go nodejs symbola + noto-fonts-color-emoji material-icons brightnessctl + toybox virt-viewer + ]; + + programs.steam.gamescopeSession.enable = true; + programs.dconf.enable = true; + programs.hyprland = { + enable = true; + package = inputs.hyprland.packages.${pkgs.system}.hyprland; + xwayland.enable = true; + }; + + programs.mtr.enable = true; + programs.gnupg.agent = { + enable = true; + enableSSHSupport = true; + }; + + virtualisation.libvirtd.enable = true; + programs.virt-manager.enable = true; +} diff --git a/config/system/services.nix b/config/system/services.nix index 27309cf..615a846 100644 --- a/config/system/services.nix +++ b/config/system/services.nix @@ -1,4 +1,4 @@ -{ pkgs, config, ... }: +{ pkgs, config, lib, deviceProfile, ... }: { # List services that you want to enable: @@ -30,4 +30,8 @@ hardware.bluetooth.enable = true; # enables support for Bluetooth hardware.bluetooth.powerOnBoot = true; # powers up the default Bluetooth controller on boot services.blueman.enable = true; + services.qemuGuest = lib.mkIf ("${deviceProfile}" == "vm") { + enable = true; + }; } + diff --git a/home.nix b/home.nix index 96016ad..06382fd 100644 --- a/home.nix +++ b/home.nix @@ -57,5 +57,12 @@ }; }; + dconf.settings = { + "org/virt-manager/virt-manager/connections" = { + autoconnect = ["qemu:///system"]; + uris = ["qemu:///system"]; + }; + }; + programs.home-manager.enable = true; } diff --git a/system.nix b/system.nix index b8d18d3..ae24d02 100644 --- a/system.nix +++ b/system.nix @@ -36,39 +36,10 @@ homeMode = "755"; isNormalUser = true; description = "${gitUsername}"; - extraGroups = [ "networkmanager" "wheel" ]; + extraGroups = [ "networkmanager" "wheel" "libvirtd" ]; packages = with pkgs; []; }; - # Allow unfree packages - nixpkgs.config.allowUnfree = true; - - # List System Programs - environment.systemPackages = with pkgs; [ - wget curl git cmatrix lolcat neofetch htop btop libvirt - polkit_gnome lm_sensors unzip unrar libnotify - v4l-utils ydotool wl-clipboard socat cowsay lsd - pkg-config meson hugo gnumake ninja go nodejs symbola - noto-fonts-color-emoji material-icons brightnessctl - toybox - ]; - - programs.steam.gamescopeSession.enable = true; - programs.dconf.enable = true; - programs.hyprland = { - enable = true; - package = inputs.hyprland.packages.${pkgs.system}.hyprland; - xwayland.enable = true; - }; - - # 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; - }; - environment.variables = { POLKIT_BIN = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; };