feat: many changes

This commit is contained in:
Zoty 2026-03-28 21:26:04 -03:00
parent 8cd75009d9
commit 3d48e35de5
Signed by: Zoty
SSH key fingerprint: SHA256:WsGEGivgl37t3Mth6uugXMOgMCTR7QolIepNbC+j/tA
14 changed files with 304 additions and 71 deletions

142
flake.lock generated
View file

@ -1,12 +1,31 @@
{ {
"nodes": { "nodes": {
"claude-code": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1775966787,
"narHash": "sha256-wq1rMcMxMK9ZBg8TsJkXxli9K4ey+C2qKKmRYphhbek=",
"owner": "sadjow",
"repo": "claude-code-nix",
"rev": "e128b713477ef9732a0b5d9bed155ff37c0bb5a4",
"type": "github"
},
"original": {
"owner": "sadjow",
"repo": "claude-code-nix",
"type": "github"
}
},
"den": { "den": {
"locked": { "locked": {
"lastModified": 1774597022, "lastModified": 1776059725,
"narHash": "sha256-QEYG3SBlX35TDVV/wyBonrEDEK4Mr3dtXSfnzvM0lII=", "narHash": "sha256-ifB3mLiGlMTfRWrb5n2LvJnlepsierXi2WYz2cwogTo=",
"owner": "vic", "owner": "vic",
"repo": "den", "repo": "den",
"rev": "b7f910ab47260c91a0ae8d55fa72cd2178ba2458", "rev": "2c16b8ce58172599a21310ff5f004ad6a918f349",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -30,6 +49,24 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -37,11 +74,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1774559029, "lastModified": 1775425411,
"narHash": "sha256-deix7yg3j6AhjMPnFDCmWB3f83LsajaaULP5HH2j34k=", "narHash": "sha256-KY6HsebJHEe5nHOWP7ur09mb0drGxYSzE3rQxy62rJo=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "a0bb0d11514f92b639514220114ac8063c72d0a3", "rev": "0d02ec1d0a05f88ef9e74b516842900c41f0f2fe",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -70,17 +107,17 @@
"inputs": { "inputs": {
"niri-stable": "niri-stable", "niri-stable": "niri-stable",
"niri-unstable": "niri-unstable", "niri-unstable": "niri-unstable",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs_2",
"nixpkgs-stable": "nixpkgs-stable", "nixpkgs-stable": "nixpkgs-stable",
"xwayland-satellite-stable": "xwayland-satellite-stable", "xwayland-satellite-stable": "xwayland-satellite-stable",
"xwayland-satellite-unstable": "xwayland-satellite-unstable" "xwayland-satellite-unstable": "xwayland-satellite-unstable"
}, },
"locked": { "locked": {
"lastModified": 1774620721, "lastModified": 1775877135,
"narHash": "sha256-QucawBaJ6Rl5JWAXAbpouXM1MsvlzwCsPGl3zOwLtzw=", "narHash": "sha256-nAqtUMy22olwyiOJB0CASVrbu5XB5+43GjlbIJ1KuvQ=",
"owner": "sodiboo", "owner": "sodiboo",
"repo": "niri-flake", "repo": "niri-flake",
"rev": "fb83d584532282f585cd02f3aa513e98b843e7e7", "rev": "f943da038fd668d435c2d17916577f295faa8839",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -109,11 +146,11 @@
"niri-unstable": { "niri-unstable": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1774616418, "lastModified": 1775561155,
"narHash": "sha256-z+dLkAS4bqytIlOI4h2MnjBJrSP4d1Awx0n+IV5YA3Y=", "narHash": "sha256-TK2IrqQivRcwqJa0suZMbcsN17CtA8Uu0v7CDnLATb0=",
"owner": "YaLTeR", "owner": "YaLTeR",
"repo": "niri", "repo": "niri",
"rev": "8f48f56fe19918b5cfa02e5d68a47ebaf7bf3dee", "rev": "599db847f857b8a7ff78ce02f15acab5d5d9fee1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -124,27 +161,27 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1774386573, "lastModified": 1775888245,
"narHash": "sha256-4hAV26quOxdC6iyG7kYaZcM3VOskcPUrdCQd/nx8obc=", "narHash": "sha256-nwASzrRDD1JBEu/o8ekKYEXm/oJW6EMCzCRdrwcLe90=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "46db2e09e1d3f113a13c0d7b81e2f221c63b8ce9", "rev": "13043924aaa7375ce482ebe2494338e058282925",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-unstable", "ref": "nixpkgs-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1774388614, "lastModified": 1775811116,
"narHash": "sha256-tFwzTI0DdDzovdE9+Ras6CUss0yn8P9XV4Ja6RjA+nU=", "narHash": "sha256-t+HZK42pB6N+i5RGbuy7Xluez/VvWbembBdvzsc23Ss=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "1073dad219cb244572b74da2b20c7fe39cb3fa9e", "rev": "54170c54449ea4d6725efd30d719c5e505f1c10e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -154,13 +191,45 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_2": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1774388614, "lastModified": 1775710090,
"narHash": "sha256-tFwzTI0DdDzovdE9+Ras6CUss0yn8P9XV4Ja6RjA+nU=", "narHash": "sha256-ar3rofg+awPB8QXDaFJhJ2jJhu+KqN/PRCXeyuXR76E=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "1073dad219cb244572b74da2b20c7fe39cb3fa9e", "rev": "4c1018dae018162ec878d42fec712642d214fdfa",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1775710090,
"narHash": "sha256-ar3rofg+awPB8QXDaFJhJ2jJhu+KqN/PRCXeyuXR76E=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "4c1018dae018162ec878d42fec712642d214fdfa",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1775811116,
"narHash": "sha256-t+HZK42pB6N+i5RGbuy7Xluez/VvWbembBdvzsc23Ss=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "54170c54449ea4d6725efd30d719c5e505f1c10e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -172,12 +241,14 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"claude-code": "claude-code",
"den": "den", "den": "den",
"flake-aspects": "flake-aspects", "flake-aspects": "flake-aspects",
"home-manager": "home-manager", "home-manager": "home-manager",
"import-tree": "import-tree", "import-tree": "import-tree",
"niri-flake": "niri-flake", "niri-flake": "niri-flake",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_3",
"nixpkgs-unstable": "nixpkgs-unstable",
"sops-nix": "sops-nix" "sops-nix": "sops-nix"
} }
}, },
@ -188,11 +259,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1774303811, "lastModified": 1775971308,
"narHash": "sha256-fhG4JAcLgjKwt+XHbjs8brpWnyKUfU4LikLm3s0Q/ic=", "narHash": "sha256-VKp9bhVSm0bT6JWctFy06ocqxGGnWHi1NfoE90IgIcY=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "614e256310e0a4f8a9ccae3fa80c11844fba7042", "rev": "31ac5fe5d015f76b54058c69fcaebb66a55871a4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -201,6 +272,21 @@
"type": "github" "type": "github"
} }
}, },
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"xwayland-satellite-stable": { "xwayland-satellite-stable": {
"flake": false, "flake": false,
"locked": { "locked": {

View file

@ -1,6 +1,7 @@
{ {
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
import-tree.url = "github:vic/import-tree"; import-tree.url = "github:vic/import-tree";
flake-aspects.url = "github:vic/flake-aspects"; flake-aspects.url = "github:vic/flake-aspects";
den.url = "github:vic/den"; den.url = "github:vic/den";
@ -13,6 +14,7 @@
url = "github:Mic92/sops-nix"; url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
claude-code.url = "github:sadjow/claude-code-nix";
}; };
outputs = inputs: outputs = inputs:

View file

@ -10,7 +10,7 @@
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "sd_mod" ]; boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" =

View file

@ -1,13 +1,21 @@
{ pkgs, ... }: { { inputs, pkgs, ... }:
let
claude-code = inputs.claude-code.packages.${pkgs.system}.default;
in {
home.packages = with pkgs; [ home.packages = with pkgs; [
firefox firefox
discord discord
stremio-linux-shell stremio-linux-shell
obsidian
kitty
qbittorrent
claude-code
mpv
]; ];
home.sessionVariables = { home.sessionVariables = {
TERMINAL = "wezterm"; TERMINAL = "kitty";
XDG_TERMINAL_EMULATOR = "wezterm"; XDG_TERMINAL_EMULATOR = "kitty";
}; };
programs.zsh = { programs.zsh = {

View file

@ -10,6 +10,37 @@
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
XDG_MENU_PREFIX = "plasma-"; XDG_MENU_PREFIX = "plasma-";
}; };
home.packages = with pkgs; [
grim
slurp
satty
wl-clipboard
];
home.file.".local/bin/screenshot" = {
executable = true;
text = ''
#!/usr/bin/env bash
MODE="''${1:-region}"
SAVE_DIR="$HOME/Images/screenshots"
mkdir -p "$SAVE_DIR"
FILENAME="$SAVE_DIR/$(date '+%Y%m%d-%H%M%S').png"
case "$MODE" in
region)
grim -g "$(slurp)" -t ppm - | satty --filename - --output-filename "$FILENAME" --copy-command wl-copy --early-exit
;;
screen)
grim -t ppm - | satty --filename - --output-filename "$FILENAME" --copy-command wl-copy --early-exit
;;
monitor)
grim -o "$(niri msg focused-output | grep 'Output' | awk '{print $2}')" -t ppm - \
| satty --filename - --output-filename "$FILENAME" --copy-command wl-copy --early-exit
;;
esac
'';
};
xdg.configFile."niri/config.kdl".text = '' xdg.configFile."niri/config.kdl".text = ''
// Modificadores: Mod = Super (tecla Windows) // Modificadores: Mod = Super (tecla Windows)
@ -40,7 +71,7 @@
binds { binds {
// Aplicativos // Aplicativos
Mod+Return { spawn "wezterm"; } Mod+Return { spawn "kitty"; }
Mod+D { spawn "fuzzel"; } Mod+D { spawn "fuzzel"; }
Mod+Q { close-window; } Mod+Q { close-window; }
@ -78,8 +109,9 @@
XF86AudioMute { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; } XF86AudioMute { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; }
// Screenshot // Screenshot
Print { screenshot; } Mod+Shift+S { spawn "bash" "-c" "$HOME/.local/bin/screenshot region"; }
Mod+Print { screenshot-screen; } Mod+Shift+Alt+S { spawn "bash" "-c" "$HOME/.local/bin/screenshot screen"; }
Mod+Shift+Ctrl+S { spawn "bash" "-c" "$HOME/.local/bin/screenshot monitor"; }
} }
''; '';
} }

View file

@ -1,23 +0,0 @@
{ pkgs, ... }: {
programs.wezterm = {
enable = true;
package = pkgs.wezterm;
extraConfig = ''
local config = wezterm.config_builder()
config.front_end = "OpenGL"
config.enable_tab_bar = false
config.max_fps = 60
config.animation_fps = 60
config.enable_wayland = true
return config
'';
};
# I'm not sure why, but this removes the annoying input
# delay from wezterm.
home.sessionVariables = {
__GL_SYNC_TO_VBLANK = "0";
};
}

17
modules/androidcam.nix Normal file
View file

@ -0,0 +1,17 @@
{ den, ... }: {
den.aspects.androidcam.nixos = { pkgs, ... }: {
boot.extraModulePackages = with pkgs.linuxPackages; [ v4l2loopback ];
boot.kernelModules = [ "v4l2loopback" ];
boot.extraModprobeConfig = ''
options v4l2loopback \
devices=1 \
video_nr=2 \
card_label="DroidCam" \
exclusive_caps=1
'';
programs.droidcam.enable = true;
};
}

View file

@ -1,12 +1,14 @@
{ den, ... }: { { den, inputs, ... }: {
den.aspects.core.nixos = { pkgs, ... }: { den.aspects.core.nixos = { pkgs, ... }:
let
pkgs-unstable = inputs.nixpkgs-unstable.legacyPackages.${pkgs.system};
in {
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
nix = { nix = {
settings = { settings = {
experimental-features = [ "nix-command" "flakes" ]; experimental-features = [ "nix-command" "flakes" ];
auto-optimise-store = true; auto-optimise-store = true;
}; };
gc = { gc = {
automatic = true; automatic = true;
@ -15,17 +17,25 @@
}; };
}; };
zramSwap = {
enable = true;
algorithm = "zstd";
memoryPercent = 300;
};
services.xserver = { services.xserver = {
enable = false; enable = false;
xkb.layout = "en"; xkb.layout = "en";
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
curl curl
wget wget
neovim pkgs-unstable.neovim
btop btop
nixd nixd
unrar
p7zip
]; ];
networking.networkmanager.enable = true; networking.networkmanager.enable = true;

View file

@ -35,6 +35,9 @@
den.aspects.desktop-specific den.aspects.desktop-specific
den.aspects.dev den.aspects.dev
den.aspects.secrets den.aspects.secrets
den.aspects.steam
den.aspects.prismlauncher
den.aspects.androidcam
]; ];
nixos = { nixos = {
system.stateVersion = "25.11"; system.stateVersion = "25.11";
@ -58,6 +61,7 @@
useGlobalPkgs = true; useGlobalPkgs = true;
useUserPackages = true; useUserPackages = true;
backupFileExtension = "backup"; backupFileExtension = "backup";
extraSpecialArgs = { inherit inputs; };
}; };
security.sudo.wheelNeedsPassword = false; security.sudo.wheelNeedsPassword = false;
}; };
@ -67,7 +71,6 @@
./_home/niri.nix ./_home/niri.nix
./_home/cursor.nix ./_home/cursor.nix
./_home/git.nix ./_home/git.nix
./_home/wezterm.nix
./_home/mako.nix ./_home/mako.nix
./_home/dolphin.nix ./_home/dolphin.nix
./_home/theme.nix ./_home/theme.nix

View file

@ -27,13 +27,17 @@
services.xserver.videoDrivers = [ "nvidia" ]; services.xserver.videoDrivers = [ "nvidia" ];
boot = { boot = {
initrd.kernelModules = [ "nvidia" "nvidia_modeset" "nvidia_uvm" "nvidia_drm" ]; initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "sd_mod" ];
initrd.kernelModules = [ ];
kernelModules = [ "kvm-intel" "nvidia" "nvidia_modeset" "nvidia_uvm" "nvidia_drm" ];
initrd.compressor = "zstd";
kernelParams = [ "nvidia.NVreg_PreserveVideoMemoryAllocations=1" ]; kernelParams = [ "nvidia.NVreg_PreserveVideoMemoryAllocations=1" ];
loader = { loader = {
grub = { grub = {
enable = true; enable = true;
device = "nodev"; device = "nodev";
efiSupport = true; efiSupport = true;
configurationLimit = 2;
}; };
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;
}; };
@ -45,6 +49,8 @@
__GLX_VENDOR_LIBRARY_NAME = "nvidia"; __GLX_VENDOR_LIBRARY_NAME = "nvidia";
MOZ_ENABLE_WAYLAND = "1"; MOZ_ENABLE_WAYLAND = "1";
MOZ_USE_XINPUT2 = "1"; MOZ_USE_XINPUT2 = "1";
__GL_SYNC_TO_VBLANK = "0";
__GL_MaxFramesAllowed = "1";
}; };
}; };
} }

