2023-06-06 02:37:52 +02:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
hypr-contrib,
|
|
|
|
nix-gaming,
|
2023-06-08 21:13:38 +02:00
|
|
|
crystal-flake,
|
2023-06-09 00:18:11 +02:00
|
|
|
nixpkgs-hyprland-autoname-workspaces,
|
2023-06-09 00:26:56 +02:00
|
|
|
nixpkgs-master,
|
2023-06-09 00:30:11 +02:00
|
|
|
nixpkgs-srb2,
|
2023-06-06 02:37:52 +02:00
|
|
|
...
|
|
|
|
}: let
|
|
|
|
VARIABLES = import ./variables.nix;
|
|
|
|
in {
|
2023-06-05 18:00:13 +02:00
|
|
|
imports = [
|
2023-06-06 03:23:27 +02:00
|
|
|
"${VARIABLES.hostHardwareConfiguration}"
|
2023-06-06 05:07:04 +02:00
|
|
|
../overlays
|
2023-06-06 03:14:44 +02:00
|
|
|
../modules
|
|
|
|
../containers/rar.nix
|
|
|
|
../containers/wine.nix
|
2023-06-05 18:00:13 +02:00
|
|
|
];
|
|
|
|
|
2023-05-25 15:09:53 +02:00
|
|
|
# locale
|
2023-06-06 14:14:52 +02:00
|
|
|
i18n.defaultLocale = VARIABLES.defaultLocale;
|
|
|
|
i18n.supportedLocales = VARIABLES.supportedLocales;
|
2023-05-25 15:09:53 +02:00
|
|
|
|
|
|
|
# nix
|
2023-06-06 00:54:33 +02:00
|
|
|
nix.package = pkgs.nixFlakes;
|
2023-06-06 02:37:52 +02:00
|
|
|
nix.settings.experimental-features = ["nix-command" "flakes" "repl-flake"];
|
2023-06-06 14:15:33 +02:00
|
|
|
nix.settings.auto-optimise-store = true;
|
2023-05-25 15:09:53 +02:00
|
|
|
|
2023-06-05 18:00:13 +02:00
|
|
|
hardware.opengl.driSupport32Bit = true;
|
|
|
|
|
|
|
|
boot.loader = {
|
|
|
|
systemd-boot = {
|
|
|
|
enable = true;
|
|
|
|
editor = false;
|
2023-06-05 23:49:06 +02:00
|
|
|
configurationLimit = 10;
|
2023-06-05 18:00:13 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
timeout = 0;
|
|
|
|
efi.canTouchEfiVariables = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
boot.tmp.useTmpfs = true;
|
|
|
|
|
2023-06-07 18:26:12 +02:00
|
|
|
programs.gamemode = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
general = {
|
|
|
|
renice = 10;
|
|
|
|
igpu_power_threshold = -1;
|
|
|
|
};
|
|
|
|
|
|
|
|
custom = {
|
|
|
|
start = "${pkgs.libnotify}/bin/notify-send 'Note' 'gamemode started.'";
|
|
|
|
end = "${pkgs.libnotify}/bin/notify-send 'Note' 'gamemode ended.";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2023-06-05 18:10:55 +02:00
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
2023-06-06 00:56:29 +02:00
|
|
|
hypr-contrib.packages."${VARIABLES.system}".grimblast
|
|
|
|
nix-gaming.packages."${VARIABLES.system}".osu-stable
|
2023-06-08 21:13:38 +02:00
|
|
|
ameba
|
|
|
|
crystal-flake.packages.${VARIABLES.system}.crystal
|
|
|
|
crystal-flake.packages.${VARIABLES.system}.crystalline
|
2023-06-09 00:26:56 +02:00
|
|
|
nixpkgs-master.legacyPackages.${VARIABLES.system}.waycorner
|
2023-06-05 18:10:55 +02:00
|
|
|
slade
|
|
|
|
typespeed
|
|
|
|
osu-lazer-bin
|
2023-06-05 18:34:23 +02:00
|
|
|
mullvad-vpn
|
2023-06-05 18:16:21 +02:00
|
|
|
|
|
|
|
# dev
|
|
|
|
marksman
|
|
|
|
lua-language-server
|
|
|
|
clang-tools
|
|
|
|
texlab
|
|
|
|
|
|
|
|
# go
|
|
|
|
go
|
|
|
|
gopls
|
|
|
|
|
|
|
|
# nix
|
|
|
|
nil
|
2023-06-06 02:19:51 +02:00
|
|
|
alejandra
|
2023-06-07 22:32:37 +02:00
|
|
|
nixpkgs-fmt
|
2023-06-05 18:16:21 +02:00
|
|
|
|
|
|
|
# node/yarn/deno
|
|
|
|
nodejs
|
|
|
|
yarn
|
|
|
|
deno
|
|
|
|
|
|
|
|
# rust
|
|
|
|
gcc
|
|
|
|
rustc
|
|
|
|
rustfmt
|
|
|
|
cargo
|
|
|
|
rust-analyzer
|
|
|
|
bacon
|
2023-06-08 23:23:09 +02:00
|
|
|
|
|
|
|
# other
|
|
|
|
audacity
|
|
|
|
gimp
|
|
|
|
anki
|
|
|
|
logseq
|
|
|
|
mullvad-browser
|
|
|
|
spek
|
|
|
|
keepassxc
|
|
|
|
libreoffice
|
|
|
|
|
|
|
|
wget
|
|
|
|
jq
|
|
|
|
exa
|
|
|
|
fd
|
|
|
|
fzf
|
|
|
|
gdu
|
|
|
|
fdupes
|
|
|
|
mediainfo
|
|
|
|
ponysay
|
|
|
|
lolcat
|
|
|
|
cmatrix
|
|
|
|
sox
|
|
|
|
httpie
|
|
|
|
p7zip
|
|
|
|
ripgrep
|
|
|
|
rsync
|
|
|
|
unar
|
|
|
|
genact
|
|
|
|
ffmpeg
|
|
|
|
killall
|
|
|
|
trashy
|
|
|
|
whois
|
|
|
|
dwt1-shell-color-scripts
|
|
|
|
dig
|
|
|
|
yt-dlp
|
|
|
|
neofetch
|
|
|
|
pywal
|
|
|
|
brightnessctl
|
|
|
|
zellij
|
|
|
|
librespeed-cli
|
|
|
|
wiki-tui
|
|
|
|
hexyl
|
|
|
|
nb
|
|
|
|
jpegoptim
|
|
|
|
playerctl
|
|
|
|
recode
|
|
|
|
rmlint
|
|
|
|
sd
|
|
|
|
shards
|
|
|
|
smartmontools
|
|
|
|
sqlitebrowser
|
|
|
|
visidata
|
|
|
|
scc
|
|
|
|
hwinfo
|
|
|
|
stress
|
|
|
|
choose
|
|
|
|
gum
|
|
|
|
hdparm
|
|
|
|
imagemagick
|
|
|
|
onefetch
|
|
|
|
restic
|
|
|
|
wails
|
|
|
|
watchexec
|
|
|
|
memento
|
|
|
|
mpvpaper
|
|
|
|
timg
|
|
|
|
kanjidraw
|
|
|
|
ventoy
|
|
|
|
wf-recorder
|
|
|
|
mdcat
|
|
|
|
mdbook
|
|
|
|
zola
|
|
|
|
file
|
|
|
|
tessen
|
|
|
|
wtype
|
|
|
|
mtr
|
|
|
|
|
|
|
|
grim
|
|
|
|
slurp
|
|
|
|
wl-clipboard
|
|
|
|
lnch
|
|
|
|
wev
|
|
|
|
swww
|
|
|
|
kickoff
|
|
|
|
greetd.tuigreet
|
2023-06-09 00:18:11 +02:00
|
|
|
nixpkgs-hyprland-autoname-workspaces.legacyPackages.${VARIABLES.system}.hyprland-autoname-workspaces
|
2023-06-09 00:30:11 +02:00
|
|
|
nixpkgs-srb2.legacyPackages.${VARIABLES.system}.srb2
|
2023-06-05 18:10:55 +02:00
|
|
|
];
|
|
|
|
|
2023-06-06 02:37:52 +02:00
|
|
|
nixpkgs.config.allowUnfreePredicate = pkg:
|
|
|
|
builtins.elem (lib.getName pkg) [
|
|
|
|
"osu-lazer-bin"
|
|
|
|
"vmware-workstation"
|
|
|
|
];
|
2023-06-05 18:00:13 +02:00
|
|
|
|
|
|
|
environment.sessionVariables = {
|
|
|
|
EDITOR = "nvim";
|
|
|
|
VISUAL = "nvim";
|
|
|
|
GIT_DISCOVERY_ACROSS_FILESYSTEM = "1";
|
|
|
|
FZF_DEFAULT_OPTS = "--height 40% --reverse --border --color=16";
|
|
|
|
NODE_OPTIONS = "--max_old_space_size=16384";
|
|
|
|
};
|
|
|
|
|
2023-06-06 02:37:52 +02:00
|
|
|
environment.defaultPackages = [];
|
2023-06-06 11:15:41 +02:00
|
|
|
system.stateVersion = VARIABLES.stateVersion;
|
2023-06-05 18:00:13 +02:00
|
|
|
|
2023-05-25 15:09:53 +02:00
|
|
|
# home-manager
|
|
|
|
home-manager = {
|
|
|
|
useGlobalPkgs = true;
|
|
|
|
useUserPackages = true;
|
|
|
|
|
2023-06-06 02:37:52 +02:00
|
|
|
sharedModules = [
|
|
|
|
{
|
2023-06-06 11:15:41 +02:00
|
|
|
home.stateVersion = VARIABLES.stateVersion;
|
2023-06-06 02:37:52 +02:00
|
|
|
|
|
|
|
editorconfig = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
settings = {
|
|
|
|
"*" = {
|
|
|
|
charset = "utf-8";
|
|
|
|
end_of_line = "lf";
|
|
|
|
insert_final_newline = true;
|
|
|
|
indent_size = 2;
|
|
|
|
indent_style = "space";
|
|
|
|
trim_trailing_whitespace = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
"*.md".indent_style = "tab";
|
|
|
|
|
|
|
|
"Makefile" = {
|
|
|
|
indent_style = "tab";
|
|
|
|
indent_size = 4;
|
|
|
|
};
|
|
|
|
|
|
|
|
"*.html" = {
|
|
|
|
indent_style = "tab";
|
|
|
|
indent_size = 4;
|
|
|
|
};
|
|
|
|
|
|
|
|
"*.go" = {
|
|
|
|
indent_style = "tab";
|
|
|
|
indent_size = 4;
|
|
|
|
};
|
2023-06-06 02:51:31 +02:00
|
|
|
|
|
|
|
"*.rs" = {
|
|
|
|
indent_style = "space";
|
|
|
|
indent_size = 4;
|
|
|
|
};
|
2023-06-05 18:16:21 +02:00
|
|
|
};
|
|
|
|
};
|
2023-06-08 23:23:09 +02:00
|
|
|
|
|
|
|
programs.bat.enable = true;
|
2023-06-06 02:37:52 +02:00
|
|
|
}
|
|
|
|
];
|
2023-05-25 15:09:53 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
# systemd
|
|
|
|
systemd.extraConfig = ''
|
|
|
|
DefaultTimeoutStopSec=10s
|
|
|
|
'';
|
|
|
|
|
2023-05-26 16:53:50 +02:00
|
|
|
# logind
|
|
|
|
services.logind.lidSwitch = "ignore";
|
|
|
|
|
2023-05-25 15:09:53 +02:00
|
|
|
# timezone
|
2023-06-06 00:56:29 +02:00
|
|
|
time.timeZone = "${VARIABLES.timezone}";
|
2023-06-05 18:12:12 +02:00
|
|
|
|
|
|
|
# user
|
|
|
|
users = {
|
|
|
|
mutableUsers = false;
|
|
|
|
|
2023-06-06 16:48:10 +02:00
|
|
|
users."${VARIABLES.username}" = {
|
2023-06-05 18:12:12 +02:00
|
|
|
isNormalUser = true;
|
|
|
|
uid = 1000;
|
|
|
|
password = "user";
|
2023-06-06 02:37:52 +02:00
|
|
|
extraGroups = ["wheel" "networkmanager"];
|
2023-06-05 18:12:12 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
home-manager.users.user = {
|
2023-06-06 16:48:10 +02:00
|
|
|
home.username = VARIABLES.username;
|
|
|
|
home.homeDirectory = "/home/${VARIABLES.username}";
|
2023-06-05 18:12:12 +02:00
|
|
|
};
|
2023-06-05 18:16:21 +02:00
|
|
|
|
|
|
|
# dev
|
|
|
|
programs.npm.enable = true;
|
2023-06-05 18:34:23 +02:00
|
|
|
|
|
|
|
# networking
|
|
|
|
networking = {
|
2023-06-06 00:56:29 +02:00
|
|
|
hostName = VARIABLES.hostname;
|
2023-06-05 18:34:23 +02:00
|
|
|
|
|
|
|
networkmanager = {
|
|
|
|
enable = true;
|
|
|
|
dns = "none";
|
|
|
|
wifi.macAddress = "random";
|
|
|
|
ethernet.macAddress = "random";
|
2023-06-05 19:04:03 +02:00
|
|
|
|
2023-06-06 02:37:52 +02:00
|
|
|
unmanaged = ["interface-name:ve-*"];
|
2023-06-05 18:34:23 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
useHostResolvConf = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
services.resolved.llmnr = "false";
|
|
|
|
|
|
|
|
systemd.services.NetworkManager-wait-online.enable = false;
|
|
|
|
|
|
|
|
# virtualization
|
|
|
|
virtualisation.vmVariant = {
|
|
|
|
virtualisation = {
|
|
|
|
memorySize = 8192;
|
|
|
|
cores = 4;
|
|
|
|
restrictNetwork = true;
|
|
|
|
};
|
|
|
|
|
2023-06-06 02:37:52 +02:00
|
|
|
virtualisation.qemu.options = ["-device virtio-vga-gl" "-display sdl,gl=on,show-cursor=off" "-full-screen"];
|
2023-06-05 18:34:23 +02:00
|
|
|
|
|
|
|
environment.sessionVariables = {
|
|
|
|
WLR_NO_HARDWARE_CURSORS = "1";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# mullvad-vpn
|
|
|
|
services.mullvad-vpn = {
|
|
|
|
enable = true;
|
|
|
|
enableExcludeWrapper = false;
|
|
|
|
};
|
|
|
|
|
2023-06-06 02:37:52 +02:00
|
|
|
networking.firewall.allowedTCPPorts = [11918];
|
2023-06-05 18:34:23 +02:00
|
|
|
|
|
|
|
networking = {
|
|
|
|
nat = {
|
|
|
|
enable = true;
|
2023-06-06 02:37:52 +02:00
|
|
|
internalInterfaces = ["ve-+"];
|
2023-06-05 18:34:23 +02:00
|
|
|
externalInterface = "wg-mullvad";
|
|
|
|
|
|
|
|
forwardPorts = [
|
|
|
|
{
|
|
|
|
destination = "192.168.100.11:80";
|
|
|
|
sourcePort = 11918;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
2023-06-08 23:23:09 +02:00
|
|
|
|
|
|
|
virtualisation.vmware.host = {
|
|
|
|
enable = true;
|
|
|
|
extraConfig = ''
|
|
|
|
# Enable 3D acceleration on the host
|
|
|
|
mks.gl.allowUnsupportedDrivers = "TRUE"
|
|
|
|
mks.vk.allowUnsupportedDevices = "TRUE"
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
programs.htop = {
|
|
|
|
enable = true;
|
|
|
|
package = pkgs."htop-vim";
|
|
|
|
settings = {tree_view = 1;};
|
|
|
|
};
|
|
|
|
|
|
|
|
services.greetd = {
|
|
|
|
enable = true;
|
|
|
|
restart = false;
|
|
|
|
settings = {
|
|
|
|
default_session = {
|
|
|
|
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd Hyprland";
|
|
|
|
user = "greeter";
|
|
|
|
};
|
|
|
|
initial_session = {
|
|
|
|
command = "${pkgs.hyprland}/bin/Hyprland";
|
|
|
|
user = VARIABLES.username;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
zramSwap.enable = true;
|
2023-05-18 21:54:15 +02:00
|
|
|
}
|