diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 25388ba..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "nix/overlays/nixpkgs-mozilla"] - path = nix/overlays/nixpkgs-mozilla - url = https://github.com/mozilla/nixpkgs-mozilla diff --git a/nix/nixos/flake.nix b/nix/nixos/flake.nix index 94fb593..5803253 100644 --- a/nix/nixos/flake.nix +++ b/nix/nixos/flake.nix @@ -77,7 +77,7 @@ uranus/configuration.nix hm2211.nixosModules.home-manager { - home-manager.users.delan = import ../nixpkgs/home.nix; + home-manager.users.delan = import ./home.nix; # use same nixpkgs as system, which has allowUnfree home-manager.useGlobalPkgs = true; @@ -96,7 +96,7 @@ nixos-hardware.nixosModules.lenovo-thinkpad-x1-extreme-gen2 hm2405.nixosModules.home-manager { - home-manager.users.delan = import ../nixpkgs/home.nix; + home-manager.users.delan = import ./home.nix; # use same nixpkgs as system, which has allowUnfree home-manager.useGlobalPkgs = true; @@ -114,7 +114,7 @@ jupiter/configuration.nix hm.nixosModules.home-manager { - home-manager.users.delan = import ../nixpkgs/home.nix; + home-manager.users.delan = import ./home.nix; # use same nixpkgs as system, which has allowUnfree home-manager.useGlobalPkgs = true; diff --git a/nix/nixpkgs/home.nix b/nix/nixos/home.nix similarity index 100% rename from nix/nixpkgs/home.nix rename to nix/nixos/home.nix diff --git a/nix/nixos/lib/default.nix b/nix/nixos/lib/default.nix index 33de78f..8a5904f 100644 --- a/nix/nixos/lib/default.nix +++ b/nix/nixos/lib/default.nix @@ -66,14 +66,6 @@ experimental-features = nix-command flakes ''; - # pin nixpkgs flakeref to match our nixos config, to avoid constantly fetching unstable packages - # https://discourse.nixos.org/t/how-to-pin-nix-registry-nixpkgs-to-release-channel/14883/7 - # TODO unwrap path in NixOS 22.11 - nix.registry.nixpkgs.to = { type = "path"; path = "${pkgs.path}"; }; - - # pin nixpkgs channel to nixpkgs flakeref - nix.nixPath = ["nixpkgs=flake:nixpkgs"]; - console.keyMap = "us"; i18n.defaultLocale = "en_AU.UTF-8"; time.timeZone = "Australia/Perth"; diff --git a/nix/nixpkgs/osu.nix b/nix/nixpkgs/osu.nix deleted file mode 100644 index 19fe75c..0000000 --- a/nix/nixpkgs/osu.nix +++ /dev/null @@ -1,84 +0,0 @@ -{ lib -, stdenv -, fetchurl -, fetchzip -, appimageTools -}: - -let - pname = "osu-lazer-bin"; - version = "2023.305.0"; - name = "${pname}-${version}"; - - file = { - aarch64-darwin = "osu.app.Apple.Silicon.zip"; - x86_64-darwin = "osu.app.Intel.zip"; - x86_64-linux = "osu.AppImage"; - }.${stdenv.system} or (throw "${pname}-${version}: ${stdenv.system} is unsupported."); - - fileHash = { - aarch64-darwin = "sha256-vfDEEU+InD5uIc1QKceM2SN1GlWV93DySn3ik1MSYf4="; - x86_64-darwin = "sha256-dK+qqwBzuPXHqQk8U3TpWQBWEz+8S9GHShVwTTq2BBQ="; - x86_64-linux = "sha256-W3XJ7HtJM5iFI8OOTTu8IBHMerZSCETHMemkoTislK8="; - }.${stdenv.system}; - - linux = appimageTools.wrapType2 rec { - inherit name pname version meta; - - src = fetchurl { - url = "https://github.com/ppy/osu/releases/download/${version}/${file}"; - sha256 = fileHash; - }; - - extraPkgs = pkgs: with pkgs; [ icu ]; - - extraInstallCommands = - let contents = appimageTools.extract { inherit pname version src; }; - in - '' - mv -v $out/bin/${pname}-${version} $out/bin/osu\! - install -m 444 -D ${contents}/osu\!.desktop -t $out/share/applications - for i in 16 32 48 64 96 128 256 512 1024; do - install -D ${contents}/osu\!.png $out/share/icons/hicolor/''${i}x$i/apps/osu\!.png - done - ''; - }; - - darwin = stdenv.mkDerivation rec { - inherit name pname version meta; - - src = fetchzip { - url = "https://github.com/ppy/osu/releases/download/${version}/${file}"; - sha256 = fileHash; - stripRoot = false; - }; - - dontBuild = true; - dontFixup = true; - - installPhase = '' - runHook preInstall - APP_DIR="$out/Applications" - mkdir -p "$APP_DIR" - cp -r . "$APP_DIR" - runHook postInstall - ''; - }; - - meta = with lib; { - description = "Rhythm is just a *click* away (AppImage version for score submission and multiplayer, and binary distribution for Darwin systems)"; - homepage = "https://osu.ppy.sh"; - license = with licenses; [ - mit - cc-by-nc-40 - unfreeRedistributable # osu-framework contains libbass.so in repository - ]; - sourceProvenance = with sourceTypes; [ binaryNativeCode ]; - maintainers = with maintainers; [ delan stepbrobd ]; - mainProgram = "osu!"; - platforms = [ "aarch64-darwin" "x86_64-darwin" "x86_64-linux" ]; - }; -in -if stdenv.isDarwin -then darwin -else linux diff --git a/nix/overlays/nixpkgs-mozilla b/nix/overlays/nixpkgs-mozilla deleted file mode 160000 index db89c87..0000000 --- a/nix/overlays/nixpkgs-mozilla +++ /dev/null @@ -1 +0,0 @@ -Subproject commit db89c8707edcffefcd8e738459d511543a339ff5 diff --git a/nix/packages/adc902fc0fa11bbe/default.nix b/nix/packages/adc902fc0fa11bbe/default.nix deleted file mode 100644 index 1ac22c2..0000000 --- a/nix/packages/adc902fc0fa11bbe/default.nix +++ /dev/null @@ -1,36 +0,0 @@ -# f=... -# chmod +x "$f" -# nix-shell -p stdenv --run 'patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" '"$f" -# patchelf --print-needed "$f" | xargs -tn 1 nix-locate -1w --top-level > p -# < p sed 's/[.]out$//' | sort -u | fgrep -ve foo -e bar -e baz > q -# < q xargs -tI {} nix-shell -p {} --run : -# printf \%s "$(< q xargs -tI {} echo 'with pkgs; lib.makeLibraryPath [ {} ]' | nix repl '' | sed 's/\x1B\[[0-9;]*m//g' | fgrep \" | tr -d \")" | tr \\n : | xargs -tI {} patchelf --set-rpath {} "$f" - -{ stdenv, fetchzip, autoPatchelfHook, pkgs }: -stdenv.mkDerivation rec { - name = "adc902fc0fa11bbe"; - - src = fetchzip { - # url = "https://bucket.daz.cat/adc902fc0fa11bbe.zip"; - # sha256 = "0mabv9rysfpqck7fw8ismbj9k3lf5r115xsaxc465936pk6myvq9"; - url = "https://bucket.daz.cat/b56ac4201f39e0d4.zip"; - sha256 = "0gy03445i9hz1yrqyg4dv18cm9j8hbf0jhh6cbldcb1w4bghn4dw"; - stripRoot = false; - }; - - # patches = [ ... ]; - - nativeBuildInputs = [ autoPatchelfHook ]; - buildInputs = with pkgs; [ - glibc alsaLib libpulseaudio libGLU - ] ++ (with xlibs; [ - libXcursor libXinerama libXrandr libXrender libX11 libXi - ]); - - installPhase = '' - mkdir -p $out/bin - install -Dm 644 ./ariasflyingthing.pck $out - install -Dm 755 ./ariasflyingthing.x86_64 $out - ln -s $out/ariasflyingthing.x86_64 $out/bin - ''; -} diff --git a/nix/packages/nmcli-rofi/default.nix b/nix/packages/nmcli-rofi/default.nix deleted file mode 100644 index c0fb0ac..0000000 --- a/nix/packages/nmcli-rofi/default.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ stdenv, fetchFromGitHub, networkmanager, rofi -, wirelesstools, gawk, gnused, makeWrapper, coreutils }: - -stdenv.mkDerivation rec { - version = "unstable-2018-08-17"; - name = "nmcli-rofi-${version}"; - - src = fetchFromGitHub { - owner = "sinetoami"; - repo = "nmcli-rofi"; - rev = "30ec4d36f36e132117044b6debb54675b778f5ba"; - sha256 = "1r4bkrpbjamfnamxa83x1ncc3iawh93m453ldg3zmrkfsihgany5"; - }; - - buildInputs = [ makeWrapper ]; - phases = [ "installPhase" "fixupPhase" ]; - - installPhase = '' - mkdir -p $out/bin - cp -a $src/nmcli-rofi $out/bin/nmcli-rofi - chmod a+x $out/bin/nmcli-rofi - mkdir -p $out/share/doc/nmcli-rofi/ - cp -a $src/config $out/share/doc/nmcli-rofi/config.example - ''; - - wrapperPath = with stdenv.lib; makeBinPath [ - coreutils - gawk - gnused - networkmanager - rofi - wirelesstools - ]; - - fixupPhase = '' - patchShebangs $out/bin - wrapProgram $out/bin/nmcli-rofi --prefix PATH : "${wrapperPath}" - ''; -}