commit 88b4e5136321fe50148d976619eb324309f1254d Author: caandt Date: Fri Aug 16 09:36:55 2024 -0500 inital commit diff --git a/configuration.nix b/configuration.nix new file mode 100644 index 0000000..5bb71c5 --- /dev/null +++ b/configuration.nix @@ -0,0 +1,150 @@ +{ config, pkgs, ... }: + +{ + imports = [ ./hardware-configuration.nix ]; + + nix.settings = { + experimental-features = [ "nix-command" "flakes" ]; + use-xdg-base-directories = true; + }; + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + networking.hostName = "nixos"; + networking.networkmanager.enable = true; + + time.timeZone = "America/Chicago"; + + i18n.defaultLocale = "en_US.UTF-8"; + i18n.supportedLocales = [ + "en_US.UTF-8/UTF-8" + "ja_JP.UTF-8/UTF-8" + ]; + + services.xserver = { + enable = true; + autorun = false; + displayManager.startx.enable = true; + windowManager.awesome.enable = true; + desktopManager.plasma5.enable = true; + autoRepeatDelay = 200; + autoRepeatInterval = 30; + videoDrivers = [ "amdgpu" ]; + deviceSection = ''Option "TearFree" "true"''; + }; + services.libinput = { + enable = true; + mouse.accelProfile = "flat"; + }; + + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; + security.rtkit.enable = true; + hardware.bluetooth = { + enable = true; + powerOnBoot = true; + settings.General = { + Enable = "Source,Sink,Media,Socket"; + }; + }; + + environment.systemPackages = with pkgs; [ + neovim + wget + tree + tmux + git + btop + cryptsetup + ]; + + users.users.ahnwuoa = { + isNormalUser = true; + extraGroups = [ "wheel" ]; + packages = with pkgs; [ + firefox + alacritty + mpv + nsxiv + rofi + sct + maim + xclip + libsForQt5.kcalc + libsForQt5.kolourpaint + libsForQt5.filelight + papirus-icon-theme + pavucontrol + qpwgraph + + gdb + lsd + bat + zoxide + fd + ripgrep + fzf + trash-cli + tlrc + micro + speedtest-cli + bluetuith + unixtools.xxd + + python3 + gnumake + ]; + }; + programs.partition-manager = { + enable = true; + package = pkgs.libsForQt5.partitionmanager; + }; + services.udisks2.enable = true; + virtualisation.libvirtd.enable = true; + programs.virt-manager.enable = true; + security.doas = { + enable = true; + }; + fonts.packages = with pkgs; [ + noto-fonts + noto-fonts-cjk + source-han-sans + source-han-serif + ]; + i18n.inputMethod = { + enabled = "fcitx5"; + fcitx5.addons = with pkgs; [ + fcitx5-mozc + fcitx5-gtk + ]; + }; + qt = { + enable = true; + platformTheme = "qt5ct"; + style = "breeze"; + }; + security.polkit.enable = true; + systemd = { + user.services.polkit-kde-authentication-agent-1 = { + description = "polkit-kde-authentication-agent-1"; + wantedBy = [ "graphical-session.target" ]; + wants = [ "graphical-session.target" ]; + after = [ "graphical-session.target" ]; + serviceConfig = { + Type = "simple"; + ExecStart = "${pkgs.libsForQt5.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + }; + + system.stateVersion = "24.05"; +} + diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..0d6a636 --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1723556749, + "narHash": "sha256-+CHVZnTnIYRLYsARInHYoWkujzcRkLY/gXm3s5bE52o=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "4a92571f9207810b559c9eac203d1f4d79830073", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-24.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..13f8d88 --- /dev/null +++ b/flake.nix @@ -0,0 +1,16 @@ +{ + description = "NixOS config"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05"; + }; + + outputs = { nixpkgs, ... }@inputs: { + nixosConfigurations.nixos = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + ./configuration.nix + ]; + }; + }; +} diff --git a/hardware-configuration.nix b/hardware-configuration.nix new file mode 100644 index 0000000..173e9b5 --- /dev/null +++ b/hardware-configuration.nix @@ -0,0 +1,38 @@ +# 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/37229430-3b89-413e-9f9d-f36b3d2935bf"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/1FF4-8F2A"; + fsType = "vfat"; + }; + + swapDevices = [ ]; + + # 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; +}