read desc

- refactor pinned to be a module using overlays (pkgs.pinned)
- refactor dev/jvm.nix to use jb ides as modules
- refactor balena etcher to be its own module (its pinned)
- pin intellij to an older version for plugin support
- move android studio to its own module under dev/ide/jb
This commit is contained in:
sadan 2024-12-06 11:47:05 -05:00
parent 2f2426b244
commit 96602259cd
No known key found for this signature in database
10 changed files with 192 additions and 151 deletions

View file

@ -1,33 +0,0 @@
# https://lazamar.co.uk/nix-versions/
{ pkgs, config }:
{
# 1.89.1
vscode = (import
(builtins.fetchGit {
# Descriptive name to make the store path easier to identify
name = "my-old-revision";
url = "https://github.com/NixOS/nixpkgs/";
ref = "refs/heads/nixpkgs-unstable";
rev = "0c19708cf035f50d28eb4b2b8e7a79d4dc52f6bb";
})
{
system = pkgs.system;
config = {
allowUnfree = true;
};
}).vscode;
etcher = (import
(builtins.fetchGit {
# Descriptive name to make the store path easier to identify
name = "my-old-revision";
url = "https://github.com/NixOS/nixpkgs/";
ref = "refs/heads/nixpkgs-unstable";
rev = "336eda0d07dc5e2be1f923990ad9fdb6bc8e28e3";
})
{
system = pkgs.system;
config = {
permittedInsecurePackages = [ "electron-19.1.9" ];
};
}).etcher;
}

View file

@ -1,7 +1,9 @@
{pkgs, config, ...}:
let
pinned = import ../../../../pinned.nix { inherit pkgs config; };
in {
imports = [
../../pinned.nix
];
home = {
packages = with pkgs; [
pinned.vscode

View file

@ -0,0 +1,8 @@
{pkgs, ...}: {
home = {
packages = with pkgs; [
android-studio-tools
android-studio
];
};
}

View file

@ -1,5 +1,6 @@
{...}: {
imports = [
./idea.nix
./androidStudio.nix
];
}

View file

@ -1,7 +1,10 @@
{pkgs, ...}: {
{ pkgs, ... }: {
imports = [
../../../pinned.nix
];
home = {
packages = with pkgs; [
jetbrains.idea-ultimate
packages = with pkgs.pinned; [
idea-ultimate
];
};
}

View file

@ -1,13 +1,12 @@
{ pkgs, ... }: {
imports = [
./ide/jb/idea.nix
./ide/jb/androidStudio.nix
];
home = {
packages = with pkgs; [
android-studio-tools
gradle
jadx
android-studio
jetbrains.idea-ultimate
# jbeap.idea-ultimate
# jetbrains.pycharm-community
];
};
programs = {

View file

@ -0,0 +1,10 @@
{ pkgs, ... }: {
imports = [
./pinned.nix
];
home = {
packages = with pkgs.pinned; [
etcher
];
};
}

View file

@ -52,11 +52,11 @@
srcOverrideFn =
name:
{
version,
url,
sha256,
plugins ? [ ],
{ version
, url
, sha256
, plugins ? [ ]
,
}:
let
versionChangedPkg = jetbrains.${name}.overrideAttrs (

View file

@ -0,0 +1,57 @@
{ ... }:
{
nixpkgs = {
overlays = [
# self: super:
# pkgs: _:
(pkgs: _:
let
defaultOpts = {
system = pkgs.system;
config = {
allowUnfree = true;
};
};
in
{
# extend packages here
pinned = {
# 1.89.1
vscode = (import
(builtins.fetchGit {
# Descriptive name to make the store path easier to identify
name = "pinned-vscode";
url = "https://github.com/NixOS/nixpkgs/";
ref = "refs/heads/nixpkgs-unstable";
rev = "0c19708cf035f50d28eb4b2b8e7a79d4dc52f6bb";
})
defaultOpts).vscode;
# removed for having out of date electron
etcher = (import
(builtins.fetchGit {
# Descriptive name to make the store path easier to identify
name = "pinned-etcher";
url = "https://github.com/NixOS/nixpkgs/";
ref = "refs/heads/nixpkgs-unstable";
rev = "336eda0d07dc5e2be1f923990ad9fdb6bc8e28e3";
})
{
system = pkgs.system;
config = {
permittedInsecurePackages = [ "electron-19.1.9" ];
};
}).etcher;
# support non-updated plugins
idea-ultimate = (import
(builtins.fetchGit {
name = "pinned-idea-ultimate";
url = "https://github.com/NixOS/nixpkgs/";
ref = "refs/heads/nixpkgs-unstable";
rev = "05bbf675397d5366259409139039af8077d695ce";
})
defaultOpts).jetbrains.idea-ultimate;
};
})
];
};
}

View file

@ -3,9 +3,7 @@
pkgs,
inputs,
...
}: let
pinned = import ../../pinned.nix { inherit pkgs config; };
in {
}: {
nixpkgs.config.allowInsecurePredicate = (pkg: true);
nixpkgs.config.allowUnfreePredicate = (pkg: true);
@ -23,6 +21,7 @@ in {
../homeModules/scripts
../homeModules/audio.nix
../homeModules/btop.nix
../homeModules/etcher.nix
../homeModules/flameshot.nix
../homeModules/frog.nix
../homeModules/gaming.nix
@ -48,11 +47,6 @@ in {
# The home.packages option allows you to install Nix packages into your
# environment.
home = {
packages = with pkgs; [
pinned.etcher
];
};
home.shellAliases = {
sd = ''lsusb | grep Elgato | grep --perl-regexp "(?<=Device 0{0,10})[1-9]+" --only-matching | xargs printf "usb.device_address eq %s" | copy'';
};