From 34e86c65859b28a0ece673add4470b9a82eaec84 Mon Sep 17 00:00:00 2001 From: bckelley Date: Fri, 14 Aug 2026 12:44:07 -0400 Subject: [PATCH] init test --- config/hypr | 1 + config/waybar | 1 + configuration.nix | 90 ++++++++++++++++++++++++++++++++++++++ flake.lock | 49 +++++++++++++++++++++ flake.nix | 33 ++++++++++++++ hardware-configuration.nix | 24 ++++++++++ home.nix | 38 ++++++++++++++++ sh.nix | 35 +++++++++++++++ 8 files changed, 271 insertions(+) create mode 160000 config/hypr create mode 160000 config/waybar create mode 100644 configuration.nix create mode 100644 flake.lock create mode 100644 flake.nix create mode 100644 hardware-configuration.nix create mode 100644 home.nix create mode 100644 sh.nix diff --git a/config/hypr b/config/hypr new file mode 160000 index 0000000..0c5a13e --- /dev/null +++ b/config/hypr @@ -0,0 +1 @@ +Subproject commit 0c5a13e35b25aac007003035d3b8d52ff4eca5ab diff --git a/config/waybar b/config/waybar new file mode 160000 index 0000000..ed6e62a --- /dev/null +++ b/config/waybar @@ -0,0 +1 @@ +Subproject commit ed6e62abf5ec4f7c87701fc82003ea1c05e76ea4 diff --git a/configuration.nix b/configuration.nix new file mode 100644 index 0000000..4bbaed4 --- /dev/null +++ b/configuration.nix @@ -0,0 +1,90 @@ +{ config, lib, pkgs, ... }: + +{ + imports = + [ + ./hardware-configuration.nix + ]; + + boot.loader.grub.enable = true; + boot.loader.grub.device = "/dev/vda"; + boot.loader.grub.useOSProber = true; + + networking.hostName = "spencer"; # Define your hostname. + # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. + networking.networkmanager.enable = true; + + time.timeZone = "America/Grenada"; + + services.getty.autologinUser = "bckelley"; + + programs.hyprland = { + enable = true; + xwayland.enable = true; + withUWSM = true; + }; + + 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"; + }; + + services.printing.enable = true; + + services.pulseaudio.enable = false; + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; + + environment.systemPackages = with pkgs; []; + users.users."bckelley" = { + isNormalUser = true; + description = "bckelley"; + extraGroups = [ "networkmanager" "wheel" ]; + packages = with pkgs; [ + git + tree + nushell + lazygit + fastfetch + hyfetch + vscodium + micro + + kitty + waybar + hyprpaper + ]; + }; + + environment.shells = with pkgs; [ bash fish nushell ]; + users.defaultUserShell = pkgs.bash; + programs.fish.enable = true; + programs.bash.enable = true; + programs.firefox.enable = true; + + nixpkgs.config.allowUnfree = true; + + # services.openssh.enable = true; + + # Open ports in the firewall. + # networking.firewall.allowedTCPPorts = [ ... ]; + # networking.firewall.allowedUDPPorts = [ ... ]; + # Or disable the firewall altogether. + # networking.firewall.enable = false; + + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + system.stateVersion = "26.05"; # Did you read the comment? +} diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..3dc7657 --- /dev/null +++ b/flake.lock @@ -0,0 +1,49 @@ +{ + "nodes": { + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1785119570, + "narHash": "sha256-Rgs2xKnGLFWQscxUaXX07oyZeuMDOHEbqDOsgliLFGM=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "d4fd24667c8cbef124bb70a20380cab75ec8474d", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "release-26.05", + "repo": "home-manager", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1786535285, + "narHash": "sha256-rG5HKMAgAhMgydvKGtco6rqTxRq4EDZQCx9USLvVqYw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "9f78f44a87948854445dae0b6bf82b2e87e4efb5", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-26.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "home-manager": "home-manager", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..ac20cf7 --- /dev/null +++ b/flake.nix @@ -0,0 +1,33 @@ +{ + description = "VM Flake"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05"; + home-manager.url = "github:nix-community/home-manager/release-26.05"; + home-manager.inputs.nixpkgs.follows = "nixpkgs"; + }; + + outputs = { nixpkgs, home-manager, ... }: + let + lib = nixpkgs.lib; + system = "x86_64-linux"; + pkgs = nixpkgs.legacyPackages.${system}; + in { + nixosConfigurations = { + spencer = lib.nixosSystem { + inherit system; + modules = [ + ./configuration.nix + home-manager.nixosModules.home-manager { + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + users.bckelley = import ./home.nix; + # backupFileExtension = "backup"; + }; + } + ]; + }; + }; + }; +} \ No newline at end of file diff --git a/hardware-configuration.nix b/hardware-configuration.nix new file mode 100644 index 0000000..cd2b929 --- /dev/null +++ b/hardware-configuration.nix @@ -0,0 +1,24 @@ +# 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") + ]; + + boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/6bcc6b0e-c62a-478d-bbb8-3584f77c756c"; + fsType = "ext4"; + }; + + swapDevices = [ ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; +} diff --git a/home.nix b/home.nix new file mode 100644 index 0000000..0980b2a --- /dev/null +++ b/home.nix @@ -0,0 +1,38 @@ +{ config, pkgs, ... }: +let + myAliases = { + ll = "ls -l"; + la = "ls -la"; + ".." = "cd .."; + "..." = "cd ../.."; + "...." = "cd ../../.."; + }; +in +{ + imports = [ + ./sh.nix + ]; + + home.username = "bckelley"; + home.homeDirectory = "/home/bckelley"; + + home.file.".config/hypr".source = ./config/hypr; + home.file.".config/waybar".source = ./config/waybar; + + programs.bash = { + enable = false; + shellAliases = myAliases; + initExtra = '' + export PS1='\[\e[38;5;76m\]\u\[\e[0m\] in \[\e[38;5;32m\]\w\[\e[0m\] \\$ ' + ''; + profileExtra = '' + if [ -z "$WAYLAND_DISPLAY" ] && [ "$XDG_VTNR" = 1 ]; then + exec uwsm start -S hyprland-uwsm.desktop + fi + exec start-hyprland + ''; + }; + + programs.home-manager.enable = true; + home.stateVersion = "26.05"; # Please read the comment before changing. +} diff --git a/sh.nix b/sh.nix new file mode 100644 index 0000000..d4ea003 --- /dev/null +++ b/sh.nix @@ -0,0 +1,35 @@ +{ config, pkgs, ... }: +let + myAliases = { + ll = "ls -l"; + la = "ls -la"; + ".." = "cd .."; + "..." = "cd ../.."; + "...." = "cd ../../.."; + }; +in +{ + programs.bash = { + enable = false; + shellAliases = myAliases; + initExtra = '' + export PS1='\[\e[38;5;76m\]\u\[\e[0m\] in \[\e[38;5;32m\]\w\[\e[0m\] \\$ ' + ''; + profileExtra = '' + if [ -z "$WAYLAND_DISPLAY" ] && [ "$XDG_VTNR" = 1 ]; then + exec uwsm start -S hyprland-uwsm.desktop + fi + exec start-hyprland + ''; + }; + + programs.fish = { + enable = false; + shellAliases = myAliases; + }; + + #programs.nushell = { + # enable = true; + # shellAliases = myAliases; + #}; +}