diff --git a/flake.nix b/flake.nix index b8c07ca..ee2ed99 100644 --- a/flake.nix +++ b/flake.nix @@ -66,15 +66,14 @@ in { # nixos-rebuild switch --flake .#hostname nixosConfigurations = { - # PCs and Laptops - firefly = mkNix [ ./hosts/firefly/system ]; - shuttleworth = mkNix [ ./hosts/shuttleworth/system ]; - lacros = mkNix [ ./hosts/lacros/system ]; - redmond = mkNix [ ./hosts/redmond/system ]; + firefly = mkNix [ ./hosts/firefly/system ]; # Main Desktop + shuttleworth = mkNix [ ./hosts/shuttleworth/system ]; # Pinebook Pro + lacros = mkNix [ ./hosts/lacros/system ]; # Dell Chromebook + redmond = mkNix [ ./hosts/redmond/system ]; # Lenovo Laptop + treefruit = mkNix [ ./hosts/treefruit/system ]; # Macbook 14,1 - # Servers - cyberspark = mkNix [ ./hosts/cyberspark/system ]; - bomberman = mkNix [ ./hosts/bomberman/system ]; + cyberspark = mkNix [ ./hosts/cyberspark/system ]; # Dell Optiplex 7010 + bomberman = mkNix [ ./hosts/bomberman/system ]; # Oracle ARM }; # home-manager switch --flake .#username@hostname @@ -83,6 +82,7 @@ "jimbo@shuttleworth" = mkHome [ ./hosts/shuttleworth/home ] nixpkgs.legacyPackages.aarch64-linux; "jimbo@lacros" = mkHome [ ./hosts/lacros/home ] nixpkgs.legacyPackages.x86_64-linux; "jimbo@redmond" = mkHome [ ./hosts/redmond/home ] nixpkgs.legacyPackages.x86_64-linux; + "jimbo@treefruit" = mkHome [ ./hosts/treefruit/home ] nixpkgs.legacyPackages.x86_64-linux; "jimbo@cyberspark" = mkHome [ ./hosts/cyberspark/home ] nixpkgs.legacyPackages.x86_64-linux; "jimbo@bomberman" = mkHome [ ./hosts/bomberman/home ] nixpkgs.legacyPackages.aarch64-linux; diff --git a/hosts/treefruit/home/default.nix b/hosts/treefruit/home/default.nix new file mode 100644 index 0000000..769a875 --- /dev/null +++ b/hosts/treefruit/home/default.nix @@ -0,0 +1,25 @@ +{ config, nur, ... }: +{ + imports = [ + # Apps and programs + ../../../modules/home + ../../../modules/home/users + ../../../modules/home/files + ../../../modules/home/settings + ../../../modules/home/programs + ../../../modules/home/programs/misc/production + ../../../modules/home/programs/misc/gaming/launchers + ../../../modules/home/programs/misc/gaming/xash3d + ../../../modules/home/programs/misc/remote-desktop + ../../../modules/home/sway + ../../../modules/home/utils + + # Misc + ../../../overlays + ../../../variables + ../../../variables/look/colors/orange + + # Imports + nur.nixosModules.nur + ]; +} diff --git a/hosts/treefruit/id_ed25519.pub b/hosts/treefruit/id_ed25519.pub new file mode 100644 index 0000000..089969c --- /dev/null +++ b/hosts/treefruit/id_ed25519.pub @@ -0,0 +1 @@ +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAzAyY6bLK/pOlijVOZjw3ikdIaOuCC1yQjxL922bON7 jimbo@treefruit diff --git a/hosts/treefruit/system/boot/default.nix b/hosts/treefruit/system/boot/default.nix new file mode 100644 index 0000000..90ff8e8 --- /dev/null +++ b/hosts/treefruit/system/boot/default.nix @@ -0,0 +1,17 @@ +{ pkgs, ... }: +{ + boot = { + kernelPackages = pkgs.linuxPackages_latest; + kernel.sysctl."vm.max_map_count" = 2147483642; + initrd = { + systemd.enable = true; + luks.devices = { + crypt-mmc = { + device = "/dev/disk/by-uuid/5bc11b61-e4dc-465c-b87a-533955cf6177"; + preLVM = true; + allowDiscards = true; + }; + }; + }; + }; +} diff --git a/hosts/treefruit/system/default.nix b/hosts/treefruit/system/default.nix new file mode 100644 index 0000000..db774c6 --- /dev/null +++ b/hosts/treefruit/system/default.nix @@ -0,0 +1,31 @@ +{ config, lib, hardware, ... }: +{ + imports = [ + ./hardware + ./boot + + # Apps and programs + ../../../modules/system + ../../../modules/system/accounts + ../../../modules/system/desktop + ../../../modules/system/programs + ../../../modules/system/services + + # Devices and hardware + ../../../modules/system/devices + ../../../modules/system/devices/boot/systemd + ../../../modules/system/devices/networking/wireless + ../../../modules/system/devices/networking/firewall/pc + ../../../modules/system/devices/networking/wireguard/pc + + # Extras + ../../../overlays + ../../../variables + + # Imports + hardware.nixosModules.apple-macbook-pro-14-1 + ]; + + networking.hostName = "treefruit"; + networking.wireguard.interfaces."${config.ips.wgInt}".ips = [ "${config.ips.wgSpan}.21/24" ]; +} diff --git a/hosts/treefruit/system/hardware/default.nix b/hosts/treefruit/system/hardware/default.nix new file mode 100644 index 0000000..9975bc5 --- /dev/null +++ b/hosts/treefruit/system/hardware/default.nix @@ -0,0 +1,63 @@ +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot = { + kernelModules = [ "kvm-intel" ]; + initrd = { + availableKernelModules = [ "xhci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; + kernelModules = [ "dm-snapshot" ]; + }; + }; + + fileSystems = { + "/" = { + device = "/dev/disk/by-uuid/db67d9e8-2ead-4fe6-8a63-5c9e5071e06e"; + fsType = "btrfs"; + options = [ "subvol=@" ]; + }; + "/home" = { + device = "/dev/disk/by-uuid/db67d9e8-2ead-4fe6-8a63-5c9e5071e06e"; + fsType = "btrfs"; + options = [ "subvol=@home" ]; + }; + "/nix" = { + device = "/dev/disk/by-uuid/db67d9e8-2ead-4fe6-8a63-5c9e5071e06e"; + fsType = "btrfs"; + options = [ "subvol=@nix" ]; + }; + "/var" = { + device = "/dev/disk/by-uuid/db67d9e8-2ead-4fe6-8a63-5c9e5071e06e"; + fsType = "btrfs"; + options = [ "subvol=@var" ]; + }; + "/.snapshots" = { + device = "/dev/disk/by-uuid/db67d9e8-2ead-4fe6-8a63-5c9e5071e06e"; + fsType = "btrfs"; + options = [ "subvol=@snapshots" ]; + }; + "/boot" = { + device = "/dev/disk/by-uuid/7B59-F17A"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + # Remote + "/home/jimbo/JimboNFS" = { + device = "${config.ips.wgSpan}.1:/export/JimboNFS"; + fsType = "nfs4"; + options = [ "x-systemd.automount" "_netdev" "nofail" "noauto" ]; + }; + }; + + swapDevices = [ + { device = "/dev/disk/by-uuid/25b5e281-f1be-49ca-991e-b340fed3e5da"; } + ]; + + networking.useDHCP = lib.mkDefault true; + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/modules/system/accounts/users/jimbo/default.nix b/modules/system/accounts/users/jimbo/default.nix index 967ab0e..8ad47c8 100644 --- a/modules/system/accounts/users/jimbo/default.nix +++ b/modules/system/accounts/users/jimbo/default.nix @@ -10,6 +10,7 @@ (builtins.readFile ../../../../../hosts/shuttleworth/id_ed25519.pub) (builtins.readFile ../../../../../hosts/lacros/id_ed25519.pub) (builtins.readFile ../../../../../hosts/redmond/id_ed25519.pub) + (builtins.readFile ../../../../../hosts/treefruit/id_ed25519.pub) (builtins.readFile ../../../../../hosts/cyberspark/id_ed25519.pub) (builtins.readFile ../../../../../hosts/bomberman/id_ed25519.pub) diff --git a/modules/system/services/pc/keyd/default.nix b/modules/system/services/pc/keyd/default.nix index 2af1288..b71dc61 100644 --- a/modules/system/services/pc/keyd/default.nix +++ b/modules/system/services/pc/keyd/default.nix @@ -7,14 +7,16 @@ settings = { main = { capslock = "overload(control,esc)"; - esc = "capslock"; + leftcontrol = "overload(ctrlmod,noop)"; + + esc = "`"; rightcontrol = "esc"; - leftcontrol = "noop"; left = "noop"; down = "noop"; up = "noop"; right = "noop"; }; + control = { h = "left"; j = "down"; @@ -22,6 +24,22 @@ l = "right"; semicolon = "macro(C-l)"; }; + + ctrlmod = { + backspace = "delete"; + "1" = "f1"; + "2" = "f2"; + "3" = "f3"; + "4" = "f4"; + "5" = "f5"; + "6" = "f6"; + "7" = "f7"; + "8" = "f8"; + "9" = "f9"; + "0" = "f10"; + "-" = "f11"; + "=" = "f12"; + }; }; }; }; diff --git a/variables/secrets/default.nix b/variables/secrets/default.nix deleted file mode 100644 index 0cbd023..0000000 Binary files a/variables/secrets/default.nix and /dev/null differ