1
0
Fork 0
This commit is contained in:
cătălin 2026-02-12 09:02:09 +01:00
commit 433967847a
No known key found for this signature in database
29 changed files with 1251 additions and 335 deletions

206
v2/nixos/configuration.nix Normal file
View file

@ -0,0 +1,206 @@
# This is your system's configuration file.
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
{
inputs,
lib,
config,
pkgs,
...
}: {
# You can import other NixOS modules here
imports = [
# If you want to use modules your own flake exports (from modules/nixos):
# inputs.self.nixosModules.example
# Or modules from other flakes (such as nixos-hardware):
# inputs.hardware.nixosModules.common-cpu-amd
# inputs.hardware.nixosModules.common-ssd
# You can also split up your configuration and import pieces of it here:
# ./users.nix
# Import your generated (nixos-generate-config) hardware configuration
./hardware-configuration.nix
];
nixpkgs = {
# You can add overlays here
overlays = [
# Add overlays your own flake exports (from overlays and pkgs dir):
inputs.self.overlays.additions
inputs.self.overlays.modifications
inputs.self.overlays.unstable-packages
# You can also add overlays exported from other flakes:
# neovim-nightly-overlay.overlays.default
# Or define it inline, for example:
# (final: prev: {
# hi = final.hello.overrideAttrs (oldAttrs: {
# patches = [ ./change-hello-to-hi.patch ];
# });
# })
];
# Configure your nixpkgs instance
config = {
# Disable if you don't want unfree packages
allowUnfree = true;
};
};
nix = let
flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
in {
settings = {
# Enable flakes and new 'nix' command
experimental-features = "nix-command flakes";
# Opinionated: disable global registry
flake-registry = "";
download-buffer-size = 524288000;
# Workaround for https://github.com/NixOS/nix/issues/9574
nix-path = config.nix.nixPath;
};
# Opinionated: disable channels
channel.enable = false;
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 1w";
};
# Opinionated: make flake registry and nix path match flake inputs
registry = lib.mapAttrs (_: flake: {inherit flake;}) flakeInputs;
nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs;
extraOptions = ''
trusted-users = root catalin
'';
};
# FIXME: Add the rest of your current configuration
nixpkgs.config.allowBroken = true;
nixpkgs.config.permittedInsecurePackages = [ "electron-33.4.11" "mono-5.20.1.34" "qtwebengine-5.15.19" ];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.supportedFilesystems = [ "ntfs" ];
networking.networkmanager.enable = true;
services.mullvad-vpn.enable = true;
environment.sessionVariables.MOZ_ENABLE_WAYLAND = 0;
time.timeZone = "Europe/Madrid";
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "es_ES.UTF-8";
LC_IDENTIFICATION = "es_ES.UTF-8";
LC_MEASUREMENT = "es_ES.UTF-8";
LC_MONETARY = "es_ES.UTF-8";
LC_NAME = "es_ES.UTF-8";
LC_NUMERIC = "es_ES.UTF-8";
LC_PAPER = "es_ES.UTF-8";
LC_TELEPHONE = "es_ES.UTF-8";
LC_TIME = "es_ES.UTF-8";
};
networking.firewall = rec {
allowedTCPPortRanges = [ { from = 1714; to = 1764; } ];
allowedUDPPortRanges = allowedTCPPortRanges;
};
services.xserver = {
enable = true;
displayManager.gdm.enable = true;
desktopManager.gnome.enable = true;
windowManager.openbox.enable = true;
xkb = {
layout = "us";
variant = "";
};
};
services.printing.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
hardware.graphics.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
programs.firefox.enable = true;
programs = {
fish.enable = true;
steam = {
enable = true;
package = pkgs.steam.override {
extraLibraries = p: with p; [ (lib.getLib networkmanager) ];
};
};
};
xdg.portal.enable = true;
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
xdg.portal.config.common.default = "gtk";
programs.mtr.enable = true;
programs.dconf.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
systemd.services.flatpak-repo = {
wantedBy = [ "multi-user.target" ];
path = [ pkgs.flatpak ];
script = ''
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
'';
};
fonts.packages = with pkgs; [
atkinson-hyperlegible
];
boot.kernel.sysctl."net.ipv4.ip_forward" = 1;
services.tailscale.enable = true;
virtualisation.docker.enable = true;
networking.nameservers = [ "192.168.1.7" "1.1.1.1" ];
system.autoUpgrade.enable = true;
environment.systemPackages = import ./packages.nix pkgs;
networking.hostName = "limgrave";
users.users = {
catalin = {
isNormalUser = true;
description = "catalin";
shell = pkgs.fish;
useDefaultShell = true;
extraGroups = [ "networkmanager" "wheel" "docker" "nas" ];
packages = with pkgs; [ flatpak ];
};
};
users.groups.nas.gid = 568;
services.openssh = {
enable = true;
settings = {
PermitRootLogin = "no";
PasswordAuthentication = true;
};
};
system.stateVersion = "24.11";
}

