merge
This commit is contained in:
@@ -0,0 +1,217 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
../../modules/nixos/hyprland
|
||||
../../modules/nixos/steam
|
||||
../../modules/nixos/awsvpn
|
||||
];
|
||||
|
||||
# Bootloader
|
||||
boot = {
|
||||
loader.systemd-boot.enable = true;
|
||||
loader.efi.canTouchEfiVariables = true;
|
||||
initrd = {
|
||||
kernelModules = [ "amdgpu" ];
|
||||
# Encrypted Drives
|
||||
luks.devices = {
|
||||
"cryptstorage-nvme" = {
|
||||
device = "/dev/disk/by-uuid/6331fbf8-5f21-4e72-b196-f31788f61d28";
|
||||
keyFile = "/storage.key";
|
||||
allowDiscards = true;
|
||||
};
|
||||
"cryptstorage-ssd" = {
|
||||
device = "/dev/disk/by-uuid/8f275b47-c2fd-4b80-80e2-9dfba3279607";
|
||||
keyFile = "/storage.key";
|
||||
allowDiscards = true;
|
||||
};
|
||||
"cryptstorage-hd" = {
|
||||
device = "/dev/disk/by-uuid/ef1bc263-b241-48c6-a93d-1a2497c1fa1d";
|
||||
keyFile = "/storage.key";
|
||||
};
|
||||
};
|
||||
secrets = {
|
||||
"/storage.key" = "/etc/secrets/storage.key";
|
||||
};
|
||||
};
|
||||
};
|
||||
# Mount Points
|
||||
fileSystems = {
|
||||
"/mnt/work" = {
|
||||
device = "/dev/mapper/cryptstorage-nvme";
|
||||
fsType = "ext4";
|
||||
options = [
|
||||
"nofail"
|
||||
"x-systemd.device-timeout=10s"
|
||||
];
|
||||
};
|
||||
"/mnt/documents" = {
|
||||
device = "/dev/mapper/cryptstorage-ssd";
|
||||
fsType = "ext4";
|
||||
options = [
|
||||
"nofail"
|
||||
"x-systemd.device-timeout=10s"
|
||||
];
|
||||
};
|
||||
"/mnt/storage" = {
|
||||
device = "/dev/mapper/cryptstorage-hd";
|
||||
fsType = "ext4";
|
||||
options = [
|
||||
"nofail"
|
||||
"x-systemd.device-timeout=10s"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# Networking
|
||||
networking = {
|
||||
hostName = "jpporta-nixos";
|
||||
networkmanager.enable = true;
|
||||
nameservers = [ "192.168.0.200" ];
|
||||
};
|
||||
|
||||
# Locale
|
||||
time.timeZone = "America/Sao_Paulo";
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
i18n.inputMethod = {
|
||||
enable = true;
|
||||
type = "fcitx5";
|
||||
fcitx5.waylandFrontend = true;
|
||||
};
|
||||
|
||||
# User
|
||||
users.users.jpporta = {
|
||||
isNormalUser = true;
|
||||
description = "jpporta";
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"networkmanager"
|
||||
"audio"
|
||||
"video"
|
||||
"docker"
|
||||
];
|
||||
shell = pkgs.zsh;
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHtBfMUaNtpUYOi0dFsGsAv/ypw535+SouH7fn8eYDvr writterdeck"
|
||||
];
|
||||
};
|
||||
|
||||
nix.settings.experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
|
||||
# Refactored Config
|
||||
custom = {
|
||||
hyprland.enable = true;
|
||||
steam.enable = true;
|
||||
};
|
||||
|
||||
##------------------------------
|
||||
programs = {
|
||||
zsh.enable = true;
|
||||
};
|
||||
|
||||
# System Packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim
|
||||
git
|
||||
wget
|
||||
curl
|
||||
htop
|
||||
wofi
|
||||
waybar
|
||||
ollama-rocm
|
||||
glib
|
||||
gsettings-desktop-schemas
|
||||
];
|
||||
|
||||
virtualisation.docker.enable = true; # docker, buildx
|
||||
virtualisation.virtualbox.host.enable = true;
|
||||
|
||||
services = {
|
||||
resolved = {
|
||||
enable = true;
|
||||
settings = {
|
||||
Resolve = {
|
||||
DNSOverTLS = "opportunistic";
|
||||
DNSSEC = "false"; # delegate DNSSEC to Pi-hole / its upstream
|
||||
FallbackDNS = [ "1.1.1.1#cloudflare-dns.com" ]; # only if Pi-hole is unreachable
|
||||
};
|
||||
};
|
||||
};
|
||||
pulseaudio.enable = false; # make sure the old one is off
|
||||
pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true; # apps expecting pulseaudio still work
|
||||
jack.enable = true; # only if you use jack apps (reaper, etc.)
|
||||
wireplumber.enable = true;
|
||||
};
|
||||
keyd = {
|
||||
enable = true;
|
||||
keyboards.default = {
|
||||
ids = [ "*" ]; # or specific vendor:product ids
|
||||
settings = {
|
||||
main = {
|
||||
capslock = "overload(control, esc)"; # translate your default.conf here
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
postgresql.enable = true;
|
||||
redis.servers."".enable = true; # valkey/redis
|
||||
syncthing = {
|
||||
enable = true;
|
||||
user = "jpporta";
|
||||
group = "users";
|
||||
dataDir = "/home/jpporta";
|
||||
configDir = "/home/jpporta/.config/syncthing";
|
||||
};
|
||||
};
|
||||
|
||||
security.rtkit.enable = true; # lets pipewire get realtime priority
|
||||
|
||||
# TODO: remove later. Required by Teleo old tools
|
||||
systemd.services.docker.environment.DOCKER_MIN_API_VERSION = "1.24";
|
||||
|
||||
hardware.bluetooth.enable = true; # bluez
|
||||
networking.firewall.enable = true; # replaces ufw
|
||||
zramSwap.enable = true; # replaces zram-generator
|
||||
|
||||
boot.extraModulePackages = [ config.boot.kernelPackages.v4l2loopback ];
|
||||
boot.kernelModules = [ "v4l2loopback" ];
|
||||
boot.extraModprobeConfig = ''
|
||||
options v4l2loopback devices=1 video_nr=10 card_label="OBS Cam" exclusive_caps=1
|
||||
'';
|
||||
|
||||
programs.obs-studio = {
|
||||
enable = true;
|
||||
enableVirtualCamera = true; # sets up the udev/module glue for you
|
||||
plugins = with pkgs.obs-studio-plugins; [
|
||||
obs-pipewire-audio-capture # capture individual app audio on wayland
|
||||
obs-backgroundremoval # green-screen without a green screen
|
||||
obs-vkcapture # game capture for vulkan/opengl on wayland
|
||||
wlrobs # wlroots screen capture (not for hyprland — use pipewire portal)
|
||||
];
|
||||
};
|
||||
|
||||
programs.awsVpnClient.enable = true;
|
||||
programs.dconf.enable = true;
|
||||
|
||||
# OpenSSH
|
||||
services.openssh.enable = true;
|
||||
programs.mosh.enable = true;
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
system.stateVersion = "26.05";
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
# 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,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot = {
|
||||
initrd.availableKernelModules = [
|
||||
"nvme"
|
||||
"ahci"
|
||||
"xhci_pci"
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
initrd.kernelModules = [ ];
|
||||
kernelModules = [ "kvm-amd" ];
|
||||
extraModulePackages = [ ];
|
||||
};
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/mapper/cryptroot";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."cryptroot".device =
|
||||
"/dev/disk/by-uuid/a672a214-222c-44f4-ad34-0a259523cf59";
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/8C2E-99B6";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"fmask=0022"
|
||||
"dmask=0022"
|
||||
];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
@@ -0,0 +1,152 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
# Shared home-manager modules
|
||||
../../modules/home-manager/arch-packages
|
||||
../../modules/home-manager/calendar
|
||||
../../modules/home-manager/oh-my-posh
|
||||
../../modules/home-manager/zshrc
|
||||
../../modules/home-manager/alacritty
|
||||
../../modules/home-manager/bat
|
||||
../../modules/home-manager/fastfetch
|
||||
../../modules/home-manager/hyprland
|
||||
../../modules/home-manager/hypridle
|
||||
../../modules/home-manager/hyprlock
|
||||
../../modules/home-manager/hyprpaper
|
||||
../../modules/home-manager/awww
|
||||
../../modules/home-manager/hyprsunset
|
||||
../../modules/home-manager/darkman
|
||||
../../modules/home-manager/wlogout
|
||||
../../modules/home-manager/opencode
|
||||
../../modules/home-manager/cedilla
|
||||
../../modules/home-manager/dictation
|
||||
../../modules/home-manager/nvim
|
||||
../../modules/home-manager/pi
|
||||
../../modules/home-manager/tmux
|
||||
|
||||
inputs.zen-browser.homeModules.beta
|
||||
];
|
||||
|
||||
home = {
|
||||
username = "jpporta";
|
||||
homeDirectory = "/home/jpporta";
|
||||
stateVersion = "26.05";
|
||||
sessionPath = [
|
||||
"$HOME/.local/bin"
|
||||
"$HOME/.cargo/bin"
|
||||
"$HOME/go/bin"
|
||||
];
|
||||
sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
};
|
||||
|
||||
custom = {
|
||||
jpporta-calendars.enable = true;
|
||||
|
||||
oh-my-posh.enable = true;
|
||||
zsh.enable = true;
|
||||
alacritty.enable = true;
|
||||
bat.enable = true;
|
||||
fastfetch.enable = true;
|
||||
opencode.enable = true;
|
||||
|
||||
hyprland.enable = true;
|
||||
hypridle.enable = true;
|
||||
hyprlock.enable = true;
|
||||
hyprpaper.enable = false;
|
||||
awww = {
|
||||
enable = true;
|
||||
transition = {
|
||||
fps = 240;
|
||||
step = 90;
|
||||
duration = "1.5";
|
||||
};
|
||||
};
|
||||
|
||||
hyprsunset.enable = true;
|
||||
wlogout.enable = true;
|
||||
|
||||
darkman.enable = true;
|
||||
|
||||
cedilla.enable = true;
|
||||
dictation = {
|
||||
enable = true;
|
||||
modelHash = "sha256-ZNGCtEC5jVIDxPm9VBVE2ExgUZbE97hF36EfsjWU0eI=";
|
||||
};
|
||||
|
||||
nvim.enable = true;
|
||||
pi.enable = true;
|
||||
tmux.enable = true;
|
||||
};
|
||||
|
||||
home.packages =
|
||||
let
|
||||
mediaplayerPython = pkgs.python3.withPackages (ps: with ps; [ pygobject3 ]);
|
||||
in
|
||||
with pkgs;
|
||||
[
|
||||
playerctl
|
||||
(pkgs.writeShellScriptBin "mediaplayer-python" ''
|
||||
export GI_TYPELIB_PATH=${pkgs.playerctl}/lib/girepository-1.0''${GI_TYPELIB_PATH:+:$GI_TYPELIB_PATH}
|
||||
exec ${mediaplayerPython}/bin/python3 "$@"
|
||||
'')
|
||||
|
||||
eza
|
||||
fastfetch
|
||||
bat-extras.batman
|
||||
nodejs
|
||||
firefox
|
||||
];
|
||||
|
||||
programs = {
|
||||
zen-browser.enable = true;
|
||||
git = {
|
||||
enable = true;
|
||||
settings = {
|
||||
user = {
|
||||
name = "João Pedro Pin Porta";
|
||||
email = "jpedro.porta@gmail.com"; # must match the uid on the gpg key
|
||||
|
||||
};
|
||||
gpg.program = "gpg";
|
||||
commit.gpgSign = true;
|
||||
tag.gpgSign = true;
|
||||
};
|
||||
signing = {
|
||||
key = "7BA72FF4FA933219";
|
||||
signByDefault = true;
|
||||
};
|
||||
};
|
||||
fzf = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
zoxide = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
options = [
|
||||
"--cmd"
|
||||
"cd"
|
||||
];
|
||||
};
|
||||
gpg.enable = true;
|
||||
};
|
||||
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
pinentry.package = pkgs.pinentry-rofi;
|
||||
enableSshSupport = true; # only if you use gpg keys as ssh keys
|
||||
defaultCacheTtl = 3600;
|
||||
maxCacheTtl = 86400;
|
||||
};
|
||||
|
||||
services.swaync.enable = true;
|
||||
}
|
||||
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
@@ -0,0 +1,177 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
mainFont = "Berkeley Mono Nerd Font Mono";
|
||||
fontSize = 14;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
# Shared home-manager modules
|
||||
../../modules/home-manager/arch-packages
|
||||
../../modules/home-manager/oh-my-posh
|
||||
../../modules/home-manager/zshrc
|
||||
../../modules/home-manager/alacritty
|
||||
../../modules/home-manager/bat
|
||||
../../modules/home-manager/fastfetch
|
||||
../../modules/home-manager/hyprland
|
||||
../../modules/home-manager/hyprlock
|
||||
../../modules/home-manager/hyprpaper
|
||||
../../modules/home-manager/awww
|
||||
../../modules/home-manager/hyprsunset
|
||||
../../modules/home-manager/darkman
|
||||
../../modules/home-manager/wlogout
|
||||
../../modules/home-manager/opencode
|
||||
../../modules/home-manager/swaync
|
||||
../../modules/home-manager/nvim
|
||||
../../modules/home-manager/pi
|
||||
../../modules/home-manager/tmux
|
||||
];
|
||||
|
||||
home = {
|
||||
username = "jpporta";
|
||||
homeDirectory = "/home/jpporta";
|
||||
stateVersion = "26.11";
|
||||
sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
};
|
||||
|
||||
custom = {
|
||||
zsh = {
|
||||
enable = true;
|
||||
fastfetch = false;
|
||||
};
|
||||
tmux.enable = true;
|
||||
oh-my-posh.enable = true;
|
||||
pi.enable = true;
|
||||
nvim.enable = true;
|
||||
|
||||
hyprland.enable = true;
|
||||
hyprlock.enable = true;
|
||||
hyprpaper.enable = false;
|
||||
hyprsunset.enable = true;
|
||||
wlogout.enable = true;
|
||||
darkman.enable = true;
|
||||
awww.enable = true;
|
||||
opencode.enable = true;
|
||||
alacritty.enable = true;
|
||||
bat.enable = true;
|
||||
fastfetch.enable = true;
|
||||
swaync.enable = true;
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
cage
|
||||
foot
|
||||
git
|
||||
ripgrep
|
||||
fd
|
||||
mosh
|
||||
fastfetch
|
||||
stow
|
||||
tmux
|
||||
];
|
||||
|
||||
# Non-NixOS host: fixes locales, ld paths, XDG desktop entries
|
||||
targets.genericLinux.enable = true;
|
||||
|
||||
# ---- fonts ----
|
||||
fonts.fontconfig.enable = true;
|
||||
|
||||
home.file."my-fonts" = {
|
||||
source = ./fonts;
|
||||
target = ".local/share/fonts/custom";
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
programs = {
|
||||
home-manager.enable = true;
|
||||
foot = {
|
||||
enable = true;
|
||||
server.enable = false;
|
||||
settings = {
|
||||
main = {
|
||||
shell = "${pkgs.zsh}/bin/zsh --login";
|
||||
term = "xterm-256color";
|
||||
font = "${mainFont}:size=${toString fontSize}";
|
||||
font-bold = "${mainFont}:size=${toString fontSize}";
|
||||
pad = "12x12";
|
||||
};
|
||||
scrollback.lines = 10000;
|
||||
cursor.style = "beam";
|
||||
colors-dark = {
|
||||
alpha = 1.0;
|
||||
background = "282828";
|
||||
foreground = "ebdbb2";
|
||||
regular0 = "282828";
|
||||
regular1 = "cc241d";
|
||||
regular2 = "98971a";
|
||||
regular3 = "d79921";
|
||||
regular4 = "458588";
|
||||
regular5 = "b16286";
|
||||
regular6 = "689d6a";
|
||||
regular7 = "a89984";
|
||||
bright0 = "928374";
|
||||
bright1 = "fb4934";
|
||||
bright2 = "b8bb26";
|
||||
bright3 = "fabd2f";
|
||||
bright4 = "83a598";
|
||||
bright5 = "d3869b";
|
||||
bright6 = "8ec07c";
|
||||
bright7 = "ebdbb2";
|
||||
};
|
||||
key-bindings = {
|
||||
font-increase = "Control+plus Control+equal";
|
||||
font-decrease = "Control+minus";
|
||||
font-reset = "Control+0";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
bash = {
|
||||
enable = true;
|
||||
profileExtra = ''
|
||||
if [ -z "$WAYLAND_DISPLAY" ] && [ "$XDG_VTNR" = "1" ]; then
|
||||
export WLR_RENDERER=pixman
|
||||
export XDG_RUNTIME_DIR=''${XDG_RUNTIME_DIR:-/run/user/$(id -u)}
|
||||
exec cage -- foot
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
ssh = {
|
||||
enable = true;
|
||||
enableDefaultConfig = false;
|
||||
|
||||
settings = {
|
||||
"*" = {
|
||||
forwardAgent = false;
|
||||
addKeysToAgent = "no";
|
||||
compression = false;
|
||||
serverAliveInterval = 0;
|
||||
serverAliveCountMax = 3;
|
||||
hashKnownHosts = false;
|
||||
userKnownHostsFile = "~/.ssh/known_hosts";
|
||||
controlMaster = "no";
|
||||
controlPath = "~/.ssh/master-%r@%n:%p";
|
||||
controlPersist = "no";
|
||||
};
|
||||
|
||||
"pc" = {
|
||||
hostname = "192.168.0.100";
|
||||
user = "jpporta";
|
||||
serverAliveInterval = 30;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.syncthing.enable = true;
|
||||
|
||||
home.sessionVariables.TERMINAL = "foot";
|
||||
}
|
||||
Reference in New Issue
Block a user