diff --git a/boxes/desktop/configuration.nix b/boxes/desktop/configuration.nix index 68b9413..37535be 100644 --- a/boxes/desktop/configuration.nix +++ b/boxes/desktop/configuration.nix @@ -53,6 +53,7 @@ programs.zsh.enable = true; environment.systemPackages = with pkgs; [ + (inputs.nix-alien.packages.${pkgs.system}.nix-alien) ddcutil clinfo i2c-tools diff --git a/common/users/homeModules/dev/cpp.nix b/common/users/homeModules/dev/cpp.nix index 16ad60b..e2198c9 100644 --- a/common/users/homeModules/dev/cpp.nix +++ b/common/users/homeModules/dev/cpp.nix @@ -2,6 +2,7 @@ home = { packages = with pkgs; [ meson + autoPatchelfHook cmake # clang libgcc diff --git a/common/users/homeModules/scripts/default.nix b/common/users/homeModules/scripts/default.nix index 90679cf..99d6a8a 100644 --- a/common/users/homeModules/scripts/default.nix +++ b/common/users/homeModules/scripts/default.nix @@ -1,8 +1,19 @@ -{pkgs, lib, inputs, ...}: -let -# cpkg = import ../../../../customPackages { inherit pkgs inputs; }; -# https://discourse.nixos.org/t/how-to-create-a-script-with-dependencies/7970/6 -mkScript = { name, version ? "0.0.1", file, env ? [ ] }: +{ + pkgs, + lib, + inputs, + ... +}: +let + # cpkg = import ../../../../customPackages { inherit pkgs inputs; }; + # https://discourse.nixos.org/t/how-to-create-a-script-with-dependencies/7970/6 + mkScript = + { + name, + version ? "0.0.1", + file, + env ? [ ], + }: pkgs.writeTextFile { name = "${name}-${version}"; executable = true; @@ -15,56 +26,64 @@ mkScript = { name, version ? "0.0.1", file, env ? [ ] }: exec ${pkgs.bash}/bin/bash ${file} $@ ''; }; -in +in { - imports = [ - ../../../../customPackages + imports = [ + ../../../../customPackages + ]; + home = { + packages = [ + # env for clipboard command will be required by their respective environemnts + (mkScript { + name = "paste"; + file = ./paste.sh; + }) + (mkScript { + name = "copy"; + file = ./copy.sh; + }) + (mkScript { + name = "http2ssh"; + file = ./http2ssh.sh; + env = [ pkgs.git ]; + }) + (mkScript { + name = "git_fetchAll"; + file = ./git_fetchAll.sh; + env = [ pkgs.git ]; + }) + (mkScript { + name = "install_eslint"; + file = ./install_eslint.sh; + }) + (mkScript { + name = "math"; + file = ./math.sh; + env = [ pkgs.python3 ]; + }) + (mkScript { + name = "hashi18n"; + file = ./hashi18n.sh; + }) + (mkScript { + name = "flakeify"; + file = ./flakeify.sh; + env = [ pkgs.direnv ]; + }) ]; - home = { - packages = [ - # env for clipboard command will be required by their respective environemnts - (mkScript { - name = "paste"; - file = ./paste.sh; - }) - (mkScript { - name = "copy"; - file = ./copy.sh; - }) - (mkScript { - name = "http2ssh"; - file = ./http2ssh.sh; - env = [pkgs.git]; - }) - (mkScript { - name = "git_fetchAll"; - file = ./git_fetchAll.sh; - env = [pkgs.git]; - }) - (mkScript { - name = "install_eslint"; - file = ./install_eslint.sh; - }) - (mkScript { - name = "math"; - file = ./math.sh; - env = [pkgs.python3]; - }) - (mkScript { - name = "hashi18n"; - file = ./hashi18n.sh; - }) - (mkScript { - name = "flakeify"; - file = ./flakeify.sh; - env = [pkgs.direnv]; - }) - ]; - file = { - scripts = { - source = "${pkgs.cpkg.scripts}"; - target = ".scripts"; - }; - }; + file = { + scripts = { + source = "${pkgs.cpkg.scripts}"; + target = ".scripts"; + }; }; + shellAliases = { + paste = "${ + (mkScript { + name = "paste"; + file = ./paste.sh; + }) + }/bin/paste"; + }; + }; } diff --git a/flake.lock b/flake.lock index e976430..a9c8773 100644 --- a/flake.lock +++ b/flake.lock @@ -197,7 +197,6 @@ } }, "flake-compat": { - "flake": false, "locked": { "lastModified": 1733328505, "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", @@ -213,6 +212,22 @@ } }, "flake-compat_2": { + "flake": false, + "locked": { + "lastModified": 1733328505, + "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_3": { "flake": false, "locked": { "lastModified": 1696426674, @@ -228,7 +243,7 @@ "type": "github" } }, - "flake-compat_3": { + "flake-compat_4": { "flake": false, "locked": { "lastModified": 1673956053, @@ -281,6 +296,24 @@ } }, "flake-utils_2": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_3": { "inputs": { "systems": [ "stylix", @@ -450,7 +483,64 @@ "type": "github" } }, + "nix-alien": { + "inputs": { + "flake-compat": "flake-compat", + "flake-utils": "flake-utils", + "nix-filter": "nix-filter", + "nix-index-database": "nix-index-database", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1734239219, + "narHash": "sha256-iKY/OGNANXpd9hXBGfx8vObpHW4IcOH0MrerLCCc7hA=", + "rev": "a266d0f74dd4a82ec6a72b02fbf3fbc5f7105f15", + "revCount": 384, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/thiagokokada/nix-alien/0.1.384%2Brev-a266d0f74dd4a82ec6a72b02fbf3fbc5f7105f15/0193c8b6-fd88-7d17-968c-7fa7f939b06a/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/thiagokokada/nix-alien/0.1.384.tar.gz" + } + }, + "nix-filter": { + "locked": { + "lastModified": 1731533336, + "narHash": "sha256-oRam5PS1vcrr5UPgALW0eo1m/5/pls27Z/pabHNy2Ms=", + "owner": "numtide", + "repo": "nix-filter", + "rev": "f7653272fd234696ae94229839a99b73c9ab7de0", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "nix-filter", + "type": "github" + } + }, "nix-index-database": { + "inputs": { + "nixpkgs": [ + "nix-alien", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1734234111, + "narHash": "sha256-icEMqBt4HtGH52PU5FHidgBrNJvOfXH6VQKNtnD1aw8=", + "owner": "nix-community", + "repo": "nix-index-database", + "rev": "311d6cf3ad3f56cb051ffab1f480b2909b3f754d", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nix-index-database", + "type": "github" + } + }, + "nix-index-database_2": { "inputs": { "nixpkgs": [ "nixpkgs" @@ -488,8 +578,8 @@ }, "nixos-wsl": { "inputs": { - "flake-compat": "flake-compat", - "flake-utils": "flake-utils", + "flake-compat": "flake-compat_2", + "flake-utils": "flake-utils_2", "nixpkgs": [ "nix-stable" ] @@ -510,15 +600,15 @@ }, "nixpkgs": { "locked": { - "lastModified": 1734119587, - "narHash": "sha256-AKU6qqskl0yf2+JdRdD0cfxX4b9x3KKV5RqA6wijmPM=", - "owner": "nixos", + "lastModified": 1733940404, + "narHash": "sha256-Pj39hSoUA86ZePPF/UXiYHHM7hMIkios8TYG29kQT4g=", + "owner": "NixOS", "repo": "nixpkgs", - "rev": "3566ab7246670a43abd2ffa913cc62dad9cdf7d5", + "rev": "5d67ea6b4b63378b9c13be21e2ec9d1afc921713", "type": "github" }, "original": { - "owner": "nixos", + "owner": "NixOS", "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" @@ -537,6 +627,22 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1734119587, + "narHash": "sha256-AKU6qqskl0yf2+JdRdD0cfxX4b9x3KKV5RqA6wijmPM=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "3566ab7246670a43abd2ffa913cc62dad9cdf7d5", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1730200266, "narHash": "sha256-l253w0XMT8nWHGXuXqyiIC/bMvh1VRszGXgdpQlfhvU=", @@ -552,7 +658,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { "lastModified": 1731763621, "narHash": "sha256-ddcX4lQL0X05AYkrkV2LMFgGdRvgap7Ho8kgon3iWZk=", @@ -574,10 +680,11 @@ "flake-parts": "flake-parts", "home-manager": "home-manager", "home-manager-stable": "home-manager-stable", - "nix-index-database": "nix-index-database", + "nix-alien": "nix-alien", + "nix-index-database": "nix-index-database_2", "nix-stable": "nix-stable", "nixos-wsl": "nixos-wsl", - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_2", "scripts": "scripts", "sops-nix": "sops-nix", "stylix": "stylix", @@ -586,7 +693,7 @@ }, "scripts": { "inputs": { - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs_3" }, "locked": { "lastModified": 1730600020, @@ -604,7 +711,7 @@ }, "sops-nix": { "inputs": { - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_4" }, "locked": { "lastModified": 1733965552, @@ -626,14 +733,14 @@ "base16-fish": "base16-fish", "base16-helix": "base16-helix", "base16-vim": "base16-vim", - "flake-compat": "flake-compat_2", - "flake-utils": "flake-utils_2", + "flake-compat": "flake-compat_3", + "flake-utils": "flake-utils_3", "gnome-shell": "gnome-shell", "home-manager": "home-manager_2", "nixpkgs": [ "nixpkgs" ], - "systems": "systems_2", + "systems": "systems_3", "tinted-foot": "tinted-foot", "tinted-kitty": "tinted-kitty", "tinted-tmux": "tinted-tmux" @@ -661,7 +768,7 @@ "base16-kitty": "base16-kitty", "base16-tmux": "base16-tmux", "base16-vim": "base16-vim_2", - "flake-compat": "flake-compat_3", + "flake-compat": "flake-compat_4", "gnome-shell": "gnome-shell_2", "home-manager": "home-manager_3", "nixpkgs": [ @@ -713,6 +820,21 @@ "type": "github" } }, + "systems_3": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "tinted-foot": { "flake": false, "locked": { diff --git a/flake.nix b/flake.nix index 358265a..185128f 100644 --- a/flake.nix +++ b/flake.nix @@ -38,6 +38,7 @@ flake = false; }; flake-parts.url = "github:hercules-ci/flake-parts"; + nix-alien.url = "https://flakehub.com/f/thiagokokada/nix-alien/0.1.384.tar.gz"; }; outputs = {