From 433967847a13f197266c9707cd4d35173713fee1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?c=C4=83t=C4=83lin?= Date: Thu, 12 Feb 2026 09:02:09 +0100 Subject: [PATCH 1/4] wip --- README.md | 156 +++---------- nix/base/packages.nix | 38 ---- nix/flake.lock | 8 +- nix/flake.nix | 61 +++--- nix/home/default.nix | 59 +++++ nix/home/packages.nix | 39 ++++ nix/hosts/carpates/configuration.nix | 37 ---- nix/hosts/carpates/home.nix | 27 --- nix/hosts/limgrave/configuration.nix | 71 +----- nix/hosts/limgrave/hardware-configuration.nix | 2 +- nix/hosts/limgrave/packages.nix | 13 +- v2/flake.lock | 66 ++++++ v2/flake.nix | 75 +++++++ v2/home-manager/home.nix | 66 ++++++ v2/modules/home-manager/default.nix | 6 + v2/modules/nixos/default.nix | 6 + v2/nixos/configuration.nix | 206 ++++++++++++++++++ v2/nixos/hardware-configuration.nix | 55 +++++ v2/nixos/packages.nix | 110 ++++++++++ v2/overlays/default.nix | 23 ++ v2/pkgs/default.nix | 5 + v22/flake.lock | 65 ++++++ v22/flake.nix | 75 +++++++ v22/hosts/limgrave/nixos/default.nix | 161 ++++++++++++++ .../limgrave/nixos/hardware-configuration.nix | 82 +++++++ v22/modules/home-manager/default.nix | 0 v22/modules/nixos/default.nix | 0 v22/overlays/default.nix | 0 v22/pkgs/default.nix | 74 +++++++ 29 files changed, 1251 insertions(+), 335 deletions(-) delete mode 100644 nix/base/packages.nix create mode 100644 nix/home/default.nix create mode 100644 nix/home/packages.nix delete mode 100644 nix/hosts/carpates/configuration.nix delete mode 100644 nix/hosts/carpates/home.nix create mode 100644 v2/flake.lock create mode 100644 v2/flake.nix create mode 100644 v2/home-manager/home.nix create mode 100644 v2/modules/home-manager/default.nix create mode 100644 v2/modules/nixos/default.nix create mode 100644 v2/nixos/configuration.nix create mode 100644 v2/nixos/hardware-configuration.nix create mode 100644 v2/nixos/packages.nix create mode 100644 v2/overlays/default.nix create mode 100644 v2/pkgs/default.nix create mode 100644 v22/flake.lock create mode 100644 v22/flake.nix create mode 100644 v22/hosts/limgrave/nixos/default.nix create mode 100644 v22/hosts/limgrave/nixos/hardware-configuration.nix create mode 100644 v22/modules/home-manager/default.nix create mode 100644 v22/modules/nixos/default.nix create mode 100644 v22/overlays/default.nix create mode 100644 v22/pkgs/default.nix diff --git a/README.md b/README.md index 978d712..dbc1284 100644 --- a/README.md +++ b/README.md @@ -2,140 +2,46 @@ This repository contains my dotfiles and a Nix flake that supports multiple hosts (machines) with a shared base and per-host configuration. -- On NixOS: hosts are built via `nixosConfigurations`. -- On non-NixOS (e.g., Ubuntu): hosts are applied via Home Manager using `homeConfigurations`. +## Nix Configuration -## Bootstrap +The Nix configuration is located in the `nix/` directory. It uses a shared Home Manager configuration for all hosts, while allowing host-specific NixOS or package settings. -```shell -pip install pipx ansible -ansible-playbook --ask-become-pass ansible/main.yml -# Then apply dotfiles with dotter -dotter -``` +### Structure -## NixOS: multi-host layout +- `nix/flake.nix`: Entry point, defines hosts and helpers. +- `nix/home/`: Shared Home Manager configuration (packages, shell, GNOME settings). +- `nix/hosts/`: Host-specific NixOS configurations. -- nix/base/packages.nix — packages installed on all hosts -- nix/hosts// - - configuration.nix — host-specific NixOS configuration - - hardware-configuration.nix — generated per-machine - - packages.nix — extra packages for this host -- nix/flake.nix — exposes each host under nixosConfigurations +### Adding New Hosts -Current hosts: -- limgrave — my main system -- carpates — scaffolded/minimal, ready to extend +#### NixOS Hosts +1. Create a directory in `nix/hosts//`. +2. Add `configuration.nix`, `hardware-configuration.nix`, and `packages.nix` there. +3. Add the host to `nixosConfigurations` in `nix/flake.nix`: + ```nix + limgrave = mkNixos "limgrave" [ + nix-snapd.nixosModules.default + autofirma-nix.nixosModules.default + ]; + ``` -## Naming rule (important) -Your machine hostname must match the Nix flake host name. For example: -- networking.hostName = "limgrave" in the host configuration -- The flake exports nixosConfigurations.limgrave -- The system hostname (output of `hostname -s`) is limgrave +#### Non-NixOS Hosts (e.g., Ubuntu) +1. Add the host to `homeConfigurations` in `nix/flake.nix`: + ```nix + "catalin@ubuntu" = mkHome "ubuntu" "catalin" [ ]; + ``` + *Note: `mkHome` takes `hostname`, `username`, and additional modules.* -This allows the upgrade function to pick the right configuration automatically. - -## Build or switch -From repo root: +### Building and Applying +#### NixOS +Run from the root of the repository: ```bash -# Limgrave (current system) -sudo nixos-rebuild switch --flake ./nix#limgrave - -# carpates (on target machine) -sudo nixos-rebuild switch --flake ./nix#carpates -# Or during install: -# nixos-install --flake /nix#carpates +sudo nixos-rebuild switch --flake .#hostname ``` -## Upgrades: nix_upgrade -A convenience Fish function is provided in fish/conf.d/functions.fish: `nix_upgrade`. -It updates flake inputs and rebuilds the system using a host name that matches the machine hostname. - -Usage: -```fish -# Automatic: uses (hostname -s) → must match a host in nix/flake.nix -nix_upgrade - -# Override the host explicitly (useful for recovery or chroots) -nix_upgrade limgrave -``` -What it does: -1) sudo nix flake update --flake /home/catalin/.dotfiles/nix -2) sudo nixos-rebuild switch --flake /home/catalin/.dotfiles/nix# --upgrade - -Safety checks: -- Verifies nix/flake.nix exists -- Verifies the host is declared in nix/flake.nix -- Prints clear error if the hostname doesn’t map to a known host - -Tip: ensure your system hostname matches one of the directories in nix/hosts/ and the entry under nixosConfigurations in nix/flake.nix. - -## Adding a new host -1) Create a directory: nix/hosts// -2) Add configuration files (start by copying limgrave and trimming, or use the minimal example from carpates) -3) Generate hardware config on the new machine: +#### Non-NixOS (Home Manager) +Run from the root of the repository: ```bash -sudo nixos-generate-config -# Move merge the generated hardware-configuration.nix into nix/hosts// -``` -4) Add the host to nix/flake.nix under nixosConfigurations -5) Make sure networking.hostName = "" in the host configuration -6) Build or install: -```bash -sudo nixos-rebuild switch --flake ./nix# -# or during install: -nixos-install --flake /nix# -``` - -## Notes -- Old single-host files nix/configuration.nix and nix/packages.nix are kept for reference but are not used by the flake. You can remove them once comfortable with the new layout. -- limgrave includes nix-snapd and Home Manager; carpates currently includes Home Manager only. - -## Nix on non-NixOS (Ubuntu, etc.) -You can also use this flake on non-NixOS systems (e.g., Ubuntu) via Home Manager. For that path, hosts are defined under `homeConfigurations` in `nix/flake.nix` and typically live next to their NixOS counterparts. In this repo, `carpates` is prepared for non-NixOS via Home Manager. - -- Naming rule: your machine's hostname (output of `hostname -s`) should match the `homeConfigurations.` entry. Example: `carpates`. -- Packages: non-NixOS hosts usually install user-scoped packages via Home Manager, using the shared base set from `nix/base/packages.nix`. - -### Prerequisites -- Install Nix (multi-user is recommended): - ```bash - sh <(curl -L https://nixos.org/nix/install) --daemon - ``` -- Enable flakes (if not already). On non-NixOS, set in `/etc/nix/nix.conf` or `$XDG_CONFIG_HOME/nix/nix.conf`: - ``` - experimental-features = nix-command flakes - ``` -- Install Home Manager (no separate channel needed when using flakes; we can run it via `nix run` or install it on PATH): - ```bash - # Optional, to have `home-manager` on PATH: - nix profile install github:nix-community/home-manager - ``` - -### Apply the configuration (non-NixOS) -From repo root: -```bash -# Use the prepared Home Manager host (example: carpates) -home-manager switch --flake ./nix#carpates -# If `home-manager` is not installed, you can run it via nix: -nix run github:nix-community/home-manager -- switch --flake ./nix#carpates -``` - -### Upgrades (non-NixOS) -`nix_upgrade` also works on non-NixOS: -```fish -# Auto-detects host from (hostname -s) and runs Home Manager switch -nix_upgrade - -# Or override explicitly -nix_upgrade carpates -``` -What it does on non-NixOS: -- `nix flake update --flake /home/catalin/.dotfiles/nix` -- `home-manager switch --flake /home/catalin/.dotfiles/nix#` (or `nix run ... -- switch` if HM is not on PATH) - -### NixOS vs. non-NixOS summary -- NixOS hosts are declared under `nixosConfigurations` and are applied with `nixos-rebuild`. -- non-NixOS hosts are declared under `homeConfigurations` and are applied with `home-manager switch`. -- The `nix_upgrade` function detects the OS and selects the correct path automatically based on the hostname. +home-manager switch --flake ./nix#user@hostname +``` \ No newline at end of file diff --git a/nix/base/packages.nix b/nix/base/packages.nix deleted file mode 100644 index d0c8b68..0000000 --- a/nix/base/packages.nix +++ /dev/null @@ -1,38 +0,0 @@ -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 - bat - dust - popeye - kubecolor - kubeconform - kube-score - uv - neovim - ncdu - direnv - asciinema - yq -] diff --git a/nix/flake.lock b/nix/flake.lock index 1ff6c22..f652dcf 100644 --- a/nix/flake.lock +++ b/nix/flake.lock @@ -139,16 +139,16 @@ ] }, "locked": { - "lastModified": 1747688870, - "narHash": "sha256-ypL9WAZfmJr5V70jEVzqGjjQzF0uCkz+AFQF7n9NmNc=", + "lastModified": 1763992789, + "narHash": "sha256-WHkdBlw6oyxXIra/vQPYLtqY+3G8dUVZM8bEXk0t8x4=", "owner": "nix-community", "repo": "home-manager", - "rev": "d5f1f641b289553927b3801580598d200a501863", + "rev": "44831a7eaba4360fb81f2acc5ea6de5fde90aaa3", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-24.11", + "ref": "release-25.05", "repo": "home-manager", "type": "github" } diff --git a/nix/flake.nix b/nix/flake.nix index e350be4..cba9f86 100644 --- a/nix/flake.nix +++ b/nix/flake.nix @@ -12,7 +12,7 @@ inputs.nixpkgs.follows = "nixpkgs"; }; home-manager = { - url = "github:nix-community/home-manager/release-24.11"; + url = "github:nix-community/home-manager/release-25.05"; inputs.nixpkgs.follows = "nixpkgs"; }; }; @@ -32,38 +32,47 @@ lib = nixpkgs.lib; pkgs-unstable = unstable.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system}; + + mkNixos = host: modules: lib.nixosSystem { + inherit system; + specialArgs = { inherit pkgs-unstable; }; + modules = [ + ./hosts/${host}/configuration.nix + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.catalin = import ./home; + home-manager.extraSpecialArgs = { inherit pkgs-unstable; }; + } + ] ++ modules; + }; + + # Helper for Home Manager configurations (non-NixOS) + mkHome = host: user: modules: home-manager.lib.homeManagerConfiguration { + inherit pkgs; + modules = [ + ./home + { + home.username = user; + home.homeDirectory = "/home/${user}"; + } + ] ++ modules; + extraSpecialArgs = { inherit pkgs-unstable; }; + }; in { nixosConfigurations = { - limgrave = lib.nixosSystem { - inherit system; - specialArgs = { inherit pkgs-unstable; }; - modules = [ - ./hosts/limgrave/configuration.nix - nix-snapd.nixosModules.default - autofirma-nix.nixosModules.default - home-manager.nixosModules.home-manager - ]; - }; - - carpates = lib.nixosSystem { - inherit system; - specialArgs = { inherit pkgs-unstable; }; - modules = [ - ./hosts/carpates/configuration.nix - home-manager.nixosModules.home-manager - ]; - }; + limgrave = mkNixos "limgrave" [ + nix-snapd.nixosModules.default + autofirma-nix.nixosModules.default + ]; }; # Home Manager configurations for non-NixOS hosts (e.g., Ubuntu) homeConfigurations = { - # For non-NixOS usage on a machine named "carpates". - # Run: home-manager switch --flake ./nix#carpates - carpates = home-manager.lib.homeManagerConfiguration { - inherit pkgs; - modules = [ ./hosts/carpates/home.nix ]; - }; + # For non-NixOS usage. Run: home-manager switch --flake ./nix#catalin@ubuntu + "catalin@limgrave" = mkHome "limgrave" "catalin" [ ]; }; }; } diff --git a/nix/home/default.nix b/nix/home/default.nix new file mode 100644 index 0000000..3f26caf --- /dev/null +++ b/nix/home/default.nix @@ -0,0 +1,59 @@ +{ pkgs, ... }: { + imports = [ + ./packages.nix + ]; + + home.stateVersion = "24.11"; + + programs.fish = { + enable = true; + }; + + programs.bash = { + enable = true; + initExtra = '' + if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]] + then + shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION="" + exec ${pkgs.fish}/bin/fish $LOGIN_OPTION + fi + ''; + }; + + programs.gnome-shell = { + enable = true; + extensions = [{ package = pkgs.gnomeExtensions.gsconnect; }]; + }; + + dconf.settings = { + "org/gnome/shell" = { + disable-user-extensions = false; + enabled-extensions = with pkgs.gnomeExtensions; [ + gsconnect.extensionUuid + user-themes.extensionUuid + caffeine.extensionUuid + colosseum.extensionUuid + dash-to-dock.extensionUuid + clipboard-indicator.extensionUuid + emoji-copy.extensionUuid + bluetooth-battery-meter.extensionUuid + ]; + }; + }; + + home.packages = with pkgs; [ + gnomeExtensions.user-themes + gnomeExtensions.caffeine + gnomeExtensions.colosseum + gnomeExtensions.dash-to-dock + gnomeExtensions.clipboard-indicator + gnomeExtensions.emoji-copy + gnomeExtensions.gsconnect + gnomeExtensions.bluetooth-battery-meter + gnome-tweaks + catppuccin-gtk + catppuccin-cursors + catppuccin-papirus-folders + catppuccin-grub + ]; +} diff --git a/nix/home/packages.nix b/nix/home/packages.nix new file mode 100644 index 0000000..586edce --- /dev/null +++ b/nix/home/packages.nix @@ -0,0 +1,39 @@ +{ pkgs, ... }: { + home.packages = 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 + ]; +} diff --git a/nix/hosts/carpates/configuration.nix b/nix/hosts/carpates/configuration.nix deleted file mode 100644 index daf1cd7..0000000 --- a/nix/hosts/carpates/configuration.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ config, pkgs, pkgs-unstable, ... }: -{ - imports = [ - ./hardware-configuration.nix - ]; - - # Basic system metadata - networking.hostName = "carpates"; - time.timeZone = "Europe/Madrid"; - i18n.defaultLocale = "en_US.UTF-8"; - - # Nix settings - nix.settings.experimental-features = [ "nix-command" "flakes" ]; - nixpkgs.config = { - allowUnfree = true; - allowBroken = false; - }; - - # Users - users.users.catalin = { - isNormalUser = true; - description = "catalin"; - shell = pkgs.fish; - extraGroups = [ "networkmanager" "wheel" ]; - }; - - # Minimal services - networking.networkmanager.enable = true; - services.openssh.enable = true; - - # Base CLI set only (shared across hosts) - environment.systemPackages = import ../../base/packages.nix pkgs; - - programs.fish.enable = true; - - system.stateVersion = "24.11"; -} diff --git a/nix/hosts/carpates/home.nix b/nix/hosts/carpates/home.nix deleted file mode 100644 index 14099f0..0000000 --- a/nix/hosts/carpates/home.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ config, pkgs, ... }: -{ - # Home Manager configuration for non-NixOS usage on host "carpates". - # Apply with: - # home-manager switch --flake ./nix#carpates - - home.username = "catalin"; - home.homeDirectory = "/home/catalin"; - - # Use the same base CLI set as all hosts - home.packages = import ../../base/packages.nix pkgs; - - programs.fish.enable = true; - - # Example: some common quality-of-life programs - programs.git = { - enable = true; - userName = "catalin"; - userEmail = ""; # set if desired - }; - - # Make sure HM itself can manage its state - programs.home-manager.enable = true; - - # Set the HM release; doesn't have to match NixOS release - home.stateVersion = "24.11"; -} diff --git a/nix/hosts/limgrave/configuration.nix b/nix/hosts/limgrave/configuration.nix index 4b0920a..5241659 100644 --- a/nix/hosts/limgrave/configuration.nix +++ b/nix/hosts/limgrave/configuration.nix @@ -40,47 +40,6 @@ allowedUDPPortRanges = allowedTCPPortRanges; }; - home-manager.users.catalin = { - programs.gnome-shell = { - enable = true; - extensions = [{ package = pkgs.gnomeExtensions.gsconnect; }]; - }; - dconf = { - enable = true; - settings."org/gnome/shell" = { - disable-user-extensions = false; - enabled-extensions = with pkgs.gnomeExtensions; [ - gsconnect.extensionUuid - user-themes.extensionUuid - caffeine.extensionUuid - colosseum.extensionUuid - dash-to-dock.extensionUuid - clipboard-indicator.extensionUuid - emoji-copy.extensionUuid - bluetooth-battery-meter.extensionUuid - ]; - }; - }; - home = { - stateVersion = "24.11"; - enableNixpkgsReleaseCheck = false; - packages = with pkgs; [ - gnomeExtensions.user-themes - gnomeExtensions.caffeine - gnomeExtensions.colosseum - gnomeExtensions.dash-to-dock - gnomeExtensions.clipboard-indicator - gnomeExtensions.emoji-copy - gnomeExtensions.gsconnect - gnomeExtensions.bluetooth-battery-meter - gnome-tweaks - catppuccin-gtk - catppuccin-cursors - catppuccin-papirus-folders - catppuccin-grub - ]; - }; - }; services.xserver = { enable = true; @@ -122,41 +81,15 @@ enable = true; firefoxIntegration.enable = true; }; - programs.dnieremote = { - enable = true; - jumpIntro = "no"; - wifiPort = 9501; - usbPort = 9501; - openFirewall = false; - }; - programs.configuradorfnmt = { - enable = true; - firefoxIntegration.enable = true; - }; - # Configure Firefox PKCS#11 modules for DNIe and OpenSC - programs.firefox.policies = { - SecurityDevices = { - "OpenSC PKCS#11" = "${pkgs.opensc}/lib/opensc-pkcs11.so"; - "DNIeRemote" = "${config.programs.dnieremote.finalPackage}/lib/libdnieremotepkcs11.so"; - }; - }; + nixpkgs.config.allowUnfree = true; services.flatpak.enable = true; programs.nix-ld.enable = true; # Merge base packages with host-specific packages - environment.systemPackages = (import ../../base/packages.nix pkgs) ++ (import ./packages.nix pkgs); + environment.systemPackages = import ./packages.nix pkgs; programs = { - bash = { - interactiveShellInit = '' - if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]] - then - shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION="" - exec ${pkgs.fish}/bin/fish $LOGIN_OPTION - fi - ''; - }; fish.enable = true; steam = { enable = true; diff --git a/nix/hosts/limgrave/hardware-configuration.nix b/nix/hosts/limgrave/hardware-configuration.nix index 7013bdc..de095d4 100644 --- a/nix/hosts/limgrave/hardware-configuration.nix +++ b/nix/hosts/limgrave/hardware-configuration.nix @@ -77,6 +77,6 @@ # networking.interfaces.docker0.useDHCP = lib.mkDefault true; # networking.interfaces.eno1.useDHCP = lib.mkDefault true; - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + nixpkgs.hostPlatform = "x86_64-linux"; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/nix/hosts/limgrave/packages.nix b/nix/hosts/limgrave/packages.nix index ede77dd..91d7b21 100644 --- a/nix/hosts/limgrave/packages.nix +++ b/nix/hosts/limgrave/packages.nix @@ -2,7 +2,6 @@ pkgs: with pkgs; [ kitty steam steam-run - vesktop python311 protonup-qt jellyfin-media-player @@ -14,7 +13,7 @@ pkgs: with pkgs; [ fishPlugins.done fishPlugins.colored-man-pages lutris - telegram-desktop + ayugram-desktop restic bitwarden pre-commit @@ -66,12 +65,10 @@ pkgs: with pkgs; [ appimage-run coder xcolor - signal-desktop element-desktop - pavucontrol samrewritten - audacity - mullvad-browser - mullvad-vpn - limo + protontricks + nmap + terragrunt + discord ] diff --git a/v2/flake.lock b/v2/flake.lock new file mode 100644 index 0000000..0e09121 --- /dev/null +++ b/v2/flake.lock @@ -0,0 +1,66 @@ +{ + "nodes": { + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1770260404, + "narHash": "sha256-3iVX1+7YUIt23hBx1WZsUllhbmP2EnXrV8tCRbLxHc8=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "0d782ee42c86b196acff08acfbf41bb7d13eed5b", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "release-25.11", + "repo": "home-manager", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1770770419, + "narHash": "sha256-iKZMkr6Cm9JzWlRYW/VPoL0A9jVKtZYiU4zSrVeetIs=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "6c5e707c6b5339359a9a9e215c5e66d6d802fd7a", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-25.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-unstable": { + "locked": { + "lastModified": 1714076141, + "narHash": "sha256-Drmja/f5MRHZCskS6mvzFqxEaZMeciScCTFxWVLqWEY=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "7bb2ccd8cdc44c91edba16c48d2c8f331fb3d856", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "home-manager": "home-manager", + "nixpkgs": "nixpkgs", + "nixpkgs-unstable": "nixpkgs-unstable" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/v2/flake.nix b/v2/flake.nix new file mode 100644 index 0000000..84e8294 --- /dev/null +++ b/v2/flake.nix @@ -0,0 +1,75 @@ +{ + description = "Your new nix config"; + + inputs = { + # Nixpkgs + nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11"; + # You can access packages and modules from different nixpkgs revs + # at the same time. Here's an working example: + nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; + # Also see the 'unstable-packages' overlay at 'overlays/default.nix'. + + # Home manager + home-manager.url = "github:nix-community/home-manager/release-25.11"; + home-manager.inputs.nixpkgs.follows = "nixpkgs"; + }; + + outputs = { + self, + nixpkgs, + home-manager, + ... + } @ inputs: let + # Supported systems for your flake packages, shell, etc. + systems = [ + "x86_64-linux" + ]; + # This is a function that generates an attribute by calling a function you + # pass to it, with each system as an argument + forAllSystems = nixpkgs.lib.genAttrs systems; + in { + # Your custom packages + # Accessible through 'nix build', 'nix shell', etc + packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system}); + # Formatter for your nix files, available through 'nix fmt' + # Other options beside 'alejandra' include 'nixpkgs-fmt' + formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra); + + # Your custom packages and modifications, exported as overlays + overlays = import ./overlays {inherit inputs;}; + # Reusable nixos modules you might want to export + # These are usually stuff you would upstream into nixpkgs + nixosModules = import ./modules/nixos; + # Reusable home-manager modules you might want to export + # These are usually stuff you would upstream into home-manager + homeManagerModules = import ./modules/home-manager; + + # NixOS configuration entrypoint + # Available through 'nixos-rebuild --flake .#your-hostname' + nixosConfigurations = { + # FIXME replace with your hostname + limgrave = nixpkgs.lib.nixosSystem { + specialArgs = {inherit inputs;}; + modules = [ + # > Our main nixos configuration file < + ./nixos/configuration.nix + ]; + }; + }; + + # Standalone home-manager configuration entrypoint + # Available through 'home-manager --flake .#your-username@your-hostname' + homeConfigurations = { + # FIXME replace with your username@hostname + "catalin@limgrave" = home-manager.lib.homeManagerConfiguration { + # Home-manager requires 'pkgs' instance + pkgs = nixpkgs.legacyPackages.x86_64-linux; # FIXME replace x86_64-linux with your architecure + extraSpecialArgs = {inherit inputs;}; + modules = [ + # > Our main home-manager configuration file < + ./home-manager/home.nix + ]; + }; + }; + }; +} diff --git a/v2/home-manager/home.nix b/v2/home-manager/home.nix new file mode 100644 index 0000000..9030601 --- /dev/null +++ b/v2/home-manager/home.nix @@ -0,0 +1,66 @@ +# This is your home-manager configuration file +# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix) +{ + inputs, + lib, + config, + pkgs, + ... +}: { + # You can import other home-manager modules here + imports = [ + # If you want to use modules your own flake exports (from modules/home-manager): + # inputs.self.homeManagerModules.example + + # Or modules exported from other flakes (such as nix-colors): + # inputs.nix-colors.homeManagerModules.default + + # You can also split up your configuration and import pieces of it here: + # ./nvim.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; + }; + }; + + # TODO: Set your username + home = { + username = "your-username"; + homeDirectory = "/home/your-username"; + }; + + # Add stuff for your user as you see fit: + # programs.neovim.enable = true; + # home.packages = with pkgs; [ steam ]; + + # Enable home-manager and git + programs.home-manager.enable = true; + programs.git.enable = true; + + # Nicely reload system units when changing configs + systemd.user.startServices = "sd-switch"; + + # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion + home.stateVersion = "23.05"; +} diff --git a/v2/modules/home-manager/default.nix b/v2/modules/home-manager/default.nix new file mode 100644 index 0000000..45aae31 --- /dev/null +++ b/v2/modules/home-manager/default.nix @@ -0,0 +1,6 @@ +# Add your reusable home-manager modules to this directory, on their own file (https://nixos.wiki/wiki/Module). +# These should be stuff you would like to share with others, not your personal configurations. +{ + # List your module files here + # my-module = import ./my-module.nix; +} diff --git a/v2/modules/nixos/default.nix b/v2/modules/nixos/default.nix new file mode 100644 index 0000000..8605069 --- /dev/null +++ b/v2/modules/nixos/default.nix @@ -0,0 +1,6 @@ +# Add your reusable NixOS modules to this directory, on their own file (https://nixos.wiki/wiki/Module). +# These should be stuff you would like to share with others, not your personal configurations. +{ + # List your module files here + # my-module = import ./my-module.nix; +} diff --git a/v2/nixos/configuration.nix b/v2/nixos/configuration.nix new file mode 100644 index 0000000..3f44965 --- /dev/null +++ b/v2/nixos/configuration.nix @@ -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"; +} diff --git a/v2/nixos/hardware-configuration.nix b/v2/nixos/hardware-configuration.nix new file mode 100644 index 0000000..907963d --- /dev/null +++ b/v2/nixos/hardware-configuration.nix @@ -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; +} diff --git a/v2/nixos/packages.nix b/v2/nixos/packages.nix new file mode 100644 index 0000000..fa1c4bb --- /dev/null +++ b/v2/nixos/packages.nix @@ -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 +] diff --git a/v2/overlays/default.nix b/v2/overlays/default.nix new file mode 100644 index 0000000..7bfcb4c --- /dev/null +++ b/v2/overlays/default.nix @@ -0,0 +1,23 @@ +# This file defines overlays +{inputs, ...}: { + # This one brings our custom packages from the 'pkgs' directory + additions = final: _prev: import ../pkgs final.pkgs; + + # This one contains whatever you want to overlay + # You can change versions, add patches, set compilation flags, anything really. + # https://nixos.wiki/wiki/Overlays + modifications = final: prev: { + # example = prev.example.overrideAttrs (oldAttrs: rec { + # ... + # }); + }; + + # When applied, the unstable nixpkgs set (declared in the flake inputs) will + # be accessible through 'pkgs.unstable' + unstable-packages = final: _prev: { + unstable = import inputs.nixpkgs-unstable { + system = final.system; + config.allowUnfree = true; + }; + }; +} diff --git a/v2/pkgs/default.nix b/v2/pkgs/default.nix new file mode 100644 index 0000000..3d9e23c --- /dev/null +++ b/v2/pkgs/default.nix @@ -0,0 +1,5 @@ +# Custom packages, that can be defined similarly to ones from nixpkgs +# You can build them using 'nix build .#example' +pkgs: { + # example = pkgs.callPackage ./example { }; +} diff --git a/v22/flake.lock b/v22/flake.lock new file mode 100644 index 0000000..79c38b5 --- /dev/null +++ b/v22/flake.lock @@ -0,0 +1,65 @@ +{ + "nodes": { + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1763992789, + "narHash": "sha256-WHkdBlw6oyxXIra/vQPYLtqY+3G8dUVZM8bEXk0t8x4=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "44831a7eaba4360fb81f2acc5ea6de5fde90aaa3", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "release-25.05", + "repo": "home-manager", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1767313136, + "narHash": "sha256-16KkgfdYqjaeRGBaYsNrhPRRENs0qzkQVUooNHtoy2w=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "ac62194c3917d5f474c1a844b6fd6da2db95077d", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-25.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "home-manager": "home-manager", + "nixpkgs": "nixpkgs", + "systems": "systems" + } + }, + "systems": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/v22/flake.nix b/v22/flake.nix new file mode 100644 index 0000000..985ed84 --- /dev/null +++ b/v22/flake.nix @@ -0,0 +1,75 @@ +{ + description = "My NixOS configuration"; + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05"; + #unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable"; + #nix-snapd.url = "github:nix-community/nix-snapd"; + #nix-snapd.inputs.nixpkgs.follows = "nixpkgs"; + systems.url = "github:nix-systems/default-linux"; + #autofirma-nix = { + # url = "github:nix-community/autofirma-nix/release-25.05"; + # inputs.nixpkgs.follows = "nixpkgs"; + #}; + home-manager = { + url = "github:nix-community/home-manager/release-25.05"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + nixConfig = { + extra-substituters = [ + "https://nix-community.cachix.org" + ]; + como cuando experimenta extra-trusted-public-keys = [ + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + ]; + }; + outputs = { + self, + nixpkgs, + systems, + home-manager, + } @ inputs: let + inherit (self) outputs; + lib = nixpkgs.lib // home-manager.lib; + forEachSystem = f: lib.genAttrs (import systems) (system: f pkgsFor.${system}); + pkgsFor = lib.genAttrs (import systems) ( + system: + import nixpkgs { + inherit system; + config.allowUnfree = true; + } + ); + in { + inherit lib; + + #nixosModules = import ./modules/nixos; + #homeManagerModules = import ./modules/home-manager; + #overlays = import ./overlays {inherit inputs;}; + + packages = forEachSystem (pkgs: import ./pkgs {inherit pkgs;}); + + # NixOS configuration entrypoint + # Available through 'nixos-rebuild --flake .#your-hostname' + nixosConfigurations = { + limgrave = nixpkgs.lib.nixosSystem { + specialArgs = {inherit inputs;}; + modules = [ + ./hosts/limgrave/nixos + ]; + }; + }; + + # Standalone home-manager configuration entrypoint + # Available through 'home-manager --flake .#your-username@your-hostname' + homeConfigurations = { + "catalin@limgrave" = home-manager.lib.homeManagerConfiguration { + # Home-manager requires 'pkgs' instance + pkgs = pkgsFor.x86_64-linux; + extraSpecialArgs = {inherit inputs;}; + modules = [ + ./hosts/limgrave/home + ]; + }; + }; + }; +} \ No newline at end of file diff --git a/v22/hosts/limgrave/nixos/default.nix b/v22/hosts/limgrave/nixos/default.nix new file mode 100644 index 0000000..1aa7029 --- /dev/null +++ b/v22/hosts/limgrave/nixos/default.nix @@ -0,0 +1,161 @@ +{ pkgs, inputs, ... }: +{ + imports = [ + ./hardware-configuration.nix + ]; + + nixpkgs.config.allowBroken = true; + nix.settings.download-buffer-size = 524288000; + nixpkgs.config.permittedInsecurePackages = [ "electron-33.4.11" "mono-5.20.1.34" ]; + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + boot.supportedFilesystems = [ "ntfs" ]; + + services.snap.enable = false; + + networking.hostName = "limgrave"; + 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; + }; + + 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; + + programs.firefox.enable = true; + # Enable smart card service and eID tooling (AutoFirma stack) + services.pcscd.enable = true; + programs.autofirma = { + enable = true; + firefoxIntegration.enable = true; + }; + programs.dnieremote = { + enable = true; + jumpIntro = "no"; + wifiPort = 9501; + usbPort = 9501; + openFirewall = false; + }; + programs.configuradorfnmt = { + enable = true; + firefoxIntegration.enable = true; + }; + # Configure Firefox PKCS#11 modules for DNIe and OpenSC + programs.firefox.policies = { + SecurityDevices = { + "OpenSC PKCS#11" = "${pkgs.opensc}/lib/opensc-pkcs11.so"; + "DNIeRemote" = "${config.programs.dnieremote.finalPackage}/lib/libdnieremotepkcs11.so"; + }; + }; + nixpkgs.config.allowUnfree = true; + services.flatpak.enable = true; + programs.nix-ld.enable = true; + + # Merge base packages with host-specific packages + environment.systemPackages = import ./packages.nix pkgs; + + 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 + ''; + }; + + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + nix.gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 1w"; + }; + + fonts.packages = with pkgs; [ + atkinson-hyperlegible + ]; + + boot.kernel.sysctl."net.ipv4.ip_forward" = 1; + services.openssh.enable = true; + services.tailscale.enable = true; + virtualisation.docker.enable = true; + networking.nameservers = [ "192.168.1.7" "1.1.1.1" ]; + + nix.extraOptions = '' + trusted-users = root catalin + ''; + + system.autoUpgrade.enable = true; + system.stateVersion = "24.11"; +} diff --git a/v22/hosts/limgrave/nixos/hardware-configuration.nix b/v22/hosts/limgrave/nixos/hardware-configuration.nix new file mode 100644 index 0000000..7013bdc --- /dev/null +++ b/v22/hosts/limgrave/nixos/hardware-configuration.nix @@ -0,0 +1,82 @@ +# 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" "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."/snap/acestreamplayer/17" = +# { device = "/var/lib/snapd/snaps/acestreamplayer_17.snap"; +# fsType = "squashfs"; +# options = [ "loop" ]; +# }; +# +# fileSystems."/snap/core22/1722" = +# { device = "/var/lib/snapd/snaps/core22_1722.snap"; +# fsType = "squashfs"; +# options = [ "loop" ]; +# }; +# +# fileSystems."/snap/snapd/23258" = +# { device = "/var/lib/snapd/snaps/snapd_23258.snap"; +# fsType = "squashfs"; +# options = [ "loop" ]; +# }; +# + 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"; } + ]; + + # 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..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.br-71a907d8e6fd.useDHCP = lib.mkDefault true; + # networking.interfaces.docker0.useDHCP = lib.mkDefault true; + # networking.interfaces.eno1.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/v22/modules/home-manager/default.nix b/v22/modules/home-manager/default.nix new file mode 100644 index 0000000..e69de29 diff --git a/v22/modules/nixos/default.nix b/v22/modules/nixos/default.nix new file mode 100644 index 0000000..e69de29 diff --git a/v22/overlays/default.nix b/v22/overlays/default.nix new file mode 100644 index 0000000..e69de29 diff --git a/v22/pkgs/default.nix b/v22/pkgs/default.nix new file mode 100644 index 0000000..120834e --- /dev/null +++ b/v22/pkgs/default.nix @@ -0,0 +1,74 @@ +pkgs: with pkgs; [ + 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 + 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 +] \ No newline at end of file From 251932e6c024f7dc81bd06d2d6a491183110c4db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?c=C4=83t=C4=83lin?= Date: Mon, 9 Mar 2026 11:00:40 +0100 Subject: [PATCH 2/4] revamp flake --- .dotter/global.toml | 38 +- README.md | 49 +-- ansible/main.yml | 6 - ansible/requirements.yml | 2 - ansible/roles/packages/tasks/arch.yml | 92 ---- ansible/roles/packages/tasks/curlers.yml | 6 - ansible/roles/packages/tasks/debian.yml | 36 -- ansible/roles/packages/tasks/flatpak.yml | 24 -- ansible/roles/packages/tasks/main.yml | 90 ---- ansible/roles/packages/tasks/python.yml | 15 - ansible/roles/packages/tasks/rhel.yaml | 13 - ansible/roles/packages/tasks/snap.yml | 5 - .../7tv_settings_TWITCH-3_6_2025.json | 0 allowed_signers => conf.d/allowed_signers | 0 {astronvim => conf.d/astronvim}/community.lua | 0 .../astronvim}/plugins/astrocore.lua | 0 .../astronvim}/plugins/astrolsp.lua | 0 .../astronvim}/plugins/astroui.lua | 0 .../astronvim}/plugins/catppuccin.lua | 0 .../astronvim}/plugins/grug-far.lua | 0 atuin.toml => conf.d/atuin.toml | 0 .../bat}/themes/Catppuccin-mocha.tmTheme | 0 {fish => conf.d/fish}/conf.d/aliases.fish | 0 {fish => conf.d/fish}/conf.d/common.fish | 0 {fish => conf.d/fish}/conf.d/functions.fish | 0 {fish => conf.d/fish}/conf.d/kubectl.fish | 0 {fish => conf.d/fish}/conf.d/paths.fish | 0 freetds.conf => conf.d/freetds.conf | 0 gamemode.ini => conf.d/gamemode.ini | 0 gitconfig => conf.d/gitconfig | 0 {halig => conf.d/halig}/halig.yml | 0 ideavim => conf.d/ideavim | 0 k9smocha.yaml => conf.d/k9smocha.yaml | 0 {kitty => conf.d/kitty}/kitty.conf | 0 mangohud.conf => conf.d/mangohud.conf | 0 .../resticprofile.schema.json | 0 .../resticprofile.toml | 0 sshconfig => conf.d/sshconfig | 12 +- timewarrior.cfg => conf.d/timewarrior.cfg | 0 tmux.conf => conf.d/tmux.conf | 0 topgrade.toml => conf.d/topgrade.toml | 0 conf.d/utils/gs.sh | 27 ++ {utils => conf.d/utils}/patch-eldenring.sh | 0 vimrc => conf.d/vimrc | 0 v2/flake.lock => flake.lock | 54 ++- flake.nix | 51 +++ greenclip.toml | 12 - hosts/limgrave/home/home.nix | 62 +++ hosts/limgrave/nixos/default.nix | 151 +++++++ hosts/limgrave/nixos/flatpaks.nix | 22 + .../nixos/hardware-configuration.nix | 47 +-- .../limgrave/nixos/packages.nix | 74 ++-- nix/flake.lock | 392 ------------------ nix/flake.nix | 78 ---- nix/home/default.nix | 59 --- nix/home/packages.nix | 39 -- nix/hosts/limgrave/configuration.nix | 144 ------- nix/hosts/limgrave/hardware-configuration.nix | 82 ---- nix/hosts/limgrave/packages.nix | 74 ---- nix/packages.nix | 121 ------ utils/asciify.sh | 4 - utils/asciify.txt | 31 -- utils/curl2tar.sh | 4 - utils/dlm.sh | 27 -- utils/launcher | 10 - utils/set-monitors.sh | 14 - utils/toggle-keyboard-layout.sh | 7 - v2/flake.nix | 75 ---- v2/home-manager/home.nix | 66 --- v2/modules/home-manager/default.nix | 6 - v2/modules/nixos/default.nix | 6 - v2/nixos/configuration.nix | 206 --------- v2/nixos/packages.nix | 110 ----- v2/overlays/default.nix | 23 - v2/pkgs/default.nix | 5 - v22/flake.lock | 65 --- v22/flake.nix | 75 ---- v22/hosts/limgrave/nixos/default.nix | 161 ------- .../limgrave/nixos/hardware-configuration.nix | 82 ---- v22/modules/home-manager/default.nix | 0 v22/modules/nixos/default.nix | 0 v22/overlays/default.nix | 0 82 files changed, 446 insertions(+), 2408 deletions(-) delete mode 100644 ansible/main.yml delete mode 100644 ansible/requirements.yml delete mode 100644 ansible/roles/packages/tasks/arch.yml delete mode 100644 ansible/roles/packages/tasks/curlers.yml delete mode 100644 ansible/roles/packages/tasks/debian.yml delete mode 100644 ansible/roles/packages/tasks/flatpak.yml delete mode 100644 ansible/roles/packages/tasks/main.yml delete mode 100644 ansible/roles/packages/tasks/python.yml delete mode 100644 ansible/roles/packages/tasks/rhel.yaml delete mode 100644 ansible/roles/packages/tasks/snap.yml rename 7tv_settings_TWITCH-3_6_2025.json => conf.d/7tv_settings_TWITCH-3_6_2025.json (100%) rename allowed_signers => conf.d/allowed_signers (100%) rename {astronvim => conf.d/astronvim}/community.lua (100%) rename {astronvim => conf.d/astronvim}/plugins/astrocore.lua (100%) rename {astronvim => conf.d/astronvim}/plugins/astrolsp.lua (100%) rename {astronvim => conf.d/astronvim}/plugins/astroui.lua (100%) rename {astronvim => conf.d/astronvim}/plugins/catppuccin.lua (100%) rename {astronvim => conf.d/astronvim}/plugins/grug-far.lua (100%) rename atuin.toml => conf.d/atuin.toml (100%) rename {bat => conf.d/bat}/themes/Catppuccin-mocha.tmTheme (100%) rename {fish => conf.d/fish}/conf.d/aliases.fish (100%) rename {fish => conf.d/fish}/conf.d/common.fish (100%) rename {fish => conf.d/fish}/conf.d/functions.fish (100%) rename {fish => conf.d/fish}/conf.d/kubectl.fish (100%) rename {fish => conf.d/fish}/conf.d/paths.fish (100%) rename freetds.conf => conf.d/freetds.conf (100%) rename gamemode.ini => conf.d/gamemode.ini (100%) rename gitconfig => conf.d/gitconfig (100%) rename {halig => conf.d/halig}/halig.yml (100%) rename ideavim => conf.d/ideavim (100%) rename k9smocha.yaml => conf.d/k9smocha.yaml (100%) rename {kitty => conf.d/kitty}/kitty.conf (100%) rename mangohud.conf => conf.d/mangohud.conf (100%) rename resticprofile.schema.json => conf.d/resticprofile.schema.json (100%) rename resticprofile.toml => conf.d/resticprofile.toml (100%) rename sshconfig => conf.d/sshconfig (72%) rename timewarrior.cfg => conf.d/timewarrior.cfg (100%) rename tmux.conf => conf.d/tmux.conf (100%) rename topgrade.toml => conf.d/topgrade.toml (100%) create mode 100755 conf.d/utils/gs.sh rename {utils => conf.d/utils}/patch-eldenring.sh (100%) rename vimrc => conf.d/vimrc (100%) rename v2/flake.lock => flake.lock (57%) create mode 100644 flake.nix delete mode 100644 greenclip.toml create mode 100644 hosts/limgrave/home/home.nix create mode 100644 hosts/limgrave/nixos/default.nix create mode 100644 hosts/limgrave/nixos/flatpaks.nix rename {v2 => hosts/limgrave}/nixos/hardware-configuration.nix (58%) rename v22/pkgs/default.nix => hosts/limgrave/nixos/packages.nix (59%) delete mode 100644 nix/flake.lock delete mode 100644 nix/flake.nix delete mode 100644 nix/home/default.nix delete mode 100644 nix/home/packages.nix delete mode 100644 nix/hosts/limgrave/configuration.nix delete mode 100644 nix/hosts/limgrave/hardware-configuration.nix delete mode 100644 nix/hosts/limgrave/packages.nix delete mode 100644 nix/packages.nix delete mode 100755 utils/asciify.sh delete mode 100644 utils/asciify.txt delete mode 100755 utils/curl2tar.sh delete mode 100755 utils/dlm.sh delete mode 100755 utils/launcher delete mode 100755 utils/set-monitors.sh delete mode 100755 utils/toggle-keyboard-layout.sh delete mode 100644 v2/flake.nix delete mode 100644 v2/home-manager/home.nix delete mode 100644 v2/modules/home-manager/default.nix delete mode 100644 v2/modules/nixos/default.nix delete mode 100644 v2/nixos/configuration.nix delete mode 100644 v2/nixos/packages.nix delete mode 100644 v2/overlays/default.nix delete mode 100644 v2/pkgs/default.nix delete mode 100644 v22/flake.lock delete mode 100644 v22/flake.nix delete mode 100644 v22/hosts/limgrave/nixos/default.nix delete mode 100644 v22/hosts/limgrave/nixos/hardware-configuration.nix delete mode 100644 v22/modules/home-manager/default.nix delete mode 100644 v22/modules/nixos/default.nix delete mode 100644 v22/overlays/default.nix diff --git a/.dotter/global.toml b/.dotter/global.toml index aa00ade..14359f7 100644 --- a/.dotter/global.toml +++ b/.dotter/global.toml @@ -1,20 +1,20 @@ [default.files] -fish = "~/.config/fish/" -utils = "~/.local/bin/dotutils/" -ideavim = "~/.ideavimrc" -'astronvim/plugins' = "~/.config/nvim/lua/plugins/" -'astronvim/community.lua' = "~/.config/nvim/lua/community.lua" -vimrc = "~/.vimrc" -halig = "~/.config/halig" -"k9smocha.yaml" = "~/.config/k9s/skins/mocha.yaml" -sshconfig = "~/.ssh/config" -gitconfig = "~/.gitconfig" -allowed_signers = "~/.ssh/allowed_signers" -'topgrade.toml' = "~/.config/topgrade.toml" -kitty = "~/.config/kitty" -bat = "~/.config/bat" -'mangohud.conf' = "~/.config/MangoHud/MangoHud.conf" -"gamemode.ini" = "~/.config/gamemode.ini" -"timewarrior.cfg" = "~/.config/timewarrior/timewarrior.cfg" -"tmux.conf" = "~/.tmux.conf" -"atuin.toml" = "~/.config/atuin/config.toml" +"conf.d/fish" = "~/.config/fish/" +"conf.d/utils" = "~/.local/bin/dotutils/" +"conf.d/ideavim" = "~/.ideavimrc" +'conf.d/astronvim/plugins' = "~/.config/nvim/lua/plugins/" +'conf.d/astronvim/community.lua' = "~/.config/nvim/lua/community.lua" +"conf.d/vimrc" = "~/.vimrc" +"conf.d/halig" = "~/.config/halig" +"conf.d/k9smocha.yaml" = "~/.config/k9s/skins/mocha.yaml" +"conf.d/sshconfig" = "~/.ssh/config" +"conf.d/gitconfig" = "~/.gitconfig" +"conf.d/allowed_signers" = "~/.ssh/allowed_signers" +"conf.d/topgrade.toml" = "~/.config/topgrade.toml" +"conf.d/kitty" = "~/.config/kitty" +"conf.d/bat" = "~/.config/bat" +"conf.d/mangohud.conf" = "~/.config/MangoHud/MangoHud.conf" +"conf.d/gamemode.ini" = "~/.config/gamemode.ini" +"conf.d/timewarrior.cfg" = "~/.config/timewarrior/timewarrior.cfg" +"conf.d/tmux.conf" = "~/.tmux.conf" +"conf.d/atuin.toml" = "~/.config/atuin/config.toml" diff --git a/README.md b/README.md index dbc1284..8cecec6 100644 --- a/README.md +++ b/README.md @@ -1,47 +1,10 @@ # dots -This repository contains my dotfiles and a Nix flake that supports multiple hosts (machines) with a shared base and per-host configuration. +# limgrave -## Nix Configuration - -The Nix configuration is located in the `nix/` directory. It uses a shared Home Manager configuration for all hosts, while allowing host-specific NixOS or package settings. - -### Structure - -- `nix/flake.nix`: Entry point, defines hosts and helpers. -- `nix/home/`: Shared Home Manager configuration (packages, shell, GNOME settings). -- `nix/hosts/`: Host-specific NixOS configurations. - -### Adding New Hosts - -#### NixOS Hosts -1. Create a directory in `nix/hosts//`. -2. Add `configuration.nix`, `hardware-configuration.nix`, and `packages.nix` there. -3. Add the host to `nixosConfigurations` in `nix/flake.nix`: - ```nix - limgrave = mkNixos "limgrave" [ - nix-snapd.nixosModules.default - autofirma-nix.nixosModules.default - ]; - ``` - -#### Non-NixOS Hosts (e.g., Ubuntu) -1. Add the host to `homeConfigurations` in `nix/flake.nix`: - ```nix - "catalin@ubuntu" = mkHome "ubuntu" "catalin" [ ]; - ``` - *Note: `mkHome` takes `hostname`, `username`, and additional modules.* - -### Building and Applying - -#### NixOS -Run from the root of the repository: -```bash -sudo nixos-rebuild switch --flake .#hostname -``` - -#### Non-NixOS (Home Manager) -Run from the root of the repository: -```bash -home-manager switch --flake ./nix#user@hostname +```shell +sudo nixos-rebuild switch --flake ~/.dotfiles#limgrave --upgrade # first time +dotter # create dotfiles symlinks +nh os switch ~/.dotfiles/ # after +nh home switch ~/.dotfiles # home manager ``` \ No newline at end of file diff --git a/ansible/main.yml b/ansible/main.yml deleted file mode 100644 index 611e1d9..0000000 --- a/ansible/main.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -- hosts: localhost - gather_facts: true - tasks: - - import_role: - name: packages diff --git a/ansible/requirements.yml b/ansible/requirements.yml deleted file mode 100644 index 052506b..0000000 --- a/ansible/requirements.yml +++ /dev/null @@ -1,2 +0,0 @@ -collections: - - name: kewlfft.aur diff --git a/ansible/roles/packages/tasks/arch.yml b/ansible/roles/packages/tasks/arch.yml deleted file mode 100644 index 76f27da..0000000 --- a/ansible/roles/packages/tasks/arch.yml +++ /dev/null @@ -1,92 +0,0 @@ ---- -- name: Install Arch packages - become: true - ansible.builtin.package: - name: - # gnome - - gnome - - gnome-extra - - gnome-bluetooth-3.0 - - gnome-control-center - - gnome-shell-extensions - - gnome-themes-extra - - gnome-browser-connector - - gnome-tweaks - - # dbs - - postgresql-client - - freetds - - unixodbc - - # work - - azure-cli - - # bluetooth - - bluez - - bluez-utils - - bluez-deprecated-tools - - # containers - - docker - - docker-buildx - - docker-compose - - # gayming - - steam - - steam-native-runtime - - mangohud - - lib32-mangohud - - gamemode - - lib32-gamemode - - mesa - - # utils - - python-virtualenv - - asciinema - - trash-cli - - git - - base-devel - - bubblewrap - - libseccomp - - xz - - shellcheck - - python-pipx - - python-gobject - - # fonts - - noto-fonts-cjk - - noto-fonts-emoji - - noto-fonts - - ttf-liberation - - ttf-inconsolata - - ttf-fira-code - - # misc - - networkmanager - - firefox - - lutris - - nodejs - - npm - - fd - - less - - timew - - man - state: present - -- name: Install aur packages - kewlfft.aur.aur: - name: - - visual-studio-code-bin - - python-pyodbc - - protonut-qt - - jetbrains-toolbox - - snapd - - gnome-shell-extension-dash-to-dock-git - - catppuccin-gtk-theme-mocha - - tree-sitter-git - - neovim-git - - papirus-icon-theme-git - - pop-launcher-git - state: present - tags: - - aur diff --git a/ansible/roles/packages/tasks/curlers.yml b/ansible/roles/packages/tasks/curlers.yml deleted file mode 100644 index 246e773..0000000 --- a/ansible/roles/packages/tasks/curlers.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -- name: Execute curl installers - ansible.builtin.shell: "curl -sSfL {{ item }} | bash" - loop: "{{ curl_install_urls }}" - tags: - - curl diff --git a/ansible/roles/packages/tasks/debian.yml b/ansible/roles/packages/tasks/debian.yml deleted file mode 100644 index dd08c78..0000000 --- a/ansible/roles/packages/tasks/debian.yml +++ /dev/null @@ -1,36 +0,0 @@ ---- -- name: Install Debian packages - ansible.builtin.package: - name: - - rofi-dev - - g++ - - nodejs - - npm - - python3.11-venv - - parallel - - postgresql-client-common - - libnss3-tools - - hwinfo - - rsync - - nmap - - nodejs - - unixodbc - - unixodbc-dev - - freetds-bin - - freetds-common - - freetds-dev - - unzip - state: present - tags: - - debian - -- name: Install Debian GUI packages - ansible.builtin.package: - name: - - rofi-dev - - qalculate-gtk - - snapd - state: present - tags: - - debian - - gui diff --git a/ansible/roles/packages/tasks/flatpak.yml b/ansible/roles/packages/tasks/flatpak.yml deleted file mode 100644 index b97374f..0000000 --- a/ansible/roles/packages/tasks/flatpak.yml +++ /dev/null @@ -1,24 +0,0 @@ ---- -- name: Install flatpak packages - community.general.flatpak: - name: - - com.github.iwalton3.jellyfin-media-player - - com.stremio.Stremio - - dev.geopjr.Tuba - - org.telegram.desktop - - com.tutanota.Tutanota - - org.gnome.DejaDup - - com.bitwarden.desktop - - com.spotify.Client - - org.qbittorrent.qBittorrent - - app/com.nextcloud.desktopclient.nextcloud/x86_64/stable - - net.lutris.Lutris - - io.github.diegoivanme.flowtime - - org.gnome.Decibels - - net.davidotek.pupgui2 - - dev.vencord.Vesktop - - com.discordapp.Discord - - com.google.Chrome - - rest.insomnia.Insomnia - - com.github.neithern.g4music - method: "user" diff --git a/ansible/roles/packages/tasks/main.yml b/ansible/roles/packages/tasks/main.yml deleted file mode 100644 index dd202e2..0000000 --- a/ansible/roles/packages/tasks/main.yml +++ /dev/null @@ -1,90 +0,0 @@ -- name: Install CLI os-agnostic packages - become: true - ansible.builtin.package: - name: - - git - - tmux - - python-pip - - fish - - rofi - - automake - - ncdu - - xclip - state: present - tags: - - agnostic - - cli - -- name: Install GUI os-agnostic packages - become: true - ansible.builtin.package: - name: - - mpv - - rofi - state: present - tags: - - agnostic - - gui - -- name: Install Arch packages - when: ansible_os_family == "Archlinux" - ansible.builtin.import_tasks: arch.yml - tags: - - arch - - -- name: Install Debian packages - become: true - when: ansible_os_family == "Debian" - ansible.builtin.import_tasks: debian.yml - - tags: - - debian - -- name: Install RHEL packages - become: true - when: ansible_os_family in ["RedHat", "Nobara"] - ansible.builtin.import_tasks: rhel.yaml - tags: - - rhel - -- name: Curl installers - become: false - ansible.builtin.import_tasks: curlers.yml - vars: - curl_install_urls: - - https://raw.githubusercontent.com/aquaproj/aqua-installer/v3.0.1/aqua-installer - - https://astral.sh/uv/install.sh - - tags: - - curl - -- name: Curl GUI installers - become: false - ansible.builtin.import_tasks: curlers.yml - vars: - curl_install_urls: - - https://sw.kovidgoyal.net/kitty/installer.sh - - https://zed.dev/install.sh | ZED_CHANNEL=preview - tags: - - gui - - curl - - -- name: Install Python packages - ansible.builtin.import_tasks: python.yml - tags: - - python - -- name: Install Flatpak packages - ansible.builtin.import_tasks: flatpak.yml - tags: - - flatpak - - gui - -- name: Install Snap packages - become: true - ansible.builtin.import_tasks: snap.yml - tags: - - snap - - gui diff --git a/ansible/roles/packages/tasks/python.yml b/ansible/roles/packages/tasks/python.yml deleted file mode 100644 index 7cfbd65..0000000 --- a/ansible/roles/packages/tasks/python.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -- name: Install pipx packages - community.general.pipx: - name: "{{ item }}" - state: latest - loop: - - yt-dlp - - pdm - - poetry - - halig - - pre-commit - - ruff - - thefuck - - streamlink - - tldr diff --git a/ansible/roles/packages/tasks/rhel.yaml b/ansible/roles/packages/tasks/rhel.yaml deleted file mode 100644 index ce2a288..0000000 --- a/ansible/roles/packages/tasks/rhel.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -- name: Install RHEL packages - ansible.builtin.package: - name: - - rofi-devel - - qalculate - - automake - - libtool - - cheat - - gcc-c++ - - neovim - - python3-neovim - state: present diff --git a/ansible/roles/packages/tasks/snap.yml b/ansible/roles/packages/tasks/snap.yml deleted file mode 100644 index ac6fae6..0000000 --- a/ansible/roles/packages/tasks/snap.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- name: Install snaps packages - community.general.snap: - name: - - acestreamplayer diff --git a/7tv_settings_TWITCH-3_6_2025.json b/conf.d/7tv_settings_TWITCH-3_6_2025.json similarity index 100% rename from 7tv_settings_TWITCH-3_6_2025.json rename to conf.d/7tv_settings_TWITCH-3_6_2025.json diff --git a/allowed_signers b/conf.d/allowed_signers similarity index 100% rename from allowed_signers rename to conf.d/allowed_signers diff --git a/astronvim/community.lua b/conf.d/astronvim/community.lua similarity index 100% rename from astronvim/community.lua rename to conf.d/astronvim/community.lua diff --git a/astronvim/plugins/astrocore.lua b/conf.d/astronvim/plugins/astrocore.lua similarity index 100% rename from astronvim/plugins/astrocore.lua rename to conf.d/astronvim/plugins/astrocore.lua diff --git a/astronvim/plugins/astrolsp.lua b/conf.d/astronvim/plugins/astrolsp.lua similarity index 100% rename from astronvim/plugins/astrolsp.lua rename to conf.d/astronvim/plugins/astrolsp.lua diff --git a/astronvim/plugins/astroui.lua b/conf.d/astronvim/plugins/astroui.lua similarity index 100% rename from astronvim/plugins/astroui.lua rename to conf.d/astronvim/plugins/astroui.lua diff --git a/astronvim/plugins/catppuccin.lua b/conf.d/astronvim/plugins/catppuccin.lua similarity index 100% rename from astronvim/plugins/catppuccin.lua rename to conf.d/astronvim/plugins/catppuccin.lua diff --git a/astronvim/plugins/grug-far.lua b/conf.d/astronvim/plugins/grug-far.lua similarity index 100% rename from astronvim/plugins/grug-far.lua rename to conf.d/astronvim/plugins/grug-far.lua diff --git a/atuin.toml b/conf.d/atuin.toml similarity index 100% rename from atuin.toml rename to conf.d/atuin.toml diff --git a/bat/themes/Catppuccin-mocha.tmTheme b/conf.d/bat/themes/Catppuccin-mocha.tmTheme similarity index 100% rename from bat/themes/Catppuccin-mocha.tmTheme rename to conf.d/bat/themes/Catppuccin-mocha.tmTheme diff --git a/fish/conf.d/aliases.fish b/conf.d/fish/conf.d/aliases.fish similarity index 100% rename from fish/conf.d/aliases.fish rename to conf.d/fish/conf.d/aliases.fish diff --git a/fish/conf.d/common.fish b/conf.d/fish/conf.d/common.fish similarity index 100% rename from fish/conf.d/common.fish rename to conf.d/fish/conf.d/common.fish diff --git a/fish/conf.d/functions.fish b/conf.d/fish/conf.d/functions.fish similarity index 100% rename from fish/conf.d/functions.fish rename to conf.d/fish/conf.d/functions.fish diff --git a/fish/conf.d/kubectl.fish b/conf.d/fish/conf.d/kubectl.fish similarity index 100% rename from fish/conf.d/kubectl.fish rename to conf.d/fish/conf.d/kubectl.fish diff --git a/fish/conf.d/paths.fish b/conf.d/fish/conf.d/paths.fish similarity index 100% rename from fish/conf.d/paths.fish rename to conf.d/fish/conf.d/paths.fish diff --git a/freetds.conf b/conf.d/freetds.conf similarity index 100% rename from freetds.conf rename to conf.d/freetds.conf diff --git a/gamemode.ini b/conf.d/gamemode.ini similarity index 100% rename from gamemode.ini rename to conf.d/gamemode.ini diff --git a/gitconfig b/conf.d/gitconfig similarity index 100% rename from gitconfig rename to conf.d/gitconfig diff --git a/halig/halig.yml b/conf.d/halig/halig.yml similarity index 100% rename from halig/halig.yml rename to conf.d/halig/halig.yml diff --git a/ideavim b/conf.d/ideavim similarity index 100% rename from ideavim rename to conf.d/ideavim diff --git a/k9smocha.yaml b/conf.d/k9smocha.yaml similarity index 100% rename from k9smocha.yaml rename to conf.d/k9smocha.yaml diff --git a/kitty/kitty.conf b/conf.d/kitty/kitty.conf similarity index 100% rename from kitty/kitty.conf rename to conf.d/kitty/kitty.conf diff --git a/mangohud.conf b/conf.d/mangohud.conf similarity index 100% rename from mangohud.conf rename to conf.d/mangohud.conf diff --git a/resticprofile.schema.json b/conf.d/resticprofile.schema.json similarity index 100% rename from resticprofile.schema.json rename to conf.d/resticprofile.schema.json diff --git a/resticprofile.toml b/conf.d/resticprofile.toml similarity index 100% rename from resticprofile.toml rename to conf.d/resticprofile.toml diff --git a/sshconfig b/conf.d/sshconfig similarity index 72% rename from sshconfig rename to conf.d/sshconfig index 97e637c..ed7d333 100644 --- a/sshconfig +++ b/conf.d/sshconfig @@ -119,4 +119,14 @@ Host fuku.dd02 Host fuku.dd01 HostName dd01.fuku User root - IdentityFile ~/.ssh/id_ed25519 \ No newline at end of file + IdentityFile ~/.ssh/id_ed25519 +# --- START CODER JETBRAINS TOOLBOX mbcode.i.mercedes-benz.com +Host coder-jetbrains-toolbox-mbcode.i.mercedes-benz.com--* + ProxyCommand /home/catalin/.local/share/coder-toolbox/mbcode.i.mercedes-benz.com/coder-linux-amd64 --global-config /home/catalin/.local/share/coder-toolbox/mbcode.i.mercedes-benz.com/config --url https://mbcode.i.mercedes-benz.com/ ssh --stdio --network-info-dir /home/catalin/.local/share/coder-toolbox/ssh-network-metrics --usage-app=jetbrains --ssh-host-prefix coder-jetbrains-toolbox-mbcode.i.mercedes-benz.com-- %h + ConnectTimeout 0 + StrictHostKeyChecking no + UserKnownHostsFile /dev/null + LogLevel ERROR + SetEnv CODER_SSH_SESSION_TYPE=JetBrains + +# --- END CODER JETBRAINS TOOLBOX mbcode.i.mercedes-benz.com diff --git a/timewarrior.cfg b/conf.d/timewarrior.cfg similarity index 100% rename from timewarrior.cfg rename to conf.d/timewarrior.cfg diff --git a/tmux.conf b/conf.d/tmux.conf similarity index 100% rename from tmux.conf rename to conf.d/tmux.conf diff --git a/topgrade.toml b/conf.d/topgrade.toml similarity index 100% rename from topgrade.toml rename to conf.d/topgrade.toml diff --git a/conf.d/utils/gs.sh b/conf.d/utils/gs.sh new file mode 100755 index 0000000..1e51c1c --- /dev/null +++ b/conf.d/utils/gs.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash +set -xeuo pipefail + +gamescopeArgs=( + --adaptive-sync # VRR support + --hdr-enabled + --mangoapp # performance overlay + --rt + --steam +) +steamArgs=( + -pipewire-dmabuf + -tenfoot +) +mangoConfig=( + cpu_temp + gpu_temp + ram + vram +) +mangoVars=( + MANGOHUD=1 + MANGOHUD_CONFIG="$(IFS=,; echo "${mangoConfig[*]}")" +) + +export "${mangoVars[@]}" +exec gamescope "${gamescopeArgs[@]}" -- steam "${steamArgs[@]}" \ No newline at end of file diff --git a/utils/patch-eldenring.sh b/conf.d/utils/patch-eldenring.sh similarity index 100% rename from utils/patch-eldenring.sh rename to conf.d/utils/patch-eldenring.sh diff --git a/vimrc b/conf.d/vimrc similarity index 100% rename from vimrc rename to conf.d/vimrc diff --git a/v2/flake.lock b/flake.lock similarity index 57% rename from v2/flake.lock rename to flake.lock index 0e09121..786d640 100644 --- a/v2/flake.lock +++ b/flake.lock @@ -21,43 +21,59 @@ "type": "github" } }, + "nix-flatpak": { + "locked": { + "lastModified": 1767983141, + "narHash": "sha256-7ZCulYUD9RmJIDULTRkGLSW1faMpDlPKcbWJLYHoXcs=", + "owner": "gmodena", + "repo": "nix-flatpak", + "rev": "440818969ac2cbd77bfe025e884d0aa528991374", + "type": "github" + }, + "original": { + "owner": "gmodena", + "ref": "v0.7.0", + "repo": "nix-flatpak", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1770770419, "narHash": "sha256-iKZMkr6Cm9JzWlRYW/VPoL0A9jVKtZYiU4zSrVeetIs=", - "owner": "nixos", + "owner": "NixOS", "repo": "nixpkgs", "rev": "6c5e707c6b5339359a9a9e215c5e66d6d802fd7a", "type": "github" }, "original": { - "owner": "nixos", + "owner": "NixOS", "ref": "nixos-25.11", "repo": "nixpkgs", "type": "github" } }, - "nixpkgs-unstable": { - "locked": { - "lastModified": 1714076141, - "narHash": "sha256-Drmja/f5MRHZCskS6mvzFqxEaZMeciScCTFxWVLqWEY=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "7bb2ccd8cdc44c91edba16c48d2c8f331fb3d856", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "root": { "inputs": { "home-manager": "home-manager", + "nix-flatpak": "nix-flatpak", "nixpkgs": "nixpkgs", - "nixpkgs-unstable": "nixpkgs-unstable" + "systems": "systems" + } + }, + "systems": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" } } }, diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..c929e03 --- /dev/null +++ b/flake.nix @@ -0,0 +1,51 @@ +{ + description = "NixOS flake"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11"; + systems.url = "github:nix-systems/default-linux"; + nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=v0.7.0"; + home-manager = { + url = "github:nix-community/home-manager/release-25.11"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = { self, nixpkgs, nix-flatpak, systems, home-manager, ... } @ inputs: let + inherit (self) outputs; + lib = nixpkgs.lib // home-manager.lib; + formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt-tree; + forEachSystem = f: lib.genAttrs (import systems) (system: f pkgsFor.${system}); + pkgsFor = lib.genAttrs (import systems) ( + system: + import nixpkgs { + inherit system; + config.allowUnfree = true; + } + ); + + in { + inherit lib; + + + nixosConfigurations = { + limgrave = nixpkgs.lib.nixosSystem { + specialArgs = {inherit inputs;}; + modules = [ + nix-flatpak.nixosModules.nix-flatpak + ./hosts/limgrave/nixos + ]; + }; + }; + + homeConfigurations = { + "catalin@limgrave" = home-manager.lib.homeManagerConfiguration { + pkgs = pkgsFor.x86_64-linux; + extraSpecialArgs = {inherit inputs;}; + modules = [ + ./hosts/limgrave/home/home.nix + ]; + }; + }; + }; +} \ No newline at end of file diff --git a/greenclip.toml b/greenclip.toml deleted file mode 100644 index 5346073..0000000 --- a/greenclip.toml +++ /dev/null @@ -1,12 +0,0 @@ -[greenclip] - history_file = "~/.cache/greenclip.history" - max_history_length = 50 - max_selection_size_bytes = 0 - trim_space_from_selection = true - use_primary_selection_as_input = false - blacklisted_applications = [] - enable_image_support = true - image_cache_directory = "/tmp/greenclip" - static_history = [ - '''¯\_(ツ)_/¯''', -] diff --git a/hosts/limgrave/home/home.nix b/hosts/limgrave/home/home.nix new file mode 100644 index 0000000..dbb8096 --- /dev/null +++ b/hosts/limgrave/home/home.nix @@ -0,0 +1,62 @@ +{ + inputs, + lib, + config, + pkgs, + ... +}: { + home = { + username = "catalin"; + homeDirectory = "/home/catalin"; + shell.enableFishIntegration = true; + packages = with pkgs; [ + gnomeExtensions.user-themes + gnomeExtensions.caffeine + gnomeExtensions.colosseum + gnomeExtensions.dash-to-dock + gnomeExtensions.clipboard-indicator + gnomeExtensions.emoji-copy + gnomeExtensions.gsconnect + gnomeExtensions.bluetooth-battery-meter + gnome-tweaks + catppuccin-gtk + catppuccin-cursors + catppuccin-papirus-folders + catppuccin-grub + ]; + + }; + dconf = { + enable = true; + settings = { + "org/gnome/desktop/interface".color-scheme = "prefer-dark"; + "org/gnome/shell" = { + disable-user-extensions = false; + enabled-extensions = with pkgs.gnomeExtensions; [ + gsconnect.extensionUuid + user-themes.extensionUuid + caffeine.extensionUuid + colosseum.extensionUuid + dash-to-dock.extensionUuid + clipboard-indicator.extensionUuid + emoji-copy.extensionUuid + bluetooth-battery-meter.extensionUuid + ]; + }; + }; + }; + + + programs.gnome-shell = { + enable = true; + extensions = [{ package = pkgs.gnomeExtensions.gsconnect; }]; + }; + programs.home-manager.enable = true; + programs.git.enable = true; + systemd.user.startServices = "sd-switch"; + programs = { + fish.enable = true; + }; + + home.stateVersion = "25.11"; +} \ No newline at end of file diff --git a/hosts/limgrave/nixos/default.nix b/hosts/limgrave/nixos/default.nix new file mode 100644 index 0000000..0ff6831 --- /dev/null +++ b/hosts/limgrave/nixos/default.nix @@ -0,0 +1,151 @@ +{ config, pkgs, flatpaks, lib, ... }: + +{ + imports = + [ + ./hardware-configuration.nix + ]; + + boot = { + loader.systemd-boot.enable = true; + loader.efi.canTouchEfiVariables = true; + kernelPackages = pkgs.linuxPackages_latest; + initrd.luks.devices."luks-7565ba12-2da3-4933-adec-8d62e81afe52".device = "/dev/disk/by-uuid/7565ba12-2da3-4933-adec-8d62e81afe52"; + }; + + nix = { + settings.experimental-features = [ "nix-command" "flakes" ]; + settings.trusted-users = [ "root" "catalin" ]; + }; + + networking = { + hostName = "limgrave"; + networkmanager.enable = true; + }; + + services = { + xserver.enable = true; + desktopManager.gnome.enable = true; + displayManager.gdm.enable = true; + xserver.xkb = { + layout = "us"; + variant = ""; + }; + printing.enable = true; + pulseaudio.enable = false; + pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; + udev.packages = with pkgs; [ gnome-settings-daemon ]; + sysprof.enable = true; + flatpak = { + enable = true; + packages = import ./flatpaks.nix; + overrides = { + "org.signal.Signal" = { + Environment = { + "SIGNAL_PASSWORD_STORE" = "gnome-libsecret org.signal.Signal"; + }; + }; + }; + }; + + + }; + + programs = { + fish.enable = true; + appimage.enable = true; + appimage.binfmt = true; + dconf.enable = true; + gamescope = { + enable = true; + capSysNice = true; + }; + steam = { + enable = true; + gamescopeSession.enable = true; + remotePlay.openFirewall = true; + package = pkgs.steam.override { + extraLibraries = p: with p; [ (lib.getLib networkmanager) ]; + }; + }; + firefox.enable = true; + nix-ld.enable = true; + nh = { + enable = true; + clean.enable = true; + clean.extraArgs = "--keep-since 4d --keep 3"; + flake = "/home/.dotfiles"; + }; + }; + + + 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"; + }; + + users = { + users.catalin = { + isNormalUser = true; + description = "catalin"; + extraGroups = [ "networkmanager" "wheel" "docker" "nas"]; + shell = pkgs.fish; + packages = with pkgs; [ + flatpak + ]; + }; + groups.nas.gid = 568; + }; + + + security.rtkit.enable = true; + + hardware = { + graphics = { + enable = true; + enable32Bit = true; + }; + }; + + + xdg.portal = { + enable = true; + config = { + common = { + default = [ + "gtk" + ]; + }; + }; + extraPortals = with pkgs; [ + xdg-desktop-portal-gtk + ]; + }; + virtualisation.docker.enable = true; + + nixpkgs.config.allowUnfree = true; + environment = { + sessionVariables.NIXOS_OZONE_WL = "1"; + systemPackages = import ./packages.nix pkgs; + loginShellInit = '' + [[ "$(tty)" = "/dev/tty1" ]] && ~/.dotfiles/conf.d/utils/gs.sh + ''; + }; + + + system.stateVersion = "25.11"; +} diff --git a/hosts/limgrave/nixos/flatpaks.nix b/hosts/limgrave/nixos/flatpaks.nix new file mode 100644 index 0000000..5afdc11 --- /dev/null +++ b/hosts/limgrave/nixos/flatpaks.nix @@ -0,0 +1,22 @@ +[ + "com.microsoft.Edge" + "dev.vencord.Vesktop" + "chat.revolt.RevoltDesktop" + "org.signal.Signal" + "io.github.hkdb.Aerion" + "io.github.mpobaschnig.Vaults" + "com.bitwarden.desktop" + "com.google.Chrome" + "org.jellyfin.JellyfinDesktop" + "net.lutris.Lutris" + "com.stremio.Stremio" + "org.musicbrainz.Picard" + "org.gimp.GIMP" + "org.qbittorrent.qBittorrent" + "com.tutanota.Tutanota" + "com.usebruno.Bruno" + "com.obsproject.Studio" + "org.kde.kdenlive" + "com.vysp3r.ProtonPlus" + "com.github.IsmaelMartinez.teams_for_linux" +] diff --git a/v2/nixos/hardware-configuration.nix b/hosts/limgrave/nixos/hardware-configuration.nix similarity index 58% rename from v2/nixos/hardware-configuration.nix rename to hosts/limgrave/nixos/hardware-configuration.nix index 907963d..2050838 100644 --- a/v2/nixos/hardware-configuration.nix +++ b/hosts/limgrave/nixos/hardware-configuration.nix @@ -1,8 +1,12 @@ - +# 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, ... }: { - boot.loader.systemd-boot.enable = true; + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; boot.initrd.kernelModules = [ ]; @@ -10,27 +14,29 @@ boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/07b5dda3-2fcd-494b-893c-72301d637e9a"; + { device = "/dev/mapper/luks-0e11cc3f-cf15-42a3-8356-12780ac991f6"; fsType = "ext4"; }; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/04FD-A91D"; - fsType = "vfat"; - options = [ "fmask=0077" "dmask=0077" ]; - }; + boot.initrd.luks.devices."luks-0e11cc3f-cf15-42a3-8356-12780ac991f6".device = "/dev/disk/by-uuid/0e11cc3f-cf15-42a3-8356-12780ac991f6"; - - fileSystems."/mnt/zeruel/nas1" = + 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/windoze" = + { device = "/dev/disk/by-uuid/46B01460B01458AF"; + fsType = "ntfs-3g"; + options = [ "rw" "uid=1000"]; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/0362-9D53"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; }; fileSystems."/mnt/windoze2" = @@ -38,18 +44,11 @@ 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"; } + [ { device = "/dev/mapper/luks-7565ba12-2da3-4933-adec-8d62e81afe52"; } ]; - networking.useDHCP = lib.mkDefault true; - - # Set your system kind (needed for flakes) - nixpkgs.hostPlatform = "x86_64-linux"; + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/v22/pkgs/default.nix b/hosts/limgrave/nixos/packages.nix similarity index 59% rename from v22/pkgs/default.nix rename to hosts/limgrave/nixos/packages.nix index 120834e..f756872 100644 --- a/v22/pkgs/default.nix +++ b/hosts/limgrave/nixos/packages.nix @@ -1,29 +1,14 @@ -pkgs: with pkgs; [ + pkgs: with pkgs; [ + bat + git + neovim + jetbrains-toolbox + coder 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 - pre-commit - cargo - inconsolata - google-chrome - yt-dlp mpv gnumake - stremio kubernetes-helm opentofu kubeseal @@ -34,14 +19,8 @@ pkgs: with pkgs; [ 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 @@ -51,24 +30,49 @@ pkgs: with pkgs; [ 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 -] \ No newline at end of file + adwaita-icon-theme + ayugram-desktop + restic + pre-commit + cargo + inconsolata + k9s + kubectl + dotter + atuin + kubecolor + trash-cli + gnomeExtensions.appindicator + bruno + devenv + vim + direnv + marble-shell-theme + colloid-gtk-theme + colloid-icon-theme + sysprof + steam-run + streamlink + twitch-chat-downloader + jq + hmcl + tmux + tor + tor-browser + remmina + yt-dlp + mangohud + ] diff --git a/nix/flake.lock b/nix/flake.lock deleted file mode 100644 index f652dcf..0000000 --- a/nix/flake.lock +++ /dev/null @@ -1,392 +0,0 @@ -{ - "nodes": { - "autofirma-nix": { - "inputs": { - "autofirma-src": "autofirma-src", - "clienteafirma-external-src": "clienteafirma-external-src", - "flake-parts": "flake-parts", - "home-manager": "home-manager", - "jmulticard-src": "jmulticard-src", - "nix-unit": "nix-unit", - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1762846273, - "narHash": "sha256-TvPVL/CLMstwlnsDrBHw7vMbrxwO1RlxJcQD2Csc/3Q=", - "owner": "nix-community", - "repo": "autofirma-nix", - "rev": "014a7decf4a60dcab532f78469ce83387c9aa40e", - "type": "github" - }, - "original": { - "owner": "nix-community", - "ref": "release-25.05", - "repo": "autofirma-nix", - "type": "github" - } - }, - "autofirma-src": { - "flake": false, - "locked": { - "lastModified": 1716805628, - "narHash": "sha256-GQyj3QuWIHTkYwdJ4oKVsG923YG9mCUXfhqdIvEWNMA=", - "owner": "ctt-gob-es", - "repo": "clienteafirma", - "rev": "f8888062394a4ca41c5802beb2524597a5ce465a", - "type": "github" - }, - "original": { - "owner": "ctt-gob-es", - "ref": "v1.8.3", - "repo": "clienteafirma", - "type": "github" - } - }, - "clienteafirma-external-src": { - "flake": false, - "locked": { - "lastModified": 1712248159, - "narHash": "sha256-iS3I6zIxuKG133s/FqDlXZzOZ2ZOJcqZK9X6Tv3+3lc=", - "owner": "ctt-gob-es", - "repo": "clienteafirma-external", - "rev": "f450ac76094ffe387f6590b9ac61b5ada5a501e7", - "type": "github" - }, - "original": { - "owner": "ctt-gob-es", - "ref": "OT_14395", - "repo": "clienteafirma-external", - "type": "github" - } - }, - "flake-compat": { - "locked": { - "lastModified": 1733328505, - "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", - "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", - "revCount": 69, - "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.1.0/01948eb7-9cba-704f-bbf3-3fa956735b52/source.tar.gz" - }, - "original": { - "type": "tarball", - "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" - } - }, - "flake-parts": { - "inputs": { - "nixpkgs-lib": [ - "autofirma-nix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1762810396, - "narHash": "sha256-dxFVgQPG+R72dkhXTtqUm7KpxElw3u6E+YlQ2WaDgt8=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "0bdadb1b265fb4143a75bd1ec7d8c915898a9923", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_2": { - "inputs": { - "nixpkgs-lib": "nixpkgs-lib" - }, - "locked": { - "lastModified": 1760948891, - "narHash": "sha256-TmWcdiUUaWk8J4lpjzu4gCGxWY6/Ok7mOK4fIFfBuU4=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "864599284fc7c0ba6357ed89ed5e2cd5040f0c04", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "home-manager": { - "inputs": { - "nixpkgs": "nixpkgs" - }, - "locked": { - "lastModified": 1762787259, - "narHash": "sha256-t2U/GLLXHa2+kJkwnFNRVc2fEJ/lUfyZXBE5iKzJdcs=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "37a3d97f2873e0f68711117c34d04b7c7ead8f4e", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, - "home-manager_2": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1763992789, - "narHash": "sha256-WHkdBlw6oyxXIra/vQPYLtqY+3G8dUVZM8bEXk0t8x4=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "44831a7eaba4360fb81f2acc5ea6de5fde90aaa3", - "type": "github" - }, - "original": { - "owner": "nix-community", - "ref": "release-25.05", - "repo": "home-manager", - "type": "github" - } - }, - "jmulticard-src": { - "flake": false, - "locked": { - "lastModified": 1686816513, - "narHash": "sha256-sCqMK4FvwRHsGIB6iQVyqrx0+EDiUfQSAsPqmDq2Giw=", - "owner": "ctt-gob-es", - "repo": "jmulticard", - "rev": "9983fc690f3b68dc2c8fde19db269766cf0fb387", - "type": "github" - }, - "original": { - "owner": "ctt-gob-es", - "ref": "v1.8", - "repo": "jmulticard", - "type": "github" - } - }, - "nix-github-actions": { - "inputs": { - "nixpkgs": [ - "autofirma-nix", - "nix-unit", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1737420293, - "narHash": "sha256-F1G5ifvqTpJq7fdkT34e/Jy9VCyzd5XfJ9TO8fHhJWE=", - "owner": "nix-community", - "repo": "nix-github-actions", - "rev": "f4158fa080ef4503c8f4c820967d946c2af31ec9", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nix-github-actions", - "type": "github" - } - }, - "nix-snapd": { - "inputs": { - "flake-compat": "flake-compat", - "flake-parts": "flake-parts_2", - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1761703712, - "narHash": "sha256-OKuNVXmHuZ0zi8T0aGWrBJizIfvdTqV1RiV0IN8GPZs=", - "owner": "nix-community", - "repo": "nix-snapd", - "rev": "f7694a0e26d890e285137e1b726b1b44038805c4", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nix-snapd", - "type": "github" - } - }, - "nix-unit": { - "inputs": { - "flake-parts": [ - "autofirma-nix", - "flake-parts" - ], - "nix-github-actions": "nix-github-actions", - "nixpkgs": [ - "autofirma-nix", - "nixpkgs" - ], - "treefmt-nix": "treefmt-nix" - }, - "locked": { - "lastModified": 1762774186, - "narHash": "sha256-hRADkHjNt41+JUHw2EiSkMaL4owL83g5ZppjYUdF/Dc=", - "owner": "nix-community", - "repo": "nix-unit", - "rev": "1c9ab50554eed0b768f9e5b6f646d63c9673f0f7", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nix-unit", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1762111121, - "narHash": "sha256-4vhDuZ7OZaZmKKrnDpxLZZpGIJvAeMtK6FKLJYUtAdw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "b3d51a0365f6695e7dd5cdf3e180604530ed33b4", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-lib": { - "locked": { - "lastModified": 1754788789, - "narHash": "sha256-x2rJ+Ovzq0sCMpgfgGaaqgBSwY+LST+WbZ6TytnT9Rk=", - "owner": "nix-community", - "repo": "nixpkgs.lib", - "rev": "a73b9c743612e4244d865a2fdee11865283c04e6", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixpkgs.lib", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1762233356, - "narHash": "sha256-cGS3lLTYusbEP/IJIWGgnkzIl+FA5xDvtiHyjalGr4k=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "ca534a76c4afb2bdc07b681dbc11b453bab21af8", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-25.05", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { - "locked": { - "lastModified": 1761907660, - "narHash": "sha256-kJ8lIZsiPOmbkJypG+B5sReDXSD1KGu2VEPNqhRa/ew=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "2fb006b87f04c4d3bdf08cfdbc7fab9c13d94a15", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "autofirma-nix": "autofirma-nix", - "home-manager": "home-manager_2", - "nix-snapd": "nix-snapd", - "nixpkgs": "nixpkgs_2", - "spicetify-nix": "spicetify-nix", - "unstable": "unstable" - } - }, - "spicetify-nix": { - "inputs": { - "nixpkgs": "nixpkgs_3", - "systems": "systems" - }, - "locked": { - "lastModified": 1762057664, - "narHash": "sha256-mdEEvepIi8ebpGP1WWOHNvNQyd8rF0mUrKAiU6mwHCk=", - "owner": "Gerg-L", - "repo": "spicetify-nix", - "rev": "4aa6e43d29e3c8acf544aa6782a1963a11369208", - "type": "github" - }, - "original": { - "owner": "Gerg-L", - "repo": "spicetify-nix", - "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" - } - }, - "treefmt-nix": { - "inputs": { - "nixpkgs": [ - "autofirma-nix", - "nix-unit", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1762410071, - "narHash": "sha256-aF5fvoZeoXNPxT0bejFUBXeUjXfHLSL7g+mjR/p5TEg=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "97a30861b13c3731a84e09405414398fbf3e109f", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" - } - }, - "unstable": { - "locked": { - "lastModified": 1762361079, - "narHash": "sha256-lz718rr1BDpZBYk7+G8cE6wee3PiBUpn8aomG/vLLiY=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "ffcdcf99d65c61956d882df249a9be53e5902ea5", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/nix/flake.nix b/nix/flake.nix deleted file mode 100644 index cba9f86..0000000 --- a/nix/flake.nix +++ /dev/null @@ -1,78 +0,0 @@ -{ - description = "NixOS flake"; - - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05"; - unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable"; - nix-snapd.url = "github:nix-community/nix-snapd"; - nix-snapd.inputs.nixpkgs.follows = "nixpkgs"; - spicetify-nix.url = "github:Gerg-L/spicetify-nix"; - autofirma-nix = { - url = "github:nix-community/autofirma-nix/release-25.05"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - home-manager = { - url = "github:nix-community/home-manager/release-25.05"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - }; - - nixConfig = { - extra-substituters = [ - "https://nix-community.cachix.org" - ]; - extra-trusted-public-keys = [ - "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" - ]; - }; - - outputs = { self, nixpkgs, unstable, nix-snapd, home-manager, autofirma-nix, ... }: - let - system = "x86_64-linux"; - lib = nixpkgs.lib; - pkgs-unstable = unstable.legacyPackages.${system}; - pkgs = nixpkgs.legacyPackages.${system}; - - mkNixos = host: modules: lib.nixosSystem { - inherit system; - specialArgs = { inherit pkgs-unstable; }; - modules = [ - ./hosts/${host}/configuration.nix - home-manager.nixosModules.home-manager - { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.catalin = import ./home; - home-manager.extraSpecialArgs = { inherit pkgs-unstable; }; - } - ] ++ modules; - }; - - # Helper for Home Manager configurations (non-NixOS) - mkHome = host: user: modules: home-manager.lib.homeManagerConfiguration { - inherit pkgs; - modules = [ - ./home - { - home.username = user; - home.homeDirectory = "/home/${user}"; - } - ] ++ modules; - extraSpecialArgs = { inherit pkgs-unstable; }; - }; - in - { - nixosConfigurations = { - limgrave = mkNixos "limgrave" [ - nix-snapd.nixosModules.default - autofirma-nix.nixosModules.default - ]; - }; - - # Home Manager configurations for non-NixOS hosts (e.g., Ubuntu) - homeConfigurations = { - # For non-NixOS usage. Run: home-manager switch --flake ./nix#catalin@ubuntu - "catalin@limgrave" = mkHome "limgrave" "catalin" [ ]; - }; - }; -} diff --git a/nix/home/default.nix b/nix/home/default.nix deleted file mode 100644 index 3f26caf..0000000 --- a/nix/home/default.nix +++ /dev/null @@ -1,59 +0,0 @@ -{ pkgs, ... }: { - imports = [ - ./packages.nix - ]; - - home.stateVersion = "24.11"; - - programs.fish = { - enable = true; - }; - - programs.bash = { - enable = true; - initExtra = '' - if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]] - then - shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION="" - exec ${pkgs.fish}/bin/fish $LOGIN_OPTION - fi - ''; - }; - - programs.gnome-shell = { - enable = true; - extensions = [{ package = pkgs.gnomeExtensions.gsconnect; }]; - }; - - dconf.settings = { - "org/gnome/shell" = { - disable-user-extensions = false; - enabled-extensions = with pkgs.gnomeExtensions; [ - gsconnect.extensionUuid - user-themes.extensionUuid - caffeine.extensionUuid - colosseum.extensionUuid - dash-to-dock.extensionUuid - clipboard-indicator.extensionUuid - emoji-copy.extensionUuid - bluetooth-battery-meter.extensionUuid - ]; - }; - }; - - home.packages = with pkgs; [ - gnomeExtensions.user-themes - gnomeExtensions.caffeine - gnomeExtensions.colosseum - gnomeExtensions.dash-to-dock - gnomeExtensions.clipboard-indicator - gnomeExtensions.emoji-copy - gnomeExtensions.gsconnect - gnomeExtensions.bluetooth-battery-meter - gnome-tweaks - catppuccin-gtk - catppuccin-cursors - catppuccin-papirus-folders - catppuccin-grub - ]; -} diff --git a/nix/home/packages.nix b/nix/home/packages.nix deleted file mode 100644 index 586edce..0000000 --- a/nix/home/packages.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ pkgs, ... }: { - home.packages = 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 - ]; -} diff --git a/nix/hosts/limgrave/configuration.nix b/nix/hosts/limgrave/configuration.nix deleted file mode 100644 index 5241659..0000000 --- a/nix/hosts/limgrave/configuration.nix +++ /dev/null @@ -1,144 +0,0 @@ -{ config, pkgs, pkgs-unstable, ... }: -{ - imports = [ - ./hardware-configuration.nix - ]; - - nixpkgs.config.allowBroken = true; - nix.settings.download-buffer-size = 524288000; - nixpkgs.config.permittedInsecurePackages = [ "electron-33.4.11" "mono-5.20.1.34" ]; - - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - boot.supportedFilesystems = [ "ntfs" ]; - - services.snap.enable = false; - - networking.hostName = "limgrave"; - 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; - }; - - 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; - - programs.firefox.enable = true; - # Enable smart card service and eID tooling (AutoFirma stack) - services.pcscd.enable = true; - programs.autofirma = { - enable = true; - firefoxIntegration.enable = true; - }; - - nixpkgs.config.allowUnfree = true; - services.flatpak.enable = true; - programs.nix-ld.enable = true; - - # Merge base packages with host-specific packages - environment.systemPackages = import ./packages.nix pkgs; - - 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 - ''; - }; - - nix.settings.experimental-features = [ "nix-command" "flakes" ]; - nix.gc = { - automatic = true; - dates = "weekly"; - options = "--delete-older-than 1w"; - }; - - fonts.packages = with pkgs; [ - atkinson-hyperlegible - ]; - - boot.kernel.sysctl."net.ipv4.ip_forward" = 1; - services.openssh.enable = true; - services.tailscale.enable = true; - virtualisation.docker.enable = true; - networking.nameservers = [ "192.168.1.7" "1.1.1.1" ]; - - nix.extraOptions = '' - trusted-users = root catalin - ''; - - system.autoUpgrade.enable = true; - system.stateVersion = "24.11"; -} diff --git a/nix/hosts/limgrave/hardware-configuration.nix b/nix/hosts/limgrave/hardware-configuration.nix deleted file mode 100644 index de095d4..0000000 --- a/nix/hosts/limgrave/hardware-configuration.nix +++ /dev/null @@ -1,82 +0,0 @@ -# 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" "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."/snap/acestreamplayer/17" = -# { device = "/var/lib/snapd/snaps/acestreamplayer_17.snap"; -# fsType = "squashfs"; -# options = [ "loop" ]; -# }; -# -# fileSystems."/snap/core22/1722" = -# { device = "/var/lib/snapd/snaps/core22_1722.snap"; -# fsType = "squashfs"; -# options = [ "loop" ]; -# }; -# -# fileSystems."/snap/snapd/23258" = -# { device = "/var/lib/snapd/snaps/snapd_23258.snap"; -# fsType = "squashfs"; -# options = [ "loop" ]; -# }; -# - 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"; } - ]; - - # 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..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.br-71a907d8e6fd.useDHCP = lib.mkDefault true; - # networking.interfaces.docker0.useDHCP = lib.mkDefault true; - # networking.interfaces.eno1.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -} diff --git a/nix/hosts/limgrave/packages.nix b/nix/hosts/limgrave/packages.nix deleted file mode 100644 index 91d7b21..0000000 --- a/nix/hosts/limgrave/packages.nix +++ /dev/null @@ -1,74 +0,0 @@ -pkgs: with pkgs; [ - 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 - 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 -] diff --git a/nix/packages.nix b/nix/packages.nix deleted file mode 100644 index 0d423ca..0000000 --- a/nix/packages.nix +++ /dev/null @@ -1,121 +0,0 @@ -pkgs: with pkgs; [ - vim - wget - kitty - steam - steam-run - vesktop - protonup-qt - jellyfin-media-player - spotify - adwaita-icon-theme - fishPlugins.z - fishPlugins.tide - fishPlugins.transient-fish - fishPlugins.done - fishPlugins.colored-man-pages - lutris - telegram-desktop - leaf - restic - bitwarden - tmux - git - dotter - pre-commit - kubectl - krew - k9s - trashy - cargo - inconsolata - devenv - google-chrome - discord - topgrade - ruff - python311 - yt-dlp - mpv - gnumake - stremio - kubernetes-helm - opentofu - git-cliff - kubeseal - difftastic - unzip - openssl - xclip - jdk - fuse - prismlauncher - resticprofile - gnupg - awscli2 - r2modman - kor - exiftool - samrewritten - jetbrains-toolbox - atuin - hadolint - delta - bottom - bat - dust - eza - jq - popeye - kubecolor - kubeconform - kube-score - uv - chiaki-ng - gnome-themes-extra - tela-circle-icon-theme - docker-compose - neovim - obs-studio - ncdu - 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 - direnv - ffmpeg - filezilla - lrcget - picard - asciinema - gimp - yq - qbittorrent - afetch - p7zip - ansible - k3sup - gamemode - lm_sensors - appimage-run - firefox-devedition - coder - xcolor - signal-desktop - element-desktop - pavucontrol - zapzap - altus - nexusmods-app - cargo - rustc - samrewritten -] diff --git a/utils/asciify.sh b/utils/asciify.sh deleted file mode 100755 index 0f9e31d..0000000 --- a/utils/asciify.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail -ROOT=$(dirname "$(readlink -f "$0")") -tail +3 $ROOT/asciify.txt | rofi -eh 2 -dmenu | cut -f1 -d'|' | xargs | xclip -selection clipboard diff --git a/utils/asciify.txt b/utils/asciify.txt deleted file mode 100644 index a1fe204..0000000 --- a/utils/asciify.txt +++ /dev/null @@ -1,31 +0,0 @@ -EMOTE| TAG -=============================== -¯\\_(ツ)_/¯| shrug -( ͡° ͜ʖ ͡°) | lemmyface -ಠ_ಠ| angry -(╯°□°)╯| more angry -༼ つ ◕_◕ ༽つ| gib -ᕕ( ᐛ )ᕗ | walk -(◉-◉)| nerd -(⌐⊙_⊙)| nerd2 -(ᄒ︹ᄒ)| sad -(῏Ṵ῏) | serious -(⌐■_■)| coolguy -( ႎ _ ႎ | sigh -( ၜ 𝄩 ၜ | kewl -ဨ(ၜ ͜ ၜ)| im listenin -(⨪_⨪)| meh -(⨪ˬ⨪)| :v -(𐨨𐭃𐨨)| hmpf -(৲ဓ―ဓ)৲| surething -(☞゚ヮ゚)☞| mahman -ԅ(≖‿≖ԅ)| creepy look -[̲̅$̲̅(̲̅ ͡° ͜ʖ ͡°̲̅)̲̅$̲̅]| skrilla -[̲̅$̲̅(̲̅ιο̲̅̅)̲̅$̲̅]| dollar -ಥ_ಥ| cryin -(⊙_☉)| derp -ლ(ಠ_ಠლ)| why -(ง •̀_•́)ง| fite me -(👁 ͜ʖ👁)| im looking, respectfully -†| cross - diff --git a/utils/curl2tar.sh b/utils/curl2tar.sh deleted file mode 100755 index 27fae06..0000000 --- a/utils/curl2tar.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash -set -eou pipefail - -curl -L $1 | tar xvzf - diff --git a/utils/dlm.sh b/utils/dlm.sh deleted file mode 100755 index 135aa66..0000000 --- a/utils/dlm.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash - -# Download files using yt-dlp -x - -# Usage: dlm.sh [URL1 ... URLn] - -# Dependencies: yt-dlp - -# Check if yt-dlp is installed -if ! command -v yt-dlp &> /dev/null; then - echo "yt-dlp is not installed" - exit 1 -fi - -# Check if URLs are provided -if [ "$#" -eq 0 ]; then - echo "No URLs provided" - exit 1 -fi - -# Download files using yt-dlp -x and save them without the youtube id -yt-dlp -x --audio-format mp3 --output "%(title)s.%(ext)s" "$@" - -# Change the file's owner to 568:568 -# Change the file's permissions to 770 -sudo chown 568:568 ./*.mp3 -sudo chmod 770 ./*.mp3 \ No newline at end of file diff --git a/utils/launcher b/utils/launcher deleted file mode 100755 index 4d9f4ab..0000000 --- a/utils/launcher +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash -rofi \ - -show drun \ - -modi run,drun,ssh,calc \ - -scroll-method 0 \ - -drun-match-fields all \ - -drun-display-format "{name}" \ - -terminal 'kermit -e' \ - -kb-cancel Escape \ - -theme "$HOME"/.config/rofi/config/launcher.rasi diff --git a/utils/set-monitors.sh b/utils/set-monitors.sh deleted file mode 100755 index c7d5b08..0000000 --- a/utils/set-monitors.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash -set -eou pipefail -base_command="xrandr -q | grep connected" -monitors=$(bash -c "$base_command") -monitors_len=$(bash -c "$base_command" | grep -w 'connected' | wc -l) -if [[ "$monitors_len" -eq 2 ]]; -then - xrandr --auto --output eDP-1 --mode 1920x1080 --right-of HDMI-2 - bspc monitor eDP-1 -d I II III IV V - bspc monitor HDMI-2 -d VI VII VIII IX X - -else - bspc monitor eDP-1 -d I II III IV V VI VII VIII IX X -fi diff --git a/utils/toggle-keyboard-layout.sh b/utils/toggle-keyboard-layout.sh deleted file mode 100755 index 87510a1..0000000 --- a/utils/toggle-keyboard-layout.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail -(setxkbmap -query | grep -q "layout:\s\+us") && setxkbmap es || setxkbmap us -notify-send "layout: $(setxkbmap -query | tail -1 | awk '{print $2}')" - - - diff --git a/v2/flake.nix b/v2/flake.nix deleted file mode 100644 index 84e8294..0000000 --- a/v2/flake.nix +++ /dev/null @@ -1,75 +0,0 @@ -{ - description = "Your new nix config"; - - inputs = { - # Nixpkgs - nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11"; - # You can access packages and modules from different nixpkgs revs - # at the same time. Here's an working example: - nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; - # Also see the 'unstable-packages' overlay at 'overlays/default.nix'. - - # Home manager - home-manager.url = "github:nix-community/home-manager/release-25.11"; - home-manager.inputs.nixpkgs.follows = "nixpkgs"; - }; - - outputs = { - self, - nixpkgs, - home-manager, - ... - } @ inputs: let - # Supported systems for your flake packages, shell, etc. - systems = [ - "x86_64-linux" - ]; - # This is a function that generates an attribute by calling a function you - # pass to it, with each system as an argument - forAllSystems = nixpkgs.lib.genAttrs systems; - in { - # Your custom packages - # Accessible through 'nix build', 'nix shell', etc - packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system}); - # Formatter for your nix files, available through 'nix fmt' - # Other options beside 'alejandra' include 'nixpkgs-fmt' - formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra); - - # Your custom packages and modifications, exported as overlays - overlays = import ./overlays {inherit inputs;}; - # Reusable nixos modules you might want to export - # These are usually stuff you would upstream into nixpkgs - nixosModules = import ./modules/nixos; - # Reusable home-manager modules you might want to export - # These are usually stuff you would upstream into home-manager - homeManagerModules = import ./modules/home-manager; - - # NixOS configuration entrypoint - # Available through 'nixos-rebuild --flake .#your-hostname' - nixosConfigurations = { - # FIXME replace with your hostname - limgrave = nixpkgs.lib.nixosSystem { - specialArgs = {inherit inputs;}; - modules = [ - # > Our main nixos configuration file < - ./nixos/configuration.nix - ]; - }; - }; - - # Standalone home-manager configuration entrypoint - # Available through 'home-manager --flake .#your-username@your-hostname' - homeConfigurations = { - # FIXME replace with your username@hostname - "catalin@limgrave" = home-manager.lib.homeManagerConfiguration { - # Home-manager requires 'pkgs' instance - pkgs = nixpkgs.legacyPackages.x86_64-linux; # FIXME replace x86_64-linux with your architecure - extraSpecialArgs = {inherit inputs;}; - modules = [ - # > Our main home-manager configuration file < - ./home-manager/home.nix - ]; - }; - }; - }; -} diff --git a/v2/home-manager/home.nix b/v2/home-manager/home.nix deleted file mode 100644 index 9030601..0000000 --- a/v2/home-manager/home.nix +++ /dev/null @@ -1,66 +0,0 @@ -# This is your home-manager configuration file -# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix) -{ - inputs, - lib, - config, - pkgs, - ... -}: { - # You can import other home-manager modules here - imports = [ - # If you want to use modules your own flake exports (from modules/home-manager): - # inputs.self.homeManagerModules.example - - # Or modules exported from other flakes (such as nix-colors): - # inputs.nix-colors.homeManagerModules.default - - # You can also split up your configuration and import pieces of it here: - # ./nvim.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; - }; - }; - - # TODO: Set your username - home = { - username = "your-username"; - homeDirectory = "/home/your-username"; - }; - - # Add stuff for your user as you see fit: - # programs.neovim.enable = true; - # home.packages = with pkgs; [ steam ]; - - # Enable home-manager and git - programs.home-manager.enable = true; - programs.git.enable = true; - - # Nicely reload system units when changing configs - systemd.user.startServices = "sd-switch"; - - # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion - home.stateVersion = "23.05"; -} diff --git a/v2/modules/home-manager/default.nix b/v2/modules/home-manager/default.nix deleted file mode 100644 index 45aae31..0000000 --- a/v2/modules/home-manager/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -# Add your reusable home-manager modules to this directory, on their own file (https://nixos.wiki/wiki/Module). -# These should be stuff you would like to share with others, not your personal configurations. -{ - # List your module files here - # my-module = import ./my-module.nix; -} diff --git a/v2/modules/nixos/default.nix b/v2/modules/nixos/default.nix deleted file mode 100644 index 8605069..0000000 --- a/v2/modules/nixos/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -# Add your reusable NixOS modules to this directory, on their own file (https://nixos.wiki/wiki/Module). -# These should be stuff you would like to share with others, not your personal configurations. -{ - # List your module files here - # my-module = import ./my-module.nix; -} diff --git a/v2/nixos/configuration.nix b/v2/nixos/configuration.nix deleted file mode 100644 index 3f44965..0000000 --- a/v2/nixos/configuration.nix +++ /dev/null @@ -1,206 +0,0 @@ -# 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"; -} diff --git a/v2/nixos/packages.nix b/v2/nixos/packages.nix deleted file mode 100644 index fa1c4bb..0000000 --- a/v2/nixos/packages.nix +++ /dev/null @@ -1,110 +0,0 @@ -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 -] diff --git a/v2/overlays/default.nix b/v2/overlays/default.nix deleted file mode 100644 index 7bfcb4c..0000000 --- a/v2/overlays/default.nix +++ /dev/null @@ -1,23 +0,0 @@ -# This file defines overlays -{inputs, ...}: { - # This one brings our custom packages from the 'pkgs' directory - additions = final: _prev: import ../pkgs final.pkgs; - - # This one contains whatever you want to overlay - # You can change versions, add patches, set compilation flags, anything really. - # https://nixos.wiki/wiki/Overlays - modifications = final: prev: { - # example = prev.example.overrideAttrs (oldAttrs: rec { - # ... - # }); - }; - - # When applied, the unstable nixpkgs set (declared in the flake inputs) will - # be accessible through 'pkgs.unstable' - unstable-packages = final: _prev: { - unstable = import inputs.nixpkgs-unstable { - system = final.system; - config.allowUnfree = true; - }; - }; -} diff --git a/v2/pkgs/default.nix b/v2/pkgs/default.nix deleted file mode 100644 index 3d9e23c..0000000 --- a/v2/pkgs/default.nix +++ /dev/null @@ -1,5 +0,0 @@ -# Custom packages, that can be defined similarly to ones from nixpkgs -# You can build them using 'nix build .#example' -pkgs: { - # example = pkgs.callPackage ./example { }; -} diff --git a/v22/flake.lock b/v22/flake.lock deleted file mode 100644 index 79c38b5..0000000 --- a/v22/flake.lock +++ /dev/null @@ -1,65 +0,0 @@ -{ - "nodes": { - "home-manager": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1763992789, - "narHash": "sha256-WHkdBlw6oyxXIra/vQPYLtqY+3G8dUVZM8bEXk0t8x4=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "44831a7eaba4360fb81f2acc5ea6de5fde90aaa3", - "type": "github" - }, - "original": { - "owner": "nix-community", - "ref": "release-25.05", - "repo": "home-manager", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1767313136, - "narHash": "sha256-16KkgfdYqjaeRGBaYsNrhPRRENs0qzkQVUooNHtoy2w=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "ac62194c3917d5f474c1a844b6fd6da2db95077d", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-25.05", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "home-manager": "home-manager", - "nixpkgs": "nixpkgs", - "systems": "systems" - } - }, - "systems": { - "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", - "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default-linux", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/v22/flake.nix b/v22/flake.nix deleted file mode 100644 index 985ed84..0000000 --- a/v22/flake.nix +++ /dev/null @@ -1,75 +0,0 @@ -{ - description = "My NixOS configuration"; - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05"; - #unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable"; - #nix-snapd.url = "github:nix-community/nix-snapd"; - #nix-snapd.inputs.nixpkgs.follows = "nixpkgs"; - systems.url = "github:nix-systems/default-linux"; - #autofirma-nix = { - # url = "github:nix-community/autofirma-nix/release-25.05"; - # inputs.nixpkgs.follows = "nixpkgs"; - #}; - home-manager = { - url = "github:nix-community/home-manager/release-25.05"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - }; - nixConfig = { - extra-substituters = [ - "https://nix-community.cachix.org" - ]; - como cuando experimenta extra-trusted-public-keys = [ - "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" - ]; - }; - outputs = { - self, - nixpkgs, - systems, - home-manager, - } @ inputs: let - inherit (self) outputs; - lib = nixpkgs.lib // home-manager.lib; - forEachSystem = f: lib.genAttrs (import systems) (system: f pkgsFor.${system}); - pkgsFor = lib.genAttrs (import systems) ( - system: - import nixpkgs { - inherit system; - config.allowUnfree = true; - } - ); - in { - inherit lib; - - #nixosModules = import ./modules/nixos; - #homeManagerModules = import ./modules/home-manager; - #overlays = import ./overlays {inherit inputs;}; - - packages = forEachSystem (pkgs: import ./pkgs {inherit pkgs;}); - - # NixOS configuration entrypoint - # Available through 'nixos-rebuild --flake .#your-hostname' - nixosConfigurations = { - limgrave = nixpkgs.lib.nixosSystem { - specialArgs = {inherit inputs;}; - modules = [ - ./hosts/limgrave/nixos - ]; - }; - }; - - # Standalone home-manager configuration entrypoint - # Available through 'home-manager --flake .#your-username@your-hostname' - homeConfigurations = { - "catalin@limgrave" = home-manager.lib.homeManagerConfiguration { - # Home-manager requires 'pkgs' instance - pkgs = pkgsFor.x86_64-linux; - extraSpecialArgs = {inherit inputs;}; - modules = [ - ./hosts/limgrave/home - ]; - }; - }; - }; -} \ No newline at end of file diff --git a/v22/hosts/limgrave/nixos/default.nix b/v22/hosts/limgrave/nixos/default.nix deleted file mode 100644 index 1aa7029..0000000 --- a/v22/hosts/limgrave/nixos/default.nix +++ /dev/null @@ -1,161 +0,0 @@ -{ pkgs, inputs, ... }: -{ - imports = [ - ./hardware-configuration.nix - ]; - - nixpkgs.config.allowBroken = true; - nix.settings.download-buffer-size = 524288000; - nixpkgs.config.permittedInsecurePackages = [ "electron-33.4.11" "mono-5.20.1.34" ]; - - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - boot.supportedFilesystems = [ "ntfs" ]; - - services.snap.enable = false; - - networking.hostName = "limgrave"; - 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; - }; - - 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; - - programs.firefox.enable = true; - # Enable smart card service and eID tooling (AutoFirma stack) - services.pcscd.enable = true; - programs.autofirma = { - enable = true; - firefoxIntegration.enable = true; - }; - programs.dnieremote = { - enable = true; - jumpIntro = "no"; - wifiPort = 9501; - usbPort = 9501; - openFirewall = false; - }; - programs.configuradorfnmt = { - enable = true; - firefoxIntegration.enable = true; - }; - # Configure Firefox PKCS#11 modules for DNIe and OpenSC - programs.firefox.policies = { - SecurityDevices = { - "OpenSC PKCS#11" = "${pkgs.opensc}/lib/opensc-pkcs11.so"; - "DNIeRemote" = "${config.programs.dnieremote.finalPackage}/lib/libdnieremotepkcs11.so"; - }; - }; - nixpkgs.config.allowUnfree = true; - services.flatpak.enable = true; - programs.nix-ld.enable = true; - - # Merge base packages with host-specific packages - environment.systemPackages = import ./packages.nix pkgs; - - 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 - ''; - }; - - nix.settings.experimental-features = [ "nix-command" "flakes" ]; - nix.gc = { - automatic = true; - dates = "weekly"; - options = "--delete-older-than 1w"; - }; - - fonts.packages = with pkgs; [ - atkinson-hyperlegible - ]; - - boot.kernel.sysctl."net.ipv4.ip_forward" = 1; - services.openssh.enable = true; - services.tailscale.enable = true; - virtualisation.docker.enable = true; - networking.nameservers = [ "192.168.1.7" "1.1.1.1" ]; - - nix.extraOptions = '' - trusted-users = root catalin - ''; - - system.autoUpgrade.enable = true; - system.stateVersion = "24.11"; -} diff --git a/v22/hosts/limgrave/nixos/hardware-configuration.nix b/v22/hosts/limgrave/nixos/hardware-configuration.nix deleted file mode 100644 index 7013bdc..0000000 --- a/v22/hosts/limgrave/nixos/hardware-configuration.nix +++ /dev/null @@ -1,82 +0,0 @@ -# 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" "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."/snap/acestreamplayer/17" = -# { device = "/var/lib/snapd/snaps/acestreamplayer_17.snap"; -# fsType = "squashfs"; -# options = [ "loop" ]; -# }; -# -# fileSystems."/snap/core22/1722" = -# { device = "/var/lib/snapd/snaps/core22_1722.snap"; -# fsType = "squashfs"; -# options = [ "loop" ]; -# }; -# -# fileSystems."/snap/snapd/23258" = -# { device = "/var/lib/snapd/snaps/snapd_23258.snap"; -# fsType = "squashfs"; -# options = [ "loop" ]; -# }; -# - 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"; } - ]; - - # 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..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.br-71a907d8e6fd.useDHCP = lib.mkDefault true; - # networking.interfaces.docker0.useDHCP = lib.mkDefault true; - # networking.interfaces.eno1.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -} diff --git a/v22/modules/home-manager/default.nix b/v22/modules/home-manager/default.nix deleted file mode 100644 index e69de29..0000000 diff --git a/v22/modules/nixos/default.nix b/v22/modules/nixos/default.nix deleted file mode 100644 index e69de29..0000000 diff --git a/v22/overlays/default.nix b/v22/overlays/default.nix deleted file mode 100644 index e69de29..0000000 From ab80a0d257b3ff035d884c4db6cce06f3bbe65d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?c=C4=83t=C4=83lin?= Date: Thu, 26 Mar 2026 12:04:43 +0100 Subject: [PATCH 3/4] move atuin from nixpkgs to its flake --- conf.d/atuin.toml | 228 +----------------- conf.d/fish/conf.d/atuin.fish | 3 + flake.lock | 143 ++++++++++- flake.nix | 9 +- hosts/limgrave/nixos/flatpaks.nix | 1 - .../limgrave/nixos/hardware-configuration.nix | 14 +- hosts/limgrave/nixos/packages.nix | 6 +- 7 files changed, 166 insertions(+), 238 deletions(-) create mode 100644 conf.d/fish/conf.d/atuin.fish diff --git a/conf.d/atuin.toml b/conf.d/atuin.toml index 80ae0f7..edac123 100644 --- a/conf.d/atuin.toml +++ b/conf.d/atuin.toml @@ -1,232 +1,14 @@ -## where to store your database, default is your system data directory -## linux/mac: ~/.local/share/atuin/history.db -## windows: %USERPROFILE%/.local/share/atuin/history.db -# db_path = "~/.history.db" -## where to store your encryption key, default is your system data directory -## linux/mac: ~/.local/share/atuin/key -## windows: %USERPROFILE%/.local/share/atuin/key -# key_path = "~/.key" - -## where to store your auth session token, default is your system data directory -## linux/mac: ~/.local/share/atuin/session -## windows: %USERPROFILE%/.local/share/atuin/session -# session_path = "~/.session" - -## date format used, either "us" or "uk" -# dialect = "us" - -## default timezone to use when displaying time -## either "l", "local" to use the system's current local timezone, or an offset -## from UTC in the format of "<+|->H[H][:M[M][:S[S]]]" -## for example: "+9", "-05", "+03:30", "-01:23:45", etc. -# timezone = "local" - -## enable or disable automatic sync -# auto_sync = true - -## enable or disable automatic update checks -# update_check = true - -## address of the sync server -# sync_address = "https://api.atuin.sh" - -## how often to sync history. note that this is only triggered when a command -## is ran, so sync intervals may well be longer -## set it to 0 to sync after every command -# sync_frequency = "10m" - -## which search mode to use -## possible values: prefix, fulltext, fuzzy, skim -# search_mode = "fuzzy" - -## which filter mode to use -## possible values: global, host, session, directory -# filter_mode = "global" - -## With workspace filtering enabled, Atuin will filter for commands executed -## in any directory within a git repository tree (default: false) -# workspaces = false - -## which filter mode to use when atuin is invoked from a shell up-key binding -## the accepted values are identical to those of "filter_mode" -## leave unspecified to use same mode set in "filter_mode" -# filter_mode_shell_up_key_binding = "global" - -## which search mode to use when atuin is invoked from a shell up-key binding -## the accepted values are identical to those of "search_mode" -## leave unspecified to use same mode set in "search_mode" -# search_mode_shell_up_key_binding = "fuzzy" - -## which style to use -## possible values: auto, full, compact -# style = "auto" - -## the maximum number of lines the interface should take up -## set it to 0 to always go full screen -# inline_height = 0 - -## Invert the UI - put the search bar at the top , Default to `false` -# invert = false - -## enable or disable showing a preview of the selected command -## useful when the command is longer than the terminal width and is cut off -# show_preview = true - -## what to do when the escape key is pressed when searching -## possible values: return-original, return-query -# exit_mode = "return-original" - -## possible values: emacs, subl -# word_jump_mode = "emacs" - -## characters that count as a part of a word -# word_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" - -## number of context lines to show when scrolling by pages -# scroll_context_lines = 1 - -## use ctrl instead of alt as the shortcut modifier key for numerical UI shortcuts -## alt-0 .. alt-9 -# ctrl_n_shortcuts = false - -## default history list format - can also be specified with the --format arg -# history_format = "{time}\t{command}\t{duration}" - -## prevent commands matching any of these regexes from being written to history. -## Note that these regular expressions are unanchored, i.e. if they don't start -## with ^ or end with $, they'll match anywhere in the command. -## For details on the supported regular expression syntax, see -## https://docs.rs/regex/latest/regex/#syntax -# history_filter = [ -# "^secret-cmd", -# "^innocuous-cmd .*--secret=.+", -# ] - -## prevent commands run with cwd matching any of these regexes from being written -## to history. Note that these regular expressions are unanchored, i.e. if they don't -## start with ^ or end with $, they'll match anywhere in CWD. -## For details on the supported regular expression syntax, see -## https://docs.rs/regex/latest/regex/#syntax -# cwd_filter = [ -# "^/very/secret/area", -# ] - -## Configure the maximum height of the preview to show. -## Useful when you have long scripts in your history that you want to distinguish -## by more than the first few lines. -# max_preview_height = 4 - -## Configure whether or not to show the help row, which includes the current Atuin -## version (and whether an update is available), a keymap hint, and the total -## amount of commands in your history. -# show_help = true - -## Configure whether or not to show tabs for search and inspect -# show_tabs = true - -## Defaults to true. This matches history against a set of default regex, and will not save it if we get a match. Defaults include -## 1. AWS key id -## 2. Github pat (old and new) -## 3. Slack oauth tokens (bot, user) -## 4. Slack webhooks -## 5. Stripe live/test keys -# secrets_filter = true - -## Defaults to true. If enabled, upon hitting enter Atuin will immediately execute the command. Press tab to return to the shell and edit. -# This applies for new installs. Old installs will keep the old behaviour unless configured otherwise. +search_mode = "fuzzy" enter_accept = false - -## Defaults to "emacs". This specifies the keymap on the startup of `atuin -## search`. If this is set to "auto", the startup keymap mode in the Atuin -## search is automatically selected based on the shell's keymap where the -## keybinding is defined. If this is set to "emacs", "vim-insert", or -## "vim-normal", the startup keymap mode in the Atuin search is forced to be -## the specified one. keymap_mode = "vim-insert" -## Cursor style in each keymap mode. If specified, the cursor style is changed -## in entering the cursor shape. Available values are "default" and -## "{blink,steady}-{block,underline,bar}". -# keymap_cursor = { emacs = "blink-block", vim_insert = "blink-block", vim_normal = "steady-block" } - -# network_connect_timeout = 5 -# network_timeout = 5 - -## Timeout (in seconds) for acquiring a local database connection (sqlite) -# local_timeout = 5 - -## Set this to true and Atuin will minimize motion in the UI - timers will not update live, etc. -## Alternatively, set env NO_MOTION=true -# prefers_reduced_motion = false - -[stats] -## Set commands where we should consider the subcommand for statistics. Eg, kubectl get vs just kubectl -# common_subcommands = [ -# "apt", -# "cargo", -# "composer", -# "dnf", -# "docker", -# "git", -# "go", -# "ip", -# "kubectl", -# "nix", -# "nmcli", -# "npm", -# "pecl", -# "pnpm", -# "podman", -# "port", -# "systemctl", -# "tmux", -# "yarn", -# ] - -## Set commands that should be totally stripped and ignored from stats -# common_prefix = ["sudo"] - -## Set commands that will be completely ignored from stats -# ignored_commands = [ -# "cd", -# "ls", -# "vi" -# ] - -[keys] -# Defaults to true. If disabled, using the up/down key won't exit the TUI when scrolled past the first/last entry. -# scroll_exits = false - [sync] -# Enable sync v2 by default -# This ensures that sync v2 is enabled for new installs only -# In a later release it will become the default across the board records = true -[preview] -## which preview strategy to use to calculate the preview height (respects max_preview_height). -## possible values: auto, static -## auto: length of the selected command. -## static: length of the longest command stored in the history. -# strategy = "auto" - [daemon] -## Enables using the daemon to sync. Requires the daemon to be running in the background. Start it with `atuin daemon` -# enabled = false +enabled = true +autostart = true -## How often the daemon should sync in seconds -# sync_frequency = 300 - -## The path to the unix socket used by the daemon (on unix systems) -## linux/mac: ~/.local/share/atuin/atuin.sock -## windows: Not Supported -# socket_path = "~/.local/share/atuin/atuin.sock" - -## Use systemd socket activation rather than opening the given path (the path must still be correct for the client) -## linux: false -## mac/windows: Not Supported -# systemd_socket = false - -## The port that should be used for TCP on non unix systems -# tcp_port = 8889 +[ai] +enabled = true \ No newline at end of file diff --git a/conf.d/fish/conf.d/atuin.fish b/conf.d/fish/conf.d/atuin.fish new file mode 100644 index 0000000..80075c2 --- /dev/null +++ b/conf.d/fish/conf.d/atuin.fish @@ -0,0 +1,3 @@ +if status is-interactive + atuin init fish | source +end diff --git a/flake.lock b/flake.lock index 786d640..7598fe6 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,83 @@ { "nodes": { + "atuin": { + "inputs": { + "fenix": "fenix", + "flake-compat": "flake-compat", + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1773709057, + "narHash": "sha256-hLt6CDHEPV8BVpOADVn4bLNcBz89eC2jKtIexHG0yAY=", + "owner": "atuinsh", + "repo": "atuin", + "rev": "e737ba5b9a149eaec706418bc560e8ba7ea8c81b", + "type": "github" + }, + "original": { + "owner": "atuinsh", + "ref": "v18.13.3", + "repo": "atuin", + "type": "github" + } + }, + "fenix": { + "inputs": { + "nixpkgs": [ + "atuin", + "nixpkgs" + ], + "rust-analyzer-src": "rust-analyzer-src" + }, + "locked": { + "lastModified": 1758609765, + "narHash": "sha256-VIYu7R9Yc/CItjmzLSm21Lr9DgpEsKL5H+JUu8KDTn4=", + "owner": "nix-community", + "repo": "fenix", + "rev": "05545a7f3cd5cd5628b195520758e56e6734b90a", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "fenix", + "type": "github" + } + }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1747046372, + "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "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": { "inputs": { "nixpkgs": [ @@ -7,11 +85,11 @@ ] }, "locked": { - "lastModified": 1770260404, - "narHash": "sha256-3iVX1+7YUIt23hBx1WZsUllhbmP2EnXrV8tCRbLxHc8=", + "lastModified": 1773963144, + "narHash": "sha256-WzBOBfSay3GYilUfKaUa1Mbf8/jtuAiJIedx7fWuIX4=", "owner": "nix-community", "repo": "home-manager", - "rev": "0d782ee42c86b196acff08acfbf41bb7d13eed5b", + "rev": "a91b3ea73a765614d90360580b689c48102d1d33", "type": "github" }, "original": { @@ -39,11 +117,27 @@ }, "nixpkgs": { "locked": { - "lastModified": 1770770419, - "narHash": "sha256-iKZMkr6Cm9JzWlRYW/VPoL0A9jVKtZYiU4zSrVeetIs=", + "lastModified": 1758446476, + "narHash": "sha256-5rdAi7CTvM/kSs6fHe1bREIva5W3TbImsto+dxG4mBo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "6c5e707c6b5339359a9a9e215c5e66d6d802fd7a", + "rev": "a1f79a1770d05af18111fbbe2a3ab2c42c0f6cd0", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1773964973, + "narHash": "sha256-NV/J+tTER0P5iJhUDL/8HO5MDjDceLQPRUYgdmy5wXw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "812b3986fd1568f7a858f97fcf425ad996ba7d25", "type": "github" }, "original": { @@ -55,13 +149,46 @@ }, "root": { "inputs": { + "atuin": "atuin", "home-manager": "home-manager", "nix-flatpak": "nix-flatpak", - "nixpkgs": "nixpkgs", - "systems": "systems" + "nixpkgs": "nixpkgs_2", + "systems": "systems_2" + } + }, + "rust-analyzer-src": { + "flake": false, + "locked": { + "lastModified": 1758556272, + "narHash": "sha256-9amq6LAd0CFF3dLrJUItPiG64MQOG4QPrvjbjpa6NFc=", + "owner": "rust-lang", + "repo": "rust-analyzer", + "rev": "d05355db16dc526bb16bd84769ea840668d7015e", + "type": "github" + }, + "original": { + "owner": "rust-lang", + "ref": "nightly", + "repo": "rust-analyzer", + "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" + } + }, + "systems_2": { "locked": { "lastModified": 1689347949, "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", diff --git a/flake.nix b/flake.nix index c929e03..16a395b 100644 --- a/flake.nix +++ b/flake.nix @@ -9,6 +9,7 @@ url = "github:nix-community/home-manager/release-25.11"; inputs.nixpkgs.follows = "nixpkgs"; }; + atuin.url = "github:atuinsh/atuin/v18.13.3"; }; outputs = { self, nixpkgs, nix-flatpak, systems, home-manager, ... } @ inputs: let @@ -21,6 +22,9 @@ import nixpkgs { inherit system; config.allowUnfree = true; + overlays = [ + inputs.atuin.overlays.default + ]; } ); @@ -34,6 +38,9 @@ modules = [ nix-flatpak.nixosModules.nix-flatpak ./hosts/limgrave/nixos + ({ ... }: { + nixpkgs.overlays = [ inputs.atuin.overlays.default ]; + }) ]; }; }; @@ -48,4 +55,4 @@ }; }; }; -} \ No newline at end of file +} diff --git a/hosts/limgrave/nixos/flatpaks.nix b/hosts/limgrave/nixos/flatpaks.nix index 5afdc11..f09a8fd 100644 --- a/hosts/limgrave/nixos/flatpaks.nix +++ b/hosts/limgrave/nixos/flatpaks.nix @@ -2,7 +2,6 @@ "com.microsoft.Edge" "dev.vencord.Vesktop" "chat.revolt.RevoltDesktop" - "org.signal.Signal" "io.github.hkdb.Aerion" "io.github.mpobaschnig.Vaults" "com.bitwarden.desktop" diff --git a/hosts/limgrave/nixos/hardware-configuration.nix b/hosts/limgrave/nixos/hardware-configuration.nix index 2050838..4a3a8fb 100644 --- a/hosts/limgrave/nixos/hardware-configuration.nix +++ b/hosts/limgrave/nixos/hardware-configuration.nix @@ -12,6 +12,7 @@ boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; + boot.supportedFilesystems = [ "nfs" ]; fileSystems."/" = { device = "/dev/mapper/luks-0e11cc3f-cf15-42a3-8356-12780ac991f6"; @@ -21,16 +22,21 @@ boot.initrd.luks.devices."luks-0e11cc3f-cf15-42a3-8356-12780ac991f6".device = "/dev/disk/by-uuid/0e11cc3f-cf15-42a3-8356-12780ac991f6"; fileSystems."/mnt/zeruel/nas1" = - { device = "zeruel.fuku:/mnt/pool1/nas1"; + { device = "zeruel.fuku:/mnt/pool1/nas1/"; fsType = "nfs"; - options = [ "x-systemd.automount" "noauto" ]; + options = [ "x-systemd.automount" ]; }; + fileSystems."/mnt/zeruel/vods" = + { device = "zeruel.fuku:/mnt/vods"; + fsType = "nfs"; + options = [ "x-systemd.automount" ]; + }; fileSystems."/mnt/windoze" = { device = "/dev/disk/by-uuid/46B01460B01458AF"; fsType = "ntfs-3g"; - options = [ "rw" "uid=1000"]; + options = [ "rw" "uid=1000" "x-gvfs-show"]; }; fileSystems."/boot" = @@ -42,7 +48,7 @@ fileSystems."/mnt/windoze2" = { device = "/dev/disk/by-uuid/6084BE5384BE2B82"; fsType = "ntfs-3g"; - options = [ "rw" "uid=1000"]; + options = [ "rw" "uid=1000" "x-gvfs-show"]; }; swapDevices = diff --git a/hosts/limgrave/nixos/packages.nix b/hosts/limgrave/nixos/packages.nix index f756872..6cefa96 100644 --- a/hosts/limgrave/nixos/packages.nix +++ b/hosts/limgrave/nixos/packages.nix @@ -52,7 +52,6 @@ k9s kubectl dotter - atuin kubecolor trash-cli gnomeExtensions.appindicator @@ -70,9 +69,14 @@ jq hmcl tmux + atuin tor tor-browser remmina yt-dlp mangohud + difftastic + libheif + ffmpegthumbnailer + signal-desktop ] From 97072971c16df8f6ad3a959c57452611cff2879a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?c=C4=83t=C4=83lin?= Date: Sat, 4 Apr 2026 12:59:18 +0200 Subject: [PATCH 4/4] update packages --- flake.lock | 47 +++++++++++++++++++++++++++---- flake.nix | 5 ++-- hosts/limgrave/home/home.nix | 1 + hosts/limgrave/nixos/packages.nix | 2 ++ 4 files changed, 47 insertions(+), 8 deletions(-) diff --git a/flake.lock b/flake.lock index 7598fe6..df0ba6f 100644 --- a/flake.lock +++ b/flake.lock @@ -85,11 +85,11 @@ ] }, "locked": { - "lastModified": 1773963144, - "narHash": "sha256-WzBOBfSay3GYilUfKaUa1Mbf8/jtuAiJIedx7fWuIX4=", + "lastModified": 1775077333, + "narHash": "sha256-OXcxobt7lBkh1B8AjwreU+24myhtKpqeLfAeIyNLFY8=", "owner": "nix-community", "repo": "home-manager", - "rev": "a91b3ea73a765614d90360580b689c48102d1d33", + "rev": "49ca96b2714c5931e17401eff87f3edd42d2b0f2", "type": "github" }, "original": { @@ -133,11 +133,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1773964973, - "narHash": "sha256-NV/J+tTER0P5iJhUDL/8HO5MDjDceLQPRUYgdmy5wXw=", + "lastModified": 1775002709, + "narHash": "sha256-d3Yx83vSrN+2z/loBh4mJpyRqr9aAJqlke4TkpFmRJA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "812b3986fd1568f7a858f97fcf425ad996ba7d25", + "rev": "bcd464ccd2a1a7cd09aa2f8d4ffba83b761b1d0e", "type": "github" }, "original": { @@ -147,12 +147,47 @@ "type": "github" } }, + "nixpkgs_3": { + "locked": { + "lastModified": 1760524057, + "narHash": "sha256-EVAqOteLBFmd7pKkb0+FIUyzTF61VKi7YmvP1tw4nEw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "544961dfcce86422ba200ed9a0b00dd4b1486ec5", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "opencode": { + "inputs": { + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1770777255, + "narHash": "sha256-1mKK8D8Jy3AS+4A22YlMsoZHlK/bo2+ULAmYIvXnIMk=", + "owner": "GutMutCode", + "repo": "opencode-nix", + "rev": "687e34c3c406de915c2eb8dc87f964c0f2fa685d", + "type": "github" + }, + "original": { + "owner": "GutMutCode", + "repo": "opencode-nix", + "type": "github" + } + }, "root": { "inputs": { "atuin": "atuin", "home-manager": "home-manager", "nix-flatpak": "nix-flatpak", "nixpkgs": "nixpkgs_2", + "opencode": "opencode", "systems": "systems_2" } }, diff --git a/flake.nix b/flake.nix index 16a395b..926a884 100644 --- a/flake.nix +++ b/flake.nix @@ -5,6 +5,7 @@ nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11"; systems.url = "github:nix-systems/default-linux"; nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=v0.7.0"; + opencode.url = "github:GutMutCode/opencode-nix/"; home-manager = { url = "github:nix-community/home-manager/release-25.11"; inputs.nixpkgs.follows = "nixpkgs"; @@ -12,7 +13,7 @@ atuin.url = "github:atuinsh/atuin/v18.13.3"; }; - outputs = { self, nixpkgs, nix-flatpak, systems, home-manager, ... } @ inputs: let + outputs = { self, nixpkgs, nix-flatpak, systems, home-manager, opencode, ... } @ inputs: let inherit (self) outputs; lib = nixpkgs.lib // home-manager.lib; formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt-tree; @@ -39,7 +40,7 @@ nix-flatpak.nixosModules.nix-flatpak ./hosts/limgrave/nixos ({ ... }: { - nixpkgs.overlays = [ inputs.atuin.overlays.default ]; + nixpkgs.overlays = [ inputs.atuin.overlays.default opencode.overlays.default ]; }) ]; }; diff --git a/hosts/limgrave/home/home.nix b/hosts/limgrave/home/home.nix index dbb8096..065b62b 100644 --- a/hosts/limgrave/home/home.nix +++ b/hosts/limgrave/home/home.nix @@ -23,6 +23,7 @@ catppuccin-cursors catppuccin-papirus-folders catppuccin-grub + opencode ]; }; diff --git a/hosts/limgrave/nixos/packages.nix b/hosts/limgrave/nixos/packages.nix index 6cefa96..0ead3d5 100644 --- a/hosts/limgrave/nixos/packages.nix +++ b/hosts/limgrave/nixos/packages.nix @@ -79,4 +79,6 @@ libheif ffmpegthumbnailer signal-desktop + tflint + kubeconform ]