diff --git a/README.md b/README.md index 4f94cb4..ca7f2d8 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,14 @@ This holds my .nix files for NixOS These files are for the configuration, software that I use and unstable software that I use, note that some systems like the Pinebook Pro will use a custom configuration file. -- `configuration.nix` : This is the main file for the base system including some applications that I use -- `programs.nix` : This file adds applications like Slack, Discord and virt-manager including turning on the services -- `unstable.nix` : This file has the applications that need to be from unstable to work like ProtonVPN software +- `flake.nix` : This is the main flake for system selection then that includes configuration, hardware-configuration (created during installation of NixOS), home-manager and Disko +- `configuration.nix` : This is the main file for the base system + +## Partition Nix files: (nix-configs/partitions/) + +These files are for the partition layouts that I use. + +- `luks-btrfs-subvolumes.nix` : This is the main layout that I use for pretty much every system that I install NixOS on ## Desktop Nix files: (nix-configs/desktops/) @@ -23,10 +28,13 @@ These files are for the desktops (DE or WM) that I use at times. These files are for the systems themselves such as my Pinebook Pro, Raspberry Pi 4B or HP Omen. +**NOTE:** These are only really used to set the hostname, install the NVIDIA driver (like for thelio-nvidia) and such. + ### x86_64 Nix files: (nix-configs/systems/x86_64/) - `shepard.nix` : This file is for my custom desktop at home. - `garrus.nix` : This file is for my System76 Galago Pro (galp3-b). +- `thelio-nvidia.nix` : This file is for my work Thelio B1. - `sovereign.nix` : This file is for a Linode instance but it could be for other VPS services as well. - `harbinger.nix` : This file is for a Linode instance but it could be for other VPS services as well. @@ -49,7 +57,6 @@ These files are for building software or for spinning something up like CUDA. - `cuda-shell.nix` : This file setups CUDA (currently 11.7). - `system-docs` : This is for building support.system76.com on NixOS for development. -- `COSMIC` : This is for building COSMIC on NixOS, there is no way to actually use it on NixOS though with how systemd works. ## Web Nix files: (nix-configs/web/) @@ -68,7 +75,6 @@ These files are for websites such as LAMP and NGINX. This file is for using with [Home Manager](https://nix-community.github.io/home-manager/index.html#sec-install-standalone). - - `home.nix` : This file is for settings for my user like Git name/email and other settings ### Screenshots diff --git a/configuration.nix b/configuration.nix index 2f9d34b..5d22ffa 100644 --- a/configuration.nix +++ b/configuration.nix @@ -1,15 +1,9 @@ { config, pkgs, ... }: { - # Import other configuration modules - # (hardware-configuration.nix is autogenerated upon installation) - # paths in nix expressions are always relative the file which defines them imports = [ - ./hardware-configuration.nix - "${builtins.fetchTarball "https://github.com/nix-community/disko/archive/master.tar.gz"}/module.nix" - ./disko-config.nix -# ./programs.nix +# ./hardware-configuration.nix ]; # Latest kernel @@ -37,17 +31,6 @@ # Enter keyboard layout services.xserver.layout = "us"; - # Enable Flatpak - xdg = { - portal = { - enable = true; - extraPortals = with pkgs; [ - xdg-desktop-portal-wlr - xdg-desktop-portal-kde - ]; - }; - }; - # Define user accounts users.users.aaronh = { description = "Aaron Honeycutt"; @@ -56,36 +39,6 @@ isNormalUser = true; hashedPassword = "$6$aAcbLtqiqzySifls$jdKMOQjoWITHD/dWNNZVUH/qNc6aoJ7v4zYofi0U7IJSVTbmOfChS3mzaJbp57AodjdPNKPrnrip8Nlh2Qanx."; - packages = with pkgs; [ - neofetch - ]; - }; - - programs.bash = { - shellAliases = { - generations = "sudo nix-env -p /nix/var/nix/profiles/system --list-generations"; - nix-upgrade = "sudo nixos-rebuild switch --upgrade"; - }; - }; - - programs.git = { - lfs.enable = true; - config = { - color = { - ui = "auto"; - }; - color.status = { - added = "green bold"; - changed = "yellow bold"; - untracked = "red bold"; - }; - push = { - autoSetupRemote = "true"; - }; - init = { - defaultBranch = "main"; - }; - }; }; # Allow Unfree @@ -129,7 +82,6 @@ hardware.bluetooth.enable = true; # Enable services - services.flatpak.enable = true; services.fwupd.enable = true; services.printing.enable = true; services.openssh.enable = true; diff --git a/desktops/cosmic.nix b/desktops/cosmic.nix new file mode 100644 index 0000000..9b15a62 --- /dev/null +++ b/desktops/cosmic.nix @@ -0,0 +1,11 @@ +{ config, pkgs, ... }: + +{ + # COSMIC + services.xserver = { + enable = true; + displayManager.gdm.enable = true; + desktopManager.cosmic.enable = true; + }; + +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..1895a5e --- /dev/null +++ b/flake.nix @@ -0,0 +1,105 @@ +{ + description = "Generic System Flake file"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/release-23.11"; + disko = { + url = github:nix-community/disko; + inputs.nixpkgs.follows = "nixpkgs"; + }; + home-manager = { + url = "github:nix-community/home-manager/release-23.11"; + inputs.nixpkgs.follows = "nixpkgs"; # Use system packages list where available + }; + }; + + outputs = { self, nixpkgs, disko, home-manager, ... }@inputs: { + nixosConfigurations = { + "nixos" = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + # Add Disko for disk management + disko.nixosModules.disko + ./disko-config.nix + ./configuration.nix + ./hardware-configuration.nix + ]; + }; + + "dev-one" = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + # Add Disko for disk management + disko.nixosModules.disko + ./disko-config.nix + ./gnome.nix + ./configuration.nix + ./hardware-configuration.nix + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.aaronh = import ./home.nix; + } + ]; + }; + + "thelio-b1" = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + # Add Disko for disk management + disko.nixosModules.disko + ./disko-config.nix + ./gnome.nix + ./thelio-nvidia.nix + ./configuration.nix + ./hardware-configuration.nix + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.aaronh = import ./home.nix; + } + ]; + }; + + "garrus" = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + # Add Disko for disk management + disko.nixosModules.disko + ./disko-config.nix + ./gnome.nix + ./garrus.nix + ./configuration.nix + ./hardware-configuration.nix + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.aaronh = import ./home.nix; + } + ]; + }; + + "vm" = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + # Add Disko for disk management + disko.nixosModules.disko + ./disko-config.nix + ./vm.nix + ./configuration.nix + ./hardware-configuration.nix + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.aaronh = import ./home.nix; + } + ]; + }; + + }; + }; +} diff --git a/flakes/.gitkeep b/flakes/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/flakes/COSMIC/.gitkeep b/flakes/COSMIC/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/flakes/COSMIC/flake.nix b/flakes/COSMIC/flake.nix deleted file mode 100644 index 9581ffc..0000000 --- a/flakes/COSMIC/flake.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ - description = "COSMIC Development Environment"; - - inputs = { - nixpkgs = {url = "github:NixOS/nixpkgs/nixpkgs-unstable";}; - flake-utils = {url = "github:numtide/flake-utils";}; - }; - - outputs = { - self, - nixpkgs, - flake-utils, - }: - flake-utils.lib.eachDefaultSystem (system: let - inherit (nixpkgs.lib) optional; - pkgs = import nixpkgs {inherit system;}; - fhs = pkgs.buildFHSUserEnv { - name = "COSMIC"; - targetPkgs = pkgs: (with pkgs; [ - # There is a lot here, because I am not sure about your system. :) - xorg.libX11 - xorg.libXext - xorg.libxcb - udev - #runScript = "bash -c ./pico8"; - }; - in { - devShell = pkgs.mkShell { - buildInputs = with pkgs; [ - fhs - ]; - shellHook = '' - if [ -e pico8 ] - then - tput setaf 2; echo "Pico-8 binary present. Type 'pico8' to get started."; tput sgr0; - else - tput setaf 3; echo "No Pico-8 binary present. Please download it."; tput sgr0; - echo "You can purchase it here:" - tput setaf 2; echo "https://www.lexaloffle.com/pico-8.php"; tput sgr0; - fi - ''; - }; - }); -} diff --git a/home.nix b/home.nix index 57b98a8..52c1836 100644 --- a/home.nix +++ b/home.nix @@ -14,24 +14,31 @@ # You can update Home Manager without changing this value. See # the Home Manager release notes for a list of state version # changes in each release. - home.stateVersion = "23.05"; + home.stateVersion = "23.11"; - nixpkgs.config.allowUnfree = true; + nixpkgs.config = { + allowUnfree = true; + }; home.packages = with pkgs; [ # GUI - spotify - vscode - + discord + libreoffice-fresh + signal-desktop + system76-keyboard-configurator + tuba + #youtube-music + vscodium + # CLI mdbook - neofetch + freshfetch ]; programs.bash = { enable = true; shellAliases = { - generations = "sudo nix-env -p /nix/var/nix/profiles/system --list-generations"; + nix-generations = "sudo nix-env -p /nix/var/nix/profiles/system --list-generations"; nix-upgrade = "sudo nixos-rebuild switch --upgrade"; }; }; @@ -64,8 +71,26 @@ }; }; }; - - programs.command-not-found.enable = true; + + programs.nix-index = { + enable = true; + enableBashIntegration = true; + }; + + dconf.settings = { + "org/gnome/shell" = { + favorite-apps = [ "nautilus.desktop" "gnome-terminal.desktop" "firefox.desktop" "codium.desktop" "signal-desktop.desktop" ]; + }; + "org/gnome/desktop/peripherals/touchpad" = { + tap-to-click = true; + }; + "org/gnome/desktop/interface" = { + clock-show-seconds = true; + clock-show-weekday = true; + color-scheme = "prefer-dark"; + enable-hot-corners = false; + }; + }; programs.gh.enable = true; diff --git a/shell/COSMIC/.gitkeep b/shell/COSMIC/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/shell/COSMIC/shell.nix b/shell/COSMIC/shell.nix deleted file mode 100644 index 4b594be..0000000 --- a/shell/COSMIC/shell.nix +++ /dev/null @@ -1,35 +0,0 @@ -# Builds now - -{ pkgs ? import {} }: - pkgs.mkShell { - nativeBuildInputs = with pkgs; [ - appstream-glib - cargo - clang - cmake - dbus - desktop-file-utils - egl-wayland - glib - gtk3 - gtk4 - lld - llvm - llvmPackages_15.llvm - libclang - libglvnd - libinput - libpulseaudio - libxkbcommon - mesa - meson - ninja - pipewire - pkg-config - seatd - systemd - ]; - - LIBCLANG_PATH = "${pkgs.llvmPackages_15.libclang.lib}/lib"; - - } diff --git a/systems/flake.nix b/systems/flake.nix index f88658f..9025db0 100644 --- a/systems/flake.nix +++ b/systems/flake.nix @@ -3,9 +3,13 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/release-23.11"; + disko = { + url = github:nix-community/disko; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; - outputs = { self, nixpkgs, ... }@inputs: { + outputs = { self, nixpkgs, disko, ... }@inputs: { nixosConfigurations = { "vm" = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; @@ -13,63 +17,68 @@ # Import the configuration.nix we used before, so that the old configuration file can still take effect. # Note: /etc/nixos/configuration.nix itself is also a Nix Module, so you can import it directly here # ./configuration.nix + disko.nixosModules.disko + ./disko-config.nix + { + _module.args.disks = [ "/dev/vda" ]; + } ./hardware-configuration.nix ({config, pkgs, ...}: { - nix = { - settings.auto-optimise-store = true; - settings.experimental-features = [ "nix-command" "flakes" ]; + nix = { + settings.auto-optimise-store = true; + settings.experimental-features = [ "nix-command" "flakes" ]; - gc = { - automatic = true; - dates = "weekly"; - options = "--delete-older-than 30d"; - }; + gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 30d"; + }; - }; + }; - boot = { - kernelPackages = pkgs.linuxPackages_latest; + boot = { + kernelPackages = pkgs.linuxPackages_latest; - loader = { - systemd-boot.enable = true; - systemd-boot.consoleMode = "0"; - }; + loader = { + systemd-boot.enable = true; + systemd-boot.consoleMode = "0"; + }; - }; + }; - networking = { - hostName = "vm"; + networking = { + hostName = "vm"; + networkmanager.enable = true; + }; - }; - - users.users.aaronh = { - isNormalUser = true; - extraGroups = [ "wheel" "networkmanager" ]; # Enable ‘sudo’ for the user. - packages = with pkgs; [ - cargo - git - git-lfs - ]; - }; - - environment.systemPackages = with pkgs; [ + users.users.aaronh = { + isNormalUser = true; + extraGroups = [ "wheel" "networkmanager" ]; # Enable ‘sudo’ for the user. + packages = with pkgs; [ + cargo git git-lfs - neofetch - tree - wget - ]; - - services.openssh = { - enable = true; - settings.PermitRootLogin = "no"; - }; + ]; + }; - system = { - stateVersion = "23.11"; - autoUpgrade.enable = true; - }; + environment.systemPackages = with pkgs; [ + git + git-lfs + neofetch + tree + wget + ]; + + services.openssh = { + enable = true; + settings.PermitRootLogin = "no"; + }; + + system = { + stateVersion = "23.11"; + autoUpgrade.enable = true; + }; }) ]; }; diff --git a/systems/vm.nix b/systems/vm.nix index c91a0e0..7d9979c 100644 --- a/systems/vm.nix +++ b/systems/vm.nix @@ -1,115 +1,8 @@ { config, pkgs, ... }: { - # Import other configuration modules - # (hardware-configuration.nix is autogenerated upon installation) - # paths in nix expressions are always relative the file which defines them - imports = - [ - ./hardware-configuration.nix - "${builtins.fetchTarball "https://github.com/nix-community/disko/archive/master.tar.gz"}/module.nix" - ./disko-config.nix -# ./programs.nix - ]; - - # Latest kernel - boot.kernelPackages = pkgs.linuxPackages_latest; + # Add kernel parameters for virtual machines boot.kernelParams = [ "vfio-pci.ids=8086:9b41" "qxl" "bochs_drm"]; - boot.loader = { - systemd-boot.enable = true; - systemd-boot.consoleMode = "0"; - }; - - #nix.settings.auto-optimise-store = true; - nix.settings.experimental-features = [ "nix-command" "flakes" ]; - - nix.gc = { - automatic = true; - dates = "weekly"; - options = "--delete-older-than 30d"; - }; - - networking.networkmanager.enable = true; - - # Set your time zone. - time.timeZone = "America/Denver"; - - # Enter keyboard layout - services.xserver.layout = "us"; - - # Define user accounts - users.users.aaronh = { - description = "Aaron Honeycutt"; - home = "/home/aaronh"; - extraGroups = [ "wheel" "networkmanager" "adm"]; - isNormalUser = true; - hashedPassword = "$6$aAcbLtqiqzySifls$jdKMOQjoWITHD/dWNNZVUH/qNc6aoJ7v4zYofi0U7IJSVTbmOfChS3mzaJbp57AodjdPNKPrnrip8Nlh2Qanx."; - - packages = with pkgs; [ - firefox - neofetch - ]; - }; - - # Allow Unfree - nixpkgs.config.allowUnfree = true; - - # Install some packages - environment.systemPackages = - with pkgs; - [ - nix-index - nvd - unzip - wget - xz - ]; - - # Enable/Disable hardware - ## Turn off PulseAudio - hardware.pulseaudio.enable = false; - - # Enable Pipewire - security.rtkit.enable = true; - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - }; - - # Enable Bluetooth - hardware.bluetooth.enable = true; - - services.printing.enable = true; - services.openssh.enable = true; - - services.avahi = { - enable = true; - nssmdns = true; - openFirewall = true; - # Needed for detecting scanners - publish = { - enable = true; - addresses = true; - userServices = true; - }; - }; - - # Scanner support - hardware.sane.enable = true; - hardware.sane.extraBackends = [ pkgs.sane-airscan ]; - services.ipp-usb.enable = true; - - system.activationScripts.diff = { - supportsDryActivation = true; - text = '' - ${pkgs.nvd}/bin/nvd --nix-bin-dir=${pkgs.nix}/bin diff /run/current-system "$systemConfig" - ''; - }; - - # System - system.stateVersion = "23.11"; - system.autoUpgrade.enable = true; + networking.hostName = "vm"; } diff --git a/walls/1920x1080/wallhaven-2y2wg6-1920x1080.png b/walls/1920x1080/wallhaven-2y2wg6-1920x1080.png new file mode 100644 index 0000000..66c74da Binary files /dev/null and b/walls/1920x1080/wallhaven-2y2wg6-1920x1080.png differ diff --git a/walls/3440x1440/wallhaven-2y2wg6-3440x1440.png b/walls/3440x1440/wallhaven-2y2wg6-3440x1440.png new file mode 100644 index 0000000..e1c9a96 Binary files /dev/null and b/walls/3440x1440/wallhaven-2y2wg6-3440x1440.png differ diff --git a/walls/4K/wallhaven-2y2wg6.png b/walls/4K/wallhaven-2y2wg6.png new file mode 100644 index 0000000..a7f07a9 Binary files /dev/null and b/walls/4K/wallhaven-2y2wg6.png differ