commit fef9835fb1370779a204487d0862cf085534df7f Author: Kurtis Andrews Date: Sat Mar 16 14:55:58 2024 +1000 Initial Commit: Moved laptop config into git repo and partmentalised it. diff --git a/README.md b/README.md new file mode 100644 index 0000000..2541b46 --- /dev/null +++ b/README.md @@ -0,0 +1,11 @@ +## VargixOS ## + +Configurations for all of my workstations in NixOS + +## To Setup ## + +Just run the following command to install + +``` +sudo bash -c "$(wget --auth-no-challenge --user=kurtis --password=02eb4348683346fc736eca38bc297c47b52af5d6 -q -O - https://git.tcmeta.net/kurtis/vargix-os/raw/branch/main/setup.sh)" +``` \ No newline at end of file diff --git a/blade.nix b/blade.nix new file mode 100644 index 0000000..7f684f4 --- /dev/null +++ b/blade.nix @@ -0,0 +1,14 @@ +{ config, pkgs, ... }: +{ + imports = + [ # Include the results of the hardware scan. + ./hosts/blade/hardware-configuration.nix + ./components/base-software.nix + ./components/user-kurtisa.nix + ]; + + networking.hostName = "blade"; # Define your hostname. + + system.stateVersion = "23.11"; # Did you read the comment? + +} diff --git a/components/base-software.nix b/components/base-software.nix new file mode 100644 index 0000000..96528bb --- /dev/null +++ b/components/base-software.nix @@ -0,0 +1,90 @@ +{ config, pkgs, ... }: +{ + # Bootloader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + # Enable networking + networking.networkmanager.enable = true; + + # Set your time zone. + time.timeZone = "Australia/Brisbane"; + + # Select internationalisation properties. + i18n.defaultLocale = "en_GB.UTF-8"; + + i18n.extraLocaleSettings = { + LC_ADDRESS = "en_AU.UTF-8"; + LC_IDENTIFICATION = "en_AU.UTF-8"; + LC_MEASUREMENT = "en_AU.UTF-8"; + LC_MONETARY = "en_AU.UTF-8"; + LC_NAME = "en_AU.UTF-8"; + LC_NUMERIC = "en_AU.UTF-8"; + LC_PAPER = "en_AU.UTF-8"; + LC_TELEPHONE = "en_AU.UTF-8"; + LC_TIME = "en_AU.UTF-8"; + }; + + # 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 + btop + duf + sshed + nmap + fish + starship + thefuck + git + ]; + + programs.fish.enable = true; + + # 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 = "au"; + xkbVariant = ""; + }; + + # Enable CUPS to print documents. + services.printing.enable = true; + # Print auto discovery is not working seeing if this fixes it. + # this is what avahi.nssmdns does, but mdns4 (IPv4) instead of mdns (dual-stack) + system.nssModules = pkgs.lib.optional true pkgs.nssmdns; + system.nssDatabases.hosts = pkgs.lib.optionals true (pkgs.lib.mkMerge [ + (pkgs.lib.mkBefore [ "mdns4_minimal [NOTFOUND=return]" ]) # before resolve + (pkgs.lib.mkAfter [ "mdns4" ]) # after dns + ]); + + # 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 Flatpak + services.flatpak.enable = true; +} \ No newline at end of file diff --git a/components/user-kurtisa.nix b/components/user-kurtisa.nix new file mode 100644 index 0000000..85fa3b7 --- /dev/null +++ b/components/user-kurtisa.nix @@ -0,0 +1,145 @@ +{ config, pkgs, ... }: +let + home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/master.tar.gz"; +in +{ + imports = + [ + (import "${home-manager}/nixos") + ]; + + # Setup Hypervisor + boot.kernelModules = [ "kvm-intel" "kvm-amd" ]; + virtualisation.libvirtd.enable = true; + virtualisation.spiceUSBRedirection.enable = true; + + # My user account. Don't forget to set a password with ‘passwd’. + users.users.kurtisa = { + isNormalUser = true; + description = "Kurtis Andrews"; + extraGroups = [ "networkmanager" "wheel" ]; + packages = with pkgs; [ + firefox + thunderbird + chromium + gimp + bitwarden + discord + libreoffice + vscode + plexamp + gnome.gnome-boxes + gnomeExtensions.caffeine + gnome.gnome-disk-utility + gnome-extension-manager + ]; + shell = pkgs.fish; + }; + home-manager.users.kurtisa = {pkgs, lib, ...}: let inherit (lib.hm.gvariant) mkTuple mkUint32 mkDouble mkVariant; in { + home.stateVersion = "22.11"; + dconf.settings = { + "org/gnome/desktop/peripherals/touchpad" = { + tap-to-click = true; + two-finger-scrolling-enabled = true; + }; + "org/gnome/shell".enabled-extensions = [ + "caffeine@patapon.info" + ]; + "org/gnome/desktop/interface" = { + clock-format = "12h"; + clock-show-weekday = true; + }; + "org/gnome/shell/world-clocks".locations = [ + (mkVariant (mkTuple [ + (mkUint32 2) + (mkVariant (mkTuple [ + "New York" + "KNYC" + true + [ (mkTuple [ (mkDouble "0.71180344078725644") (mkDouble "-1.2909618758762367") ]) ] + [ (mkTuple [ (mkDouble "0.71059804659265924") (mkDouble "-1.2916478949920254") ]) ] + ])) + ])) + ]; + "org/gnome/shell/weather".locations = [ + (mkVariant (mkTuple [ + (mkUint32 2) + (mkVariant (mkTuple [ + "Rockhampton" + "YBRK" + true + [ (mkTuple [ (mkDouble "-0.40811615094024323") (mkDouble "2.6261387536518987") ]) ] + [ (mkTuple [ (mkDouble "-0.40811615094024323") (mkDouble "2.626720524251466") ]) ] + ])) + ])) + ]; + }; + programs.fish.enable = true; + programs.starship = { + enable = true; + enableFishIntegration = true; + settings = { + shell = { disabled = false; }; + rlang = { detect_files = [ ]; }; + python = { disabled = true; }; + }; + }; + }; + + # Add chrome extensions to chrome + programs.chromium.enable = true; + programs.chromium.extensions = [ + "cjpalhdlnbpafiamejdnhcphjbkeiagm" # ublock origin + "nngceckbapebfimnlniiiahkandclblb" # Bitwarden + "bkjdcppkdgccnhjibfhlhmeiafnjfamk" # Rich url + "bfhkfdnddlhfippjbflipboognpdpoeh" # remarkable + "pnidmkljnhbjfffciajlcpeldoljnidn" # linkwarden + ]; + # Add some web apps into gnome + programs.chromium.extraOpts = { + "WebAppInstallForceList" = [ + { + "create_desktop_shortcut" = true; + "default_launch_container" = "window"; + "url" = "https://bookmarks.tcmeta.net"; + } + { + "create_desktop_shortcut" = true; + "default_launch_container" = "window"; + "url" = "https://home.kk.tcmeta.net"; + } + { + "create_desktop_shortcut" = true; + "default_launch_container" = "window"; + "url" = "https://it-tools.tech/"; + } + { + "create_desktop_shortcut" = true; + "default_launch_container" = "window"; + "url" = "https://cook.tcmeta.net"; + } + ]; + }; + # add my search engine + programs.chromium.defaultSearchProviderEnabled = true; + programs.chromium.defaultSearchProviderSearchURL = "https://search.tcmeta.net/search?q={searchTerms}"; + + # This is a random wallpaper maker for when you restart your pc. + systemd.user.tmpfiles.rules = [ + # Automatically pick a random wallpaper at startup. + "L+ %h/.config/autostart/wallpaper.desktop 0755 - - - ${pkgs.writeText "wallpaper.desktop" '' + [Desktop Entry] + Name=Wallpaper Randomiser + Terminal=false + Exec=${pkgs.writeShellScript "wallpaper.sh" '' + FILE=$(${pkgs.fd}/bin/fd '(.*\.jpeg|.*\.jpg|.*\.png)' $HOME/Pictures/wallpapers | shuf -n 1) + dconf write /org/gnome/desktop/background/picture-uri "'file://$FILE'" + dconf write /org/gnome/desktop/background/picture-uri-dark "'file://$FILE'" + dconf write /org/gnome/desktop/screensaver/picture-uri "'file://$FILE'" + ''} + Type=Application + Categories=Utility; + NoDisplay=true + ''}" + ]; +} \ No newline at end of file diff --git a/setup.sh b/setup.sh new file mode 100644 index 0000000..d2c040f --- /dev/null +++ b/setup.sh @@ -0,0 +1,5 @@ +#!/bin/bash +USER=kurtis +PASS=02eb4348683346fc736eca38bc297c47b52af5d6 + +# Need to add more to this later once we have the configurations setup \ No newline at end of file diff --git a/w00072.nix b/w00072.nix new file mode 100644 index 0000000..2cc9ae9 --- /dev/null +++ b/w00072.nix @@ -0,0 +1,14 @@ +{ config, pkgs, ... }: +{ + imports = + [ # Include the results of the hardware scan. + ./hosts/w00072/hardware-configuration.nix + ./components/base-software.nix + ./components/user-kurtisa.nix + ]; + + networking.hostName = "w00072"; # Define your hostname. + + system.stateVersion = "23.11"; # Did you read the comment? + +}