View file

@ -1,7 +1,45 @@
{ den, pkgs, ... }: { { den, inputs, pkgs, ... }: {
den.aspects.dev.nixos = { pkgs, ... }: { den.aspects.dev.nixos = { pkgs, ... }:
environment.systemPackages = with pkgs; [ let
pkgs-unstable = inputs.nixpkgs-unstable.legacyPackages.${pkgs.system};
in
{
environment.systemPackages = (with pkgs-unstable; [
# Basic
gcc
fzf fzf
]; tree-sitter
# LSPs
bash-language-server # Bash
lua-language-server # lua
nixd # Nix
vscode-langservers-extracted # Json & CSS
yaml-language-server # Yaml
dockerfile-language-server # Docker
marksman # Markdown
clang-tools # C++
jdt-language-server # Java
typescript-language-server # Typescript
pyright # Python
taplo # TOML and rust crates
sqls # SQL
astro-language-server # Astro
angular-language-server # Angular
vue-language-server # Vue
tailwindcss-language-server # Tailwind
# Extra
chafa
ripgrep
]) ++ (with pkgs; [
# Other
vimPlugins.blink-cmp
jetbrains.idea-community
aseprite
]);
programs.java = {
enable = true;
package = pkgs.jdk17;
};
}; };
} }

View file

