diff --git a/configuration.nix b/configuration.nix index e74d000..51e3abe 100644 --- a/configuration.nix +++ b/configuration.nix @@ -1,20 +1,45 @@ # Edit this configuration file to define what should be installed on # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). - -{ config, pkgs, ... }: - { - imports = - [ # Include the results of the hardware scan. - ./hardware-configuration.nix - ]; + config, + pkgs, + inputs, + ... +}: { + imports = [ + # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; # Bootloader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; - networking.hostName = "miguel"; # Define your hostname. + # apparently needed for mesa + services.xserver = { + enable = true; + videoDrivers = ["nvidia"]; + displayManager.lightdm.enable = false; + }; + + hardware.opengl = { + enable = true; + driSupport = true; + driSupport32Bit = true; + }; + + hardware.nvidia = { + modesetting.enable = true; + powerManagement = { + enable = false; + finegrained = false; + }; + open = false; + nvidiaSettings = false; + }; + + networking.hostName = "fuji"; # Define your hostname. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. # Configure network proxy if necessary @@ -69,46 +94,123 @@ # services.xserver.libinput.enable = true; # Define a user account. Don't forget to set a password with ‘passwd’. - users.users.uku = { + users.users.leo = { isNormalUser = true; - description = "uku"; - extraGroups = [ "networkmanager" "wheel" ]; + description = "leo"; + extraGroups = ["networkmanager" "wheel"]; shell = pkgs.fish; packages = with pkgs; [ firefox neovim git - gnupg - pinentry kitty chezmoi starship waybar rofi-wayland + hyprpaper + (discord.override { + withOpenASAR = true; + withVencord = true; + }) + hyfetch + grim + slurp + swappy + swayidle + wl-clipboard + cliphist + libsForQt5.polkit-kde-agent + font-manager + nwg-look + (catppuccin-gtk.override { + variant = "macchiato"; + accents = ["sky" "sapphire"]; + }) + xfce.thunar + xfce.thunar-volman + xfce.thunar-archive-plugin + jetbrains.idea-ultimate + temurin-bin-17 + temurin-bin-8 + gcc + gnumake + mold + sccache + rustc + cargo + pavucontrol + ungoogled-chromium + gnome.gnome-keyring + gnome.seahorse + obs-studio + mpv + ffmpeg_6 + vscode + nil + nixpkgs-fmt + glfw-wayland-minecraft + (prismlauncher.override { + jdks = [temurin-bin-17]; + }) + shotcut + vesktop + grimblast ]; }; - programs.hyprland.enable = true; + programs.gnupg.agent = { + enable = true; + enableSSHSupport = true; + pinentryFlavor = "gnome3"; + }; + + programs.hyprland = { + enable = true; + enableNvidiaPatches = true; + }; programs.fish.enable = true; + programs.command-not-found.enable = false; + programs.nix-index = { + enable = true; + enableFishIntegration = true; + }; + + programs.steam.enable = true; + + nixpkgs.overlays = [ + (final: prev: { + shotcut = prev.shotcut.overrideAttrs (old: { + version = "23.09.29"; + src = prev.fetchFromGitHub { + owner = "mltframework"; + repo = "shotcut"; + rev = "v23.09.29"; + sha256 = "1y46n5gmlayfl46l0vhg5g5dbbc0sg909mxb68sia0clkaas8xrh"; + }; + }); + }) + ]; + # Allow unfree packages nixpkgs.config.allowUnfree = true; # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; [ - # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. - # wget + # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. + # wget ]; fonts.packages = with pkgs; [ iosevka jetbrains-mono - (nerdfonts.override { fonts = [ "Iosevka" "JetBrainsMono" ]; }) + (nerdfonts.override {fonts = ["Iosevka" "JetBrainsMono"];}) ]; nix.settings.experimental-features = ["nix-command" "flakes"]; - + # Some programs need SUID wrappers, can be configured further or are # started in user sessions. # programs.mtr.enable = true; @@ -135,5 +237,4 @@ # Before changing this value read the documentation for this option # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). system.stateVersion = "23.05"; # Did you read the comment? - } diff --git a/flake.lock b/flake.lock index 4355e00..10f2193 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1693158576, - "narHash": "sha256-aRTTXkYvhXosGx535iAFUaoFboUrZSYb1Ooih/auGp0=", + "lastModified": 1699099776, + "narHash": "sha256-X09iKJ27mGsGambGfkKzqvw5esP1L/Rf8H3u3fCqIiU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a999c1cc0c9eb2095729d5aa03e0d8f7ed256780", + "rev": "85f1ba3e51676fa8cc604a3d863d729026a6b8eb", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 28faa35..62e42bf 100644 --- a/flake.nix +++ b/flake.nix @@ -5,11 +5,13 @@ nixpkgs.url = "nixpkgs/nixos-unstable"; }; - outputs = inputs: { - nixosConfigurations.miguel = inputs.nixpkgs.lib.nixosSystem { + outputs = inputs: { + nixosConfigurations.fuji = inputs.nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [./configuration.nix]; - specialArgs = inputs; + specialArgs = {inherit inputs;}; }; + + formatter.x86_64-linux = inputs.nixpkgs.legacyPackages.x86_64-linux.alejandra; }; } diff --git a/hardware-configuration.nix b/hardware-configuration.nix index 58ebb7b..270bc58 100644 --- a/hardware-configuration.nix +++ b/hardware-configuration.nix @@ -1,36 +1,54 @@ # 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 + "/profiles/qemu-guest.nix") - ]; + config, + lib, + pkgs, + modulesPath, + ... +}: { + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; - boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; + boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "sd_mod"]; + boot.initrd.kernelModules = []; + boot.kernelModules = ["kvm-intel"]; + boot.extraModulePackages = []; - fileSystems."/" = - { device = "/dev/disk/by-uuid/c9838d2a-812e-4451-8ffe-2c4bd392755f"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/660ff32b-308f-411a-815e-959706ec1bcb"; + fsType = "btrfs"; + options = ["subvol=@"]; + }; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/EAC8-2405"; - fsType = "vfat"; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/306D-3240"; + fsType = "vfat"; + }; - swapDevices = [ ]; + fileSystems."/home" = { + device = "/dev/disk/by-uuid/eb612572-5d15-407b-b691-e7486a69d33c"; + fsType = "ext4"; + }; + + fileSystems."/mnt/videos" = { + device = "/dev/disk/by-uuid/b7f70053-dda2-4084-bd92-ddeccb4b4950"; + fsType = "btrfs"; + }; + + swapDevices = [ + {device = "/dev/disk/by-uuid/6ee8ec3d-3b26-4d6d-b43d-174f908fd8fe";} + ]; # 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.enp1s0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp4s0.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; }