From b1282db7ae0222941880e50ad7502784406ff94c Mon Sep 17 00:00:00 2001 From: Kurtis Date: Tue, 26 Mar 2024 22:14:34 +1000 Subject: [PATCH 01/14] update added dynamic menu for configuration --- vargix-os | 47 ++++++++++++++++++----------------------------- 1 file changed, 18 insertions(+), 29 deletions(-) diff --git a/vargix-os b/vargix-os index 671b6b6..2d62309 100755 --- a/vargix-os +++ b/vargix-os @@ -1,27 +1,31 @@ #!/usr/bin/env bash +scriptDIR=$(dirname $0) hostname=$(hostname -f) + # Okay need to get the hostname and see if this exists in our list of items. start () { if [ $hostname == "nixos" ] then # no hostname defined. need to generate menu. - menuItems=( - "1. blade " - "2. W00072" - "3. W00149" - "Q. Exit " - ) - menuActions=( - setupBlade - setupW00072 - setupW00149 - quitApp - ) + menuIndex=1 + menuItems=() + menuActions=() + for entry in "$scriptDIR"/*.nix + do + entry=${entry##*/} + entry=${entry%.nix} + menuItems+=("$menuIndex. $entry") + menuActions+=(build_$entry) + eval "build_${entry}() { hostname=${entry}; doBuild; }" + ((menuIndex+=1)) + done + menuItems+=("Q. Exit") + menuActions+=(quitApp) menuTitle=" New nixos instance detected. Please select a build to deploy." else # Need to check if the nix file exists - if [[ ! -f "$hostname.nix" ]] + if [[ ! -f $scriptDIR/$hostname.nix ]] then menuItems=( "Q. Exit" @@ -52,24 +56,9 @@ start () { menuLoop } -setupBlade () { - hostname="blade" - doBuild -} - -setupW00072 () { - hostname="w00072" - doBuild -} - -setupW00149 () { - hostname="w00149" - doBuild -} - doBuild () { logo - sudo nixos-rebuild switch -I nixos-config=./$hostname.nix + sudo nixos-rebuild switch -I nixos-config=$scriptDIR/$hostname.nix return 0 } From c5d1d888e5c79fb66172970d403019eaf4a86f75 Mon Sep 17 00:00:00 2001 From: Kurtis Date: Tue, 9 Apr 2024 09:11:48 +1000 Subject: [PATCH 02/14] Added base server Added GSConnect to user --- components/base-server.nix | 49 +++++++++++++++++++++++++++++++++++++ components/user-kurtisa.nix | 4 +++ 2 files changed, 53 insertions(+) create mode 100644 components/base-server.nix diff --git a/components/base-server.nix b/components/base-server.nix new file mode 100644 index 0000000..5a8fdca --- /dev/null +++ b/components/base-server.nix @@ -0,0 +1,49 @@ +{ 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 + stow + ]; + + programs.fish.enable = true; + +} \ No newline at end of file diff --git a/components/user-kurtisa.nix b/components/user-kurtisa.nix index 4353e2e..75255dc 100644 --- a/components/user-kurtisa.nix +++ b/components/user-kurtisa.nix @@ -80,6 +80,10 @@ in vargix-os = "~/.vargix-os/vargix-os"; }; }; + programs.kdeconnect = { + enable = true; + package = pkgs.gnomeExtensions.gsconnect; + } programs.thefuck.enable = true; programs.starship = { enable = true; From 02648203c622930938cdef4717b6f3b62b531bbb Mon Sep 17 00:00:00 2001 From: Kurtis Date: Wed, 10 Apr 2024 09:08:22 +1000 Subject: [PATCH 03/14] Moved config to local one Added rock64 configuration modified configs for a desktop and server version --- blade.nix | 9 ++- components/base-server.nix | 12 +--- components/base-software.nix | 7 -- hosts/blade/hardware-configuration.nix | 92 ------------------------- hosts/w00149/hardware-configuration.nix | 40 ----------- rock64.nix | 57 +++++++++++++++ w00072.nix | 9 ++- w00149.nix | 9 ++- 8 files changed, 84 insertions(+), 151 deletions(-) delete mode 100644 hosts/blade/hardware-configuration.nix delete mode 100644 hosts/w00149/hardware-configuration.nix create mode 100644 rock64.nix diff --git a/blade.nix b/blade.nix index 7f684f4..b371e33 100644 --- a/blade.nix +++ b/blade.nix @@ -2,11 +2,18 @@ { imports = [ # Include the results of the hardware scan. - ./hosts/blade/hardware-configuration.nix + /etc/nixos/hardware-configuration.nix ./components/base-software.nix ./components/user-kurtisa.nix ]; + # Bootloader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + # Enable networking + networking.networkmanager.enable = true; + networking.hostName = "blade"; # Define your hostname. system.stateVersion = "23.11"; # Did you read the comment? diff --git a/components/base-server.nix b/components/base-server.nix index 5a8fdca..d15332d 100644 --- a/components/base-server.nix +++ b/components/base-server.nix @@ -1,12 +1,5 @@ { 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"; @@ -29,9 +22,7 @@ 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 @@ -44,6 +35,9 @@ stow ]; + # Enable the OpenSSH daemon. + services.openssh.enable = true; + programs.fish.enable = true; } \ No newline at end of file diff --git a/components/base-software.nix b/components/base-software.nix index 20cae6c..8f8bd6f 100644 --- a/components/base-software.nix +++ b/components/base-software.nix @@ -1,12 +1,5 @@ { 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"; diff --git a/hosts/blade/hardware-configuration.nix b/hosts/blade/hardware-configuration.nix deleted file mode 100644 index 4b32da8..0000000 --- a/hosts/blade/hardware-configuration.nix +++ /dev/null @@ -1,92 +0,0 @@ -# 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 = [ "xhci_pci" "nvme" "uas" "usbhid" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = - { device = "/dev/disk/by-uuid/6270d5e5-c300-4fb5-9752-93bca7d8cb4b"; - fsType = "ext4"; - }; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/5184-28C3"; - fsType = "vfat"; - }; - - swapDevices = - [ { device = "/dev/disk/by-uuid/156b072b-2d78-40f7-a4ae-9ff8b88b7003"; } - ]; - - # 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.wlo1.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; - # Nvidia Drivers - # Enable OpenGL - hardware.opengl = { - enable = true; - driSupport = true; - driSupport32Bit = true; - }; - - # Load nvidia driver for Xorg and Wayland - services.xserver.videoDrivers = ["nvidia"]; # or "nvidiaLegacy470 etc. - - hardware.nvidia = { - - # Modesetting is required. - modesetting.enable = true; - - # Nvidia power management. Experimental, and can cause sleep/suspend to fail. - # Enable this if you have graphical corruption issues or application crashes after waking - # up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead - # of just the bare essentials. - powerManagement.enable = false; - - # Fine-grained power management. Turns off GPU when not in use. - # Experimental and only works on modern Nvidia GPUs (Turing or newer). - powerManagement.finegrained = false; - - # Use the NVidia open source kernel module (not to be confused with the - # independent third-party "nouveau" open source driver). - # Support is limited to the Turing and later architectures. Full list of - # supported GPUs is at: - # https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus - # Only available from driver 515.43.04+ - # Currently alpha-quality/buggy, so false is currently the recommended setting. - open = false; - - # Enable the Nvidia settings menu, - # accessible via `nvidia-settings`. - nvidiaSettings = true; - - # Optionally, you may need to select the appropriate driver version for your specific GPU. - package = config.boot.kernelPackages.nvidiaPackages.stable; - }; - - # laptop hybrid video settings settings - hardware.nvidia.prime = { - offload = { - enable = true; - enableOffloadCmd = true; - }; - # Make sure to use the correct Bus ID values for your system! - intelBusId = "PCI:0:2:0"; - nvidiaBusId = "PCI:2:0:0"; - }; -} diff --git a/hosts/w00149/hardware-configuration.nix b/hosts/w00149/hardware-configuration.nix deleted file mode 100644 index 3130bda..0000000 --- a/hosts/w00149/hardware-configuration.nix +++ /dev/null @@ -1,40 +0,0 @@ -# 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 = [ "xhci_pci" "ahci" "nvme" "uas" "usbhid" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = - { device = "/dev/disk/by-uuid/fcc18df6-fd6c-46b6-ba9b-68b35dc7e2e9"; - fsType = "ext4"; - }; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/A3AC-7B6E"; - fsType = "vfat"; - }; - - swapDevices = - [ { device = "/dev/disk/by-uuid/da9cffb9-6af8-4591-8c0c-eeb059144813"; } - ]; - - # 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.eno1.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -} diff --git a/rock64.nix b/rock64.nix new file mode 100644 index 0000000..cb64a00 --- /dev/null +++ b/rock64.nix @@ -0,0 +1,57 @@ +{ config, pkgs, ... }: + +{ + imports = + [ # Include the results of the hardware scan. + /etc/nixos/hardware-configuration.nix + ./components/base-server.nix + ]; + + # Use the extlinux boot loader. (NixOS wants to enable GRUB by default) + boot.loader.grub.enable = false; + # Enables the generation of /boot/extlinux/extlinux.conf + boot.loader.generic-extlinux-compatible.enable = true; + + networking.hostName = "rock64"; # Define your hostname. + + # Set your time zone. + time.timeZone = "Australia/Brisbane"; + + users.users.kurtisa = { + isNormalUser = true; + description = "Kurtis Andrews"; + extraGroups = [ "networkmanager" "wheel" ]; + }; + + # List packages installed in system profile. + environment.systemPackages = with pkgs; [ + netclient + ]; + + # Docker + virtualisation.docker.enable = true; + + #wireguard settings + networking.firewall = { + allowedUDPPorts = [ 51820 ]; # Clients and peers can use the same port, see listenport + }; + networking.wireguard.interfaces = { + wg0 = { + ips = [ "10.138.53.253/32" ]; + listenPort = 51820; + mtu = 1420; + privateKey = "EP5qHEd5XCjnRVAHQSobA8LJhnlBMtVFgNbR75s1eUw="; + + peers = [ + { + publicKey = "y5qD7a3Pf2Hmt/kje6zGObPBkYbg4V2Ugxzml1B32xw="; + allowedIPs = [ "10.138.53.0/24" "10.7.0.0/24" "10.14.88.0/24" "10.13.50.0/24" ]; + endpoint = "139.99.171.43:51821"; + persistentKeepalive = 25; + } + ]; + }; + }; + system.stateVersion = "23.05"; # Did you read the comment? + +} diff --git a/w00072.nix b/w00072.nix index 2cc9ae9..859af52 100644 --- a/w00072.nix +++ b/w00072.nix @@ -2,11 +2,18 @@ { imports = [ # Include the results of the hardware scan. - ./hosts/w00072/hardware-configuration.nix + /etc/nixos/hardware-configuration.nix ./components/base-software.nix ./components/user-kurtisa.nix ]; + # Bootloader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + # Enable networking + networking.networkmanager.enable = true; + networking.hostName = "w00072"; # Define your hostname. system.stateVersion = "23.11"; # Did you read the comment? diff --git a/w00149.nix b/w00149.nix index 6a70a16..551d2ac 100644 --- a/w00149.nix +++ b/w00149.nix @@ -2,11 +2,18 @@ { imports = [ # Include the results of the hardware scan. - ./hosts/w00149/hardware-configuration.nix + /etc/nixos/hardware-configuration.nix ./components/base-software.nix ./components/user-kurtisa.nix ]; + # Bootloader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + # Enable networking + networking.networkmanager.enable = true; + networking.hostName = "w00149"; # Define your hostname. system.stateVersion = "23.11"; # Did you read the comment? From 6e8c206fb1aa100cdd26f255a1568acd3db1d976 Mon Sep 17 00:00:00 2001 From: Kurtis Andrews Date: Tue, 7 May 2024 13:40:44 +1000 Subject: [PATCH 04/14] added docker added docker to user config --- components/user-kurtisa.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/user-kurtisa.nix b/components/user-kurtisa.nix index 75255dc..e404848 100644 --- a/components/user-kurtisa.nix +++ b/components/user-kurtisa.nix @@ -12,12 +12,15 @@ in boot.kernelModules = [ "kvm-intel" "kvm-amd" ]; virtualisation.libvirtd.enable = true; virtualisation.spiceUSBRedirection.enable = true; + + #docker + virtualisation.docker.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" ]; + extraGroups = [ "networkmanager" "wheel" "docker" ]; packages = with pkgs; [ firefox thunderbird From 855dcae358281dd848f924efbe8e128f001e2939 Mon Sep 17 00:00:00 2001 From: Kurtis Andrews Date: Tue, 7 May 2024 13:48:25 +1000 Subject: [PATCH 05/14] syntax syntax issue on config. --- components/user-kurtisa.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/user-kurtisa.nix b/components/user-kurtisa.nix index e404848..5d47de8 100644 --- a/components/user-kurtisa.nix +++ b/components/user-kurtisa.nix @@ -86,7 +86,7 @@ in programs.kdeconnect = { enable = true; package = pkgs.gnomeExtensions.gsconnect; - } + }; programs.thefuck.enable = true; programs.starship = { enable = true; From 8ea89f3b1b1ba6ddd5f2d1eb0d5c9342a7d935f1 Mon Sep 17 00:00:00 2001 From: Kurtis Andrews Date: Tue, 7 May 2024 13:50:20 +1000 Subject: [PATCH 06/14] Update components/user-kurtisa.nix --- components/user-kurtisa.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/user-kurtisa.nix b/components/user-kurtisa.nix index 5d47de8..1fd9d25 100644 --- a/components/user-kurtisa.nix +++ b/components/user-kurtisa.nix @@ -34,7 +34,6 @@ in gnome.gnome-boxes gnomeExtensions.caffeine gnome.gnome-disk-utility - gnome-extension-manager ]; shell = pkgs.fish; }; @@ -83,7 +82,7 @@ in vargix-os = "~/.vargix-os/vargix-os"; }; }; - programs.kdeconnect = { + programs.gsconnect = { enable = true; package = pkgs.gnomeExtensions.gsconnect; }; From 8d8a24fda20b794dd4e3ea6d08ff5694088eb367 Mon Sep 17 00:00:00 2001 From: Kurtis Andrews Date: Tue, 7 May 2024 13:51:44 +1000 Subject: [PATCH 07/14] Update components/user-kurtisa.nix --- components/user-kurtisa.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/components/user-kurtisa.nix b/components/user-kurtisa.nix index 1fd9d25..7a135be 100644 --- a/components/user-kurtisa.nix +++ b/components/user-kurtisa.nix @@ -16,6 +16,12 @@ in #docker virtualisation.docker.enable = true; + #GS CONNECT + programs.kdeconnect = { + enable = true; + package = pkgs.gnomeExtensions.gsconnect; + }; + # My user account. Don't forget to set a password with ‘passwd’. users.users.kurtisa = { isNormalUser = true; @@ -82,10 +88,6 @@ in vargix-os = "~/.vargix-os/vargix-os"; }; }; - programs.gsconnect = { - enable = true; - package = pkgs.gnomeExtensions.gsconnect; - }; programs.thefuck.enable = true; programs.starship = { enable = true; From 6b85edb1d07c0b058fa1e2a936357dcb8be61397 Mon Sep 17 00:00:00 2001 From: Kurtis Date: Tue, 7 May 2024 23:12:32 +1000 Subject: [PATCH 08/14] Updated Settings --- components/user-kurtisa.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/user-kurtisa.nix b/components/user-kurtisa.nix index 7a135be..a84bc1f 100644 --- a/components/user-kurtisa.nix +++ b/components/user-kurtisa.nix @@ -50,8 +50,12 @@ in tap-to-click = true; two-finger-scrolling-enabled = true; }; + "/org/gnome/mutter" = { + edge-tiling = true; + }; "org/gnome/shell".enabled-extensions = [ "caffeine@patapon.info" + "gsconnect@andyholmes.github.io" ]; "org/gnome/desktop/interface" = { clock-format = "12h"; From c89c1f283029b06e0c423845490e9bf26a463d53 Mon Sep 17 00:00:00 2001 From: Kurtis Date: Wed, 8 May 2024 19:49:37 +1000 Subject: [PATCH 09/14] fixed syntax fixed / in home manager --- components/user-kurtisa.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/user-kurtisa.nix b/components/user-kurtisa.nix index a84bc1f..67e7bad 100644 --- a/components/user-kurtisa.nix +++ b/components/user-kurtisa.nix @@ -50,7 +50,7 @@ in tap-to-click = true; two-finger-scrolling-enabled = true; }; - "/org/gnome/mutter" = { + "org/gnome/mutter" = { edge-tiling = true; }; "org/gnome/shell".enabled-extensions = [ From c526375b22e352f00a7e18b0c35d50c631d01c32 Mon Sep 17 00:00:00 2001 From: Kurtis Date: Wed, 8 May 2024 20:00:04 +1000 Subject: [PATCH 10/14] Update moved config update to script --- update-nix.sh | 9 --------- vargix-os | 14 ++++++++++++-- 2 files changed, 12 insertions(+), 11 deletions(-) delete mode 100755 update-nix.sh diff --git a/update-nix.sh b/update-nix.sh deleted file mode 100755 index 5aec184..0000000 --- a/update-nix.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash - -# This will update the repo - -echo "Updating Configs" - -git pull - -echo "Done" \ No newline at end of file diff --git a/vargix-os b/vargix-os index 2d62309..cf94571 100755 --- a/vargix-os +++ b/vargix-os @@ -37,12 +37,12 @@ start () { else menuItems=( "1. Perform Rebuild" - "2. Update Build " + "2. Update Configs " "Q. Exit " ) menuActions=( doBuild - updateBuild + updateScript quitApp ) menuTitle=" $hostname was found. Proceed with rebuild?" @@ -59,6 +59,8 @@ start () { doBuild () { logo sudo nixos-rebuild switch -I nixos-config=$scriptDIR/$hostname.nix + echo Finished .. press any key to continue + read -n 1 return 0 } @@ -68,6 +70,14 @@ updateBuild () { return 0 } +updateScript () { + git -C $scriptDIR pull + echo Script pulled you may need to restart vargix-os if theres been an update to it + echo .. press any key to continue + read -n 1 + return 0 +} + quitApp () { return 0 } From ae2737458b6c8f0bb96e7a14ec6b6ebd19f1b564 Mon Sep 17 00:00:00 2001 From: Kurtis Date: Thu, 9 May 2024 10:33:59 +1000 Subject: [PATCH 11/14] Update enabled numlock at boot --- components/base-software.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/components/base-software.nix b/components/base-software.nix index 8f8bd6f..88777f6 100644 --- a/components/base-software.nix +++ b/components/base-software.nix @@ -52,6 +52,19 @@ xkbVariant = ""; }; + # Enable Numlock being turned on at startup + systemd.services.numLockOnTty = { + wantedBy = [ "multi-user.target" ]; + serviceConfig = { + # /run/current-system/sw/bin/setleds -D +num < "$tty"; + ExecStart = lib.mkForce (pkgs.writeShellScript "numLockOnTty" '' + for tty in /dev/tty{1..6}; do + ${pkgs.kbd}/bin/setleds -D +num < "$tty"; + done + ''); + }; + }; + # Enable CUPS to print documents. services.printing.enable = true; # Print auto discovery is not working seeing if this fixes it. From 77fcd7b288b1852b5b9832ba998b2ddb5292cfcd Mon Sep 17 00:00:00 2001 From: Kurtis Date: Sat, 25 May 2024 20:38:47 +1000 Subject: [PATCH 12/14] Update fixed issue with package error --- components/base-software.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/base-software.nix b/components/base-software.nix index 88777f6..f50565b 100644 --- a/components/base-software.nix +++ b/components/base-software.nix @@ -57,7 +57,7 @@ wantedBy = [ "multi-user.target" ]; serviceConfig = { # /run/current-system/sw/bin/setleds -D +num < "$tty"; - ExecStart = lib.mkForce (pkgs.writeShellScript "numLockOnTty" '' + ExecStart = pkgs.lib.mkForce (pkgs.writeShellScript "numLockOnTty" '' for tty in /dev/tty{1..6}; do ${pkgs.kbd}/bin/setleds -D +num < "$tty"; done From 128b61651046893f150698842ae9d5b88133d473 Mon Sep 17 00:00:00 2001 From: Kurtis Date: Sat, 25 May 2024 20:42:32 +1000 Subject: [PATCH 13/14] added update channel flag --- vargix-os | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vargix-os b/vargix-os index cf94571..9a97b1a 100755 --- a/vargix-os +++ b/vargix-os @@ -58,7 +58,7 @@ start () { doBuild () { logo - sudo nixos-rebuild switch -I nixos-config=$scriptDIR/$hostname.nix + sudo nixos-rebuild switch -I nixos-config=$scriptDIR/$hostname.nix --upgrade echo Finished .. press any key to continue read -n 1 return 0 From 4f5bb4f16836f2d6e49668eb1a7b8e123963c2bb Mon Sep 17 00:00:00 2001 From: Kurtis Date: Sat, 25 May 2024 21:17:28 +1000 Subject: [PATCH 14/14] Update added game-serv and updated configs --- components/base-server.nix | 10 ++++++++-- components/base-software.nix | 2 +- game-serv.nix | 27 +++++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 game-serv.nix diff --git a/components/base-server.nix b/components/base-server.nix index d15332d..42b7f5d 100644 --- a/components/base-server.nix +++ b/components/base-server.nix @@ -4,7 +4,7 @@ time.timeZone = "Australia/Brisbane"; # Select internationalisation properties. - i18n.defaultLocale = "en_GB.UTF-8"; + i18n.defaultLocale = "en_AU.UTF-8"; i18n.extraLocaleSettings = { LC_ADDRESS = "en_AU.UTF-8"; @@ -18,6 +18,13 @@ LC_TIME = "en_AU.UTF-8"; }; + # Configure keymap in X11 + services.xserver = { + layout = "au"; + xkbVariant = ""; + }; + + # Allow unfree packages nixpkgs.config.allowUnfree = true; @@ -39,5 +46,4 @@ services.openssh.enable = true; programs.fish.enable = true; - } \ No newline at end of file diff --git a/components/base-software.nix b/components/base-software.nix index f50565b..d1ca797 100644 --- a/components/base-software.nix +++ b/components/base-software.nix @@ -4,7 +4,7 @@ time.timeZone = "Australia/Brisbane"; # Select internationalisation properties. - i18n.defaultLocale = "en_GB.UTF-8"; + i18n.defaultLocale = "en_AU.UTF-8"; i18n.extraLocaleSettings = { LC_ADDRESS = "en_AU.UTF-8"; diff --git a/game-serv.nix b/game-serv.nix new file mode 100644 index 0000000..a9fc531 --- /dev/null +++ b/game-serv.nix @@ -0,0 +1,27 @@ +{ config, pkgs, ... }: + +{ + imports = + [ # Include the results of the hardware scan. + /etc/nixos/hardware-configuration.nix + ./components/base-server.nix + ]; + + # Bootloader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + networking.hostName = "game-serv"; # Define your hostname. + + users.users.kurtisa = { + isNormalUser = true; + description = "Kurtis Andrews"; + extraGroups = [ "networkmanager" "wheel" "docker"]; + shell = pkgs.fish; + }; + + # Docker + virtualisation.docker.enable = true; + + system.stateVersion = "23.11"; # Did you read the comment? +} \ No newline at end of file