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:
|
||||
- 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:
|
||||
- split up configs
|
||||
- look into home manager
|
||||
- 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 =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
# ./cfg/Hyprland.nix
|
||||
./cfg/home-manager.nix
|
||||
];
|
||||
|
||||
boot = {
|
||||
|
@ -64,14 +64,17 @@
|
|||
enable = true;
|
||||
powerOnBoot = true;
|
||||
};
|
||||
|
||||
services.blueman.enable = true;
|
||||
programs.dconf.enable = true;
|
||||
|
||||
services.udev.extraRules = ''
|
||||
ACTION=="add", SUBSYSTEM=="backlight", RUN+="${pkgs.bash}/bin/bash -c '${pkgs.coreutils}/bin/chgrp video /sys/class/backlight/%k/brightness'"
|
||||
ACTION=="add", SUBSYSTEM=="backlight", RUN+="${pkgs.bash}/bin/bash -c '${pkgs.coreutils}/bin/chmod g+w /sys/class/backlight/%k/brightness'"
|
||||
# give permanent path to keyboard XF86* binds
|
||||
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;
|
||||
|
||||
systemd.services.fprintd = {
|
||||
|
@ -186,8 +189,9 @@
|
|||
jack.enable = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
hardware.sensor.iio.enable = true;
|
||||
hardware.opengl.enable = true;
|
||||
hardware.opengl.driSupport32Bit = true;
|
||||
|
||||
xdg.portal.enable = true;
|
||||
services.flatpak.enable = true;
|
||||
|
@ -198,27 +202,23 @@
|
|||
# Define a user account. Don't forget to set a password with 'passwd'.
|
||||
users.users.matt = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "input" "adm" ];
|
||||
extraGroups = [ "wheel" "input" "adm" "mlocate" "video" ];
|
||||
# packages = with pkgs; [
|
||||
# firefox
|
||||
# tree
|
||||
# ];
|
||||
};
|
||||
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
libsForQt5.qtstyleplugin-kvantum
|
||||
alacritty
|
||||
brightnessctl
|
||||
pulseaudio
|
||||
alsa-utils
|
||||
hyprland
|
||||
wget
|
||||
firefox
|
||||
tree
|
||||
mlocate
|
||||
gcc
|
||||
|
@ -229,43 +229,16 @@
|
|||
killall
|
||||
htop
|
||||
fzf
|
||||
libinput-gestures
|
||||
jq
|
||||
ripgrep
|
||||
hyprpaper
|
||||
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
|
||||
fontfor
|
||||
qt5ct
|
||||
qt6Packages.qtstyleplugin-kvantum
|
||||
lxappearance
|
||||
gnome3.adwaita-icon-theme
|
||||
xorg.xcursorthemes
|
||||
imagemagick
|
||||
usbutils
|
||||
catppuccin-plymouth
|
||||
evtest
|
||||
];
|
||||
|
||||
fonts = {
|
||||
|
@ -289,11 +262,6 @@
|
|||
jetbrains-mono
|
||||
#google-fonts
|
||||
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 = {
|
||||
GTK_THEME = "Lavanda-Dark";
|
||||
QT_QPA_PLATFORMTHEME = "qt5ct";
|
||||
QT_STYLE_OVERRIDE = "kvantum";
|
||||
QT_FONT_DPI = "125";
|
||||
|
||||
};
|
||||
|
||||
environment.variables = {
|
||||
|
|
Loading…
Reference in a new issue