refactor: move stuff to hyprland config

This commit is contained in:
matt1432 2023-12-04 01:13:24 -05:00
parent 796e7e8f1d
commit 8c7a36554e
9 changed files with 73 additions and 141 deletions

View file

@ -4,14 +4,12 @@
../../modules/ags ../../modules/ags
../../modules/audio.nix ../../modules/audio.nix
../../modules/greetd
../../modules/hyprland ../../modules/hyprland
../../modules/kmscon.nix ../../modules/kmscon.nix
../../modules/printer.nix ../../modules/printer.nix
../../modules/proton-bridge.nix ../../modules/proton-bridge.nix
../../modules/tailscale.nix ../../modules/tailscale.nix
./modules/desktop.nix
./modules/gpu-replay.nix ./modules/gpu-replay.nix
./modules/nix-gaming.nix ./modules/nix-gaming.nix
./modules/nvidia.nix ./modules/nvidia.nix

View file

@ -67,6 +67,9 @@
virtualisation = { virtualisation = {
libvirtd.enable = true; libvirtd.enable = true;
}; };
environment.systemPackages = with pkgs; [
qemu
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
} }

View file

@ -1,59 +0,0 @@
{
pkgs,
config,
...
}: let
hyprland =
config
.home-manager
.users
.${config.vars.user}
.wayland
.windowManager
.hyprland
.finalPackage;
in {
programs.dconf.enable = true;
services = {
xserver = {
displayManager = {
sessionPackages = [hyprland];
};
libinput.enable = true;
};
greetd = {
settings = {
initial_session = {
command = "${hyprland}/bin/Hyprland";
user = config.vars.user;
};
};
};
dbus.enable = true;
gvfs.enable = true;
flatpak.enable = true;
};
programs.kdeconnect.enable = true;
xdg.portal = {
enable = true;
wlr.enable = true;
extraPortals = [
pkgs.xdg-desktop-portal-gtk
];
};
environment.systemPackages = with pkgs; [
qemu
alsa-utils
plasma5Packages.kio-admin
plasma5Packages.ksshaskpass
p7zip # for reshade
kio-admin
];
}

View file

@ -4,7 +4,6 @@
../../modules/ags ../../modules/ags
../../modules/audio.nix ../../modules/audio.nix
../../modules/greetd
../../modules/hyprland ../../modules/hyprland
../../modules/kmscon.nix ../../modules/kmscon.nix
../../modules/plymouth.nix ../../modules/plymouth.nix
@ -12,7 +11,6 @@
../../modules/proton-bridge.nix ../../modules/proton-bridge.nix
../../modules/tailscale.nix ../../modules/tailscale.nix
./modules/desktop.nix
./modules/security.nix ./modules/security.nix
]; ];

View file

@ -83,15 +83,22 @@
libvirtd.enable = true; libvirtd.enable = true;
waydroid.enable = true; waydroid.enable = true;
}; };
environment.systemPackages = with pkgs; [
qemu
];
# enable brightness control # enable brightness control
programs.light.enable = true; programs.light.enable = true;
services.udev.extraRules = '' services = {
tlp.enable = true;
udev.extraRules = ''
# give permanent path to keyboard XF86* binds # give permanent path to keyboard XF86* binds
SUBSYSTEMS=="input", ATTRS{id/product}=="0006", ATTRS{id/vendor}=="0000", SYMLINK += "video-bus" SUBSYSTEMS=="input", ATTRS{id/product}=="0006", ATTRS{id/vendor}=="0000", SYMLINK += "video-bus"
# give permanent path to touchpad # give permanent path to touchpad
SUBSYSTEMS=="input", ATTRS{id/product}=="01e0", ATTRS{id/vendor}=="27c6", ATTRS{name}=="*Touchpad", SYMLINK += "touchpad" SUBSYSTEMS=="input", ATTRS{id/product}=="01e0", ATTRS{id/vendor}=="27c6", ATTRS{name}=="*Touchpad", SYMLINK += "touchpad"
''; '';
};
} }

