2023-05-10 17:31:57 +02:00
|
|
|
{ config, pkgs, lib, stylix, ... }:
|
2023-05-03 07:19:19 +02:00
|
|
|
|
|
|
|
{
|
2023-05-16 18:33:18 +02:00
|
|
|
imports = [
|
|
|
|
./laptop.nix
|
|
|
|
./modules/starship.nix
|
|
|
|
./modules/fish.nix
|
|
|
|
];
|
2023-05-03 07:19:19 +02:00
|
|
|
|
|
|
|
boot.loader.systemd-boot.enable = true;
|
|
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
|
|
|
2023-05-10 21:22:18 +02:00
|
|
|
services.xserver.displayManager.lightdm.enable = false;
|
|
|
|
|
2023-05-03 07:19:19 +02:00
|
|
|
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;
|
2023-05-10 04:44:16 +02:00
|
|
|
services.udisks2.enable = true;
|
|
|
|
security.pam.services.swaylock = { };
|
2023-05-11 22:40:17 +02:00
|
|
|
|
2023-05-12 01:05:21 +02:00
|
|
|
systemd.extraConfig = ''
|
|
|
|
DefaultTimeoutStopSec=10s
|
|
|
|
'';
|
|
|
|
|
2023-05-11 22:40:17 +02:00
|
|
|
virtualisation.vmVariant = {
|
|
|
|
virtualisation = {
|
|
|
|
memorySize = 8192;
|
|
|
|
cores = 4;
|
|
|
|
};
|
|
|
|
virtualisation.qemu.options =
|
2023-05-13 21:20:26 +02:00
|
|
|
[ "-device virtio-vga-gl" "-display sdl,gl=on" ];
|
2023-05-13 05:01:20 +02:00
|
|
|
|
|
|
|
services.xserver.desktopManager.gnome.enable = true;
|
|
|
|
services.xserver.displayManager.gdm.enable = true;
|
|
|
|
|
|
|
|
i18n.inputMethod = lib.mkDefault {
|
|
|
|
enabled = "ibus";
|
|
|
|
ibus.engines = with pkgs.ibus-engines; [ mozc ];
|
|
|
|
};
|
|
|
|
|
|
|
|
services.gnome.core-utilities.enable = false;
|
|
|
|
environment.gnome.excludePackages = [ pkgs.gnome-tour ];
|
|
|
|
hardware.pulseaudio.enable = false;
|
2023-05-11 22:40:17 +02:00
|
|
|
};
|
|
|
|
|
2023-05-10 19:21:30 +02:00
|
|
|
stylix.image = ./wallpaper.png;
|
2023-05-10 17:31:57 +02:00
|
|
|
stylix.polarity = "dark";
|
|
|
|
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/monokai.yaml";
|
|
|
|
|
|
|
|
stylix.fonts = {
|
|
|
|
serif = {
|
|
|
|
package = pkgs.noto-fonts-cjk-sans;
|
|
|
|
name = "Noto Sans CJK JP";
|
|
|
|
};
|
|
|
|
|
|
|
|
sansSerif = {
|
|
|
|
package = pkgs.noto-fonts-cjk-sans;
|
|
|
|
name = "Noto Sans CJK JP";
|
|
|
|
};
|
|
|
|
|
|
|
|
monospace = {
|
|
|
|
package = pkgs.maple-mono-NF;
|
|
|
|
name = "MapleMono-NF";
|
|
|
|
};
|
|
|
|
|
|
|
|
emoji = {
|
|
|
|
package = pkgs.noto-fonts-emoji;
|
|
|
|
name = "Noto Color Emoji";
|
|
|
|
};
|
|
|
|
|
|
|
|
sizes = {
|
|
|
|
applications = 11;
|
|
|
|
desktop = 11;
|
|
|
|
popups = 11;
|
|
|
|
terminal = 11;
|
|
|
|
};
|
|
|
|
};
|
2023-05-08 19:50:47 +02:00
|
|
|
|
2023-05-11 23:18:57 +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-05-08 19:50:47 +02:00
|
|
|
services.vnstat.enable = true;
|
|
|
|
services.tumbler.enable = true;
|
2023-05-10 18:34:05 +02:00
|
|
|
security.rtkit.enable = true;
|
|
|
|
services.pipewire = {
|
|
|
|
enable = true;
|
|
|
|
alsa.enable = true;
|
|
|
|
alsa.support32Bit = true;
|
|
|
|
pulse.enable = true;
|
|
|
|
jack.enable = true;
|
|
|
|
};
|
2023-05-03 07:19:19 +02:00
|
|
|
|
|
|
|
programs.fish.enable = true;
|
|
|
|
users.defaultUserShell = pkgs.fish;
|
|
|
|
environment.shells = with pkgs; [ fish ];
|
2023-05-11 23:18:57 +02:00
|
|
|
programs.fish.shellAliases = {
|
|
|
|
ls = "exa --group-directories-first -I 'lost+found'";
|
2023-05-12 01:07:04 +02:00
|
|
|
tree =
|
|
|
|
"exa --group-directories-first --all --long --tree -I 'node_modules|.git|public|lost+found'";
|
2023-05-11 23:18:57 +02:00
|
|
|
mv = "mv -i";
|
|
|
|
rg = "rg --max-columns=2000";
|
|
|
|
};
|
2023-05-03 07:19:19 +02:00
|
|
|
|
|
|
|
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;
|
|
|
|
programs.thunar.enable = true;
|
|
|
|
|
2023-05-08 19:50:47 +02:00
|
|
|
programs.neovim.enable = true;
|
2023-05-11 23:31:02 +02:00
|
|
|
programs.htop = {
|
|
|
|
enable = true;
|
|
|
|
package = pkgs."htop-vim";
|
|
|
|
settings = { tree_view = 1; };
|
|
|
|
};
|
2023-05-08 19:50:47 +02:00
|
|
|
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-12 01:04:44 +02:00
|
|
|
pinentry-curses
|
2023-05-03 07:19:19 +02:00
|
|
|
wget
|
2023-05-10 21:25:37 +02:00
|
|
|
grim
|
|
|
|
slurp
|
2023-05-03 07:19:19 +02:00
|
|
|
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
|
2023-05-12 06:05:31 +02:00
|
|
|
mpc-cli
|
2023-05-03 07:19:19 +02:00
|
|
|
neofetch
|
2023-05-12 06:05:31 +02:00
|
|
|
tectonic
|
|
|
|
fdupes
|
2023-05-03 07:19:19 +02:00
|
|
|
anki
|
|
|
|
logseq
|
2023-05-12 06:05:31 +02:00
|
|
|
yt-dlp
|
|
|
|
gurk-rs
|
2023-05-03 07:19:19 +02:00
|
|
|
wl-clipboard
|
2023-05-12 06:05:31 +02:00
|
|
|
ffmpeg
|
|
|
|
siege
|
|
|
|
ponysay
|
|
|
|
lolcat
|
|
|
|
figlet
|
|
|
|
calcurse
|
|
|
|
httpie
|
|
|
|
cmatrix
|
2023-05-08 19:50:47 +02:00
|
|
|
sox
|
|
|
|
spek
|
2023-05-12 06:05:31 +02:00
|
|
|
p7zip
|
2023-05-08 19:50:47 +02:00
|
|
|
ripgrep
|
|
|
|
rsync
|
|
|
|
jq
|
|
|
|
keepassxc
|
|
|
|
stow
|
|
|
|
exa
|
|
|
|
fd
|
|
|
|
fzf
|
|
|
|
unar
|
2023-05-12 06:05:31 +02:00
|
|
|
audacity
|
|
|
|
gimp
|
|
|
|
typespeed
|
|
|
|
slade
|
2023-05-08 19:50:47 +02:00
|
|
|
gdu
|
|
|
|
ranger
|
|
|
|
nixfmt
|
|
|
|
whois
|
2023-05-12 01:04:44 +02:00
|
|
|
lnch
|
|
|
|
libnotify
|
2023-05-12 07:19:01 +02:00
|
|
|
dwt1-shell-color-scripts
|
2023-05-10 21:25:37 +02:00
|
|
|
tig
|
2023-05-12 06:05:31 +02:00
|
|
|
dig
|
2023-05-10 21:25:37 +02:00
|
|
|
trashy
|
|
|
|
swaybg
|
|
|
|
udiskie
|
|
|
|
brightnessctl
|
|
|
|
killall
|
2023-05-12 06:05:31 +02:00
|
|
|
nodejs
|
|
|
|
yarn
|
|
|
|
deno
|
|
|
|
crystal
|
|
|
|
shards
|
|
|
|
rustc
|
|
|
|
rustfmt
|
|
|
|
cargo
|
|
|
|
genact
|
2023-05-12 18:18:16 +02:00
|
|
|
xfce.exo
|
2023-05-16 15:14:34 +02:00
|
|
|
(pkgs.callPackage ./pkgs/srb2.nix {})
|
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
|
2023-05-12 06:05:31 +02:00
|
|
|
maple-mono
|
2023-05-10 21:25:37 +02:00
|
|
|
maple-mono-NF
|
2023-05-13 22:29:38 +02:00
|
|
|
font-awesome
|
2023-05-03 07:19:19 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
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";
|
2023-05-10 21:25:37 +02:00
|
|
|
fonts.fontconfig.allowBitmaps = false;
|
2023-05-03 07:19:19 +02:00
|
|
|
|
2023-05-10 01:30:58 +02:00
|
|
|
i18n.inputMethod.enabled = "fcitx5";
|
2023-05-11 23:22:53 +02:00
|
|
|
i18n.inputMethod.fcitx5.addons = [ pkgs.fcitx5-mozc ];
|
2023-05-03 07:19:19 +02:00
|
|
|
|
|
|
|
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 = [ ];
|
|
|
|
services.xserver.excludePackages = [ pkgs.xterm ];
|
|
|
|
|
|
|
|
# Force containers to use mullvad
|
|
|
|
networking.nat.enable = true;
|
2023-05-10 21:25:37 +02:00
|
|
|
networking.nat.internalInterfaces = [ "ve-+" ];
|
2023-05-08 19:50:47 +02:00
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2023-05-03 07:19:19 +02:00
|
|
|
system.stateVersion = "22.11";
|
|
|
|
}
|