treewide: config/nixos/programs -> modules/nix/programs
Here, we also use the option we just added, `local.modules.hyprland.enable` to toggle Hyprland, as well as the profiles. Also removed other unused configuration, such as KDE/Gnome.
This commit is contained in:
parent
76a2caa9c7
commit
ec285bcc52
14 changed files with 94 additions and 138 deletions
|
@ -1,15 +0,0 @@
|
|||
_: {
|
||||
programs = {
|
||||
steam = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
gamemode.enable = true;
|
||||
gamescope.enable = true;
|
||||
|
||||
coolercontrol = {
|
||||
enable = true;
|
||||
nvidiaSupport = true;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
displayManager.gdm.enable = true;
|
||||
desktopManager.gnome = {
|
||||
enable = true;
|
||||
extraGSettingsOverridePackages = [pkgs.mutter];
|
||||
extraGSettingsOverrides = ''
|
||||
[org.gnome.mutter]
|
||||
experimental-features=['scale-monitor-framebuffer']
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
environment.gnome.excludePackages = with pkgs; [
|
||||
gnome-console
|
||||
gnome-photos
|
||||
gnome-tour
|
||||
gnome-software
|
||||
iagno
|
||||
hitori
|
||||
atomix
|
||||
gnome-contacts
|
||||
gnome-initial-setup
|
||||
gnome-terminal
|
||||
gnome-music
|
||||
gedit
|
||||
cheese
|
||||
tali
|
||||
epiphany
|
||||
geary
|
||||
yelp
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
gnome-tweaks
|
||||
gnome-power-manager
|
||||
rhythmbox
|
||||
];
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
{
|
||||
inputs,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
environment.systemPackages = [
|
||||
inputs.hyprland-qtutils.packages.${pkgs.system}.default
|
||||
];
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
|
||||
portalPackage = inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland;
|
||||
withUWSM = true;
|
||||
systemd.setPath.enable = true;
|
||||
};
|
||||
|
||||
# copied from https://github.com/linyinfeng/dotfiles/blob/91b0363b093303f57885cbae9da7f8a99bbb4432/nixos/profiles/graphical/niri/default.nix#L17-L29
|
||||
security.pam.services.hyprlock.text = lib.mkIf config.services.fprintd.enable ''
|
||||
account required pam_unix.so
|
||||
|
||||
# check passwork before fprintd
|
||||
auth sufficient pam_unix.so try_first_pass likeauth
|
||||
auth sufficient ${pkgs.fprintd}/lib/security/pam_fprintd.so
|
||||
auth required pam_deny.so
|
||||
|
||||
password sufficient pam_unix.so nullok yescrypt
|
||||
|
||||
session required pam_env.so conffile=/etc/pam/environment readenv=0
|
||||
session required pam_unix.so
|
||||
'';
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
{
|
||||
inputs,
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
inputs.niri.nixosModules.niri
|
||||
];
|
||||
|
||||
programs.niri = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# copied from https://github.com/linyinfeng/dotfiles/blob/91b0363b093303f57885cbae9da7f8a99bbb4432/nixos/profiles/graphical/niri/default.nix#L17-L29
|
||||
security.pam.services.swaylock.text = lib.mkIf config.services.fprintd.enable ''
|
||||
account required pam_unix.so
|
||||
|
||||
# check passwork before fprintd
|
||||
auth sufficient pam_unix.so try_first_pass likeauth
|
||||
auth sufficient ${pkgs.fprintd}/lib/security/pam_fprintd.so
|
||||
auth required pam_deny.so
|
||||
|
||||
password sufficient pam_unix.so nullok yescrypt
|
||||
|
||||
session required pam_env.so conffile=/etc/pam/environment readenv=0
|
||||
session required pam_unix.so
|
||||
'';
|
||||
|
||||
environment.systemPackages = [pkgs.xwayland-satellite];
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
xdgOpenUsePortal = true;
|
||||
config = {
|
||||
common.default = ["gtk"];
|
||||
hyprland.default = ["gtk" "hyprland"];
|
||||
};
|
||||
|
||||
extraPortals = [
|
||||
pkgs.xdg-desktop-portal-gtk
|
||||
];
|
||||
};
|
||||
}
|
|
@ -39,8 +39,6 @@
|
|||
"${self}/config/nixos/services/logind.nix"
|
||||
"${self}/config/nixos/services/greetd.nix"
|
||||
|
||||
"${self}/config/nixos/programs/hyprland.nix"
|
||||
"${self}/config/nixos/programs/xdg.nix"
|
||||
"${self}/config/nixos/services/gnome.nix"
|
||||
({config, ...}: {
|
||||
home-manager.users.${config.local.systemVars.username}.imports = [
|
||||
|
@ -58,7 +56,6 @@
|
|||
];
|
||||
|
||||
gaming = [
|
||||
../config/nixos/programs/games.nix
|
||||
../config/nixos/services/flatpak.nix
|
||||
({config, ...}: {
|
||||
home-manager.users.${config.local.systemVars.username}.imports = [
|
||||
|
|
|
@ -15,6 +15,10 @@ _: {
|
|||
desktop.enable = true;
|
||||
gaming.enable = true;
|
||||
};
|
||||
|
||||
modules = {
|
||||
hyprland.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
environment.variables.FLAKE = "/home/nezia/.dotfiles";
|
||||
|
|
|
@ -16,6 +16,10 @@ _: {
|
|||
desktop.enable = true;
|
||||
laptop.enable = true;
|
||||
};
|
||||
|
||||
modules = {
|
||||
hyprland.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
environment.variables.FLAKE = "/home/nezia/.dotfiles";
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
imports = [
|
||||
./core
|
||||
./programs
|
||||
./style
|
||||
];
|
||||
}
|
||||
|
|
7
modules/nix/programs/default.nix
Normal file
7
modules/nix/programs/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
imports = [
|
||||
./hyprland.nix
|
||||
./games.nix
|
||||
./xdg.nix
|
||||
];
|
||||
}
|
21
modules/nix/programs/games.nix
Normal file
21
modules/nix/programs/games.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
config = lib.mkIf config.local.profiles.gaming.enable {
|
||||
programs = {
|
||||
steam = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
gamemode.enable = true;
|
||||
gamescope.enable = true;
|
||||
|
||||
coolercontrol = {
|
||||
enable = true;
|
||||
nvidiaSupport = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
35
modules/nix/programs/hyprland.nix
Normal file
35
modules/nix/programs/hyprland.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
inputs,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
config = lib.mkIf config.local.modules.hyprland.enable {
|
||||
environment.systemPackages = [
|
||||
inputs.hyprland-qtutils.packages.${pkgs.system}.default
|
||||
];
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
|
||||
portalPackage = inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland;
|
||||
withUWSM = true;
|
||||
systemd.setPath.enable = true;
|
||||
};
|
||||
|
||||
# copied from https://github.com/linyinfeng/dotfiles/blob/91b0363b093303f57885cbae9da7f8a99bbb4432/nixos/profiles/graphical/niri/default.nix#L17-L29
|
||||
security.pam.services.hyprlock.text = lib.mkIf config.services.fprintd.enable ''
|
||||
account required pam_unix.so
|
||||
|
||||
# check passwork before fprintd
|
||||
auth sufficient pam_unix.so try_first_pass likeauth
|
||||
auth sufficient ${pkgs.fprintd}/lib/security/pam_fprintd.so
|
||||
auth required pam_deny.so
|
||||
|
||||
password sufficient pam_unix.so nullok yescrypt
|
||||
|
||||
session required pam_env.so conffile=/etc/pam/environment readenv=0
|
||||
session required pam_unix.so
|
||||
'';
|
||||
};
|
||||
}
|
21
modules/nix/programs/xdg.nix
Normal file
21
modules/nix/programs/xdg.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
config = lib.mkIf config.local.profiles.desktop.enable {
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
xdgOpenUsePortal = true;
|
||||
config = {
|
||||
common.default = ["gtk"];
|
||||
hyprland.default = ["gtk" "hyprland"];
|
||||
};
|
||||
|
||||
extraPortals = [
|
||||
pkgs.xdg-desktop-portal-gtk
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib.types) mkEnableOption;
|
||||
inherit (lib) mkEnableOption;
|
||||
in {
|
||||
options.local.modules.hyprland = {
|
||||
enable = mkEnableOption "Hyprland modules";
|
||||
|
|
Loading…
Reference in a new issue