diff --git a/config/common.nix b/config/common.nix index 8438ae9..84236ff 100644 --- a/config/common.nix +++ b/config/common.nix @@ -1,42 +1,23 @@ { pkgs, ... }: { - # List packages installed in system profile. To search, run: - # $ nix search wget - environment.systemPackages = with pkgs; [ - vim - git - wget - curl - htop - ]; - # Bootloader. boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.configurationLimit = 5; boot.loader.efi.canTouchEfiVariables = true; + # System-Tuning für JetBrains Tools + boot.kernel.sysctl = { + "fs.inotify.max_user_watches" = 1048576; + }; + + # Network networking.hostName = "cesium"; # Define your hostname. - # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. - - # Configure network proxy if necessary - # networking.proxy.default = "http://user:password@proxy:port/"; - # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; - - networking.firewall.allowedTCPPorts = [ 22 ]; - # networking.firewall.allowedUDPPorts = [ ... ]; - # Or disable the firewall altogether. - # networking.firewall.enable = false; - - # Enable networking networking.networkmanager.enable = true; # Set your time zone. time.timeZone = "Europe/Berlin"; - - # Select internationalisation properties. i18n.defaultLocale = "de_DE.UTF-8"; - i18n.extraLocaleSettings = { LC_ADDRESS = "de_DE.UTF-8"; LC_IDENTIFICATION = "de_DE.UTF-8"; @@ -49,26 +30,8 @@ LC_TIME = "de_DE.UTF-8"; }; - # Some programs need SUID wrappers, can be configured further or are - # started in user sessions. - # programs.mtr.enable = true; - # programs.gnupg.agent = { - # enable = true; - # enableSSHSupport = true; - # }; - - system.autoUpgrade = { - enable = true; - allowReboot = true; - channel = "https://channels.nixos.org/nixos-25.11"; - }; - - # Enable the X11 windowing system. - services.xserver.enable = true; - #services.xserver.videoDrivers = [ "nvidia" ]; - - # Enable touchpad support (enabled default in most desktopManager). - # services.xserver.libinput.enable = true; + # Configure console keymap + console.keyMap = "de"; # Configure keymap in X11 services.xserver.xkb = { @@ -76,48 +39,66 @@ variant = ""; }; - # Enable the GNOME Desktop Environment. - services.displayManager.gdm.enable = true; - services.desktopManager.gnome.enable = true; - # Enable the OpenSSH daemon. - services.openssh.enable = true; + # List packages installed in system profile. To search, run: + # $ nix search wget + environment.systemPackages = with pkgs; [ + vim + git + wget + curl + htop + stow - # Configure console keymap - console.keyMap = "de"; + cifs-utils + ]; - # Enable CUPS to print documents. - services.printing.enable = true; + # Shell-Programme + programs.zsh.enable = true; + programs.git.enable = true; - # Enable sound with pipewire. - services.pulseaudio.enable = false; + # Flatpak Support + services.flatpak.enable = true; + + # Sound + sound.enable = true; + hardware.pulseaudio.enable = false; security.rtkit.enable = true; services.pipewire = { enable = true; alsa.enable = true; alsa.support32Bit = true; pulse.enable = true; - # If you want to use JACK applications, uncomment this - #jack.enable = true; - - # use the example session manager (no others are packaged yet so this is enabled by default, - # no need to redefine it in your config for now) - #media-session.enable = true; }; - - # Define a user account. Don't forget to set a password with ‘passwd’. - users.users.sebastian = { - isNormalUser = true; - description = "Sebastian Fischer"; - extraGroups = [ "networkmanager" "wheel" ]; + # Sound + sound.enable = true; + hardware.pulseaudio.enable = false; + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; }; - # Install firefox. - programs.firefox.enable = true; + # 32-bit Support für Steam + hardware.graphics.enable32Bit = true; + hardware.pulseaudio.support32Bit = true; - # Allow unfree packages - nixpkgs.config.allowUnfree = true; + # Desktop Environment / Window Manager + services.xserver.enable = true; + services.xserver.displayManager.gdm.enable = true; + services.xserver.desktopManager.gnome.enable = true; + + # Enable CUPS to print documents. + services.printing.enable = true; + + system.autoUpgrade = { + enable = true; + allowReboot = true; + channel = "https://channels.nixos.org/nixos-25.11"; + }; nix.gc = { automatic = true; diff --git a/config/configuration.nix b/config/configuration.nix index e426550..38c5a49 100644 --- a/config/configuration.nix +++ b/config/configuration.nix @@ -4,18 +4,19 @@ imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix ./common.nix - # ./vm.nix + ./services.nix + ./users.nix + # ./vm-guest.nix ]; - nixpkgs.config.allowUnfree = true; - # Home Manager Konfiguration home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; - - # Dein(e) Benutzer mit Home Manager home-manager.users.sebastian = import ./home.nix; + # NixOS Version (nicht ändern nach Erstinstallation) system.stateVersion = "25.11"; + + nixpkgs.config.allowUnfree = true; } diff --git a/config/home.nix b/config/home.nix index 3f2469d..8afbed8 100644 --- a/config/home.nix +++ b/config/home.nix @@ -1,6 +1,52 @@ # In deiner home.nix { config, pkgs, ... }: +let + # Jameica/Hibiscus Custom Package + jameica = pkgs.stdenv.mkDerivation rec { + pname = "jameica"; + version = "2.12.0"; + + src = pkgs.fetchurl { + url = "https://www.willuhn.de/products/jameica/releases/current/jameica/jameica-linux64-${version}.zip"; + # Hash ermitteln mit: nix-prefetch-url + sha256 = "d5abbd1f8ce4c799e50669e6f4cb7deebf7af3343891e24ff36377ac4ea4192a"; + }; + + nativeBuildInputs = [ pkgs.unzip pkgs.makeWrapper ]; + buildInputs = [ pkgs.jre ]; + + unpackPhase = '' + unzip $src + ''; + + installPhase = '' + mkdir -p $out/opt/jameica + cp -r jameica/* $out/opt/jameica/ || true + + mkdir -p $out/bin + makeWrapper $out/opt/jameica/jameica.sh $out/bin/jameica \ + --prefix PATH : ${pkgs.jre}/bin + + mkdir -p $out/share/applications + cat > $out/share/applications/jameica.desktop <