❄️ Nix configurations
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

add pinemarten

A. Ottr a1c929aa c4e687e4

+191
+151
nixos/pinemarten/configuration.nix
··· 1 + # Edit this configuration file to define what should be installed on 2 + # your system. Help is available in the configuration.nix(5) man page 3 + # and in the NixOS manual (accessible by running ‘nixos-help’). 4 + 5 + { config, pkgs, ... }: 6 + 7 + { 8 + imports = 9 + [ # Include the results of the hardware scan. 10 + ./hardware-configuration.nix 11 + ]; 12 + 13 + # Bootloader. 14 + boot.loader.systemd-boot.enable = true; 15 + boot.loader.efi.canTouchEfiVariables = true; 16 + 17 + networking.hostName = "nixos"; # Define your hostname. 18 + # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. 19 + nix.settings.experimental-features = [ "nix-command" "flakes" ]; 20 + # Configure network proxy if necessary 21 + # networking.proxy.default = "http://user:password@proxy:port/"; 22 + # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; 23 + 24 + # Enable networking 25 + networking.networkmanager.enable = true; 26 + 27 + # Set your time zone. 28 + time.timeZone = "Europe/Paris"; 29 + 30 + # Select internationalisation properties. 31 + i18n.defaultLocale = "en_US.UTF-8"; 32 + 33 + i18n.extraLocaleSettings = { 34 + LC_ADDRESS = "fr_FR.UTF-8"; 35 + LC_IDENTIFICATION = "fr_FR.UTF-8"; 36 + LC_MEASUREMENT = "fr_FR.UTF-8"; 37 + LC_MONETARY = "fr_FR.UTF-8"; 38 + LC_NAME = "fr_FR.UTF-8"; 39 + LC_NUMERIC = "fr_FR.UTF-8"; 40 + LC_PAPER = "fr_FR.UTF-8"; 41 + LC_TELEPHONE = "fr_FR.UTF-8"; 42 + LC_TIME = "fr_FR.UTF-8"; 43 + }; 44 + 45 + # Enable the X11 windowing system. 46 + services.xserver.enable = true; 47 + 48 + # Enable the GNOME Desktop Environment. 49 + services.xserver.displayManager.gdm.enable = true; 50 + services.xserver.desktopManager.gnome.enable = true; 51 + 52 + # Configure keymap in X11 53 + services.xserver.xkb = { 54 + layout = "us"; 55 + variant = ""; 56 + }; 57 + 58 + # Enable CUPS to print documents. 59 + services.printing.enable = true; 60 + 61 + # Enable sound with pipewire. 62 + hardware.pulseaudio.enable = false; 63 + security.rtkit.enable = true; 64 + services.pipewire = { 65 + enable = true; 66 + alsa.enable = true; 67 + alsa.support32Bit = true; 68 + pulse.enable = true; 69 + # If you want to use JACK applications, uncomment this 70 + #jack.enable = true; 71 + 72 + # use the example session manager (no others are packaged yet so this is enabled by default, 73 + # no need to redefine it in your config for now) 74 + #media-session.enable = true; 75 + }; 76 + 77 + # Enable touchpad support (enabled default in most desktopManager). 78 + # services.xserver.libinput.enable = true; 79 + 80 + # Define a user account. Don't forget to set a password with ‘passwd’. 81 + users.users.alex = { 82 + isNormalUser = true; 83 + description = "Alex"; 84 + extraGroups = [ "networkmanager" "wheel" ]; 85 + packages = with pkgs; [ 86 + # thunderbird 87 + ]; 88 + }; 89 + 90 + # Install firefox. 91 + programs.firefox.enable = true; 92 + 93 + # Allow unfree packages 94 + nixpkgs.config.allowUnfree = true; 95 + 96 + # List packages installed in system profile. To search, run: 97 + # $ nix search wget 98 + environment.systemPackages = with pkgs; [ 99 + vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. 100 + wget 101 + git 102 + curl 103 + ]; 104 + 105 + # Some programs need SUID wrappers, can be configured further or are 106 + # started in user sessions. 107 + # programs.mtr.enable = true; 108 + # programs.gnupg.agent = { 109 + # enable = true; 110 + # enableSSHSupport = true; 111 + # }; 112 + 113 + # List services that you want to enable: 114 + 115 + # Enable the OpenSSH daemon. 116 + services.openssh.enable = true; 117 + 118 + # nvidia 119 + # hardware.graphics.enable = true; 120 + hardware.opengl = { 121 + enable = true; 122 + driSupport = true; 123 + }; 124 + services.xserver.videoDrivers = ["nvidia"]; 125 + 126 + hardware.nvidia = { 127 + modesetting.enable = true; 128 + powerManagement.enable = false; 129 + powerManagement.finegrained = false; 130 + open = false; 131 + 132 + nvidiaSettings = true; 133 + 134 + package = config.boot.kernelPackages.nvidiaPackages.stable; # TODO install updated driver for RTX 2070 SUPER 135 + }; 136 + 137 + # Open ports in the firewall. 138 + # networking.firewall.allowedTCPPorts = [ ... ]; 139 + # networking.firewall.allowedUDPPorts = [ ... ]; 140 + # Or disable the firewall altogether. 141 + # networking.firewall.enable = false; 142 + 143 + # This value determines the NixOS release from which the default 144 + # settings for stateful data, like file locations and database versions 145 + # on your system were taken. It‘s perfectly fine and recommended to leave 146 + # this value at the release version of the first install of this system. 147 + # Before changing this value read the documentation for this option 148 + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). 149 + system.stateVersion = "24.05"; # Did you read the comment? 150 + 151 + }
+40
nixos/pinemarten/hardware-configuration.nix
··· 1 + # Do not modify this file! It was generated by ‘nixos-generate-config’ 2 + # and may be overwritten by future invocations. Please make changes 3 + # to /etc/nixos/configuration.nix instead. 4 + { config, lib, pkgs, modulesPath, ... }: 5 + 6 + { 7 + imports = 8 + [ (modulesPath + "/installer/scan/not-detected.nix") 9 + ]; 10 + 11 + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; 12 + boot.initrd.kernelModules = [ ]; 13 + boot.kernelModules = [ "kvm-amd" ]; 14 + boot.extraModulePackages = [ ]; 15 + 16 + fileSystems."/" = 17 + { device = "/dev/disk/by-uuid/fe527f6c-1da0-40d3-b541-eb5eadfdc95a"; 18 + fsType = "ext4"; 19 + }; 20 + 21 + fileSystems."/boot" = 22 + { device = "/dev/disk/by-uuid/1B9A-699B"; 23 + fsType = "vfat"; 24 + options = [ "fmask=0077" "dmask=0077" ]; 25 + }; 26 + 27 + swapDevices = 28 + [ { device = "/dev/disk/by-uuid/220734f6-88e2-42b5-b373-f72646bf3c34"; } 29 + ]; 30 + 31 + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking 32 + # (the default) this is the recommended approach. When using systemd-networkd it's 33 + # still possible to use this option, but it's recommended to use it in conjunction 34 + # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. 35 + networking.useDHCP = lib.mkDefault true; 36 + # networking.interfaces.enp4s0.useDHCP = lib.mkDefault true; 37 + 38 + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; 39 + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; 40 + }