2023-05-03 07:19:19 +02:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
|
|
|
{
|
2023-05-08 19:50:47 +02:00
|
|
|
imports = [ ./hardware-configuration.nix ];
|
2023-05-03 07:19:19 +02:00
|
|
|
|
|
|
|
boot.loader.systemd-boot.enable = true;
|
|
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
|
|
|
|
|
|
networking.hostName = "nixos";
|
|
|
|
networking.networkmanager.enable = true;
|
2023-05-08 19:50:47 +02:00
|
|
|
networking.networkmanager.unmanaged = [ "interface-name:ve-*" ];
|
|
|
|
networking.networkmanager.dns = "none";
|
|
|
|
networking.useHostResolvConf = true;
|
|
|
|
|
|
|
|
services.vnstat.enable = true;
|
|
|
|
services.tumbler.enable = true;
|
|
|
|
services.xserver.displayManager.sddm.enable = true;
|
2023-05-03 07:19:19 +02:00
|
|
|
|
|
|
|
programs.fish.enable = true;
|
|
|
|
users.defaultUserShell = pkgs.fish;
|
|
|
|
environment.shells = with pkgs; [ fish ];
|
|
|
|
|
|
|
|
time.timeZone = "America/New_York";
|
|
|
|
|
|
|
|
i18n.defaultLocale = "en_US.UTF-8";
|
2023-05-08 19:50:47 +02:00
|
|
|
i18n.supportedLocales =
|
|
|
|
[ "en_US.UTF-8/UTF-8" "ja_JP.UTF-8/UTF-8" "fr_FR.UTF-8/UTF-8" ];
|
2023-05-03 07:19:19 +02:00
|
|
|
|
|
|
|
services.xserver.enable = true;
|
|
|
|
services.xserver.desktopManager.gnome.enable = true;
|
|
|
|
programs.thunar.enable = true;
|
|
|
|
|
2023-05-08 19:50:47 +02:00
|
|
|
programs.starship.enable = true;
|
|
|
|
programs.neovim.enable = true;
|
|
|
|
programs.hyprland.enable = true;
|
|
|
|
programs.git.enable = true;
|
|
|
|
programs.firejail.enable = true;
|
|
|
|
|
2023-05-03 07:19:19 +02:00
|
|
|
nix.package = pkgs.nixFlakes;
|
2023-05-08 19:50:47 +02:00
|
|
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
2023-05-03 07:19:19 +02:00
|
|
|
environment.systemPackages = with pkgs; [
|
2023-05-08 19:50:47 +02:00
|
|
|
fluent-icon-theme
|
|
|
|
fluent-gtk-theme
|
|
|
|
maple-mono-NF
|
2023-05-03 07:19:19 +02:00
|
|
|
tmux
|
|
|
|
fish
|
|
|
|
wget
|
|
|
|
librewolf
|
|
|
|
kitty
|
|
|
|
mullvad-vpn
|
|
|
|
mullvad-browser
|
|
|
|
papirus-icon-theme
|
2023-05-08 19:50:47 +02:00
|
|
|
mediainfo
|
2023-05-03 07:19:19 +02:00
|
|
|
pywal
|
|
|
|
mpv
|
|
|
|
neofetch
|
|
|
|
anki
|
2023-05-08 19:50:47 +02:00
|
|
|
htop-vim
|
2023-05-03 07:19:19 +02:00
|
|
|
logseq
|
|
|
|
wl-clipboard
|
2023-05-08 19:50:47 +02:00
|
|
|
sox
|
|
|
|
spek
|
|
|
|
ripgrep
|
|
|
|
phinger-cursors
|
|
|
|
rsync
|
|
|
|
jq
|
|
|
|
keepassxc
|
|
|
|
feh
|
|
|
|
stow
|
|
|
|
lf
|
|
|
|
exa
|
|
|
|
fd
|
|
|
|
fzf
|
|
|
|
unar
|
|
|
|
gdu
|
|
|
|
ranger
|
|
|
|
nixfmt
|
|
|
|
whois
|
|
|
|
wofi
|
2023-05-03 07:19:19 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
fonts.enableDefaultFonts = true;
|
|
|
|
fonts.fonts = with pkgs; [
|
|
|
|
noto-fonts
|
2023-05-08 19:50:47 +02:00
|
|
|
noto-fonts-cjk-sans
|
|
|
|
noto-fonts-cjk-serif
|
2023-05-03 07:19:19 +02:00
|
|
|
noto-fonts-emoji
|
|
|
|
hack-font
|
|
|
|
];
|
|
|
|
|
|
|
|
fonts.fontconfig = {
|
|
|
|
defaultFonts = {
|
2023-05-08 19:50:47 +02:00
|
|
|
serif = [ "Noto Serif CJK JP" "Noto Serif" ];
|
|
|
|
sansSerif = [ "Noto Sans CJK JP" "Noto Sans" ];
|
|
|
|
monospace = [ "Noto Mono CJK JP" "Noto Mono" ];
|
2023-05-03 07:19:19 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
fonts.fontconfig.hinting.style = "hintfull";
|
|
|
|
|
|
|
|
i18n.inputMethod = {
|
|
|
|
enabled = "ibus";
|
|
|
|
ibus.engines = with pkgs.ibus-engines; [ anthy mozc ];
|
|
|
|
};
|
|
|
|
|
|
|
|
services.gnome.core-utilities.enable = false;
|
|
|
|
services.mullvad-vpn.enable = true;
|
2023-05-08 19:50:47 +02:00
|
|
|
services.mullvad-vpn.enableExcludeWrapper = false;
|
2023-05-03 07:19:19 +02:00
|
|
|
|
2023-05-04 19:10:56 +02:00
|
|
|
networking.networkmanager.wifi.macAddress = "random";
|
|
|
|
networking.networkmanager.ethernet.macAddress = "random";
|
|
|
|
services.resolved.llmnr = "false";
|
|
|
|
|
2023-05-08 19:50:47 +02:00
|
|
|
environment.defaultPackages = [ ];
|
|
|
|
environment.gnome.excludePackages = [ pkgs.gnome-tour ];
|
|
|
|
services.xserver.excludePackages = [ pkgs.xterm ];
|
|
|
|
services.gnome.gnome-online-accounts.enable = false;
|
|
|
|
services.gnome.gnome-user-share.enable = false;
|
|
|
|
services.gnome.tracker.enable = false;
|
|
|
|
services.gnome.tracker-miners.enable = false;
|
|
|
|
|
|
|
|
# Force containers to use mullvad
|
|
|
|
networking.nat.enable = true;
|
|
|
|
networking.nat.internalInterfaces = ["ve-+"];
|
|
|
|
networking.nat.externalInterface = "wg-mullvad";
|
|
|
|
|
|
|
|
services.interception-tools = {
|
|
|
|
enable = true;
|
|
|
|
plugins = [ pkgs.interception-tools-plugins.dual-function-keys ];
|
|
|
|
udevmonConfig = ''
|
|
|
|
- JOB: "${pkgs.interception-tools}/bin/intercept -g $DEVNODE | ${pkgs.interception-tools-plugins.dual-function-keys}/bin/dual-function-keys -c /etc/dual-function-keys.yaml | ${pkgs.interception-tools}/bin/uinput -d $DEVNODE"
|
|
|
|
DEVICE:
|
|
|
|
EVENTS:
|
|
|
|
EV_KEY: [KEY_CAPSLOCK, KEY_ESC]
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
environment.etc."dual-function-keys.yaml".text = ''
|
|
|
|
TIMING:
|
|
|
|
- TAP_MILLISEC: 1000
|
|
|
|
- DOUBLE_TAP_MILLISEC: 0
|
|
|
|
MAPPINGS:
|
|
|
|
- KEY: KEY_CAPSLOCK
|
|
|
|
TAP: KEY_ESC
|
|
|
|
HOLD: KEY_LEFTCTRL
|
|
|
|
- KEY: KEY_SYSRQ
|
|
|
|
TAP: KEY_SYSRQ
|
|
|
|
HOLD: KEY_RIGHTMETA
|
|
|
|
'';
|
|
|
|
|
|
|
|
containers.test = let hostCfg = config;
|
|
|
|
in {
|
|
|
|
autoStart = true;
|
|
|
|
privateNetwork = true;
|
|
|
|
hostAddress = "192.168.100.10";
|
|
|
|
localAddress = "192.168.100.11";
|
|
|
|
|
|
|
|
bindMounts = {
|
|
|
|
waylandDisplay = rec {
|
|
|
|
hostPath = "/run/user/1000";
|
|
|
|
mountPoint = hostPath;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = { config, pkgs, ... }: {
|
|
|
|
programs.fish.enable = true;
|
|
|
|
users.defaultUserShell = pkgs.fish;
|
|
|
|
environment.shells = with pkgs; [ fish ];
|
|
|
|
|
|
|
|
programs.npm.enable = true;
|
|
|
|
|
|
|
|
nix.package = pkgs.nixFlakes;
|
|
|
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
p7zip
|
|
|
|
kitty
|
|
|
|
neovim
|
|
|
|
git
|
|
|
|
unzip
|
|
|
|
ripgrep
|
|
|
|
gcc
|
|
|
|
trashy
|
|
|
|
mullvad-browser
|
|
|
|
alacritty
|
|
|
|
logseq
|
|
|
|
feh
|
|
|
|
wget
|
|
|
|
exa
|
|
|
|
fd
|
|
|
|
fzf
|
|
|
|
gdu
|
|
|
|
ranger
|
|
|
|
wofi
|
|
|
|
lf
|
|
|
|
];
|
|
|
|
|
|
|
|
environment.variables = { TERM = "xterm-kitty"; };
|
|
|
|
|
|
|
|
environment.sessionVariables = {
|
|
|
|
# WAYLAND_DISPLAY = "wayland-0"; # GNOME+gdm
|
|
|
|
WAYLAND_DISPLAY = "wayland-1"; # Hyprland+sddm
|
|
|
|
QT_QPA_PLATFORM = "wayland";
|
|
|
|
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
|
|
|
SDL_VIDEODRIVER = "wayland";
|
|
|
|
CLUTTER_BACKEND = "wayland";
|
|
|
|
MOZ_ENABLE_WAYLAND = "1";
|
|
|
|
XDG_RUNTIME_DIR = "/run/user/1000";
|
|
|
|
# DISPLAY = ":0"; # GNOME+gdm
|
|
|
|
DISPLAY = ":1"; # Hyprland+sddm
|
|
|
|
};
|
|
|
|
|
|
|
|
services.xserver.enable = true;
|
|
|
|
|
|
|
|
hardware.opengl = {
|
|
|
|
enable = true;
|
|
|
|
extraPackages = hostCfg.hardware.opengl.extraPackages;
|
|
|
|
};
|
|
|
|
|
|
|
|
users.mutableUsers = false;
|
|
|
|
users.allowNoPasswordLogin = true;
|
|
|
|
|
|
|
|
users.users.user = {
|
|
|
|
isNormalUser = true;
|
|
|
|
home = "/home/user";
|
|
|
|
};
|
|
|
|
|
|
|
|
environment.defaultPackages = [ ];
|
|
|
|
system.stateVersion = "22.11";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-05-03 07:19:19 +02:00
|
|
|
system.stateVersion = "22.11";
|
|
|
|
}
|