2023-07-06 20:03:25 +02:00
|
|
|
{
|
2023-07-13 12:49:20 +02:00
|
|
|
config,
|
|
|
|
pkgs,
|
2023-09-08 16:10:15 +02:00
|
|
|
lib,
|
2023-07-13 12:49:20 +02:00
|
|
|
inputs,
|
2023-09-09 00:05:59 +02:00
|
|
|
config',
|
2023-07-13 12:49:20 +02:00
|
|
|
...
|
2023-07-30 23:52:15 +02:00
|
|
|
}: {
|
2023-08-11 00:00:19 +02:00
|
|
|
nixpkgs = {
|
2023-08-15 17:55:20 +02:00
|
|
|
config = {
|
|
|
|
permittedInsecurePackages = [
|
|
|
|
"python-2.7.18.6"
|
|
|
|
];
|
|
|
|
allowUnfree = true;
|
|
|
|
};
|
2023-08-11 00:00:19 +02:00
|
|
|
overlays = [
|
|
|
|
inputs.nur.overlay
|
|
|
|
inputs.neovim-nightly-overlay.overlay
|
|
|
|
];
|
|
|
|
};
|
2023-07-13 12:49:20 +02:00
|
|
|
|
2023-08-11 00:00:19 +02:00
|
|
|
boot = {
|
|
|
|
loader = {
|
2023-09-08 16:10:15 +02:00
|
|
|
systemd-boot = {
|
|
|
|
enable = true;
|
|
|
|
memtest86.enable = true;
|
|
|
|
};
|
2023-08-11 00:00:19 +02:00
|
|
|
efi.canTouchEfiVariables = true;
|
|
|
|
};
|
|
|
|
kernelPackages = pkgs.linuxPackages_xanmod_latest;
|
2023-08-16 09:46:16 +02:00
|
|
|
extraModulePackages = with config.boot.kernelPackages; [
|
2023-08-16 09:48:26 +02:00
|
|
|
(
|
|
|
|
ddcci-driver.overrideAttrs (o: {
|
|
|
|
patches = (o.patches or [ ]) ++ [
|
|
|
|
./ddcci_semaphore_fix.patch
|
|
|
|
];
|
|
|
|
})
|
|
|
|
)
|
2023-08-16 09:46:16 +02:00
|
|
|
];
|
|
|
|
kernelModules = [ "ddcci" ];
|
2023-08-11 00:00:19 +02:00
|
|
|
initrd.kernelModules = [ "amdgpu" ];
|
|
|
|
kernelParams = [
|
|
|
|
"video=eDP-1:2560x1440@165"
|
|
|
|
"video=HDMI-A-1:2560x1440@144"
|
|
|
|
];
|
|
|
|
};
|
2023-07-13 12:49:20 +02:00
|
|
|
|
2023-09-08 16:10:15 +02:00
|
|
|
documentation = {
|
|
|
|
enable = true;
|
|
|
|
dev.enable = true;
|
|
|
|
doc.enable = true;
|
|
|
|
info.enable = true;
|
|
|
|
man = {
|
|
|
|
enable = true;
|
|
|
|
generateCaches = true;
|
|
|
|
man-db.enable = false;
|
|
|
|
mandoc.enable = true;
|
|
|
|
};
|
|
|
|
nixos = {
|
|
|
|
includeAllModules = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-08-11 00:01:05 +02:00
|
|
|
networking = {
|
2023-09-09 00:05:59 +02:00
|
|
|
hostName = config'.hostname;
|
2023-08-11 00:01:05 +02:00
|
|
|
networkmanager.enable = true;
|
|
|
|
firewall.checkReversePath = "loose";
|
|
|
|
};
|
2023-07-13 12:49:20 +02:00
|
|
|
|
2023-09-08 16:10:15 +02:00
|
|
|
# don't wait for network to boot faster
|
|
|
|
# https://old.reddit.com/r/NixOS/comments/vdz86j/how_to_remove_boot_dependency_on_network_for_a
|
|
|
|
systemd = {
|
|
|
|
targets.network-online.wantedBy = lib.mkForce []; # default is [ "multi-user.target" ]
|
|
|
|
services.NetworkManager-wait-online.wantedBy = lib.mkForce []; # default is [ "network-online.target" ]
|
|
|
|
};
|
2023-07-13 12:49:20 +02:00
|
|
|
|
2023-09-08 16:10:15 +02:00
|
|
|
systemd.oomd = {
|
|
|
|
enable = true;
|
|
|
|
enableUserServices = true;
|
2023-07-13 12:49:20 +02:00
|
|
|
};
|
2023-07-06 20:03:25 +02:00
|
|
|
|
2023-09-08 16:10:15 +02:00
|
|
|
time.timeZone = "Europe/Warsaw";
|
|
|
|
|
|
|
|
nix = {
|
|
|
|
settings = {
|
|
|
|
experimental-features = [
|
|
|
|
"flakes"
|
|
|
|
"nix-command"
|
|
|
|
];
|
|
|
|
substituters = [
|
|
|
|
"https://hyprland.cachix.org"
|
|
|
|
"https://nix-gaming.cachix.org"
|
|
|
|
"https://anyrun.cachix.org"
|
|
|
|
"https://nix-community.cachix.org"
|
|
|
|
"https://nixpkgs-wayland.cachix.org"
|
|
|
|
"https://helix.cachix.org"
|
|
|
|
];
|
|
|
|
trusted-public-keys = [
|
|
|
|
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
|
|
|
"nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="
|
|
|
|
"anyrun.cachix.org-1:pqBobmOjI7nKlsUMV25u9QHa9btJK65/C8vnO3p346s="
|
|
|
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
|
|
|
"nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
|
|
|
|
"helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs="
|
|
|
|
];
|
|
|
|
keep-outputs = true;
|
|
|
|
keep-derivations = true;
|
|
|
|
};
|
|
|
|
};
|
2023-07-06 20:03:25 +02:00
|
|
|
|
2023-09-08 16:10:15 +02:00
|
|
|
virtualisation = {
|
|
|
|
libvirtd = {
|
|
|
|
enable = true;
|
|
|
|
onBoot = "ignore";
|
|
|
|
qemu = {
|
|
|
|
ovmf.enable = true;
|
|
|
|
runAsRoot = false;
|
|
|
|
swtpm.enable = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2023-07-30 01:18:57 +02:00
|
|
|
programs.dconf.enable = true;
|
|
|
|
|
2023-07-22 00:17:32 +02:00
|
|
|
# https://github.com/NixOS/nixpkgs/issues/158025
|
|
|
|
security.pam.services.swaylock = {};
|
|
|
|
|
2023-08-10 23:52:43 +02:00
|
|
|
security.sudo.package = pkgs.sudo.override { withInsults = true; };
|
|
|
|
|
2023-07-30 01:19:23 +02:00
|
|
|
fonts.packages = with pkgs; [
|
2023-07-13 12:49:20 +02:00
|
|
|
material-design-icons
|
2023-09-08 16:10:15 +02:00
|
|
|
(nerdfonts.override { fonts = [
|
|
|
|
"JetBrainsMono"
|
|
|
|
"Iosevka"
|
|
|
|
]; })
|
2023-08-15 18:59:11 +02:00
|
|
|
noto-fonts
|
2023-08-11 23:52:31 +02:00
|
|
|
noto-fonts-cjk-sans
|
|
|
|
noto-fonts-cjk-serif
|
2023-08-15 17:57:50 +02:00
|
|
|
noto-fonts-emoji
|
2023-07-06 20:03:25 +02:00
|
|
|
];
|
|
|
|
|
2023-09-09 00:05:59 +02:00
|
|
|
users.users.${config'.username} = {
|
2023-07-13 12:49:20 +02:00
|
|
|
isNormalUser = true;
|
2023-07-30 01:18:57 +02:00
|
|
|
extraGroups = [ "wheel" "networkmanager" "libvirtd" ];
|
2023-07-13 12:49:20 +02:00
|
|
|
shell = pkgs.zsh;
|
|
|
|
};
|
2023-07-06 20:03:25 +02:00
|
|
|
|
2023-09-08 16:10:15 +02:00
|
|
|
programs.zsh.enable = true;
|
|
|
|
|
2023-07-13 12:49:20 +02:00
|
|
|
environment = {
|
2023-09-08 16:10:15 +02:00
|
|
|
shells = [ pkgs.zsh ];
|
2023-07-13 12:49:20 +02:00
|
|
|
pathsToLink = [ "/share/zsh" ];
|
|
|
|
enableAllTerminfo = true;
|
|
|
|
sessionVariables = {
|
|
|
|
TERM = "foot";
|
2023-08-06 23:04:14 +02:00
|
|
|
EDITOR = "${pkgs.neovim}/bin/nvim";
|
2023-07-13 12:49:20 +02:00
|
|
|
|
|
|
|
GTK_IM_MODULE = "fcitx";
|
|
|
|
QT_IM_MODULE = "fcitx";
|
|
|
|
XMODIFIERS = "@im=fcitx";
|
|
|
|
|
|
|
|
LIBSEAT_BACKEND = "logind";
|
|
|
|
QT_QPA_PLATFORMTHEME = "qt5ct";
|
|
|
|
|
2023-08-11 20:04:01 +02:00
|
|
|
GOPATH = "\$HOME/.local/share/go";
|
|
|
|
|
2023-07-13 12:49:20 +02:00
|
|
|
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";
|
|
|
|
|
2023-07-22 00:17:57 +02:00
|
|
|
XDG_DATA_HOME = "\$HOME/.local/share";
|
|
|
|
XDG_CONFIG_HOME = "\$HOME/.config";
|
|
|
|
XDG_STATE_HOME = "\$HOME/.local/state";
|
|
|
|
XDG_CACHE_HOME = "\$HOME/.cache";
|
|
|
|
|
|
|
|
HISTFILE = "\${XDG_STATE_HOME}/bash/history";
|
|
|
|
CARGO_HOME = "\${XDG_DATA_HOME}/cargo";
|
|
|
|
GTK2_RC_FILES = "\${XDG_CONFIG_HOME}/gtk-2.0/gtkrc";
|
2023-08-11 20:04:01 +02:00
|
|
|
|
|
|
|
CHROME_EXECUTABLE = "${pkgs.ungoogled-chromium}/bin/chromium";
|
2023-07-13 12:49:20 +02:00
|
|
|
};
|
2023-09-08 16:10:15 +02:00
|
|
|
systemPackages = with pkgs; [
|
|
|
|
man-pages
|
|
|
|
man-pages-posix
|
|
|
|
];
|
2023-07-06 21:07:54 +02:00
|
|
|
};
|
2023-07-13 12:49:20 +02:00
|
|
|
|
|
|
|
services = {
|
2023-07-20 00:06:31 +02:00
|
|
|
blueman.enable = true;
|
2023-07-20 17:11:15 +02:00
|
|
|
mullvad-vpn.enable = true;
|
2023-07-23 20:12:12 +02:00
|
|
|
|
|
|
|
pcscd.enable = true;
|
|
|
|
|
|
|
|
udev.packages = [ pkgs.yubikey-personalization ];
|
|
|
|
|
|
|
|
udisks2.enable = true;
|
2023-09-08 16:10:15 +02:00
|
|
|
dbus.enable = true;
|
2023-07-23 20:12:12 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
programs.gnupg.agent = {
|
|
|
|
enable = true;
|
|
|
|
pinentryFlavor = "qt";
|
|
|
|
enableSSHSupport = true;
|
2023-07-20 00:06:31 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
hardware = {
|
2023-07-20 15:51:48 +02:00
|
|
|
opentabletdriver = {
|
|
|
|
enable = true;
|
|
|
|
daemon.enable = true;
|
|
|
|
};
|
2023-07-20 00:06:31 +02:00
|
|
|
bluetooth.enable = true;
|
2023-07-20 21:03:58 +02:00
|
|
|
opengl = {
|
|
|
|
enable = true;
|
|
|
|
driSupport = true;
|
|
|
|
driSupport32Bit = true;
|
|
|
|
};
|
2023-07-07 20:13:49 +02:00
|
|
|
};
|
2023-07-13 12:49:20 +02:00
|
|
|
|
2023-09-08 16:10:15 +02:00
|
|
|
xdg.portal = {
|
2023-07-23 20:12:29 +02:00
|
|
|
enable = true;
|
2023-09-08 16:10:15 +02:00
|
|
|
extraPortals = with pkgs; [
|
|
|
|
xdg-desktop-portal-hyprland
|
|
|
|
xdg-desktop-portal-gtk
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
services.btrfs = {
|
|
|
|
autoScrub = {
|
2023-07-23 20:12:29 +02:00
|
|
|
enable = true;
|
2023-09-08 16:10:15 +02:00
|
|
|
interval = "weekly";
|
2023-07-23 20:12:29 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-09-08 16:10:15 +02:00
|
|
|
services.psd = {
|
|
|
|
enable = true;
|
|
|
|
resyncTimer = "30m";
|
|
|
|
};
|
2023-07-22 00:16:19 +02:00
|
|
|
|
2023-07-13 15:11:17 +02:00
|
|
|
system.stateVersion = "23.11";
|
2023-07-06 20:03:25 +02:00
|
|
|
}
|