Merge branch 'main' of https://github.com/Lillian-Violet/NixOS-Configuration
This commit is contained in:
commit
9b978acc15
18
flake.lock
18
flake.lock
|
@ -7,11 +7,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1700419052,
|
"lastModified": 1700553346,
|
||||||
"narHash": "sha256-U6a5f9ynbzcp8PMIHULbHPkbwp7YfPKOYmTcLqlalD4=",
|
"narHash": "sha256-kW7uWsCv/lxuA824Ng6EYD9hlVYRyjuFn0xBbYltAeQ=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "993fb02d20760067b8ee19c713d94cee07037759",
|
"rev": "1aabb0a31b25ad83cfaa37c3fe29053417cd9a0f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -23,11 +23,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1700204040,
|
"lastModified": 1700390070,
|
||||||
"narHash": "sha256-xSVcS5HBYnD3LTer7Y2K8ZQCDCXMa3QUD1MzRjHzuhI=",
|
"narHash": "sha256-de9KYi8rSJpqvBfNwscWdalIJXPo8NjdIZcEJum1mH0=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad",
|
"rev": "e4ad989506ec7d71f7302cc3067abd82730a4beb",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -55,11 +55,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1700204040,
|
"lastModified": 1700390070,
|
||||||
"narHash": "sha256-xSVcS5HBYnD3LTer7Y2K8ZQCDCXMa3QUD1MzRjHzuhI=",
|
"narHash": "sha256-de9KYi8rSJpqvBfNwscWdalIJXPo8NjdIZcEJum1mH0=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad",
|
"rev": "e4ad989506ec7d71f7302cc3067abd82730a4beb",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -56,6 +56,7 @@
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
# Coding:
|
# Coding:
|
||||||
|
azuredatastudio
|
||||||
git
|
git
|
||||||
kate
|
kate
|
||||||
|
|
||||||
|
@ -126,6 +127,7 @@
|
||||||
userEmail = "git@gladtherescake.eu";
|
userEmail = "git@gladtherescake.eu";
|
||||||
userName = "Lillian-Violet";
|
userName = "Lillian-Violet";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Nicely reload system units when changing configs
|
# Nicely reload system units when changing configs
|
||||||
systemd.user.startServices = "sd-switch";
|
systemd.user.startServices = "sd-switch";
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,6 +58,8 @@
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
age
|
age
|
||||||
alejandra
|
alejandra
|
||||||
|
docker
|
||||||
|
docker-compose
|
||||||
git-filter-repo
|
git-filter-repo
|
||||||
home-manager
|
home-manager
|
||||||
input-leap
|
input-leap
|
||||||
|
@ -159,12 +161,30 @@
|
||||||
boot.loader.systemd-boot.configurationLimit = 3;
|
boot.loader.systemd-boot.configurationLimit = 3;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
users.groups.mssql = {};
|
||||||
|
|
||||||
users.users = {
|
users.users = {
|
||||||
lillian = {
|
lillian = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = ["sudo" "networkmanager" "wheel" "vboxsf"];
|
extraGroups = ["sudo" "networkmanager" "wheel" "vboxsf" "docker"];
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
};
|
};
|
||||||
|
mssql = {
|
||||||
|
isSystemUser = true;
|
||||||
|
group = "mssql";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
virtualisation.oci-containers.containers = {
|
||||||
|
mssql = {
|
||||||
|
image = "mcr.microsoft.com/mssql/server:2022-latest";
|
||||||
|
ports = ["1433:1433"];
|
||||||
|
environment = {
|
||||||
|
"ACCEPT_EULA" = "Y";
|
||||||
|
"MSSQL_SA_PASSWORD" = "EbKihNUHg6S$V$qchADFmw!JCm##toc3";
|
||||||
|
};
|
||||||
|
volumes = ["/home/lillian/docker/mssql:/data"];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Enable completion of system packages by zsh
|
# Enable completion of system packages by zsh
|
||||||
|
|
195
pkgs/azuredatastudio/default.nix
Normal file
195
pkgs/azuredatastudio/default.nix
Normal file
|
@ -0,0 +1,195 @@
|
||||||
|
{
|
||||||
|
stdenv,
|
||||||
|
lib,
|
||||||
|
fetchurl,
|
||||||
|
copyDesktopItems,
|
||||||
|
makeDesktopItem,
|
||||||
|
makeWrapper,
|
||||||
|
alsa-lib,
|
||||||
|
at-spi2-atk,
|
||||||
|
at-spi2-core,
|
||||||
|
cairo,
|
||||||
|
cups,
|
||||||
|
curl,
|
||||||
|
dbus,
|
||||||
|
expat,
|
||||||
|
gdk-pixbuf,
|
||||||
|
glib,
|
||||||
|
gnutar,
|
||||||
|
gtk3,
|
||||||
|
icu,
|
||||||
|
libdrm,
|
||||||
|
libunwind,
|
||||||
|
libuuid,
|
||||||
|
libxkbcommon,
|
||||||
|
mesa,
|
||||||
|
nspr,
|
||||||
|
nss,
|
||||||
|
openssl,
|
||||||
|
pango,
|
||||||
|
systemd,
|
||||||
|
xorg,
|
||||||
|
zlib,
|
||||||
|
}:
|
||||||
|
# from justinwoo/azuredatastudio-nix
|
||||||
|
# https://github.com/justinwoo/azuredatastudio-nix/blob/537c48aa3981cd1a82d5d6e508ab7e7393b3d7c8/default.nix
|
||||||
|
let
|
||||||
|
desktopItem = makeDesktopItem {
|
||||||
|
name = "azuredatastudio";
|
||||||
|
desktopName = "Azure Data Studio";
|
||||||
|
comment = "Data Management Tool that enables you to work with SQL Server, Azure SQL DB and SQL DW from Windows, macOS and Linux.";
|
||||||
|
genericName = "Text Editor";
|
||||||
|
exec = "azuredatastudio --no-sandbox --unity-launch %F";
|
||||||
|
icon = "azuredatastudio";
|
||||||
|
startupNotify = true;
|
||||||
|
startupWMClass = "azuredatastudio";
|
||||||
|
categories = ["Utility" "TextEditor" "Development" "IDE"];
|
||||||
|
mimeTypes = ["text/plain" "inode/directory" "application/x-azuredatastudio-workspace"];
|
||||||
|
keywords = ["azuredatastudio"];
|
||||||
|
actions.new-empty-window = {
|
||||||
|
name = "New Empty Window";
|
||||||
|
exec = "azuredatastudio --no-sandbox --new-window %F";
|
||||||
|
icon = "azuredatastudio";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
urlHandlerDesktopItem = makeDesktopItem {
|
||||||
|
name = "azuredatastudio-url-handler";
|
||||||
|
desktopName = "Azure Data Studio - URL Handler";
|
||||||
|
comment = "Azure Data Studio";
|
||||||
|
genericName = "Text Editor";
|
||||||
|
exec = "azuredatastudio --no-sandbox --open-url %U";
|
||||||
|
icon = "azuredatastudio";
|
||||||
|
startupNotify = true;
|
||||||
|
startupWMClass = "azuredatastudio";
|
||||||
|
categories = ["Utility" "TextEditor" "Development" "IDE"];
|
||||||
|
mimeTypes = ["x-scheme-handler/azuredatastudio"];
|
||||||
|
keywords = ["azuredatastudio"];
|
||||||
|
noDisplay = true;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "azuredatastudio";
|
||||||
|
version = "1.47.0";
|
||||||
|
|
||||||
|
desktopItems = [desktopItem urlHandlerDesktopItem];
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
name = "${pname}-${version}.tar.gz";
|
||||||
|
url = "https://azuredatastudio-update.azurewebsites.net/${version}/linux-x64/stable";
|
||||||
|
sha256 = "0e094179ffb883d0da8fdbe9721a32402303bf68f411445f2d=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
makeWrapper
|
||||||
|
copyDesktopItems
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
libuuid
|
||||||
|
at-spi2-core
|
||||||
|
at-spi2-atk
|
||||||
|
];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
|
mkdir -p $out/share/pixmaps
|
||||||
|
cp ${targetPath}/resources/app/resources/linux/code.png $out/share/pixmaps/azuredatastudio.png
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
# change this to azuredatastudio-insiders for insiders releases
|
||||||
|
edition = "azuredatastudio";
|
||||||
|
targetPath = "$out/${edition}";
|
||||||
|
|
||||||
|
unpackPhase = ''
|
||||||
|
mkdir -p ${targetPath}
|
||||||
|
${gnutar}/bin/tar xf $src --strip 1 -C ${targetPath}
|
||||||
|
'';
|
||||||
|
|
||||||
|
sqltoolsserviceRpath = lib.makeLibraryPath [
|
||||||
|
stdenv.cc.cc
|
||||||
|
libunwind
|
||||||
|
libuuid
|
||||||
|
icu
|
||||||
|
openssl
|
||||||
|
zlib
|
||||||
|
curl
|
||||||
|
];
|
||||||
|
|
||||||
|
# this will most likely need to be updated when azuredatastudio's version changes
|
||||||
|
sqltoolsservicePath = "${targetPath}/resources/app/extensions/mssql/sqltoolsservice/Linux/4.7.1.6";
|
||||||
|
|
||||||
|
rpath = lib.concatStringsSep ":" [
|
||||||
|
(lib.makeLibraryPath [
|
||||||
|
alsa-lib
|
||||||
|
at-spi2-atk
|
||||||
|
cairo
|
||||||
|
cups
|
||||||
|
dbus
|
||||||
|
expat
|
||||||
|
gdk-pixbuf
|
||||||
|
glib
|
||||||
|
gtk3
|
||||||
|
mesa
|
||||||
|
nss
|
||||||
|
nspr
|
||||||
|
libdrm
|
||||||
|
xorg.libX11
|
||||||
|
xorg.libxcb
|
||||||
|
xorg.libXcomposite
|
||||||
|
xorg.libXdamage
|
||||||
|
xorg.libXext
|
||||||
|
xorg.libXfixes
|
||||||
|
xorg.libXrandr
|
||||||
|
xorg.libxshmfence
|
||||||
|
libxkbcommon
|
||||||
|
xorg.libxkbfile
|
||||||
|
pango
|
||||||
|
stdenv.cc.cc.lib
|
||||||
|
systemd
|
||||||
|
])
|
||||||
|
targetPath
|
||||||
|
sqltoolsserviceRpath
|
||||||
|
];
|
||||||
|
|
||||||
|
fixupPhase = ''
|
||||||
|
fix_sqltoolsservice()
|
||||||
|
{
|
||||||
|
mv ${sqltoolsservicePath}/$1 ${sqltoolsservicePath}/$1_old
|
||||||
|
patchelf \
|
||||||
|
--set-interpreter "${stdenv.cc.bintools.dynamicLinker}" \
|
||||||
|
${sqltoolsservicePath}/$1_old
|
||||||
|
|
||||||
|
makeWrapper \
|
||||||
|
${sqltoolsservicePath}/$1_old \
|
||||||
|
${sqltoolsservicePath}/$1 \
|
||||||
|
--set LD_LIBRARY_PATH ${sqltoolsserviceRpath}
|
||||||
|
}
|
||||||
|
|
||||||
|
fix_sqltoolsservice MicrosoftSqlToolsServiceLayer
|
||||||
|
fix_sqltoolsservice MicrosoftSqlToolsCredentials
|
||||||
|
fix_sqltoolsservice SqlToolsResourceProviderService
|
||||||
|
|
||||||
|
patchelf \
|
||||||
|
--set-interpreter "${stdenv.cc.bintools.dynamicLinker}" \
|
||||||
|
${targetPath}/${edition}
|
||||||
|
|
||||||
|
mkdir -p $out/bin
|
||||||
|
makeWrapper \
|
||||||
|
${targetPath}/bin/${edition} \
|
||||||
|
$out/bin/azuredatastudio \
|
||||||
|
--set LD_LIBRARY_PATH ${rpath}
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
maintainers = with lib.maintainers; [xavierzwirtz];
|
||||||
|
description = "A data management tool that enables working with SQL Server, Azure SQL DB and SQL DW";
|
||||||
|
homepage = "https://docs.microsoft.com/en-us/sql/azure-data-studio/download-azure-data-studio";
|
||||||
|
sourceProvenance = with lib.sourceTypes; [binaryNativeCode];
|
||||||
|
license = lib.licenses.unfreeRedistributable;
|
||||||
|
platforms = ["x86_64-linux"];
|
||||||
|
};
|
||||||
|
}
|
|
@ -2,4 +2,5 @@
|
||||||
# You can build them using 'nix build .#example'
|
# You can build them using 'nix build .#example'
|
||||||
pkgs: {
|
pkgs: {
|
||||||
# example = pkgs.callPackage ./example { };
|
# example = pkgs.callPackage ./example { };
|
||||||
|
azuredatastudio = pkgs.callPackage ./azuredatastudio {};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue