feat: add home-manager module and config
This commit is contained in:
parent
b011573f52
commit
7ca4b38d6f
3 changed files with 127 additions and 47 deletions
|
@ -1,7 +1,8 @@
|
||||||
what is currently not working:
|
what is currently not working:
|
||||||
- tablet mode
|
- gdm doesn't let me use other tty
|
||||||
|
- gdm thinks i tried to login when pressing on the user
|
||||||
|
|
||||||
what i want to do:
|
what i want to do:
|
||||||
- split up configs
|
- split up configs
|
||||||
- look into home manager
|
|
||||||
- learn flakes
|
- learn flakes
|
||||||
|
- give more stuff over to home-manager
|
||||||
|
|
111
nixos/cfg/home-manager.nix
Normal file
111
nixos/cfg/home-manager.nix
Normal file
|
@ -0,0 +1,111 @@
|
||||||
|
{ config, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[
|
||||||
|
<home-manager/nixos>
|
||||||
|
];
|
||||||
|
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
programs.dconf.enable = true;
|
||||||
|
|
||||||
|
home-manager.users.matt = { config, pkgs, lib, ... }: let
|
||||||
|
flake-compat = builtins.fetchTarball "https://github.com/edolstra/flake-compat/archive/master.tar.gz";
|
||||||
|
|
||||||
|
hyprland = (import flake-compat {
|
||||||
|
src = builtins.fetchTarball "https://github.com/hyprwm/Hyprland/archive/v0.26.0.tar.gz";
|
||||||
|
}).defaultNix;
|
||||||
|
|
||||||
|
hyprland-touch-gestures = (with import <nixpkgs> {}; callPackage ./hyprland-touch-gestures.nix {})
|
||||||
|
;
|
||||||
|
|
||||||
|
in {
|
||||||
|
programs.waybar = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.waybar.overrideAttrs (oldAttrs: {
|
||||||
|
mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
libsForQt5.qtstyleplugin-kvantum
|
||||||
|
alacritty
|
||||||
|
brightnessctl
|
||||||
|
pulseaudio
|
||||||
|
alsa-utils
|
||||||
|
wget
|
||||||
|
firefox
|
||||||
|
tree
|
||||||
|
mlocate
|
||||||
|
gcc
|
||||||
|
rsync
|
||||||
|
tmux
|
||||||
|
git
|
||||||
|
git-lfs
|
||||||
|
killall
|
||||||
|
htop
|
||||||
|
fzf
|
||||||
|
jq
|
||||||
|
ripgrep
|
||||||
|
hyprpaper
|
||||||
|
python3
|
||||||
|
rofi-wayland
|
||||||
|
wev
|
||||||
|
networkmanagerapplet
|
||||||
|
nextcloud-client
|
||||||
|
tutanota-desktop
|
||||||
|
galaxy-buds-client
|
||||||
|
gnome.gnome-calculator
|
||||||
|
swaynotificationcenter
|
||||||
|
#swayosd
|
||||||
|
(with import <nixpkgs> {}; callPackage ./swayosd.nix {})
|
||||||
|
swayidle
|
||||||
|
wl-clipboard
|
||||||
|
cliphist
|
||||||
|
polkit-kde-agent
|
||||||
|
gtklock
|
||||||
|
gtklock-playerctl-module
|
||||||
|
gtklock-powerbar-module
|
||||||
|
grim
|
||||||
|
slurp
|
||||||
|
swappy
|
||||||
|
gnome.seahorse
|
||||||
|
neovim
|
||||||
|
fontfor
|
||||||
|
qt5ct
|
||||||
|
lxappearance
|
||||||
|
gnome3.adwaita-icon-theme
|
||||||
|
xorg.xcursorthemes
|
||||||
|
imagemagick
|
||||||
|
usbutils
|
||||||
|
catppuccin-plymouth
|
||||||
|
evtest
|
||||||
|
squeekboard
|
||||||
|
glib
|
||||||
|
appimage-run
|
||||||
|
];
|
||||||
|
|
||||||
|
home.sessionVariables = {
|
||||||
|
XDG_DATA_DIRS = "${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}:\$XDG_DATA_DIRS";
|
||||||
|
};
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
hyprland.homeManagerModules.default
|
||||||
|
];
|
||||||
|
|
||||||
|
wayland.windowManager.hyprland = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
plugins = with pkgs; [
|
||||||
|
hyprland-touch-gestures
|
||||||
|
];
|
||||||
|
|
||||||
|
extraConfig = ''
|
||||||
|
source = ~/.config/hypr/main.conf
|
||||||
|
env = XDG_DATA_DIRS, ${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}:$XDG_DATA_DIRS
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
home.stateVersion = "23.05";
|
||||||
|
};
|
||||||
|
}
|
|
@ -8,7 +8,7 @@
|
||||||
imports =
|
imports =
|
||||||
[ # Include the results of the hardware scan.
|
[ # Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
# ./cfg/Hyprland.nix
|
./cfg/home-manager.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
|
@ -64,14 +64,17 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
powerOnBoot = true;
|
powerOnBoot = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
services.blueman.enable = true;
|
services.blueman.enable = true;
|
||||||
programs.dconf.enable = true;
|
|
||||||
|
|
||||||
services.udev.extraRules = ''
|
services.udev.extraRules = ''
|
||||||
ACTION=="add", SUBSYSTEM=="backlight", RUN+="${pkgs.bash}/bin/bash -c '${pkgs.coreutils}/bin/chgrp video /sys/class/backlight/%k/brightness'"
|
# give permanent path to keyboard XF86* binds
|
||||||
ACTION=="add", SUBSYSTEM=="backlight", RUN+="${pkgs.bash}/bin/bash -c '${pkgs.coreutils}/bin/chmod g+w /sys/class/backlight/%k/brightness'"
|
SUBSYSTEMS=="input", ATTRS{id/product}=="0006", ATTRS{id/vendor}=="0000", SYMLINK += "video-bus"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# enable brightness control for swayosd
|
||||||
|
programs.light.enable = true;
|
||||||
|
|
||||||
services.fprintd.enable = true;
|
services.fprintd.enable = true;
|
||||||
|
|
||||||
systemd.services.fprintd = {
|
systemd.services.fprintd = {
|
||||||
|
@ -186,8 +189,9 @@
|
||||||
jack.enable = true;
|
jack.enable = true;
|
||||||
pulse.enable = true;
|
pulse.enable = true;
|
||||||
};
|
};
|
||||||
|
hardware.sensor.iio.enable = true;
|
||||||
hardware.opengl.enable = true;
|
hardware.opengl.enable = true;
|
||||||
|
hardware.opengl.driSupport32Bit = true;
|
||||||
|
|
||||||
xdg.portal.enable = true;
|
xdg.portal.enable = true;
|
||||||
services.flatpak.enable = true;
|
services.flatpak.enable = true;
|
||||||
|
@ -198,27 +202,23 @@
|
||||||
# Define a user account. Don't forget to set a password with 'passwd'.
|
# Define a user account. Don't forget to set a password with 'passwd'.
|
||||||
users.users.matt = {
|
users.users.matt = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = [ "wheel" "input" "adm" ];
|
extraGroups = [ "wheel" "input" "adm" "mlocate" "video" ];
|
||||||
# packages = with pkgs; [
|
# packages = with pkgs; [
|
||||||
# firefox
|
# firefox
|
||||||
# tree
|
# tree
|
||||||
# ];
|
# ];
|
||||||
};
|
};
|
||||||
|
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
# List packages installed in system profile. To search, run:
|
# List packages installed in system profile. To search, run:
|
||||||
# $ nix search wget
|
# $ nix search wget
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
libsForQt5.qtstyleplugin-kvantum
|
|
||||||
alacritty
|
|
||||||
brightnessctl
|
brightnessctl
|
||||||
pulseaudio
|
pulseaudio
|
||||||
alsa-utils
|
alsa-utils
|
||||||
hyprland
|
|
||||||
wget
|
wget
|
||||||
firefox
|
|
||||||
tree
|
tree
|
||||||
mlocate
|
mlocate
|
||||||
gcc
|
gcc
|
||||||
|
@ -229,43 +229,16 @@
|
||||||
killall
|
killall
|
||||||
htop
|
htop
|
||||||
fzf
|
fzf
|
||||||
libinput-gestures
|
|
||||||
jq
|
jq
|
||||||
ripgrep
|
ripgrep
|
||||||
hyprpaper
|
|
||||||
python3
|
python3
|
||||||
rofi-wayland
|
|
||||||
wev
|
|
||||||
networkmanagerapplet
|
|
||||||
nextcloud-client
|
|
||||||
tutanota-desktop
|
|
||||||
galaxy-buds-client
|
|
||||||
gnome.gnome-keyring
|
|
||||||
gnome.gnome-calculator
|
|
||||||
swaynotificationcenter
|
|
||||||
#swayosd
|
|
||||||
(with import <nixpkgs> {}; callPackage ./cfg/swayosd.nix {})
|
|
||||||
swayidle
|
|
||||||
wl-clipboard
|
|
||||||
cliphist
|
|
||||||
polkit-kde-agent
|
|
||||||
gtklock
|
|
||||||
gtklock-playerctl-module
|
|
||||||
gtklock-powerbar-module
|
|
||||||
grim
|
|
||||||
slurp
|
|
||||||
swappy
|
|
||||||
gnome.seahorse
|
|
||||||
neovim
|
neovim
|
||||||
fontfor
|
|
||||||
qt5ct
|
|
||||||
qt6Packages.qtstyleplugin-kvantum
|
|
||||||
lxappearance
|
|
||||||
gnome3.adwaita-icon-theme
|
gnome3.adwaita-icon-theme
|
||||||
xorg.xcursorthemes
|
xorg.xcursorthemes
|
||||||
imagemagick
|
imagemagick
|
||||||
usbutils
|
usbutils
|
||||||
catppuccin-plymouth
|
catppuccin-plymouth
|
||||||
|
evtest
|
||||||
];
|
];
|
||||||
|
|
||||||
fonts = {
|
fonts = {
|
||||||
|
@ -289,11 +262,6 @@
|
||||||
jetbrains-mono
|
jetbrains-mono
|
||||||
#google-fonts
|
#google-fonts
|
||||||
ubuntu_font_family
|
ubuntu_font_family
|
||||||
#fira-code
|
|
||||||
#fira-code-symbols
|
|
||||||
#mplus-outline-fonts.githubRelease
|
|
||||||
#dina-font
|
|
||||||
#proggyfonts
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -312,12 +280,12 @@
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# TODO: see if setting them in Hyprland.nix works
|
||||||
environment.sessionVariables = {
|
environment.sessionVariables = {
|
||||||
GTK_THEME = "Lavanda-Dark";
|
GTK_THEME = "Lavanda-Dark";
|
||||||
QT_QPA_PLATFORMTHEME = "qt5ct";
|
QT_QPA_PLATFORMTHEME = "qt5ct";
|
||||||
QT_STYLE_OVERRIDE = "kvantum";
|
QT_STYLE_OVERRIDE = "kvantum";
|
||||||
QT_FONT_DPI = "125";
|
QT_FONT_DPI = "125";
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.variables = {
|
environment.variables = {
|
||||||
|
|
Loading…
Reference in a new issue