From 9d1574ffefe00faa094f7f33768e7a63f41ffe08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?c=C4=83t=C4=83lin?= Date: Sun, 8 Dec 2024 17:47:42 +0100 Subject: [PATCH] feat: add nix conf --- nix/configuration.nix | 135 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 nix/configuration.nix diff --git a/nix/configuration.nix b/nix/configuration.nix new file mode 100644 index 0000000..7ee805a --- /dev/null +++ b/nix/configuration.nix @@ -0,0 +1,135 @@ + +{ config, pkgs, ... }: +{ + imports = + [ # Include the results of the hardware scan. + /etc/nixos/hardware-configuration.nix + (import ).nixosModules.default + ]; + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + services.snap.enable = true; + networking.hostName = "limgrave"; + networking.networkmanager.enable = true; + 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"; + }; + + services.xserver.enable = true; + services.xserver.displayManager.lightdm.enable = true; + services.xserver.desktopManager.pantheon.enable = true; + services.xserver.xkb = { + layout = "us"; + variant = ""; + }; + + services.printing.enable = true; + + hardware.pulseaudio.enable = false; + security.rtkit.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" ]; + packages = with pkgs; [ + flatpak + ]; + }; + + programs.firefox.enable = true; + nixpkgs.config.allowUnfree = true; + services.flatpak.enable = true; + environment.systemPackages = with pkgs; [ + vim + wget + nextcloud-client + kitty + steam + vesktop + pantheon-tweaks + protonup-qt + jellyfin-media-player + spotify + adwaita-icon-theme + jetbrains.pycharm-professional + fishPlugins.z + fishPlugins.tide + fishPlugins.transient-fish + fishPlugins.git-abbr + fishPlugins.done + fishPlugins.colored-man-pages + lutris + telegram-desktop + leaf + restic + bitwarden + uv + tmux + git + dotter + pre-commit + kubectl + k9s + trashy + cargo + inconsolata + inconsolata-nerdfont + ]; + 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; + package = pkgs.steam.override { + extraLibraries = p: with p; [(lib.getLib networkmanager)]; + }; + }; + }; + programs.mtr.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 + ''; + }; + + + services.openssh.enable = true; + virtualisation.docker.enable = true; + networking.nameservers = [ "192.168.1.7" "1.1.1.1" ]; + system.stateVersion = "24.11"; +}