From 529a579ce1c2b253d86434198fd84627cbb3948a Mon Sep 17 00:00:00 2001 From: rainy Date: Sun, 20 Apr 2025 15:06:10 -0700 Subject: [PATCH] Initial commit --- configuration.nix | 137 +++++++++++++++++++++++++++++++++++++ flake.lock | 48 +++++++++++++ hardware-configuration.nix | 40 +++++++++++ home.nix | 30 ++++++++ modules/fish.nix | 12 ++++ modules/git.nix | 9 +++ modules/kitty.nix | 10 +++ 7 files changed, 286 insertions(+) create mode 100644 configuration.nix create mode 100644 flake.lock create mode 100644 hardware-configuration.nix create mode 100644 home.nix create mode 100644 modules/fish.nix create mode 100644 modules/git.nix create mode 100644 modules/kitty.nix diff --git a/configuration.nix b/configuration.nix new file mode 100644 index 0000000..8cc9e8f --- /dev/null +++ b/configuration.nix @@ -0,0 +1,137 @@ +# 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.kernelPackages = pkgs.linuxPackages_latest; + + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.backupFileExtension = "backup"; + + home-manager.users.rainy = import ./home.nix; + + networking.hostName = "rainix"; # 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/Los_Angeles"; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; + # 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"; + }; + + # Configure keymap in X11 + services.xserver = { + layout = "us"; + xkbVariant = ""; + }; + + services.desktopManager.cosmic.enable = true; + + # Define a user account. Don't forget to set a password with ‘passwd’. + users.users.rainy = { + isNormalUser = true; + description = "rainy"; + extraGroups = [ "networkmanager" "wheel" ]; + ignoreShellProgramCheck = true; + packages = with pkgs; [ + pavucontrol + #kitty + #krita + #steam + #floorp + #legcord + #fastfetch + #chromium + #element-desktop + #vscodium + #upscayl + #helix + #protonup + #spotify + #unzip + #zip + ]; + shell = pkgs.fish; + }; + + programs.steam.enable = true; + #programs.fish.enable = true; + + # Allow unfree packages + nixpkgs.config.allowUnfree = true; + + #hardware.pulseaudio.enable = true; + #hardware.pulseaudio.support32Bit = 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 + # pipewire-pulse + ]; + + # 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.11"; # Did you read the comment? + +} diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..d0ffe15 --- /dev/null +++ b/flake.lock @@ -0,0 +1,48 @@ +{ + "nodes": { + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1745071558, + "narHash": "sha256-bvcatss0xodcdxXm0LUSLPd2jjrhqO3yFSu3stOfQXg=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "9676e8a52a177d80c8a42f66566362a6d74ecf78", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1744932701, + "narHash": "sha256-fusHbZCyv126cyArUwwKrLdCkgVAIaa/fQJYFlCEqiU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "b024ced1aac25639f8ca8fdfc2f8c4fbd66c48ef", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "home-manager": "home-manager", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/hardware-configuration.nix b/hardware-configuration.nix new file mode 100644 index 0000000..d700bee --- /dev/null +++ b/hardware-configuration.nix @@ -0,0 +1,40 @@ +# 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" "usb_storage" "usbhid" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/7167537b-1647-4abe-b1a6-6c5237364d9f"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/409A-8231"; + fsType = "vfat"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/9cbe5d5e-5b8c-49be-b2ee-509624aa7ee5"; } + ]; + + # 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.enp10s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp9s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/home.nix b/home.nix new file mode 100644 index 0000000..0c37b63 --- /dev/null +++ b/home.nix @@ -0,0 +1,30 @@ +{ config, pkgs, ... }: + +{ + imports = [ + ./modules/kitty.nix + ./modules/fish.nix + ./modules/git.nix + ]; + home.username = "rainy"; + home.homeDirectory = "/home/rainy"; + programs.home-manager.enable = true; + + home.packages = [ + pkgs.krita + pkgs.zip + pkgs.unzip + pkgs.legcord + pkgs.floorp + pkgs.element-desktop + pkgs.stremio + pkgs.vscodium + pkgs.gamemode + pkgs.mangohud + pkgs.gamescope + pkgs.fastfetch + ]; + + home.stateVersion = "25.05"; + #programs.kitty.enable = true; +} diff --git a/modules/fish.nix b/modules/fish.nix new file mode 100644 index 0000000..7eeaf7e --- /dev/null +++ b/modules/fish.nix @@ -0,0 +1,12 @@ +{ config, pkgs, ... }: + +{ + programs.fish.enable = true; + programs.fish.shellAliases = { + nxr = "sudo nixos-rebuild switch"; + nxe = "sudo nano /etc/nixos/configuration.nix"; + nxh = "sudo nano /etc/nixos/home.nix"; + nxu = "sudo nix-channel --update && sudo nixos-rebuild switch --upgrade"; + }; +} + diff --git a/modules/git.nix b/modules/git.nix new file mode 100644 index 0000000..5f4ac66 --- /dev/null +++ b/modules/git.nix @@ -0,0 +1,9 @@ +{ config, pkgs, ... }: + +{ + programs.git = { + enable = true; + userName = "rainy"; + userEmail = "ryan.skeeb@gmail.com"; + }; +} diff --git a/modules/kitty.nix b/modules/kitty.nix new file mode 100644 index 0000000..40e899e --- /dev/null +++ b/modules/kitty.nix @@ -0,0 +1,10 @@ +{ config, pkgs, ... }: + +{ + programs.kitty = { + enable = true; + settings = { + background_opacity = 0.75; + }; + }; +}