this repo has no description
0
fork

Configure Feed

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

:sparkles: nix configuration flake

Pedro Correa 3d3d1a77

+315
+27
flake.lock
··· 1 + { 2 + "nodes": { 3 + "nixpkgs": { 4 + "locked": { 5 + "lastModified": 1683014792, 6 + "narHash": "sha256-6Va9iVtmmsw4raBc3QKvQT2KT/NGRWlvUlJj46zN8B8=", 7 + "owner": "nixos", 8 + "repo": "nixpkgs", 9 + "rev": "1a411f23ba299db155a5b45d5e145b85a7aafc42", 10 + "type": "github" 11 + }, 12 + "original": { 13 + "owner": "nixos", 14 + "ref": "nixos-unstable", 15 + "repo": "nixpkgs", 16 + "type": "github" 17 + } 18 + }, 19 + "root": { 20 + "inputs": { 21 + "nixpkgs": "nixpkgs" 22 + } 23 + } 24 + }, 25 + "root": "root", 26 + "version": 7 27 + }
+21
flake.nix
··· 1 + { 2 + description = "Tulk'dan's system config"; 3 + 4 + inputs = { 5 + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; 6 + }; 7 + 8 + outputs = {self, nixpkgs}: let 9 + system = "x86_64-linux"; 10 + hostname = "nixos"; 11 + pkgs = import nixpkgs {inherit system;}; 12 + in { 13 + 14 + nixosConfigurations.${hostname} = nixpkgs.lib.nixosSystem { 15 + inherit system; 16 + 17 + modules = [ ./system/configuration.nix ]; 18 + }; 19 + 20 + }; 21 + }
+229
system/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, fetchFromGithub, ... }: 6 + 7 + { 8 + imports = 9 + [ # Include the results of the hardware scan. 10 + ./hardware-configuration.nix 11 + ]; 12 + 13 + # Bootloader. 14 + boot.loader.grub = { 15 + enable = true; 16 + device = "/dev/sda"; 17 + useOSProber = true; 18 + }; 19 + 20 + networking = { 21 + hostName = "nixos"; # Define your hostname. 22 + # wireless.enable = true; # Enables wireless support via wpa_supplicant. 23 + 24 + # Configure network proxy if necessary 25 + # networking.proxy.default = "http://user:password@proxy:port/"; 26 + # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; 27 + 28 + # Enable networking 29 + networkmanager.enable = true; 30 + }; 31 + 32 + # Set your time zone. 33 + time.timeZone = "America/Sao_Paulo"; 34 + 35 + # Select internationalisation properties. 36 + i18n.defaultLocale = "en_US.UTF-8"; 37 + 38 + i18n.extraLocaleSettings = { 39 + LC_ADDRESS = "pt_BR.UTF-8"; 40 + LC_IDENTIFICATION = "pt_BR.UTF-8"; 41 + LC_MEASUREMENT = "pt_BR.UTF-8"; 42 + LC_MONETARY = "pt_BR.UTF-8"; 43 + LC_NAME = "pt_BR.UTF-8"; 44 + LC_NUMERIC = "pt_BR.UTF-8"; 45 + LC_PAPER = "pt_BR.UTF-8"; 46 + LC_TELEPHONE = "pt_BR.UTF-8"; 47 + LC_TIME = "pt_BR.UTF-8"; 48 + }; 49 + 50 + services = { 51 + 52 + xserver = { 53 + # Enable the X11 windowing system. 54 + enable = true; 55 + 56 + # Enable the GNOME Desktop Environment. 57 + displayManager.gdm.enable = true; 58 + desktopManager.gnome.enable = true; 59 + 60 + # Configure keymap in X11 61 + layout = "us"; 62 + xkbVariant = ""; 63 + 64 + updateDbusEnvironment = true; 65 + }; 66 + 67 + # Enable CUPS to print documents. 68 + printing.enable = true; 69 + 70 + pipewire = { 71 + enable = true; 72 + alsa.enable = true; 73 + alsa.support32Bit = true; 74 + pulse.enable = true; 75 + # If you want to use JACK applications, uncomment this 76 + #jack.enable = true; 77 + 78 + # use the example session manager (no others are packaged yet so this is enabled by default, 79 + # no need to redefine it in your config for now) 80 + #media-session.enable = true; 81 + }; 82 + 83 + pcscd.enable = true; 84 + 85 + # Enable the OpenSSH daemon. 86 + openssh.enable = true; 87 + 88 + # Adding support for flatpak 89 + flatpak.enable = true; 90 + 91 + emacs = { 92 + enable = true; 93 + package = pkgs.emacs; 94 + }; 95 + }; 96 + 97 + # Enable sound with pipewire. 98 + sound.enable = true; 99 + hardware.pulseaudio.enable = false; 100 + security.rtkit.enable = true; 101 + 102 + hardware.opengl.enable = true; 103 + 104 + # Enable touchpad support (enabled default in most desktopManager). 105 + # services.xserver.libinput.enable = true; 106 + 107 + programs = { 108 + # Enabling zsh 109 + zsh = { 110 + enable = true; 111 + ohMyZsh = { 112 + enable = true; 113 + plugins = [ "git" ]; 114 + }; 115 + }; 116 + 117 + gnupg.agent = { 118 + enable = true; 119 + enableSSHSupport = true; 120 + enableExtraSocket = true; 121 + }; 122 + 123 + }; 124 + 125 + # Define a user account. Don't forget to set a password with ‘passwd’. 126 + users.users.pedro = { 127 + isNormalUser = true; 128 + description = "Pedro"; 129 + extraGroups = [ "networkmanager" "wheel" "tty" ]; 130 + packages = with pkgs; [ 131 + firefox 132 + # thunderbird 133 + neovim 134 + nodejs 135 + ghc 136 + alacritty 137 + oh-my-zsh 138 + direnv 139 + gnupg 140 + emacs 141 + wezterm 142 + vscodium 143 + 144 + gnomeExtensions.pop-shell 145 + gnomeExtensions.paperwm 146 + just 147 + 148 + eww-wayland 149 + ripgrep 150 + jq 151 + ]; 152 + shell = pkgs.zsh; 153 + }; 154 + 155 + # Allow unfree packages 156 + nixpkgs.config.allowUnfree = true; 157 + 158 + # List packages installed in system profile. To search, run: 159 + # $ nix search wget 160 + environment = { 161 + gnome.excludePackages = (with pkgs; [ 162 + gnome-tour 163 + gnome-text-editor 164 + ]) ++ (with pkgs.gnome; [ 165 + gnome-music 166 + gnome-shell 167 + geary 168 + epiphany 169 + totem 170 + ]); 171 + 172 + systemPackages = with pkgs; [ 173 + git 174 + vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. 175 + wget 176 + ]; 177 + 178 + variables = { 179 + EDITOR = "nvim"; 180 + VISUAL = "nvim"; 181 + BROWSER = "firefox"; 182 + }; 183 + }; 184 + 185 + 186 + # Some programs need SUID wrappers, can be configured further or are 187 + # started in user sessions. 188 + # programs.mtr.enable = true; 189 + 190 + # List services that you want to enable: 191 + 192 + # Open ports in the firewall. 193 + # networking.firewall.allowedTCPPorts = [ ... ]; 194 + # networking.firewall.allowedUDPPorts = [ ... ]; 195 + # Or disable the firewall altogether. 196 + # networking.firewall.enable = false; 197 + 198 + # This value determines the NixOS release from which the default 199 + # settings for stateful data, like file locations and database versions 200 + # on your system were taken. It‘s perfectly fine and recommended to leave 201 + # this value at the release version of the first install of this system. 202 + # Before changing this value read the documentation for this option 203 + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). 204 + system.stateVersion = "22.11"; # Did you read the comment? 205 + 206 + 207 + # Automatic GB 208 + nix = { 209 + settings = { 210 + substituters = ["https://hyprland.cachix.org"]; 211 + trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="]; 212 + experimental-features = ["nix-command" "flakes"]; 213 + }; 214 + 215 + gc = { 216 + automatic = true; 217 + dates = "weekly"; 218 + options = "--delete-older-than 7d"; 219 + }; 220 + }; 221 + 222 + # Installing fonts 223 + fonts.fonts = with pkgs; [ 224 + material-design-icons 225 + fira-code 226 + hasklig 227 + ]; 228 + 229 + }
+38
system/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 = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; 12 + boot.initrd.kernelModules = [ ]; 13 + boot.kernelModules = [ "kvm-intel" ]; 14 + boot.extraModulePackages = [ ]; 15 + 16 + fileSystems."/" = 17 + { device = "/dev/disk/by-uuid/5ce7128f-3031-48fb-819b-f9c6942a142e"; 18 + fsType = "ext4"; 19 + }; 20 + 21 + swapDevices = 22 + [ { device = "/dev/disk/by-uuid/80b01507-ea31-4d84-a7ea-dbcd5f4b2546"; } 23 + ]; 24 + 25 + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking 26 + # (the default) this is the recommended approach. When using systemd-networkd it's 27 + # still possible to use this option, but it's recommended to use it in conjunction 28 + # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. 29 + networking.useDHCP = lib.mkDefault true; 30 + # networking.interfaces.eno1.useDHCP = lib.mkDefault true; 31 + # networking.interfaces.wlp0s20f0u6.useDHCP = lib.mkDefault true; 32 + 33 + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; 34 + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; 35 + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; 36 + # high-resolution display 37 + # hardware.video.hidpi.enable = lib.mkDefault true; 38 + }