add aoife
This commit is contained in:
parent
a04a4bcf3a
commit
dcc9d733ae
27 changed files with 34 additions and 21 deletions
22
hosts/thalassa/aoife/README.md
Normal file
22
hosts/thalassa/aoife/README.md
Normal file
|
@ -0,0 +1,22 @@
|
|||
# Aoife
|
||||
This is the NixOS config for my laptop `aoife`.
|
||||
|
||||
## Hardware
|
||||
This is a Thinkpad Z16 Gen 1.
|
||||
|
||||
**CPU**: AMD Ryzen 9 PRO 6950H (16 cores) @ 4.935GHz
|
||||
|
||||
**RAM**: 32GB LPDDR5 6400MHz
|
||||
|
||||
**SCREEN**: 16" 3840 x 2400 OLED
|
||||
|
||||
**GPU**: AMD Radeon™ RX 6500M, 4 GB, GDDR6
|
||||
|
||||
|
||||
## Software
|
||||
**OS**: NixOS
|
||||
|
||||
**DE**: Gnome
|
||||
|
||||
**Shell**: ZSH (grml)
|
||||
|
44
hosts/thalassa/aoife/default.nix
Normal file
44
hosts/thalassa/aoife/default.nix
Normal file
|
@ -0,0 +1,44 @@
|
|||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ inputs, lib, ... }: {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-z
|
||||
./hardware.nix
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
boot = {
|
||||
bootspec.enable = true;
|
||||
initrd.kernelModules = [ "amdgpu" ];
|
||||
resumeDevice = "/dev/nvme0n1p2";
|
||||
loader.systemd-boot.enable = lib.mkForce false;
|
||||
|
||||
kernel.sysctl = {
|
||||
"perf_event_paranoid" = 1;
|
||||
"kptr_restrict" = 0;
|
||||
};
|
||||
lanzaboote = {
|
||||
enable = true;
|
||||
configurationLimit = 5;
|
||||
pkiBundle = "/etc/secureboot";
|
||||
};
|
||||
};
|
||||
|
||||
home-manager.users.vivian = import ./home;
|
||||
|
||||
# Enable Ozone rendering for Chromium and Electron apps.
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
# environment.sessionVariables.INFRA_INFO = self; # hosts.${config.networking.domain}.${config.networking.hostName};
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "23.05"; # Did you read the comment?
|
||||
}
|
42
hosts/thalassa/aoife/hardware-configuration.nix
Normal file
42
hosts/thalassa/aoife/hardware-configuration.nix
Normal file
|
@ -0,0 +1,42 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
boot = {
|
||||
|
||||
initrd.availableKernelModules =
|
||||
[ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod" "sdhci_pci" ];
|
||||
initrd.kernelModules = [ ];
|
||||
kernelModules = [ "kvm-amd" ];
|
||||
extraModulePackages = [ ];
|
||||
};
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/c184866a-9a53-4a9f-9a1f-493792af7ea9";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot/efi" = {
|
||||
device = "/dev/disk/by-uuid/5BB8-7503";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[{ device = "/dev/disk/by-uuid/bedb5b75-578e-441f-a9eb-2ecff1f4cfca"; }];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode =
|
||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
# high-resolution display
|
||||
}
|
55
hosts/thalassa/aoife/hardware.nix
Normal file
55
hosts/thalassa/aoife/hardware.nix
Normal file
|
@ -0,0 +1,55 @@
|
|||
{ pkgs, ... }: {
|
||||
hardware = {
|
||||
enableAllFirmware = true;
|
||||
|
||||
bluetooth.enable = true;
|
||||
|
||||
# Vulkan
|
||||
opengl.driSupport = true;
|
||||
opengl.extraPackages = with pkgs; [
|
||||
amdvlk
|
||||
rocm-opencl-icd
|
||||
rocm-opencl-runtime
|
||||
];
|
||||
};
|
||||
services = {
|
||||
|
||||
hardware.bolt.enable = true;
|
||||
|
||||
fprintd.enable = true;
|
||||
|
||||
# Video Driver
|
||||
xserver.videoDrivers = [ "amdgpu" ];
|
||||
xserver = {
|
||||
dpi = 280;
|
||||
xkbOptions = "caps:swapescape";
|
||||
};
|
||||
|
||||
# SSD Trim
|
||||
fstrim.enable = true;
|
||||
|
||||
# Power Management
|
||||
upower.enable = true;
|
||||
thermald.enable = true;
|
||||
};
|
||||
|
||||
# hardware.trackpoint.enable = true;
|
||||
|
||||
# FS
|
||||
fileSystems."/".options = [ "compress=zstd" ];
|
||||
|
||||
powerManagement = {
|
||||
enable = true;
|
||||
powertop.enable = true;
|
||||
};
|
||||
security = {
|
||||
tpm2 = {
|
||||
|
||||
# tpm
|
||||
enable = true;
|
||||
pkcs11.enable = true; # expose /run/current-system/sw/lib/libtpm2_pkcs11.so
|
||||
tctiEnvironment.enable = true;
|
||||
};
|
||||
}; # TPM2TOOLS_TCTI and TPM2_PKCS11_TCTI env variables
|
||||
users.users.vivian.extraGroups = [ "tss" ]; # tss group has access to TPM devices
|
||||
}
|
1
hosts/thalassa/aoife/home/.gitignore
vendored
Normal file
1
hosts/thalassa/aoife/home/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
*dconf_dump*
|
16
hosts/thalassa/aoife/home/default.nix
Normal file
16
hosts/thalassa/aoife/home/default.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{ pkgs, ... }: {
|
||||
# Custom dconf settings
|
||||
dconf.settings."org/gnome/desktop/input-sources" = {
|
||||
xkb-options = [ "caps:swapescape" ];
|
||||
};
|
||||
|
||||
programs.zsh.envExtra = ''
|
||||
source ~/.zshrc.secrets
|
||||
'';
|
||||
|
||||
home.packages = with pkgs; [
|
||||
libreoffice-fresh
|
||||
jetbrains.clion
|
||||
jetbrains.rust-rover
|
||||
];
|
||||
}
|
10
hosts/thalassa/null/README.md
Normal file
10
hosts/thalassa/null/README.md
Normal file
|
@ -0,0 +1,10 @@
|
|||
# null
|
||||
This folder contains the NixOS configuration for my laptop, with hostname `null`.
|
||||
|
||||
## Information
|
||||
* OS: NixOS
|
||||
* WM: hyprland
|
||||
* Terminal: foot
|
||||
* Shell: zsh
|
||||
* Theme: Captuccin Pink Dark
|
||||
* Launcher: wofi
|
267
hosts/thalassa/null/configuration.nix
Normal file
267
hosts/thalassa/null/configuration.nix
Normal file
|
@ -0,0 +1,267 @@
|
|||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ pkgs, inputs, ... }:
|
||||
let
|
||||
nvidia-offload = pkgs.writeShellScriptBin "nvidia-offload" ''
|
||||
export __NV_PRIME_RENDER_OFFLOAD=1
|
||||
export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0
|
||||
export __GLX_VENDOR_LIBRARY_NAME=nvidia
|
||||
export __VK_LAYER_NV_optimus=NVIDIA_only
|
||||
export LIBVA_DRIVER_NAME=nvidia
|
||||
export GBM_BACKEND=nvidia-drm
|
||||
|
||||
exec "$@"
|
||||
'';
|
||||
run-hyprland = pkgs.writeShellScriptBin "run-hyprland" ''
|
||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||
export XCURSOR_SIZE=32
|
||||
|
||||
export CLUTTER_BACKEND=wayland
|
||||
export XDG_SESSION_TYPE=wayland
|
||||
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
|
||||
export MOZ_ENABLE_WAYLAND=1
|
||||
export WLR_NO_HARDWARE_CURSORS=1
|
||||
export WLR_BACKEND=vulkan
|
||||
export QT_QPA_PLATFORM=wayland
|
||||
export GDK_BACKEND=wayland
|
||||
export SDL_VIDEODRIVER=wayland
|
||||
|
||||
exec Hyprland
|
||||
'';
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
./rescue-boot.nix
|
||||
./networking.nix
|
||||
];
|
||||
home-manager = {
|
||||
|
||||
# home-manager
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
users.vivian = import ./home;
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
};
|
||||
security = {
|
||||
|
||||
pam.services.swaylock = { };
|
||||
|
||||
sudo.wheelNeedsPassword = true;
|
||||
rtkit.enable = true;
|
||||
|
||||
# Enables logging in with my Solokey
|
||||
pam.u2f = {
|
||||
enable = true;
|
||||
debug = false;
|
||||
cue = true;
|
||||
control = "sufficient";
|
||||
authFile =
|
||||
"/etc/u2f-mappings"; # use `pamu2fcfg` from `pkgs.pam_u2f` to generate this config
|
||||
};
|
||||
};
|
||||
|
||||
fonts = {
|
||||
fonts = with pkgs; [
|
||||
material-design-icons
|
||||
noto-fonts
|
||||
noto-fonts-cjk
|
||||
noto-fonts-emoji
|
||||
dejavu_fonts
|
||||
(nerdfonts.override {
|
||||
fonts =
|
||||
[ "DejaVuSansMono" "Ubuntu" "DroidSansMono" "NerdFontsSymbolsOnly" ];
|
||||
})
|
||||
];
|
||||
|
||||
enableDefaultFonts = false;
|
||||
|
||||
fontconfig = {
|
||||
defaultFonts = {
|
||||
monospace = [ "DejaVuSansMono Nerd Font" "Noto Color Emoji" ];
|
||||
sansSerif =
|
||||
[ "DejaVu Sans" "DejaVuSansMono Nerd Font" "Noto Color Emoji" ];
|
||||
serif =
|
||||
[ "DejaVu Serif" "DejaVuSansMono Nerd Font" "Noto Color Emoji" ];
|
||||
emoji = [ "Noto Color Emoji" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Bootloader.
|
||||
# boot.initrd.systemd.enable = true; # Experimental
|
||||
boot = {
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
loader = {
|
||||
systemd-boot.editor = false;
|
||||
systemd-boot.enable = true;
|
||||
# loader.systemd-boot.configurationLimit = 6;
|
||||
efi.canTouchEfiVariables = true;
|
||||
efi.efiSysMountPoint = "/boot/efi";
|
||||
};
|
||||
|
||||
kernel.sysctl = { "fs.inotify.max_user_watches" = 524288; };
|
||||
};
|
||||
services = {
|
||||
|
||||
gnome.gnome-keyring.enable = true;
|
||||
|
||||
udisks2.enable = true;
|
||||
dbus.enable = true;
|
||||
|
||||
xserver = {
|
||||
enable = false;
|
||||
layout = "us";
|
||||
xkbVariant = "altgr-intl";
|
||||
xkbOptions = "caps:swapescape";
|
||||
videoDrivers = [ "nvidia" ];
|
||||
};
|
||||
blueman.enable = true;
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
printing.enable = true;
|
||||
pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
# If you want to use JACK applications, uncomment this
|
||||
#jack.enable = true;
|
||||
|
||||
# use the example session manager (no others are packaged yet so this is enabled by default,
|
||||
# no need to redefine it in your config for now)
|
||||
#media-session.enable = true;
|
||||
};
|
||||
|
||||
fstrim.enable = true;
|
||||
|
||||
# don't shutdown when power button is short-pressed
|
||||
logind.extraConfig = ''
|
||||
HandlePowerKey=suspend
|
||||
'';
|
||||
|
||||
udev.packages = with pkgs; [
|
||||
android-udev-rules
|
||||
logitech-udev-rules
|
||||
wooting-udev-rules
|
||||
];
|
||||
};
|
||||
fileSystems = {
|
||||
|
||||
"/".options = [ "compress=zstd" ];
|
||||
"/home".options = [ "compress=zstd" ];
|
||||
"/nix".options = [ "compress=zstd" "noatime" ];
|
||||
};
|
||||
i18n = {
|
||||
|
||||
# Filesystem dedup
|
||||
# services.beesd.filesystems = {
|
||||
# root = {
|
||||
# spec = "LABEL=nixos";
|
||||
# hashTableSizeMB = 256;
|
||||
# verbosity = "crit";
|
||||
# extraOptions = [ "--loadavg-target" "2.0" ];
|
||||
# };
|
||||
# };
|
||||
|
||||
# Select internationalisation properties.
|
||||
defaultLocale = "en_GB.utf8";
|
||||
|
||||
extraLocaleSettings = {
|
||||
LC_ADDRESS = "nl_NL.UTF-8";
|
||||
LC_IDENTIFICATION = "nl_NL.UTF-8";
|
||||
LC_MEASUREMENT = "nl_NL.UTF-8";
|
||||
LC_MONETARY = "nl_NL.UTF-8";
|
||||
LC_NAME = "nl_NL.UTF-8";
|
||||
LC_NUMERIC = "nl_NL.UTF-8";
|
||||
LC_PAPER = "nl_NL.UTF-8";
|
||||
LC_TELEPHONE = "nl_NL.UTF-8";
|
||||
LC_TIME = "en_DK.UTF-8";
|
||||
};
|
||||
|
||||
supportedLocales =
|
||||
[ "en_GB.UTF-8/UTF-8" "nl_NL.UTF-8/UTF-8" "en_DK.UTF-8/UTF-8" ];
|
||||
};
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
wlr.enable = true;
|
||||
};
|
||||
programs = {
|
||||
|
||||
# Hyprland
|
||||
hyprland = {
|
||||
enable = true;
|
||||
package = null; # Managed by home manager
|
||||
};
|
||||
|
||||
steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
dedicatedServer.openFirewall = true;
|
||||
};
|
||||
|
||||
ssh.startAgent = true;
|
||||
};
|
||||
|
||||
environment.loginShellInit = ''
|
||||
if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then
|
||||
${run-hyprland}/bin/run-hyprland
|
||||
fi
|
||||
'';
|
||||
hardware = {
|
||||
|
||||
nvidia.prime = {
|
||||
offload.enable = true;
|
||||
intelBusId = "PCI:0:2:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
};
|
||||
|
||||
opengl = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
vaapiVdpau
|
||||
intel-media-driver # LIBVA_DRIVER_NAME=iHD
|
||||
vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
|
||||
libvdpau-va-gl
|
||||
];
|
||||
};
|
||||
|
||||
bluetooth.enable = true;
|
||||
|
||||
saleae-logic.enable = true;
|
||||
pulseaudio.enable = false;
|
||||
};
|
||||
|
||||
virtualisation.podman.enable = true;
|
||||
|
||||
# Enable sound with pipewire.
|
||||
sound.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
pciutils
|
||||
nvidia-offload
|
||||
run-hyprland
|
||||
wireguard-tools
|
||||
slurp
|
||||
gdb
|
||||
|
||||
swaylock-effects # Has to be installed globally so that pam module works
|
||||
];
|
||||
|
||||
nix.extraOptions = ''
|
||||
keep-outputs = true
|
||||
keep-derivations = true
|
||||
'';
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "22.05"; # Did you read the comment?
|
||||
}
|
56
hosts/thalassa/null/hardware-configuration.nix
Normal file
56
hosts/thalassa/null/hardware-configuration.nix
Normal file
|
@ -0,0 +1,56 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
boot = {
|
||||
|
||||
initrd.availableKernelModules =
|
||||
[ "xhci_pci" "ahci" "nvme" "rtsx_pci_sdmmc" ];
|
||||
initrd.kernelModules = [ ];
|
||||
kernelModules = [ "kvm-intel" ];
|
||||
extraModulePackages = [ ];
|
||||
};
|
||||
fileSystems = {
|
||||
|
||||
"/" = {
|
||||
device = "/dev/disk/by-uuid/d4f56e5b-2509-4e63-8324-65a35c71e90c";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@" ];
|
||||
};
|
||||
|
||||
"/nix" = {
|
||||
device = "/dev/disk/by-uuid/d4f56e5b-2509-4e63-8324-65a35c71e90c";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@/nix" ];
|
||||
};
|
||||
|
||||
"/home" = {
|
||||
device = "/dev/disk/by-uuid/d4f56e5b-2509-4e63-8324-65a35c71e90c";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@home" ];
|
||||
};
|
||||
|
||||
"/boot/efi" = {
|
||||
device = "/dev/disk/by-uuid/D478-6F66";
|
||||
fsType = "vfat";
|
||||
};
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wg0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
hardware.cpu.intel.updateMicrocode =
|
||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
207
hosts/thalassa/null/home/default.nix
Normal file
207
hosts/thalassa/null/home/default.nix
Normal file
|
@ -0,0 +1,207 @@
|
|||
{ config, pkgs, inputs, texlive, ... }:
|
||||
let
|
||||
tex = pkgs.texlive.combine {
|
||||
inherit (pkgs.texlive) scheme-full;
|
||||
dnd-5e-latex-template = { pkgs = [ pkgs.v.dnd-5e-latex-template ]; };
|
||||
};
|
||||
in
|
||||
{
|
||||
programs = {
|
||||
home-manager.enable = true;
|
||||
|
||||
foot = { enable = true; };
|
||||
|
||||
nix-index.enable = true;
|
||||
|
||||
exa = {
|
||||
enable = true;
|
||||
enableAliases = true;
|
||||
};
|
||||
|
||||
bat.enable = true;
|
||||
|
||||
git = {
|
||||
enable = true;
|
||||
package = pkgs.gitAndTools.gitFull;
|
||||
userName = "Vivian";
|
||||
userEmail = "vivian@0x76.dev";
|
||||
lfs.enable = true;
|
||||
# delta.enable = true;
|
||||
extraConfig = {
|
||||
push.autoSetupRemote = true;
|
||||
init.defaultBranch = "main";
|
||||
};
|
||||
};
|
||||
|
||||
mako = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
[mode=do-not-disturb]
|
||||
invisible=1
|
||||
'';
|
||||
};
|
||||
|
||||
tmux = {
|
||||
enable = true;
|
||||
shortcut = "b";
|
||||
terminal = "screen-256color";
|
||||
clock24 = true;
|
||||
};
|
||||
|
||||
firefox = {
|
||||
enable = true;
|
||||
package = pkgs.firefox-devedition-bin;
|
||||
};
|
||||
|
||||
vscode = {
|
||||
enable = true;
|
||||
package = pkgs.vscode;
|
||||
userSettings = {
|
||||
"ltex.language" = "en-GB";
|
||||
"latex-workshop" = {
|
||||
"linting.chktex.enabled" = true;
|
||||
"latex.clean.subfolder.enabled" = true;
|
||||
"latex.outDir" = "%TMPDIR%/%RELATIVE_DOC%";
|
||||
};
|
||||
"workbench.colorTheme" = "Catppuccin Frappé";
|
||||
"editor.fontFamily" =
|
||||
"'DejaVuSansMono Nerd Font', 'monospace', monospace";
|
||||
"keyboard.dispatch" = "keyCode";
|
||||
"rust-analyzer.server.path" = "${pkgs.rust-analyzer}/bin/rust-analyzer";
|
||||
"terminal.integrated.defaultProfile.linux" = "zsh";
|
||||
"nix.enableLanguageServer" = true; # Enable LSP.
|
||||
"nix.serverPath" =
|
||||
"${pkgs.nil}/bin/nil"; # The path to the LSP server executable.
|
||||
"[nix]" = { "editor.defaultFormatter" = "brettm12345.nixfmt-vscode"; };
|
||||
};
|
||||
extensions = with pkgs.vscode-extensions;
|
||||
with pkgs.v.vscode-extensions; [
|
||||
# astro-build.astro-vscode
|
||||
brettm12345.nixfmt-vscode
|
||||
catppuccin.catppuccin-vsc
|
||||
codezombiech.gitignore
|
||||
editorconfig.editorconfig
|
||||
foxundermoon.shell-format
|
||||
james-yu.latex-workshop
|
||||
jnoortheen.nix-ide
|
||||
matklad.rust-analyzer
|
||||
mkhl.direnv
|
||||
ms-vscode-remote.remote-ssh
|
||||
ms-vscode.cpptools
|
||||
platformio.platformio-ide
|
||||
redhat.vscode-yaml
|
||||
tamasfe.even-better-toml
|
||||
valentjn.vscode-ltex
|
||||
vscodevim.vim
|
||||
xaver.clang-format
|
||||
];
|
||||
};
|
||||
|
||||
direnv = {
|
||||
enable = true;
|
||||
nix-direnv = { enable = true; };
|
||||
};
|
||||
|
||||
zsh = {
|
||||
enable = true;
|
||||
sessionVariables = { DIRENV_LOG_FORMAT = ""; };
|
||||
};
|
||||
};
|
||||
home = {
|
||||
username = "vivian";
|
||||
homeDirectory = "/home/vivian";
|
||||
stateVersion = "22.05";
|
||||
|
||||
packages = with pkgs; [
|
||||
appimage-run
|
||||
brightnessctl
|
||||
btop
|
||||
calibre
|
||||
cinny-desktop
|
||||
discord-canary
|
||||
fluxcd
|
||||
fusee-launcher
|
||||
gcc
|
||||
gimp
|
||||
gnome.eog
|
||||
gnome.file-roller
|
||||
gnome.gnome-font-viewer
|
||||
gnome.nautilus
|
||||
grim # Screenshot tool
|
||||
inputs.comma.packages.${pkgs.system}.default
|
||||
inputs.riff.packages.${pkgs.system}.riff
|
||||
inputs.webcord.packages.${pkgs.system}.default
|
||||
k9s
|
||||
kubectl
|
||||
libnotify
|
||||
mullvad-vpn
|
||||
neofetch
|
||||
nixpkgs-review
|
||||
nixfmt
|
||||
ouch
|
||||
plex-media-player
|
||||
plexamp
|
||||
python3
|
||||
retroarchFull
|
||||
ripgrep
|
||||
rsync
|
||||
rustup
|
||||
saleae-logic-2
|
||||
solo2-cli
|
||||
steam-run
|
||||
tex
|
||||
thunderbird-wayland
|
||||
v.deemix-gui
|
||||
wf-recorder # Screenrecorder
|
||||
wl-clipboard # Clipboard manager
|
||||
wofi # Wayland rofi
|
||||
wpa_supplicant_gui
|
||||
];
|
||||
};
|
||||
|
||||
imports = [ ./hyprland.nix ./neovim.nix ./eww ./theme.nix ];
|
||||
|
||||
xdg.mimeApps = {
|
||||
enable = true;
|
||||
defaultApplications =
|
||||
let browser = [ "firefox.desktop" ];
|
||||
in {
|
||||
"image/*" = "org.gnome.eog.desktop";
|
||||
"text/html" = browser;
|
||||
"x-scheme-handler/http" = browser;
|
||||
"x-scheme-handler/https" = browser;
|
||||
"x-scheme-handler/ftp" = browser;
|
||||
"x-scheme-handler/about" = browser;
|
||||
"x-scheme-handler/unknown" = browser;
|
||||
"application/x-extension-htm" = browser;
|
||||
"application/x-extension-html" = browser;
|
||||
"application/x-extension-shtml" = browser;
|
||||
"application/xhtml+xml" = browser;
|
||||
"application/x-extension-xhtml" = browser;
|
||||
"application/x-extension-xht" = browser;
|
||||
|
||||
"application/json" = browser;
|
||||
"application/pdf" = browser;
|
||||
|
||||
"x-scheme-handler/vscode" = "code-url-handler.desktop";
|
||||
"x-scheme-handler/discord" = "webcord.desktop";
|
||||
};
|
||||
};
|
||||
|
||||
xdg.userDirs =
|
||||
let home = config.home.homeDirectory;
|
||||
in {
|
||||
enable = true;
|
||||
createDirectories = true;
|
||||
desktop = "${home}/.desktop";
|
||||
documents = "${home}/cloud/Documents";
|
||||
download = "${home}/dl";
|
||||
music = "${home}/cloud/Music";
|
||||
pictures = "${home}/cloud/Pictures";
|
||||
publicShare = "${home}/.publicShare";
|
||||
templates = "${home}/.templates";
|
||||
videos = "${home}/cloud/Videos";
|
||||
};
|
||||
|
||||
services.syncthing.enable = true;
|
||||
}
|
42
hosts/thalassa/null/home/eww/default.nix
Normal file
42
hosts/thalassa/null/home/eww/default.nix
Normal file
|
@ -0,0 +1,42 @@
|
|||
{ pkgs, ... }: {
|
||||
home = {
|
||||
packages = with pkgs; [
|
||||
eww-wayland
|
||||
pamixer
|
||||
lua
|
||||
(nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
|
||||
];
|
||||
file = {
|
||||
|
||||
".config/eww/eww.yuck".source = ./eww.yuck;
|
||||
".config/eww/eww.scss".text = builtins.readFile ./eww.scss;
|
||||
|
||||
# scripts
|
||||
# TODO: just link all scripts in ./scripts to .config/eww/scripts
|
||||
".config/eww/scripts/volume.sh" = {
|
||||
source = ./scripts/volume.sh;
|
||||
executable = true;
|
||||
};
|
||||
|
||||
".config/eww/scripts/wifi.sh" = {
|
||||
source = ./scripts/wifi.sh;
|
||||
executable = true;
|
||||
};
|
||||
|
||||
".config/eww/scripts/workspaces.sh" = {
|
||||
source = ./scripts/workspaces.sh;
|
||||
executable = true;
|
||||
};
|
||||
|
||||
".config/eww/scripts/workspaces.lua" = {
|
||||
source = ./scripts/workspaces.lua;
|
||||
executable = true;
|
||||
};
|
||||
|
||||
".config/eww/scripts/do-not-disturb.sh" = {
|
||||
source = ./scripts/do-not-disturb.sh;
|
||||
executable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
138
hosts/thalassa/null/home/eww/eww.scss
Normal file
138
hosts/thalassa/null/home/eww/eww.scss
Normal file
|
@ -0,0 +1,138 @@
|
|||
$light-gray: #9699b7;
|
||||
|
||||
* {
|
||||
all: unset; //Unsets everything so you can style everything from scratch
|
||||
font-family: "JetBrainsMono"
|
||||
}
|
||||
|
||||
tooltip {
|
||||
background-color: $base;
|
||||
border-radius: 5px
|
||||
}
|
||||
|
||||
button {
|
||||
transition: background-color 200ms, color 200ms;
|
||||
}
|
||||
|
||||
.active {
|
||||
color: $pink;
|
||||
font-size: 1.4rem;
|
||||
}
|
||||
|
||||
.inactive {
|
||||
color: $base;
|
||||
font-size: 1.4rem;
|
||||
}
|
||||
|
||||
.inactive:hover {
|
||||
color: $light-gray;
|
||||
}
|
||||
|
||||
.bar {
|
||||
background-color: $mantle;
|
||||
}
|
||||
|
||||
.clock {
|
||||
font-weight: bold;
|
||||
background-color: $base;
|
||||
color: $text;
|
||||
border-radius: 10px;
|
||||
padding: 0.2rem;
|
||||
margin: 0.5rem;
|
||||
}
|
||||
|
||||
.date {
|
||||
font-size: 1.5rem;
|
||||
color: $text;
|
||||
}
|
||||
|
||||
|
||||
.battery {
|
||||
font-family: monospace;
|
||||
font-size: 1.5rem;
|
||||
color: $teal;
|
||||
}
|
||||
|
||||
.volume,
|
||||
.dnd,
|
||||
.wifi {
|
||||
font-family: monospace;
|
||||
font-size: 1.5rem;
|
||||
color: $mauve;
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
|
||||
// battery menu
|
||||
.batterywindow {
|
||||
background-color: $mantle;
|
||||
border-radius: 5px;
|
||||
font-size: 18px;
|
||||
font-weight: normal;
|
||||
color: $text;
|
||||
|
||||
progressbar {
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
progressbar progress {
|
||||
background-color: $green;
|
||||
}
|
||||
|
||||
progressbar trough {
|
||||
background-color: $base;
|
||||
}
|
||||
|
||||
.batterymenu {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Calendar
|
||||
.cal {
|
||||
background-color: $mantle;
|
||||
border-radius: 5px;
|
||||
font-size: 18px;
|
||||
font-weight: normal;
|
||||
|
||||
.cal-in {
|
||||
padding: 0px 10px 0px 10px;
|
||||
color: $text;
|
||||
|
||||
.cal {
|
||||
&.highlight {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
padding: 5px 5px 5px 5px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
calender {
|
||||
color: $text;
|
||||
}
|
||||
|
||||
calendar:selected {
|
||||
color: $mauve;
|
||||
}
|
||||
|
||||
calendar.header {
|
||||
color: $overlay0;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
calendar.button {
|
||||
color: $base;
|
||||
}
|
||||
|
||||
calendar.highlight {
|
||||
color: $overlay0;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
calendar:indeterminate {
|
||||
color: $text;
|
||||
}
|
164
hosts/thalassa/null/home/eww/eww.yuck
Normal file
164
hosts/thalassa/null/home/eww/eww.yuck
Normal file
|
@ -0,0 +1,164 @@
|
|||
(defwidget bar []
|
||||
(centerbox
|
||||
:orientation "v"
|
||||
(box
|
||||
:valign "start"
|
||||
:hexpand false
|
||||
:vexpand false
|
||||
:orientation "v"
|
||||
:space-evenly false
|
||||
)
|
||||
|
||||
(workspaces
|
||||
:halign "center"
|
||||
:vexpand true
|
||||
:hexpand false
|
||||
:orientation "v"
|
||||
)
|
||||
|
||||
(box :valign "end" :hexpand false :vexpand true :orientation "v" :space-evenly false
|
||||
(wifi)
|
||||
(do-not-disturb)
|
||||
(volume)
|
||||
(battery)
|
||||
(time)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; ━━━ BATTERY ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
(defwidget battery []
|
||||
(eventbox :onclick "eww open batterywindow --toggle"
|
||||
(label
|
||||
:text `${
|
||||
EWW_BATTERY.BAT0.status == "Charging" ? "" :
|
||||
EWW_BATTERY.BAT0.capacity < 10 ? "" :
|
||||
EWW_BATTERY.BAT0.capacity < 20 ? "" :
|
||||
EWW_BATTERY.BAT0.capacity < 30 ? "" :
|
||||
EWW_BATTERY.BAT0.capacity < 40 ? "" :
|
||||
EWW_BATTERY.BAT0.capacity < 50 ? "" :
|
||||
EWW_BATTERY.BAT0.capacity < 60 ? "" :
|
||||
EWW_BATTERY.BAT0.capacity < 70 ? "" :
|
||||
EWW_BATTERY.BAT0.capacity < 80 ? "" :
|
||||
EWW_BATTERY.BAT0.capacity < 90 ? "" : ""
|
||||
}`
|
||||
:class "battery"
|
||||
))
|
||||
)
|
||||
|
||||
(defwidget batterymenu []
|
||||
(box :orientation "v"
|
||||
:class "batterymenu"
|
||||
(label :text "${EWW_BATTERY.BAT0.status}: ${EWW_BATTERY.BAT0.capacity}%")
|
||||
(progress :value "${EWW_BATTERY.BAT0.capacity}" :orientation "h") ; TODO: change class (and color) on low juice
|
||||
)
|
||||
)
|
||||
|
||||
(defwindow batterywindow
|
||||
:monitor 0
|
||||
:geometry (geometry
|
||||
:x "53px"
|
||||
:y "30px"
|
||||
:anchor "bottom left"
|
||||
)
|
||||
(batterymenu)
|
||||
)
|
||||
|
||||
; ━━━ do-not-disturb ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
(defvar dnd "")
|
||||
(defwidget do-not-disturb []
|
||||
(eventbox
|
||||
:orientation "h"
|
||||
:halign "center"
|
||||
:space-evenly false
|
||||
:onclick "nohup ./scripts/do-not-disturb.sh &"
|
||||
(label
|
||||
:text {dnd}
|
||||
:class "dnd"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; ━━━ WIFI ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
(defpoll wifi :interval "30s" "./scripts/wifi.sh")
|
||||
|
||||
(defwidget wifi []
|
||||
(box
|
||||
:orientation "h"
|
||||
:halign "center"
|
||||
:space-evenly false
|
||||
(label
|
||||
:text {wifi.icon}
|
||||
:tooltip {wifi.status}
|
||||
:class "wifi"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; ━━━ VOLUME ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
(defpoll volume :interval "1s" "./scripts/volume.sh")
|
||||
(defwidget volume []
|
||||
(eventbox
|
||||
:orientation "h"
|
||||
:halign "center"
|
||||
:space-evenly false
|
||||
:onclick "pamixer -t"
|
||||
(label
|
||||
:text {volume.icon}
|
||||
:tooltip "${volume.percent}%"
|
||||
:class "volume"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; ━━━ TIME ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
(defpoll hour :interval "10s" "date +%H")
|
||||
(defpoll minute :interval "10s" "date +%M")
|
||||
(defpoll dateVar :interval "600s" "date '+%A %d.%m.%y'")
|
||||
|
||||
(defwidget time []
|
||||
(eventbox
|
||||
:cursor "hand"
|
||||
:hexpand false
|
||||
:vexpand false
|
||||
:tooltip "${dateVar}"
|
||||
:onclick "eww open calendar --toggle &"
|
||||
(box :orientation "v" :hexpand false :vexpand false :space-evenly false :class "clock"
|
||||
(label :class "date" :text "${hour}")
|
||||
|
||||
(label :class "date" :text "${minute}")
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; Calendar
|
||||
(defpoll calendar_day :interval "20h" "date '+%d'")
|
||||
(defpoll calendar_year :interval "20h" "date '+%Y'")
|
||||
(defwidget cal []
|
||||
(box :class "cal" :orientation "v"
|
||||
(box :class "cal-in"
|
||||
(calendar :class "cal"
|
||||
:day calendar_day
|
||||
:year calendar_year))))
|
||||
|
||||
(defwindow calendar
|
||||
:monitor 0
|
||||
:geometry (geometry :x "53px"
|
||||
:y "5px"
|
||||
:anchor "bottom left"
|
||||
:width "270px"
|
||||
:height "60px")
|
||||
(cal))
|
||||
|
||||
(deflisten workspaces_listen "./scripts/workspaces.sh")
|
||||
(defwidget workspaces []
|
||||
(literal :content workspaces_listen))
|
||||
|
||||
(defwindow bar
|
||||
:monitor 0
|
||||
:exclusive false
|
||||
:geometry (geometry :height "1080px" :x "-4px" :y "0px"
|
||||
:width "52px"
|
||||
:anchor "top left")
|
||||
:stacking "fg"
|
||||
(bar))
|
10
hosts/thalassa/null/home/eww/scripts/do-not-disturb.sh
Executable file
10
hosts/thalassa/null/home/eww/scripts/do-not-disturb.sh
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#! nix-shell -p jq -i bash
|
||||
|
||||
if makoctl mode | rg -q "do-not-disturb"; then
|
||||
eww update dnd=""
|
||||
makoctl mode -r do-not-disturb > /dev/null
|
||||
else
|
||||
eww update dnd=""
|
||||
makoctl mode -a do-not-disturb > /dev/null
|
||||
fi
|
15
hosts/thalassa/null/home/eww/scripts/volume.sh
Executable file
15
hosts/thalassa/null/home/eww/scripts/volume.sh
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
|
||||
per="$(pamixer --get-volume)"
|
||||
|
||||
if pamixer --get-mute | rg -q true; then
|
||||
icon="婢"
|
||||
elif [ "$per" -gt 66 ]; then
|
||||
icon="墳" # high
|
||||
elif [ "$per" -gt 33 ]; then
|
||||
icon="奔" # med
|
||||
else
|
||||
icon="奄" #low
|
||||
fi
|
||||
|
||||
printf "{\"icon\": \"${icon}\", \"percent\": \"${per}\"}"
|
11
hosts/thalassa/null/home/eww/scripts/wifi.sh
Executable file
11
hosts/thalassa/null/home/eww/scripts/wifi.sh
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
if wpa_cli status | rg -q "wpa_state=COMPLETED"; then
|
||||
icon="直"
|
||||
status="Connected"
|
||||
else
|
||||
icon="睊"
|
||||
status="offline"
|
||||
fi
|
||||
|
||||
printf "{\"icon\": \"${icon}\", \"status\": \"${status}\"}"
|
21
hosts/thalassa/null/home/eww/scripts/workspaces.lua
Executable file
21
hosts/thalassa/null/home/eww/scripts/workspaces.lua
Executable file
|
@ -0,0 +1,21 @@
|
|||
#!/usr/bin/env lua
|
||||
|
||||
aw = io.popen("hyprctl monitors | grep active | sed 's/()/(1)/g' | sort | awk 'NR>1{print $1}' RS='(' FS=')'")
|
||||
active_workspace = aw:read("*a")
|
||||
aw:close()
|
||||
|
||||
box = "(box :orientation \"v\" :spacing 1 :space-evenly \"true\" "
|
||||
|
||||
for i = 1,10 do
|
||||
if i == tonumber(active_workspace) then
|
||||
local btn = "(button :class \"active\" :onclick \"hyprctl dispatch workspace "..i.." \" \"\")"
|
||||
box = box .. btn
|
||||
else
|
||||
local btn = "(button :class \"inactive\" :onclick \"hyprctl dispatch workspace "..i.."\" \"\")"
|
||||
box = box .. btn
|
||||
end
|
||||
end
|
||||
|
||||
box = box .. ")"
|
||||
|
||||
print(box)
|
10
hosts/thalassa/null/home/eww/scripts/workspaces.sh
Executable file
10
hosts/thalassa/null/home/eww/scripts/workspaces.sh
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
workspaces() {
|
||||
./scripts/workspaces.lua
|
||||
}
|
||||
|
||||
workspaces
|
||||
|
||||
tail -f /tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/hyprland.log | grep --line-buffered "Changed to workspace" | while read -r; do
|
||||
workspaces
|
||||
done
|
137
hosts/thalassa/null/home/hyprland.nix
Normal file
137
hosts/thalassa/null/home/hyprland.nix
Normal file
|
@ -0,0 +1,137 @@
|
|||
{ pkgs, config, ... }: {
|
||||
home.file.".config/hypr/hyprpaper.conf".text = ''
|
||||
ipc = off
|
||||
preload = ~/cloud/Pictures/Wallpapers-Laptop/wallpaper-nix-pink.png
|
||||
wallpaper = eDP-1,~/cloud/Pictures/Wallpapers-Laptop/wallpaper-nix-pink.png
|
||||
'';
|
||||
|
||||
wayland.windowManager.hyprland =
|
||||
let
|
||||
startup-script = pkgs.writeScriptBin "startup" ''
|
||||
#!${pkgs.stdenv.shell}
|
||||
hyprctl setcursor Catppuccin-Frappe-Pink-Cursors ${
|
||||
builtins.toString config.home.pointerCursor.size
|
||||
}
|
||||
${pkgs.hyprpaper}/bin/hyprpaper &
|
||||
foot --server &
|
||||
eww daemon &
|
||||
eww open bar &
|
||||
firefox-devedition &
|
||||
webcord &
|
||||
element-desktop &
|
||||
'';
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
recommendedEnvironment = true;
|
||||
extraConfig = ''
|
||||
exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
||||
exec-once=systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
||||
|
||||
monitor=eDP-1,1920x1080@60,0x0,1
|
||||
monitor=eDP-1,addreserved,0,0,48,0
|
||||
monitor=,preferred,auto,1
|
||||
|
||||
windowrulev2 = workspace 1 silent,class:^(Electron)$,title:^(.*)(WebCord)(.*)$
|
||||
windowrulev2 = workspace 1 silent,title:^(Element)(.*)$
|
||||
windowrulev2 = workspace 2 silent,class:^(firefox-aurora)$
|
||||
windowrulev2 = float,class:^(firefox-aurora)$,title:^(Picture-in-Picture)$
|
||||
|
||||
general {
|
||||
layout = dwindle
|
||||
col.active_border = 0xfff4b8e4
|
||||
}
|
||||
|
||||
input {
|
||||
kb_options=caps:escape
|
||||
touchpad {
|
||||
natural_scroll= true
|
||||
}
|
||||
}
|
||||
|
||||
gestures {
|
||||
workspace_swipe = true
|
||||
}
|
||||
|
||||
misc {
|
||||
no_vfr = false
|
||||
disable_hyprland_logo = true
|
||||
disable_splash_rendering = true
|
||||
}
|
||||
|
||||
dwindle {
|
||||
pseudotile=true
|
||||
}
|
||||
|
||||
bind=SUPER,RETURN,exec,footclient
|
||||
bind=SUPER,f,exec,firefox-devedition
|
||||
bind=SUPER,d,exec,wofi --show run,drun
|
||||
|
||||
bind=,Print,exec,grim -g "$(slurp)" -t png - | wl-copy -t image/png
|
||||
bind=SUPER,W,killactive,
|
||||
bind=SUPERSHIFT,Q,exit,
|
||||
bind=SUPER,S,togglefloating,
|
||||
bind=SUPER,P,pin,
|
||||
|
||||
bindm=SUPER,mouse:272,movewindow
|
||||
bindm=SUPER,mouse:273,resizewindow
|
||||
|
||||
bind=SUPER,left,movefocus,l
|
||||
bind=SUPER,right,movefocus,r
|
||||
bind=SUPER,up,movefocus,u
|
||||
bind=SUPER,down,movefocus,d
|
||||
|
||||
bind=SUPER,1,workspace,1
|
||||
bind=SUPER,2,workspace,2
|
||||
bind=SUPER,3,workspace,3
|
||||
bind=SUPER,4,workspace,4
|
||||
bind=SUPER,5,workspace,5
|
||||
bind=SUPER,6,workspace,6
|
||||
bind=SUPER,7,workspace,7
|
||||
bind=SUPER,8,workspace,8
|
||||
bind=SUPER,9,workspace,9
|
||||
bind=SUPER,0,workspace,10
|
||||
bind=SUPER,grave,togglespecialworkspace
|
||||
|
||||
bind=ALT,1,movetoworkspace,1
|
||||
bind=ALT,2,movetoworkspace,2
|
||||
bind=ALT,3,movetoworkspace,3
|
||||
bind=ALT,4,movetoworkspace,4
|
||||
bind=ALT,5,movetoworkspace,5
|
||||
bind=ALT,6,movetoworkspace,6
|
||||
bind=ALT,7,movetoworkspace,7
|
||||
bind=ALT,8,movetoworkspace,8
|
||||
bind=ALT,9,movetoworkspace,9
|
||||
bind=ALT,0,movetoworkspace,10
|
||||
bind=ALT,grave,movetoworkspace,special
|
||||
|
||||
bind=SUPERSHIFT,1,movetoworkspacesilent,1
|
||||
bind=SUPERSHIFT,2,movetoworkspacesilent,2
|
||||
bind=SUPERSHIFT,3,movetoworkspacesilent,3
|
||||
bind=SUPERSHIFT,4,movetoworkspacesilent,4
|
||||
bind=SUPERSHIFT,5,movetoworkspacesilent,5
|
||||
bind=SUPERSHIFT,6,movetoworkspacesilent,6
|
||||
bind=SUPERSHIFT,7,movetoworkspacesilent,7
|
||||
bind=SUPERSHIFT,8,movetoworkspacesilent,8
|
||||
bind=SUPERSHIFT,9,movetoworkspacesilent,9
|
||||
bind=SUPERSHIFT,0,movetoworkspacesilent,10
|
||||
bind=SUPERSHIFT,grave,movetoworkspacesilent,special
|
||||
|
||||
bind=SUPER,mouse_down,workspace,e+1
|
||||
bind=SUPER,mouse_up,workspace,e-1
|
||||
|
||||
bind=SUPER,g,togglegroup
|
||||
bind=SUPER,tab,changegroupactive
|
||||
bind=SUPER,m,fullscreen,1
|
||||
bind=SUPERSHIFT,m,fullscreen,0
|
||||
|
||||
bind=,XF86MonBrightnessUp,exec,brightnessctl -q s +5%
|
||||
bind=,XF86MonBrightnessDown,exec,brightnessctl -q s 5%-
|
||||
bind=,XF86MonRaiseVolume,exec,pamixer -i 5
|
||||
bind=,XF86MonLowerVolume,exec,pamixer -d 5
|
||||
bind=,XF86AudioMute,exec,pamixer -t
|
||||
|
||||
exec-once=${startup-script}/bin/startup
|
||||
'';
|
||||
};
|
||||
}
|
39
hosts/thalassa/null/home/neovim.nix
Normal file
39
hosts/thalassa/null/home/neovim.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{ inputs, pkgs, ... }: {
|
||||
imports = [ inputs.nixvim.homeManagerModules.nixvim ];
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
package = pkgs.neovim-unwrapped;
|
||||
|
||||
extraPlugins = with pkgs.vimPlugins; [ catppuccin-nvim ];
|
||||
|
||||
colorscheme = "catppuccin-frappe";
|
||||
|
||||
plugins = {
|
||||
nix.enable = true;
|
||||
treesitter = {
|
||||
enable = true;
|
||||
nixGrammars = false;
|
||||
ensureInstalled = [ ];
|
||||
};
|
||||
surround.enable = true;
|
||||
fugitive.enable = true;
|
||||
lualine = {
|
||||
enable = true;
|
||||
theme = "catppuccin";
|
||||
};
|
||||
telescope = {
|
||||
enable = true;
|
||||
extensions.fzf-native.enable = true;
|
||||
};
|
||||
lsp = {
|
||||
enable = true;
|
||||
servers = {
|
||||
rust-analyzer.enable = true;
|
||||
rnix-lsp.enable = true;
|
||||
pyright.enable = true;
|
||||
};
|
||||
};
|
||||
nvim-cmp = { enable = true; };
|
||||
};
|
||||
};
|
||||
}
|
127
hosts/thalassa/null/home/theme.nix
Normal file
127
hosts/thalassa/null/home/theme.nix
Normal file
|
@ -0,0 +1,127 @@
|
|||
{ lib, pkgs, config, ... }:
|
||||
let
|
||||
inherit (builtins) mapAttrs;
|
||||
|
||||
theme = "Catppuccin-Pink-Dark";
|
||||
cursorTheme = config.home.pointerCursor.name;
|
||||
colour = {
|
||||
rosewater = "f2d5cf";
|
||||
flamingo = "eebebe";
|
||||
pink = "f4b8e4";
|
||||
mauve = "ca9ee6";
|
||||
red = "e78284";
|
||||
maroon = "ea999c";
|
||||
peach = "ef9f76";
|
||||
yellow = "e5c890";
|
||||
green = "a6d189";
|
||||
teal = "81c8be";
|
||||
sky = "99d1db";
|
||||
sapphire = "85c1dc";
|
||||
blue = "8caaee";
|
||||
lavender = "babbf1";
|
||||
text = "c6d0f5";
|
||||
subtext0 = "a5adce";
|
||||
subtext1 = "b5bfe2";
|
||||
overlay2 = "949cbb";
|
||||
overlay0 = "737994";
|
||||
overlay1 = "838ba7";
|
||||
surface0 = "414559";
|
||||
surface1 = "51576d";
|
||||
surface2 = "626880";
|
||||
base = "303446";
|
||||
mantle = "292c3c";
|
||||
crust = "232634";
|
||||
|
||||
hex = mapAttrs (_name: value: "#${value}") colour;
|
||||
};
|
||||
in
|
||||
{
|
||||
home = {
|
||||
file.".xsettingsd".text = ''
|
||||
Net/ThemeName "${theme}"
|
||||
Gtk/CursorThemeName "${cursorTheme}"
|
||||
'';
|
||||
|
||||
pointerCursor = {
|
||||
name = "Catppuccin-Frappe-Pink-Cursors";
|
||||
size = 32;
|
||||
package = pkgs.catppuccin-cursors.frappePink;
|
||||
};
|
||||
|
||||
file.".config/eww/eww.scss".text = lib.mkBefore ''
|
||||
$rosewater: ${colour.hex.rosewater};
|
||||
$flamingo: ${colour.hex.flamingo};
|
||||
$pink: ${colour.hex.pink};
|
||||
$mauve: ${colour.hex.mauve};
|
||||
$red: ${colour.hex.red};
|
||||
$maroon: ${colour.hex.maroon};
|
||||
$peach: ${colour.hex.peach};
|
||||
$yellow: ${colour.hex.yellow};
|
||||
$green: ${colour.hex.green};
|
||||
$teal: ${colour.hex.teal};
|
||||
$sky: ${colour.hex.sky};
|
||||
$sapphire: ${colour.hex.sapphire};
|
||||
$blue: ${colour.hex.blue};
|
||||
$lavender: ${colour.hex.lavender};
|
||||
$text: ${colour.hex.text};
|
||||
$subtext0: ${colour.hex.subtext0};
|
||||
$subtext1: ${colour.hex.subtext1};
|
||||
$overlay0: ${colour.hex.overlay0};
|
||||
$overlay1: ${colour.hex.overlay1};
|
||||
$overlay2: ${colour.hex.overlay2};
|
||||
$surface0: ${colour.hex.surface0};
|
||||
$surface1: ${colour.hex.surface1};
|
||||
$surface2: ${colour.hex.surface2};
|
||||
$base: ${colour.hex.base};
|
||||
$mantle: ${colour.hex.mantle};
|
||||
$crust: ${colour.hex.crust};
|
||||
'';
|
||||
};
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme = {
|
||||
name = theme;
|
||||
package = pkgs.catppuccin-gtk;
|
||||
};
|
||||
iconTheme = {
|
||||
name = "Arc";
|
||||
package = pkgs.arc-icon-theme;
|
||||
};
|
||||
cursorTheme = {
|
||||
name = cursorTheme;
|
||||
inherit (config.home.pointerCursor) size package;
|
||||
};
|
||||
};
|
||||
|
||||
# Note, pink and blue are switched
|
||||
programs.foot.settings.colors = {
|
||||
alpha = 0.8;
|
||||
|
||||
foreground = colour.text; # Text
|
||||
background = colour.base; # Base
|
||||
regular0 = colour.surface1; # Surface 1
|
||||
regular1 = colour.red; # red
|
||||
regular2 = colour.green; # green
|
||||
regular3 = colour.yellow; # yellow
|
||||
regular4 = colour.pink; # pink
|
||||
regular5 = colour.blue; # blue
|
||||
regular6 = colour.teal; # teal
|
||||
regular7 = colour.subtext1; # Subtext 1
|
||||
bright0 = colour.surface2; # Surface 2
|
||||
bright1 = colour.red; # red
|
||||
bright2 = colour.green; # green
|
||||
bright3 = colour.yellow; # yellow
|
||||
bright4 = colour.pink; # pink
|
||||
bright5 = colour.blue; # blue
|
||||
bright6 = colour.teal; # teal
|
||||
bright7 = colour.subtext0; # Subtext 0
|
||||
};
|
||||
|
||||
programs.mako = {
|
||||
backgroundColor = colour.hex.mantle;
|
||||
borderColor = colour.hex.pink;
|
||||
textColor = colour.hex.text;
|
||||
borderRadius = 5;
|
||||
};
|
||||
}
|
76
hosts/thalassa/null/networking.nix
Normal file
76
hosts/thalassa/null/networking.nix
Normal file
|
@ -0,0 +1,76 @@
|
|||
_: {
|
||||
services.v.dns = {
|
||||
enable = true;
|
||||
openFirewall = false;
|
||||
mode = "laptop";
|
||||
};
|
||||
|
||||
services.mullvad-vpn.enable = true;
|
||||
|
||||
networking = {
|
||||
useDHCP = true;
|
||||
dhcpcd.wait = "background";
|
||||
wireless = {
|
||||
enable = true;
|
||||
environmentFile = "/var/lib/secrets/wireless.env";
|
||||
userControlled.enable = true;
|
||||
networks = {
|
||||
eduroam = {
|
||||
auth = ''
|
||||
proto=RSN
|
||||
key_mgmt=WPA-EAP
|
||||
eap=PEAP
|
||||
identity="vroest@tudelft.nl"
|
||||
password=hash:@EDUROAM_PASSWORD_HASH@
|
||||
domain_suffix_match="radius.tudelft.nl"
|
||||
anonymous_identity="anonymous@tudelft.nl"
|
||||
phase1="peaplabel=0"
|
||||
phase2="auth=MSCHAPV2"
|
||||
ca_cert="/etc/ssl/certs/ca-bundle.crt"
|
||||
'';
|
||||
};
|
||||
"Pikachu 5G" = { psk = "@PIKACHU_PASSWORD@"; };
|
||||
"sha256('yeet')" = { psk = "@SHA256_PASSWORD@"; };
|
||||
"wired" = { psk = "@WIRED_PASSWORD@"; };
|
||||
"meowy hotspot" = { psk = "@HOTSPOT_PASSWORD@"; };
|
||||
"WiFi Roest" = { psk = "@WIFI_ROEST_PASSWORD@"; };
|
||||
};
|
||||
};
|
||||
|
||||
nameservers = [
|
||||
"127.0.0.1" # Use locally deployed unbound
|
||||
"::1"
|
||||
];
|
||||
|
||||
firewall.allowedUDPPorts = [ 51820 ];
|
||||
|
||||
# Maybe switch to wg-quick
|
||||
wireguard.interfaces.wg0 = {
|
||||
ips = [ "10.100.0.4/24" ];
|
||||
listenPort = 51820;
|
||||
privateKeyFile = "/var/lib/secrets/wg_key";
|
||||
|
||||
peers = [
|
||||
{
|
||||
# Delft
|
||||
publicKey = "kDIO3BJSYlDwRXc2zt9tR1LqKJzIPrulaRmdiYkg+m0=";
|
||||
allowedIPs = [ "10.100.0.1" "10.42.42.0/23" ];
|
||||
endpoint = "195.85.167.34:51820";
|
||||
persistentKeepalive = 25;
|
||||
}
|
||||
{
|
||||
# Aerdenhout
|
||||
publicKey = "KgqLhmUMX6kyTjRoa/GOCrZOvXNE5HWYuOr/T3v8/VI=";
|
||||
allowedIPs = [
|
||||
"10.100.0.5"
|
||||
"192.168.0.0/24" # to avoid being less specific than a LAN
|
||||
"192.168.1.0/24"
|
||||
"10.10.10.0/24"
|
||||
];
|
||||
endpoint = "80.60.83.220:51820";
|
||||
persistentKeepalive = 25;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
35
hosts/thalassa/null/rescue-boot.nix
Normal file
35
hosts/thalassa/null/rescue-boot.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
# TODO: slim down size
|
||||
netboot = import (pkgs.path + "/nixos/lib/eval-config.nix") {
|
||||
inherit (pkgs) system;
|
||||
modules = [
|
||||
(pkgs.path + "/nixos/modules/installer/netboot/netboot-minimal.nix")
|
||||
module
|
||||
];
|
||||
};
|
||||
module = {
|
||||
system.stateVersion = "22.11";
|
||||
boot.supportedFilesystems = [ "btrfs" "ext4" ];
|
||||
environment.systemPackages = with pkgs; [ git ];
|
||||
};
|
||||
in
|
||||
{
|
||||
boot.loader.systemd-boot = {
|
||||
extraEntries = {
|
||||
"rescue.conf" = ''
|
||||
title Rescue Boot
|
||||
linux /rescue-kernel
|
||||
initrd /rescue-initrd
|
||||
options init=${netboot.config.system.build.toplevel}/init ${
|
||||
toString netboot.config.boot.kernelParams
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
extraFiles = {
|
||||
"rescue-kernel" = "${netboot.config.system.build.kernel}/bzImage";
|
||||
"rescue-initrd" = "${netboot.config.system.build.netbootRamdisk}/initrd";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue