2023-06-06 02:37:52 +02:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
hypr-contrib,
|
|
|
|
nix-gaming,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
VARIABLES = import ./variables.nix;
|
|
|
|
in {
|
2023-06-05 18:00:13 +02:00
|
|
|
imports = [
|
|
|
|
./modules
|
|
|
|
./containers/rar.nix
|
|
|
|
./containers/wine.nix
|
|
|
|
];
|
|
|
|
|
2023-05-25 15:09:53 +02:00
|
|
|
# locale
|
2023-05-26 16:41:07 +02:00
|
|
|
i18n.defaultLocale = "ja_JP.UTF-8";
|
2023-06-06 02:37:52 +02:00
|
|
|
i18n.supportedLocales = ["ja_JP.UTF-8/UTF-8" "en_US.UTF-8/UTF-8" "fr_FR.UTF-8/UTF-8"];
|
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-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-05 18:10:55 +02:00
|
|
|
programs.gamemode.enable = true;
|
|
|
|
|
|
|
|
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-06 02:37:52 +02:00
|
|
|
(pkgs.callPackage ./packages/waycorner {})
|
|
|
|
(pkgs.callPackage ./packages/srb2 {})
|
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-05 18:16:21 +02:00
|
|
|
nixos-generators
|
|
|
|
|
|
|
|
# node/yarn/deno
|
|
|
|
nodejs
|
|
|
|
yarn
|
|
|
|
deno
|
|
|
|
|
|
|
|
# rust
|
|
|
|
gcc
|
|
|
|
rustc
|
|
|
|
rustfmt
|
|
|
|
cargo
|
|
|
|
rust-analyzer
|
|
|
|
bacon
|
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-05 18:00:13 +02:00
|
|
|
system.stateVersion = "22.11";
|
|
|
|
|
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 = [
|
|
|
|
{
|
|
|
|
home.stateVersion = "22.11";
|
|
|
|
|
|
|
|
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-05 18:16:21 +02:00
|
|
|
};
|
|
|
|
};
|
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;
|
|
|
|
|
|
|
|
users.user = {
|
|
|
|
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 = {
|
|
|
|
home.username = "user";
|
|
|
|
home.homeDirectory = "/home/user";
|
|
|
|
};
|
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-05-18 21:54:15 +02:00
|
|
|
}
|