140 lines
3.5 KiB
Nix
140 lines
3.5 KiB
Nix
{
|
|
config,
|
|
pkgs,
|
|
inputs,
|
|
...
|
|
}:
|
|
let
|
|
swayConfig = pkgs.writeText "greetd-sway-config" ''
|
|
exec "${pkgs.greetd.gtkgreet}/bin/gtkgreet -l; swaymsg exit"
|
|
bindsym Mod4+shift+e exec swaynag \
|
|
-t warning \
|
|
-m 'What do you want to do?' \
|
|
-b 'Poweroff' 'systemctl poweroff' \
|
|
-b 'Reboot' 'systemctl reboot'
|
|
'';
|
|
in
|
|
{
|
|
nixpkgs.config.allowUnfree = true;
|
|
|
|
boot.loader.systemd-boot.enable = true;
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
|
|
networking.networkmanager.enable = true;
|
|
|
|
time.timeZone = "Europe/Warsaw";
|
|
|
|
nix.settings = {
|
|
experimental-features = [
|
|
"flakes"
|
|
"nix-command"
|
|
];
|
|
substituters = [
|
|
"https://hyprland.cachix.org"
|
|
"https://neovim-nightly.cachix.org/"
|
|
];
|
|
trusted-public-keys = [
|
|
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
|
"neovim-nightly.cachix.org-1:feIoInHRevVEplgdZvQDjhp11kYASYCE2NGY9hNrwxY="
|
|
];
|
|
};
|
|
|
|
programs.zsh.enable = true;
|
|
|
|
programs.hyprland = {
|
|
enable = true;
|
|
xwayland = {
|
|
enable = true;
|
|
hidpi = true;
|
|
};
|
|
nvidiaPatches = false;
|
|
};
|
|
|
|
fonts.fonts = with pkgs; [
|
|
material-design-icons
|
|
(nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
|
|
];
|
|
|
|
users.users.jacek = {
|
|
isNormalUser = true;
|
|
extraGroups = ["wheel" "networkmanager"];
|
|
shell = pkgs.zsh;
|
|
};
|
|
|
|
environment = {
|
|
shells = with pkgs; [zsh];
|
|
pathsToLink = [ "/share/zsh" ];
|
|
enableAllTerminfo = true;
|
|
sessionVariables = {
|
|
TERM = "foot";
|
|
EDITOR = "nvim";
|
|
SSH_AUTH_SOCK = "\$XDG_RUNTIME_DIR/ssh-agent.socket";
|
|
|
|
GTK_IM_MODULE = "fcitx";
|
|
QT_IM_MODULE = "fcitx";
|
|
XMODIFIERS = "@im=fcitx";
|
|
|
|
LIBSEAT_BACKEND = "logind";
|
|
QT_QPA_PLATFORMTHEME = "qt5ct";
|
|
|
|
GOPATH = "\$HOME/.local/share/go";
|
|
|
|
XDG_CURRENT_DESKTOP = "Hyprland";
|
|
XDG_SESSION_TYPE = "wayland";
|
|
XDG_SESSION_DESKTOP = "Hyprland";
|
|
|
|
QT_QPA_PLATFORM = "wayland";
|
|
MOZ_ENABLE_WAYLAND = "1";
|
|
MOZ_DRM_DEVICE = "/dev/dri/card0";
|
|
|
|
SDL_VIDEODRIVER = "wayland";
|
|
|
|
_JAVA_AWT_WM_NONEREPARENTING = "1";
|
|
|
|
CLUTTER_BACKEND = "wayland";
|
|
|
|
GDK_BACKEND = "wayland";
|
|
|
|
XCURSOR_THEME = "Bibata-Modern-Classic";
|
|
XCURSOR_SIZE = "24";
|
|
|
|
SYSTEMD_TIMEDATED_NTP_SERVICES = "chronyd.service:systemd-timesyncd.service";
|
|
};
|
|
etc."greetd/environments".text = ''
|
|
Hyprland
|
|
sway
|
|
zsh
|
|
shutdown now
|
|
'';
|
|
};
|
|
|
|
services = {
|
|
pipewire = {
|
|
enable = true;
|
|
alsa.enable = true;
|
|
alsa.support32Bit = true;
|
|
pulse.enable = true;
|
|
};
|
|
openssh = {
|
|
enable = true;
|
|
settings.PasswordAuthentication = true;
|
|
};
|
|
greetd = {
|
|
enable = true;
|
|
settings = {
|
|
default_session = {
|
|
command = "${pkgs.sway}/bin/sway --config ${swayConfig}";
|
|
};
|
|
};
|
|
};
|
|
blueman.enable = true;
|
|
mullvad-vpn.enable = true;
|
|
};
|
|
|
|
hardware = {
|
|
opentabletdriver.enable = true;
|
|
bluetooth.enable = true;
|
|
};
|
|
|
|
system.stateVersion = "23.11";
|
|
}
|