diff --git a/flake.lock b/flake.lock index 6290c33..90aa9a3 100644 --- a/flake.lock +++ b/flake.lock @@ -218,6 +218,45 @@ "type": "github" } }, + "home-unstable": { + "inputs": { + "nixpkgs": [ + "unstable" + ] + }, + "locked": { + "lastModified": 1729459288, + "narHash": "sha256-gBOVJv+q6Mx8jGvwX7cE6J8+sZmi1uxpRVsO7WxvVuQ=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "1e27f213d77fc842603628bcf2df6681d7d08f7e", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "jovian": { + "inputs": { + "nix-github-actions": "nix-github-actions", + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1729177642, + "narHash": "sha256-DdKal+ZhB9QD/tnEwFg4cZ4j4YnrkvSljBxnyG+3eE0=", + "owner": "Jovian-Experiments", + "repo": "Jovian-NixOS", + "rev": "bb69165ff372ddbd3228a03513922acd783040e8", + "type": "github" + }, + "original": { + "owner": "Jovian-Experiments", + "repo": "Jovian-NixOS", + "type": "github" + } + }, "lanzaboote": { "inputs": { "crane": "crane", @@ -249,7 +288,7 @@ "inputs": { "blobs": "blobs", "flake-compat": "flake-compat_2", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "nixpkgs-24_05": "nixpkgs-24_05", "utils": "utils" }, @@ -272,7 +311,7 @@ "inputs": { "flake-compat": "flake-compat_3", "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_4" }, "locked": { "lastModified": 1727660955, @@ -288,6 +327,28 @@ "type": "github" } }, + "nix-github-actions": { + "inputs": { + "nixpkgs": [ + "jovian", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1690328911, + "narHash": "sha256-fxtExYk+aGf2YbjeWQ8JY9/n9dwuEt+ma1eUFzF8Jeo=", + "owner": "zhaofengli", + "repo": "nix-github-actions", + "rev": "96df4a39c52f53cb7098b923224d8ce941b64747", + "type": "github" + }, + "original": { + "owner": "zhaofengli", + "ref": "matrix-name", + "repo": "nix-github-actions", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1722221733, @@ -334,6 +395,22 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1728888510, + "narHash": "sha256-nsNdSldaAyu6PE3YUA+YQLqUDJh+gRbBooMMekZJwvI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "a3c0b3b21515f74fd2665903d4ce6bc4dc81c77c", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1717602782, "narHash": "sha256-pL9jeus5QpX5R+9rsp3hhZ+uplVHscNJh8n8VpqscM0=", @@ -348,7 +425,7 @@ "type": "indirect" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { "lastModified": 1715266358, "narHash": "sha256-doPgfj+7FFe9rfzWo1siAV2mVCasW+Bh8I1cToAXEE4=", @@ -364,7 +441,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_5": { "locked": { "lastModified": 1728740863, "narHash": "sha256-u+rxA79a0lyhG+u+oPBRtTDtzz8kvkc9a6SWSt9ekVc=", @@ -426,10 +503,12 @@ "blender-bin": "blender-bin", "hardware": "hardware", "home-manager": "home-manager", + "home-unstable": "home-unstable", + "jovian": "jovian", "lanzaboote": "lanzaboote", "mailserver": "mailserver", "minecraft": "minecraft", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_5", "nur": "nur", "unstable": "unstable" } diff --git a/flake.nix b/flake.nix index 1a52682..c67403b 100644 --- a/flake.nix +++ b/flake.nix @@ -8,8 +8,14 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + home-unstable = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "unstable"; + }; + nur.url = "github:nix-community/NUR"; blender-bin.url = "https://flakehub.com/f/edolstra/blender-bin/1.0.9.tar.gz"; + jovian.url = "github:Jovian-Experiments/Jovian-NixOS"; hardware.url = "github:nixos/nixos-hardware/master"; lanzaboote = { @@ -21,35 +27,45 @@ minecraft.url = "github:Infinidoge/nix-minecraft"; }; - outputs = { self, nixpkgs, unstable, home-manager, nur, blender-bin, hardware, lanzaboote, mailserver, minecraft, ... }: + outputs = { self, nixpkgs, unstable, home-manager, home-unstable, nur, blender-bin, jovian, hardware, lanzaboote, mailserver, minecraft, ... }: let - mkNixos = modules: nixpkgs.lib.nixosSystem { + mkNix = modules: nixpkgs.lib.nixosSystem { inherit modules; - specialArgs = { inherit nixpkgs unstable hardware lanzaboote mailserver minecraft; }; + specialArgs = { inherit unstable jovian hardware lanzaboote mailserver minecraft; }; }; - + mkUnstable = modules: unstable.lib.nixosSystem { + inherit modules; + specialArgs = { inherit unstable jovian hardware lanzaboote mailserver minecraft; }; + }; + mkHome = modules: pkgs: home-manager.lib.homeManagerConfiguration { inherit modules pkgs; extraSpecialArgs = { inherit unstable nur blender-bin; }; }; + mkUnHome = modules: pkgs: home-unstable.lib.homeManagerConfiguration { + inherit modules pkgs; + extraSpecialArgs = { inherit unstable nur blender-bin; }; + }; in { # nixos-rebuild switch --flake .#hostname nixosConfigurations = { # PCs and Laptops - firefly = mkNixos [ ./hosts/firefly/system ]; - shuttleworth = mkNixos [ ./hosts/shuttleworth/system ]; - lacros = mkNixos [ ./hosts/lacros/system ]; - redmond = mkNixos [ ./hosts/redmond/system ]; + firefly = mkNix [ ./hosts/firefly/system ]; + shuttleworth = mkNix [ ./hosts/shuttleworth/system ]; + jupiter = mkUnstable [ ./hosts/jupiter/system ]; + lacros = mkNix [ ./hosts/lacros/system ]; + redmond = mkNix [ ./hosts/redmond/system ]; # Servers - cyberspark = mkNixos [ ./hosts/cyberspark/system ]; - bomberman = mkNixos [ ./hosts/bomberman/system ]; + cyberspark = mkNix [ ./hosts/cyberspark/system ]; + bomberman = mkNix [ ./hosts/bomberman/system ]; }; # home-manager switch --flake .#username@hostname homeConfigurations = { "jimbo@firefly" = mkHome [ ./hosts/firefly/home ] nixpkgs.legacyPackages.x86_64-linux; "jimbo@shuttleworth" = mkHome [ ./hosts/shuttleworth/home ] nixpkgs.legacyPackages.aarch64-linux; + "jimbo@jupiter" = mkUnHome [ ./hosts/jupiter/home ] unstable.legacyPackages.x86_64-linux; "jimbo@lacros" = mkHome [ ./hosts/lacros/home ] nixpkgs.legacyPackages.x86_64-linux; "jimbo@redmond" = mkHome [ ./hosts/redmond/home ] nixpkgs.legacyPackages.x86_64-linux; diff --git a/hosts/firefly/system/default.nix b/hosts/firefly/system/default.nix index 2d5c458..7b72d03 100644 --- a/hosts/firefly/system/default.nix +++ b/hosts/firefly/system/default.nix @@ -11,6 +11,7 @@ ../../../modules/system/programs ../../../modules/system/services ../../../modules/system/services/pc/sunshine + ../../../modules/system/services/pc/school ../../../modules/system/services/pc/virtualization/qemu # Devices and hardware diff --git a/hosts/jupiter/home/default.nix b/hosts/jupiter/home/default.nix new file mode 100644 index 0000000..b8ab842 --- /dev/null +++ b/hosts/jupiter/home/default.nix @@ -0,0 +1,24 @@ +{ 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/remote-desktop + ../../../modules/home/sway + ../../../modules/home/utils + + # Misc + ../../../overlays + ../../../variables + ../../../variables/look/colors/green + + # Imports + nur.nixosModules.nur + ]; +} diff --git a/hosts/jupiter/id_ed25519.pub b/hosts/jupiter/id_ed25519.pub new file mode 100644 index 0000000..9f19d29 --- /dev/null +++ b/hosts/jupiter/id_ed25519.pub @@ -0,0 +1 @@ +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBDp5gYwago24NiWu4Q7XZxy5Me/PL7RQCcM3rQxzWs1 jimbo@nixos diff --git a/hosts/jupiter/system/boot/default.nix b/hosts/jupiter/system/boot/default.nix new file mode 100644 index 0000000..1158544 --- /dev/null +++ b/hosts/jupiter/system/boot/default.nix @@ -0,0 +1,4 @@ +{ pkgs, ... }: +{ + boot.kernel.sysctl."vm.max_map_count" = 2147483642; +} diff --git a/hosts/jupiter/system/default.nix b/hosts/jupiter/system/default.nix new file mode 100644 index 0000000..dca0813 --- /dev/null +++ b/hosts/jupiter/system/default.nix @@ -0,0 +1,34 @@ +{ config, lib, jovian, ... }: +{ + imports = [ + ./hardware + ./boot + + # Apps and programs + ../../../modules/system + ../../../modules/system/accounts + ../../../modules/system/desktop/qt + ../../../modules/system/desktop/wayland + ../../../modules/system/desktop/sway + ../../../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 + jovian.nixosModules.default + ]; + + networking.hostName = "jupiter"; + networking.wireguard.interfaces."${config.ips.wgInt}".ips = [ "${config.ips.wgSpan}.21/24" ]; + system.stateVersion = lib.mkForce "24.11"; +} diff --git a/hosts/jupiter/system/hardware/default.nix b/hosts/jupiter/system/hardware/default.nix new file mode 100644 index 0000000..9617d3b --- /dev/null +++ b/hosts/jupiter/system/hardware/default.nix @@ -0,0 +1,51 @@ +{ config, lib, pkgs, modulesPath, ... }: +{ + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot = { + initrd = { + availableKernelModules = [ + "nvme" + "xhci_pci" + "usbhid" + "usb_storage" + "sd_mod" + "sdhci_pci" + ]; + kernelModules = [ + "kvm-amd" + ]; + }; + }; + + fileSystems = { + "/" = { + device = "/dev/disk/by-uuid/182b2841-88a8-4845-9a29-0c1cdc01102d"; + fsType = "btrfs"; + }; + "/boot" = { + device = "/dev/disk/by-uuid/10A5-1022"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + "/mnt/Mount" = { + device = "/dev/disk/by-uuid/a026c6c7-04a0-4f34-82bb-ea7e4f3e85c5"; + fsType = "ext4"; + }; + "/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/552f8899-a255-4e2b-a22c-e361ceaa527a"; } + ]; + + networking.useDHCP = lib.mkDefault true; + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hosts/redmond/system/default.nix b/hosts/redmond/system/default.nix index 2844205..d1a1cd8 100644 --- a/hosts/redmond/system/default.nix +++ b/hosts/redmond/system/default.nix @@ -1,4 +1,4 @@ -{ config, lib, ... }: +{ config, ... }: { imports = [ ./hardware diff --git a/hosts/redmond/system/hardware/default.nix b/hosts/redmond/system/hardware/default.nix index 4d1b8e3..4b1d568 100644 --- a/hosts/redmond/system/hardware/default.nix +++ b/hosts/redmond/system/hardware/default.nix @@ -1,5 +1,4 @@ { config, lib, pkgs, modulesPath, ... }: - { imports = [ (modulesPath + "/installer/scan/not-detected.nix") diff --git a/modules/system/services/pc/default.nix b/modules/system/services/pc/default.nix index 40cfcb2..8eb0044 100644 --- a/modules/system/services/pc/default.nix +++ b/modules/system/services/pc/default.nix @@ -7,6 +7,5 @@ ./mpd ./networkfs ./polkit - ./school ]; } diff --git a/modules/system/services/pc/jovian/default.nix b/modules/system/services/pc/jovian/default.nix new file mode 100644 index 0000000..002d54b --- /dev/null +++ b/modules/system/services/pc/jovian/default.nix @@ -0,0 +1,14 @@ +{ pkgs, ... }: +{ + jovian = { + steam = { + enable = true; + autoStart = true; + user = "jimbo"; + desktopSession = "sway"; + }; + decky-loader.enable = true; + devices.steamdeck.enable = true; + steamos.useSteamOSConfig = true; + }; +} diff --git a/modules/system/services/pc/school/default.nix b/modules/system/services/pc/school/default.nix index a124cad..e5756bd 100644 --- a/modules/system/services/pc/school/default.nix +++ b/modules/system/services/pc/school/default.nix @@ -1,4 +1,6 @@ { ... }: { - services.globalprotect.enable = true; + imports = [ + ./globalprotect + ]; } diff --git a/modules/system/services/pc/school/globalprotect/default.nix b/modules/system/services/pc/school/globalprotect/default.nix new file mode 100644 index 0000000..a124cad --- /dev/null +++ b/modules/system/services/pc/school/globalprotect/default.nix @@ -0,0 +1,4 @@ +{ ... }: +{ + services.globalprotect.enable = true; +} diff --git a/overlays/default.nix b/overlays/default.nix index 425a195..69ca9f8 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -1,8 +1,8 @@ -{ unstable, ... }: +{ pkgs, ... }: { - nixpkgs.overlays = [ - (import ./unstable { inherit unstable; }) - (final: _prev: import ./packages { pkgs = final; }) - (import ./mpv) + imports = [ + ./unstable + ./packages + ./mpv ]; } diff --git a/overlays/mpv/default.nix b/overlays/mpv/default.nix index 3ffc3b0..a98eb9c 100644 --- a/overlays/mpv/default.nix +++ b/overlays/mpv/default.nix @@ -1,9 +1,14 @@ -(self: super: { - mpv = super.mpv.override { - scripts = with self.mpvScripts; [ - mpris - sponsorblock - thumbnail - ]; - }; -}) +{ unstable, ... }: +{ + nixpkgs.overlays = [ + (self: super: { + mpv = super.mpv.override { + scripts = with self.mpvScripts; [ + mpris + sponsorblock + thumbnail + ]; + }; + }) + ]; +} diff --git a/overlays/packages/default.nix b/overlays/packages/default.nix index ba05e60..a9e3e72 100644 --- a/overlays/packages/default.nix +++ b/overlays/packages/default.nix @@ -1,5 +1,9 @@ { pkgs, ... }: { - xash3d = pkgs.callPackage ./xash3d {}; - hlsdk = pkgs.callPackage ./hlsdk {}; + nixpkgs.overlays = [ + (final: _prev: { + xash3d = pkgs.callPackage ./xash3d {}; + hlsdk = pkgs.callPackage ./hlsdk {}; + }) + ]; } diff --git a/overlays/unstable/default.nix b/overlays/unstable/default.nix index abdcf62..cdd4a8c 100644 --- a/overlays/unstable/default.nix +++ b/overlays/unstable/default.nix @@ -1,7 +1,11 @@ { unstable, ... }: -(final: prev: { - unstable = import unstable { - system = final.system; - config.allowUnfree = true; - }; -}) +{ + nixpkgs.overlays = [ + (final: prev: { + unstable = import unstable { + system = final.system; + config.allowUnfree = true; + }; + }) + ]; +}