diff --git a/flake.nix b/flake.nix index 74fca9e..3ef4b8b 100644 --- a/flake.nix +++ b/flake.nix @@ -36,6 +36,12 @@ } ]; }; + nixosConfigurations.thelio76 = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + ./thelio76/configuration.nix + ]; + }; nixosConfigurations.ursa-minor = nixpkgs.lib.nixosSystem { system = "aarch64-linux"; diff --git a/thelio76/configuration.nix b/thelio76/configuration.nix new file mode 100644 index 0000000..44edf23 --- /dev/null +++ b/thelio76/configuration.nix @@ -0,0 +1,175 @@ +# 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 + ]; + + # Bootloader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + boot.initrd.luks.devices."luks-7d758c82-9079-46a6-8bb2-05d5016ed623".device = "/dev/disk/by-uuid/7d758c82-9079-46a6-8bb2-05d5016ed623"; + environment.etc.crypttab.text = '' + luks-9870176e-53f3-493e-94d8-560994fa8f35 UUID=9870176e-53f3-493e-94d8-560994fa8f35 /luks-9870176e-53f3-493e-94d8-560994fa8f35 nofail +''; + + + fileSystems."/home/alex/Documents" = { + device = "/run/media/alex/External/Documents"; + options = [ "bind" ]; + }; + + networking.hostName = "thelio76"; # 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"; + + # Enable networking + networking.networkmanager.enable = true; + + # Set your time zone. + time.timeZone = "America/New_York"; + + # Select internationalisation properties. + i18n.defaultLocale = "en_US.UTF-8"; + + i18n.extraLocaleSettings = { + LC_ADDRESS = "en_US.UTF-8"; + LC_IDENTIFICATION = "en_US.UTF-8"; + LC_MEASUREMENT = "en_US.UTF-8"; + LC_MONETARY = "en_US.UTF-8"; + LC_NAME = "en_US.UTF-8"; + LC_NUMERIC = "en_US.UTF-8"; + LC_PAPER = "en_US.UTF-8"; + LC_TELEPHONE = "en_US.UTF-8"; + LC_TIME = "en_US.UTF-8"; + }; + + # Enable the X11 windowing system. + services.xserver.enable = true; + + # Enable the GNOME Desktop Environment. + services.xserver.displayManager.gdm.enable = true; + services.xserver.desktopManager.gnome.enable = true; + + # Configure keymap in X11 + services.xserver = { + layout = "us"; + xkbVariant = ""; + }; + + # Enable CUPS to print documents. + services.printing.enable = true; + + # Enable sound with pipewire. + 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; + }; + + # Enable touchpad support (enabled default in most desktopManager). + # services.xserver.libinput.enable = true; + + # Define a user account. Don't forget to set a password with ‘passwd’. + nixpkgs.config.permittedInsecurePackages = [ + "electron-25.9.0" + ]; + + + + users.users.alex = { + isNormalUser = true; + description = "Alex"; + extraGroups = [ "networkmanager" "wheel" ]; + packages = with pkgs; [ + aseprite + audacity + blender + darktable + digikam + discord + famistudio + firefox + flameshot + gimp-with-plugins + git + godot_4 + gnucash + keepassxc + # kdePackages.kdenlive + krita + libreoffice + lmms + lutris + mpv + nextcloud-client + nixpkgs-fmt + obsidian + picard + spotify + steam + syncthing + rawtherapee + vim + vscode + yt-dlp + ]; + }; + + # 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 + ]; + + # 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; + # }; + + # List services that you want to enable: + + # Enable the OpenSSH daemon. + # services.openssh.enable = true; + + # Open ports in the firewall. + # networking.firewall.allowedTCPPorts = [ ... ]; + # networking.firewall.allowedUDPPorts = [ ... ]; + # Or disable the firewall altogether. + # networking.firewall.enable = false; + + # This value determines the NixOS release from which the default + # settings for stateful data, like file locations and database versions + # on your system were taken. It‘s perfectly fine and recommended to leave + # this value at the release version of the first install of this system. + # 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 = "24.05"; # Did you read the comment? + +} diff --git a/thelio76/hardware-configuration.nix b/thelio76/hardware-configuration.nix new file mode 100644 index 0000000..5c56b16 --- /dev/null +++ b/thelio76/hardware-configuration.nix @@ -0,0 +1,46 @@ +# 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 + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/5b17c208-6c1b-4317-b59c-6596b1857f1f"; + fsType = "ext4"; + }; + + boot.initrd.luks.devices."luks-b748a776-5e2c-4809-927e-1f4c051b9460".device = "/dev/disk/by-uuid/b748a776-5e2c-4809-927e-1f4c051b9460"; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/EB52-074B"; + fsType = "vfat"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/19de8142-e695-4425-a8cc-27e062204882"; } + ]; + + fileSystems."/run/media/alex/External" = + { device = "/dev/disk/by-uuid/5057a0e6-649f-487f-a17c-11e379f9af19"; + fsType = "auto"; + }; + # 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.enp9s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp7s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}