@ -7,6 +7,8 @@
package = pkgs.niri; package = pkgs.niri;
}; };
programs.gpu-screen-recorder.enable = true;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
waybar waybar
fuzzel fuzzel
@ -18,6 +20,7 @@
xdg-desktop-portal-gnome xdg-desktop-portal-gnome
kdePackages.xdg-desktop-portal-kde kdePackages.xdg-desktop-portal-kde
xwayland-satellite xwayland-satellite
gpu-screen-recorder-gtk
]; ];
xdg.portal = { xdg.portal = {

14
modules/prismlauncher.nix Normal file
View file

@ -0,0 +1,14 @@
{ den, ...}: {
den.aspects.prismlauncher.nixos = { pkgs, ... }: {
environment.systemPackages = with pkgs; [
(prismlauncher.override {
jdks = [
temurin-bin-8
temurin-bin-17
temurin-bin-21
temurin-bin-25
];
})
];
};
}

37
modules/steam.nix Normal file
View file

@ -0,0 +1,37 @@
{ den, ... }: {
den.aspects.steam.nixos = { pkgs, ... }: {
programs.steam = {
enable = true;
remotePlay.openFirewall = false;
dedicatedServer.openFirewall = false;
localNetworkGameTransfers.openFirewall = true;
gamescopeSession.enable = true;
protontricks.enable = true;
extraCompatPackages = with pkgs; [
proton-ge-bin
];
# Extra packages that steam might need
extraPackages = with pkgs; [
xorg.libXcursor
xorg.libXi
xorg.libXinerama
xorg.libXScrnSaver
libpng
libpulseaudio
libvorbis
stdenv.cc.cc.lib
libkrb5
keyutils
];
};
# Fonts for better game text rendering
fonts.packages = with pkgs; [
liberation_ttf
wqy_zenhei
];
};
}