View file

@ -0,0 +1,55 @@
{ config, lib, pkgs, modulesPath, ... }:
{
boot.loader.systemd-boot.enable = true;
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/07b5dda3-2fcd-494b-893c-72301d637e9a";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/04FD-A91D";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
fileSystems."/mnt/zeruel/nas1" =
{ device = "zeruel.fuku:/mnt/pool1/nas1";
fsType = "nfs";
options = [ "x-systemd.automount" "noauto" ];
};
fileSystems."/mnt/zeruel/dcsi" =
{ device = "zeruel.fuku:/mnt/pool1/dcsi";
fsType = "nfs";
options = [ "x-systemd.automount" "noauto" ];
};
fileSystems."/mnt/windoze2" =
{ device = "/dev/disk/by-uuid/6084BE5384BE2B82";
fsType = "ntfs-3g";
options = [ "rw" "uid=1000"];
};
fileSystems."/mnt/windoze" =
{ device = "/dev/disk/by-uuid/46B01460B01458AF";
fsType = "ntfs-3g";
options = [ "rw" "uid=1000"];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/03ecd98d-013f-4476-b43a-bcae0bc1de67"; }
];
networking.useDHCP = lib.mkDefault true;
# Set your system kind (needed for flakes)
nixpkgs.hostPlatform = "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

110
v2/nixos/packages.nix Normal file
View file

@ -0,0 +1,110 @@
pkgs: with pkgs; [
vim
wget
git
tmux
eza
bat
jq
curl
atuin
leaf
dotter
kubectl
k9s
trashy
krew
pre-commit
devenv
git-cliff
difftastic
unzip
hadolint
docker-compose
delta
bottom
dust
popeye
kubecolor
kubeconform
kube-score
uv
neovim
ncdu
direnv
asciinema
yq
kitty
steam
steam-run
python311
protonup-qt
jellyfin-media-player
spotify
adwaita-icon-theme
fishPlugins.z
fishPlugins.tide
fishPlugins.transient-fish
fishPlugins.done
fishPlugins.colored-man-pages
lutris
ayugram-desktop
restic
bitwarden-desktop
pre-commit
cargo
inconsolata
google-chrome
yt-dlp
mpv
gnumake
stremio
kubernetes-helm
opentofu
kubeseal
openssl
xclip
resticprofile
gnupg
awscli2
kor
exiftool
jetbrains-toolbox
chiaki-ng
gnome-themes-extra
tela-circle-icon-theme
hmcl
rose-pine-gtk-theme
rose-pine-icon-theme
rose-pine-cursor
vlc
unrar-wrapper
atkinson-hyperlegible
libreoffice-qt
hunspell
hunspellDicts.es_ES
hunspellDicts.en_US
sqlite-interactive
ffmpeg
filezilla
lrcget
picard
gimp
yq
qbittorrent
p7zip
ansible
k3sup
gamemode
lm_sensors
appimage-run
coder
xcolor
element-desktop
samrewritten
protontricks
nmap
terragrunt
discord
]