From bab94c7f2283cb66ff12d656ff4521621b628040 Mon Sep 17 00:00:00 2001 From: alsaiduq-lab Date: Sun, 29 Jun 2025 20:22:27 -0600 Subject: [PATCH] initial refactor --- flake.lock | 37 +++++++++++++++++++++++--------- flake.nix | 18 ++++++++++++++++ home-manager/modules/ghostty.nix | 31 ++++++++++++++++++++++---- pkgs/default.nix | 2 +- pkgs/rpcs3/default.nix | 2 +- 5 files changed, 74 insertions(+), 16 deletions(-) diff --git a/flake.lock b/flake.lock index eb85f53..93ea5ef 100644 --- a/flake.lock +++ b/flake.lock @@ -47,11 +47,11 @@ ] }, "locked": { - "lastModified": 1750960128, - "narHash": "sha256-Or2VEGOQojQBtt6csiFjbza/2Zwyr+ZiNuvlhsh/+kc=", + "lastModified": 1751163021, + "narHash": "sha256-BZGuvFape+quvsfFm+RJdjABUu/xMWnRNd+mzvfrj30=", "owner": "fufexan", "repo": "nix-gaming", - "rev": "a4bc2115b466e92ab83a773f73f7f1d0d3fa83f0", + "rev": "094da7499257ec96bb1708f76cf221687a9aa498", "type": "github" }, "original": { @@ -62,11 +62,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1750838302, - "narHash": "sha256-aVkL3/yu50oQzi2YuKo0ceiCypVZpZXYd2P2p1FMJM4=", + "lastModified": 1750969886, + "narHash": "sha256-zW/OFnotiz/ndPFdebpo3X0CrbVNf22n4DjN2vxlb58=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "7284e2decc982b81a296ab35aa46e804baaa1cfe", + "rev": "a676066377a2fe7457369dd37c31fd2263b662f4", "type": "github" }, "original": { @@ -96,17 +96,18 @@ "home-manager": "home-manager", "nix-gaming": "nix-gaming", "nixpkgs": "nixpkgs", - "rpcs3_latest": "rpcs3_latest" + "rpcs3_latest": "rpcs3_latest", + "unstable": "unstable" } }, "rpcs3_latest": { "flake": false, "locked": { - "lastModified": 1750881964, - "narHash": "sha256-frn2F3DX8w4ACXhMNCkBLq9XFmdJn/UMkvmW24YJ+iU=", + "lastModified": 1751221912, + "narHash": "sha256-H8u56u8m4crkatMedCQb2I9aREaJ3biz7eBVqredE/Q=", "owner": "RPCS3", "repo": "rpcs3", - "rev": "aa50b0fbb99c04918645a78acd1fcab8a1cf31b2", + "rev": "786ac95dc018bd56874450b48b6cbd2083ef3242", "type": "github" }, "original": { @@ -114,6 +115,22 @@ "repo": "rpcs3", "type": "github" } + }, + "unstable": { + "locked": { + "lastModified": 1751180975, + "narHash": "sha256-BKk4yDiXr4LdF80OTVqYJ53Q74rOcA/82EClXug8xsY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "a48741b083d4f36dd79abd9f760c84da6b4dc0e5", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 0b9a72b..82da2b3 100644 --- a/flake.nix +++ b/flake.nix @@ -3,18 +3,25 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05"; + home-manager = { url = "github:nix-community/home-manager/release-25.05"; inputs.nixpkgs.follows = "nixpkgs"; }; + nix-gaming = { url = "github:fufexan/nix-gaming"; inputs.nixpkgs.follows = "nixpkgs"; }; + rpcs3_latest = { url = "github:RPCS3/rpcs3"; flake = false; }; + + unstable = { + url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + }; }; outputs = { @@ -23,10 +30,18 @@ home-manager, nix-gaming, rpcs3_latest, + unstable, ... } @ inputs: let system = "x86_64-linux"; + pkgs = nixpkgs.legacyPackages.${system}; + + unstablePkgs = import unstable { + inherit system; + config = {allowUnfree = true;}; + }; + customPkgs = import "${self}/pkgs" { inherit pkgs; lib = nixpkgs.lib; @@ -36,6 +51,7 @@ nixosConfigurations.nixos = nixpkgs.lib.nixosSystem { inherit system; specialArgs = {inherit inputs;}; + modules = [ { nixpkgs = { @@ -45,6 +61,7 @@ }; hostPlatform = system; overlays = [ + (final: prev: {ollama = unstablePkgs.ollama;}) (final: prev: { inherit (customPkgs) @@ -56,6 +73,7 @@ binary-font ; }) + (final: prev: { clear-sans = prev.clear-sans.clear-sans; binary-font = prev.binary-font.binary-clock-font; diff --git a/home-manager/modules/ghostty.nix b/home-manager/modules/ghostty.nix index af2ccdc..a9b6e13 100644 --- a/home-manager/modules/ghostty.nix +++ b/home-manager/modules/ghostty.nix @@ -1,9 +1,32 @@ -{ - pkgs, - ... -}: { +{pkgs, ...}: { home.packages = with pkgs; [ ghostty fastfetch ]; + + programs.ghostty = { + enable = true; + enableFishIntegration = true; + + settings = { + command = "${pkgs.fish}/bin/fish --login --interactive"; + font-family = "0xProto Nerd Font"; + font-size = 12; + theme = "tokyonight-storm"; + window-padding-x = 10; + window-padding-y = 10; + cursor-color = "#7AA2F7"; + cursor-style = "block"; + cursor-style-blink = true; + window-decoration = "none"; + window-theme = "dark"; + selection-background = "#364A82"; + selection-foreground = "#C0CAF5"; + + keybind = [ + "super+t=new_tab" + "super+w=close_surface" + ]; + }; + }; } diff --git a/pkgs/default.nix b/pkgs/default.nix index f2bafd1..500ad5e 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -7,7 +7,7 @@ inherit lib rpcs3_latest; }; in { - inherit (rpcs3Pkgs) pugixml SDL3 rpcs3 rpcs3_latest; + inherit (rpcs3Pkgs) pugixml SDL3 rpcs3_latest; fish-rust = pkgs.callPackage ./fish-rust {}; clear-sans = pkgs.callPackage ./clear-sans {}; binary-font = pkgs.callPackage ./binary-font {}; diff --git a/pkgs/rpcs3/default.nix b/pkgs/rpcs3/default.nix index 8ccc0e2..0c4bca7 100644 --- a/pkgs/rpcs3/default.nix +++ b/pkgs/rpcs3/default.nix @@ -37,7 +37,7 @@ src = pkgs.fetchgit { url = "https://github.com/RPCS3/rpcs3.git"; rev = rpcs3_latest.rev; - sha256 = "sha256-7D4kvvUbhM0SvEDbHs2mFwO3SchqunSS9xwvw5USQqA="; + sha256 = "sha256-B73c2lG7FLZjrJvbNzEcZeQN7TWFyqrKjF+ajiGkpA4="; fetchSubmodules = true; }; patches = [];