View file

@ -1,61 +0,0 @@
{
pkgs,
config,
...
}: let
hyprland =
config
.home-manager
.users
.${config.vars.user}
.wayland
.windowManager
.hyprland
.finalPackage;
in {
programs.dconf.enable = true;
services = {
xserver = {
displayManager = {
sessionPackages = [hyprland];
};
libinput.enable = true;
wacom.enable = true;
};
greetd = {
settings = {
initial_session = {
command = "${hyprland}/bin/Hyprland";
user = "matt";
};
};
};
dbus.enable = true;
gvfs.enable = true;
flatpak.enable = true;
tlp.enable = true;
};
programs.kdeconnect.enable = true;
xdg.portal = {
enable = true;
wlr.enable = true;
extraPortals = [
pkgs.xdg-desktop-portal-gtk
];
};
environment.systemPackages = with pkgs; [
qemu
alsa-utils
plasma5Packages.kio-admin
plasma5Packages.ksshaskpass
p7zip # for reshade
kio-admin
];
}

Binary file not shown.

View file

@ -7,17 +7,19 @@
# Nix stuff # Nix stuff
optionals = lib.lists.optionals; optionals = lib.lists.optionals;
isNvidia = config.hardware.nvidia.modesetting.enable; isNvidia = config.hardware.nvidia.modesetting.enable;
isTouchscreen = config.hardware.sensor.iio.enable;
# Executables' paths hyprland = config
regreetBin = "${lib.getExe config.programs.regreet.package}";
hyprBin = "${config
.home-manager .home-manager
.users .users
.${config.vars.user} .${config.vars.user}
.wayland .wayland
.windowManager .windowManager
.hyprland .hyprland
.finalPackage}/bin"; .finalPackage;
# Executables' paths
hyprBin = "${hyprland}/bin";
regreetBin = "${lib.getExe config.programs.regreet.package}";
# Show Regreet on all monitors # Show Regreet on all monitors
dupeMonitors = pkgs.writeShellScriptBin "dupeMonitors" '' dupeMonitors = pkgs.writeShellScriptBin "dupeMonitors" ''
@ -88,13 +90,29 @@ in {
}; };
}; };
services.greetd = { services = {
xserver = {
displayManager = {
sessionPackages = [hyprland];
};
libinput.enable = true;
wacom.enable = isTouchscreen;
};
greetd = {
enable = true; enable = true;
settings = { settings = {
default_session = { default_session = {
command = "${hyprBin}/Hyprland --config ${hyprConf}"; command = "${hyprBin}/Hyprland --config ${hyprConf}";
user = "greeter"; user = "greeter";
}; };
initial_session = {
command = "${hyprBin}/Hyprland";
user = config.vars.user;
};
};
}; };
}; };

View file

@ -20,6 +20,32 @@
gset = pkgs.gsettings-desktop-schemas; gset = pkgs.gsettings-desktop-schemas;
polkit = pkgs.plasma5Packages.polkit-kde-agent; polkit = pkgs.plasma5Packages.polkit-kde-agent;
in { in {
# SYSTEM CONFIG
imports = [../greetd];
programs = {
kdeconnect.enable = true;
dconf.enable = true;
};
services = {
dbus.enable = true;
gvfs.enable = true;
};
xdg.portal = {
enable = true;
wlr.enable = true;
extraPortals = [
pkgs.xdg-desktop-portal-gtk
];
};
environment.systemPackages = with pkgs; [
plasma5Packages.kio-admin
];
# HOME-MANAGER CONFIG
home-manager.users.${config.vars.user} = { home-manager.users.${config.vars.user} = {
imports = [ imports = [
../../home/theme.nix ../../home/theme.nix
@ -197,9 +223,11 @@ in {
bluez-tools bluez-tools
brightnessctl brightnessctl
pulseaudio pulseaudio
alsa-utils
gnome.seahorse gnome.seahorse
p7zip # for reshade
gtklock gtklock # FIXME: find replacement
swww swww
## libs ## libs