Compare commits
2 commits
67f1a68090
...
f14fa1e478
Author | SHA1 | Date | |
---|---|---|---|
f14fa1e478 | |||
0934df7b6f |
4 changed files with 179 additions and 148 deletions
|
@ -6,6 +6,16 @@
|
|||
<home-manager/nixos>
|
||||
];
|
||||
|
||||
# Define a user account. Don't forget to set a password with 'passwd'.
|
||||
users.users.matt = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "input" "adm" "mlocate" "video" ];
|
||||
# packages = with pkgs; [
|
||||
# firefox
|
||||
# tree
|
||||
# ];
|
||||
};
|
||||
|
||||
home-manager.useGlobalPkgs = true;
|
||||
programs.dconf.enable = true;
|
||||
|
||||
|
@ -27,7 +37,6 @@
|
|||
|
||||
home.packages = with pkgs;
|
||||
(with xorg; [
|
||||
xhost # for gparted
|
||||
xcursorthemes
|
||||
|
||||
]) ++
|
||||
|
@ -37,10 +46,18 @@
|
|||
|
||||
]) ++
|
||||
(with plasma5Packages; [
|
||||
polkit-kde-agent
|
||||
qtstyleplugin-kvantum
|
||||
breeze-icons
|
||||
dolphin # install plugins
|
||||
kio-admin # dbus issues
|
||||
dolphin
|
||||
dolphin-plugins
|
||||
ffmpegthumbs
|
||||
kio-admin # needs to be both here and in system pkgs
|
||||
ark
|
||||
kcharselect
|
||||
#kdenlive
|
||||
kmime
|
||||
okular
|
||||
|
||||
]) ++
|
||||
(with gnome; [
|
||||
|
@ -59,19 +76,15 @@
|
|||
neofetch
|
||||
photoqt
|
||||
progress
|
||||
tlp
|
||||
wl-color-picker # add bind for this in hyprland
|
||||
xclip
|
||||
xdg-utils
|
||||
zathura # set default
|
||||
pavucontrol # TODO: open on left click
|
||||
gimp-with-plugins
|
||||
gparted # doesn't open without sudo
|
||||
jdk8_headless
|
||||
bluez-tools
|
||||
spotify
|
||||
#spotifywm # fails to build
|
||||
spotify-tray # doesn't open
|
||||
spicetify-cli # TODO
|
||||
vlc
|
||||
discord
|
||||
|
@ -97,7 +110,6 @@
|
|||
swayidle
|
||||
wl-clipboard
|
||||
cliphist
|
||||
polkit-kde-agent
|
||||
gtklock
|
||||
gtklock-playerctl-module
|
||||
gtklock-powerbar-module
|
||||
|
@ -115,10 +127,26 @@
|
|||
squeekboard
|
||||
glib
|
||||
appimage-run
|
||||
gparted # doesn't open without sudo
|
||||
(writeShellScriptBin "Gparted" ''
|
||||
(
|
||||
sleep 0.5
|
||||
while killall -r -0 ksshaskpass > /dev/null 2>&1
|
||||
do
|
||||
sleep 0.1
|
||||
if [[ $(hyprctl activewindow | grep Ksshaskpas) == "" ]]; then
|
||||
killall -r ksshaskpass
|
||||
fi
|
||||
done
|
||||
) &
|
||||
|
||||
exec sudo -k -EA '${gparted}/bin/${gparted.pname}' "$@"
|
||||
'')
|
||||
];
|
||||
|
||||
home.sessionVariables = {
|
||||
XDG_DATA_DIRS = "${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}:\$XDG_DATA_DIRS";
|
||||
SUDO_ASKPASS= "${pkgs.plasma5Packages.ksshaskpass}/bin/${pkgs.plasma5Packages.ksshaskpass.pname}";
|
||||
};
|
||||
|
||||
imports = [
|
||||
|
@ -133,8 +161,11 @@
|
|||
];
|
||||
|
||||
extraConfig = ''
|
||||
exec-once = ${pkgs.plasma5Packages.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1
|
||||
source = ~/.config/hypr/main.conf
|
||||
env = XDG_DATA_DIRS, ${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}:$XDG_DATA_DIRS
|
||||
env = SUDO_ASKPASS, ${pkgs.plasma5Packages.ksshaskpass}/bin/${pkgs.plasma5Packages.ksshaskpass.pname}
|
||||
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
43
nixos/cfg/packages.nix
Normal file
43
nixos/cfg/packages.nix
Normal file
|
@ -0,0 +1,43 @@
|
|||
{config, pkgs, ...}:
|
||||
|
||||
{
|
||||
# List packages in root user PATH
|
||||
environment.systemPackages = with pkgs; [
|
||||
wl-clipboard
|
||||
alsa-utils
|
||||
wget
|
||||
tree
|
||||
rsync
|
||||
killall
|
||||
ripgrep-all
|
||||
neovim # TODO: use nix
|
||||
imagemagick
|
||||
usbutils
|
||||
evtest
|
||||
plasma5Packages.kio-admin
|
||||
plasma5Packages.ksshaskpass
|
||||
];
|
||||
|
||||
fonts = {
|
||||
fontconfig = {
|
||||
enable = true;
|
||||
/*defaultFonts = {
|
||||
emoji = [ "Noto Color Emoji" ];
|
||||
monospace = [ "MesloLGS Nerd Font" ];
|
||||
sansSerif = [ "MesloLGS Nerd Font" ];
|
||||
serif = [ "MesloLGS Nerd Font" ];
|
||||
};*/
|
||||
};
|
||||
fonts = with pkgs; [
|
||||
(nerdfonts.override { fonts = [ "JetBrainsMono" "Go-Mono" "Iosevka" "NerdFontsSymbolsOnly" "SpaceMono" "Ubuntu" ]; })
|
||||
noto-fonts
|
||||
noto-fonts-cjk
|
||||
noto-fonts-emoji
|
||||
liberation_ttf
|
||||
font-awesome
|
||||
meslo-lgs-nf
|
||||
jetbrains-mono
|
||||
ubuntu_font_family
|
||||
];
|
||||
};
|
||||
}
|
92
nixos/cfg/services.nix
Normal file
92
nixos/cfg/services.nix
Normal file
|
@ -0,0 +1,92 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
layout = "ca";
|
||||
displayManager = {
|
||||
gdm = {
|
||||
enable = true;
|
||||
wayland = true;
|
||||
}; # gnome session needed to fix bugs
|
||||
sessionPackages = [ pkgs.hyprland pkgs.gnome.gnome-session.sessions ];
|
||||
defaultSession = "hyprland";
|
||||
#autoLogin = { # logs out after a minute
|
||||
# enable = true;
|
||||
# user = "matt";
|
||||
#};
|
||||
};
|
||||
libinput.enable = true;
|
||||
};
|
||||
|
||||
xdg.portal.enable = true;
|
||||
xdg.portal.extraPortals = [
|
||||
pkgs.xdg-desktop-portal-hyprland
|
||||
];
|
||||
|
||||
virtualisation = {
|
||||
waydroid.enable = true;
|
||||
lxd.enable = true;
|
||||
};
|
||||
|
||||
services = {
|
||||
dbus.enable = true;
|
||||
flatpak.enable = true;
|
||||
tlp.enable = true;
|
||||
|
||||
locate = {
|
||||
enable = true;
|
||||
interval = "hourly";
|
||||
prunePaths = [
|
||||
"/tmp"
|
||||
"/var/tmp"
|
||||
"/var/cache"
|
||||
"/var/lock"
|
||||
"/var/run"
|
||||
"/var/spool"
|
||||
"/nix/var/log/nix"
|
||||
"/proc"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
programs = {
|
||||
|
||||
waybar = {
|
||||
enable = true;
|
||||
package = pkgs.waybar.overrideAttrs (oldAttrs: {
|
||||
mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
|
||||
});
|
||||
};
|
||||
|
||||
tmux = {
|
||||
enable = true;
|
||||
keyMode = "vi";
|
||||
terminal = "screen-256color";
|
||||
newSession = true;
|
||||
historyLimit = 30000;
|
||||
extraConfig = ''
|
||||
bind-key -n Home send Escape "OH"
|
||||
bind-key -n End send Escape "OF"
|
||||
set -g mouse on
|
||||
set -ga terminal-overrides ',xterm*:smcup@:rmcup@'
|
||||
bind -T root WheelUpPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; copy-mode -e; send-keys -M"
|
||||
bind -T root WheelDownPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; send-keys -M"
|
||||
'';
|
||||
};
|
||||
|
||||
git = { # TODO: make better config
|
||||
enable = true;
|
||||
lfs.enable = true;
|
||||
};
|
||||
|
||||
htop = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
fzf = {
|
||||
fuzzyCompletion = true;
|
||||
keybindings = true;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -4,78 +4,22 @@
|
|||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
./overlays/list.nix
|
||||
./cfg/boot.nix
|
||||
./cfg/security.nix
|
||||
./cfg/extra-hardware.nix
|
||||
./overlays/list.nix
|
||||
./cfg/services.nix
|
||||
./cfg/packages.nix
|
||||
./cfg/home-manager.nix
|
||||
];
|
||||
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
layout = "ca";
|
||||
displayManager = {
|
||||
gdm.enable = true;
|
||||
gdm.wayland = true;
|
||||
sessionPackages = [ pkgs.hyprland pkgs.gnome.gnome-session.sessions ];
|
||||
};
|
||||
};
|
||||
|
||||
services.locate = {
|
||||
enable = true;
|
||||
interval = "hourly";
|
||||
prunePaths = [
|
||||
"/tmp"
|
||||
"/var/tmp"
|
||||
"/var/cache"
|
||||
"/var/lock"
|
||||
"/var/run"
|
||||
"/var/spool"
|
||||
"/nix/var/log/nix"
|
||||
"/proc"
|
||||
];
|
||||
};
|
||||
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
keyMode = "vi";
|
||||
terminal = "screen-256color";
|
||||
newSession = true;
|
||||
historyLimit = 30000;
|
||||
extraConfig = ''
|
||||
bind-key -n Home send Escape "OH"
|
||||
bind-key -n End send Escape "OF"
|
||||
set -g mouse on
|
||||
set -ga terminal-overrides ',xterm*:smcup@:rmcup@'
|
||||
bind -T root WheelUpPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; copy-mode -e; send-keys -M"
|
||||
bind -T root WheelDownPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; send-keys -M"
|
||||
'';
|
||||
};
|
||||
|
||||
programs.git = { # TODO: make better config
|
||||
enable = true;
|
||||
lfs.enable = true;
|
||||
};
|
||||
|
||||
programs.htop = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
programs.fzf = {
|
||||
fuzzyCompletion = true;
|
||||
keybindings = true;
|
||||
};
|
||||
|
||||
networking.hostName = "wim";
|
||||
networking.networkmanager.enable = true;
|
||||
networking.networkmanager.wifi.backend = "iwd";
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Montreal";
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
#time.timeZone = "America/Montreal";
|
||||
time.timeZone = "Europe/Paris";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_CA.UTF-8";
|
||||
|
@ -84,89 +28,10 @@
|
|||
keyMap = "ca";
|
||||
#useXkbConfig = true; # use xkbOptions in tty.
|
||||
};
|
||||
|
||||
virtualisation = {
|
||||
waydroid.enable = true;
|
||||
lxd.enable = true;
|
||||
};
|
||||
|
||||
services.dbus.enable = true;
|
||||
|
||||
xdg.portal.enable = true;
|
||||
xdg.portal.extraPortals = [
|
||||
pkgs.xdg-desktop-portal-hyprland
|
||||
];
|
||||
services.flatpak.enable = true;
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with 'passwd'.
|
||||
users.users.matt = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "input" "adm" "mlocate" "video" ];
|
||||
# packages = with pkgs; [
|
||||
# firefox
|
||||
# tree
|
||||
# ];
|
||||
};
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# List packages in root user PATH
|
||||
environment.systemPackages = with pkgs; [
|
||||
wl-clipboard
|
||||
alsa-utils
|
||||
wget
|
||||
tree
|
||||
rsync
|
||||
killall
|
||||
ripgrep-all
|
||||
neovim # TODO: use nix
|
||||
imagemagick
|
||||
usbutils
|
||||
evtest
|
||||
];
|
||||
|
||||
fonts = {
|
||||
fontconfig = {
|
||||
enable = true;
|
||||
defaultFonts = {
|
||||
#emoji = [ "Noto Color Emoji" ];
|
||||
#monospace = [ "MesloLGS Nerd Font" ];
|
||||
#sansSerif = [ "MesloLGS Nerd Font" ];
|
||||
#serif = [ "MesloLGS Nerd Font" ];
|
||||
};
|
||||
};
|
||||
fonts = with pkgs; [
|
||||
(nerdfonts.override { fonts = [ "JetBrainsMono" "Go-Mono" "Iosevka" "NerdFontsSymbolsOnly" "SpaceMono" "Ubuntu" ]; })
|
||||
noto-fonts
|
||||
noto-fonts-cjk
|
||||
noto-fonts-emoji
|
||||
liberation_ttf
|
||||
font-awesome
|
||||
meslo-lgs-nf
|
||||
jetbrains-mono
|
||||
#google-fonts
|
||||
ubuntu_font_family
|
||||
];
|
||||
};
|
||||
|
||||
# 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;
|
||||
# };
|
||||
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
package = pkgs.waybar.overrideAttrs (oldAttrs: {
|
||||
mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
|
||||
});
|
||||
};
|
||||
|
||||
# TODO: see if setting them in Hyprland.nix works
|
||||
environment.sessionVariables = {
|
||||
|
|
Loading…
Reference in a new issue