crystal devenv & misc stuff
This commit is contained in:
parent
5119d85da6
commit
f3a0e5d82a
190
flake.lock
190
flake.lock
|
@ -1,5 +1,22 @@
|
|||
{
|
||||
"nodes": {
|
||||
"ameba-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1690573222,
|
||||
"narHash": "sha256-TdyEnTloaciSpkPmnm+OM75sz9jaCaQ3VoDEepfescU=",
|
||||
"owner": "crystal-ameba",
|
||||
"repo": "ameba",
|
||||
"rev": "7b8316f0616ef140cd29b7bf9d7e242009f80d1c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "crystal-ameba",
|
||||
"ref": "v1.5.0",
|
||||
"repo": "ameba",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"base16-schemes": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
@ -16,6 +33,23 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"bdwgc-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1685120683,
|
||||
"narHash": "sha256-KHijT4BBKfDvTpHpwognN+3ZXoC6JabBTFSYFyOUT9o=",
|
||||
"owner": "ivmai",
|
||||
"repo": "bdwgc",
|
||||
"rev": "d1ff06cc503a74dca0150d5e988f2c93158b0cdf",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "ivmai",
|
||||
"ref": "v8.2.4",
|
||||
"repo": "bdwgc",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"catppuccin-vsc": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
|
@ -34,6 +68,123 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"crystal-aarch64-darwin": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1697184042,
|
||||
"narHash": "sha256-zHvZo/t13QsKTJOOp6v6ZNw7cwjKZ29TajRNC3vUaCI=",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/crystal-lang/crystal/releases/download/1.10.1/crystal-1.10.1-1-darwin-universal.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/crystal-lang/crystal/releases/download/1.10.1/crystal-1.10.1-1-darwin-universal.tar.gz"
|
||||
}
|
||||
},
|
||||
"crystal-flake": {
|
||||
"inputs": {
|
||||
"ameba-src": "ameba-src",
|
||||
"bdwgc-src": "bdwgc-src",
|
||||
"crystal-aarch64-darwin": "crystal-aarch64-darwin",
|
||||
"crystal-src": "crystal-src",
|
||||
"crystal-x86_64-darwin": "crystal-x86_64-darwin",
|
||||
"crystal-x86_64-linux": "crystal-x86_64-linux",
|
||||
"crystalline-src": "crystalline-src",
|
||||
"flake-parts": "flake-parts",
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1697498174,
|
||||
"narHash": "sha256-cuGNIqwO8Zdex277Fp+pwwPfjxS44Kpnbggj5Cv2RhQ=",
|
||||
"owner": "manveru",
|
||||
"repo": "crystal-flake",
|
||||
"rev": "2b34b26d2969e862282e83e85e59899d41cafeab",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "manveru",
|
||||
"repo": "crystal-flake",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"crystal-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1697181881,
|
||||
"narHash": "sha256-+ytVFf0t6ZDcJ+bQaDC012/YlOTpo7G6WGBMGlRltt4=",
|
||||
"owner": "crystal-lang",
|
||||
"repo": "crystal",
|
||||
"rev": "c6f3552f5be159eb06c8f348c6b9e23ff7f17dbc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "crystal-lang",
|
||||
"ref": "1.10.1",
|
||||
"repo": "crystal",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"crystal-x86_64-darwin": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1697184042,
|
||||
"narHash": "sha256-zHvZo/t13QsKTJOOp6v6ZNw7cwjKZ29TajRNC3vUaCI=",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/crystal-lang/crystal/releases/download/1.10.1/crystal-1.10.1-1-darwin-universal.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/crystal-lang/crystal/releases/download/1.10.1/crystal-1.10.1-1-darwin-universal.tar.gz"
|
||||
}
|
||||
},
|
||||
"crystal-x86_64-linux": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1697182606,
|
||||
"narHash": "sha256-QhWySbDISW3GNcNXpTJN7tucbW5sTTeo0r2D/T7VHwo=",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/crystal-lang/crystal/releases/download/1.10.1/crystal-1.10.1-1-linux-x86_64.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/crystal-lang/crystal/releases/download/1.10.1/crystal-1.10.1-1-linux-x86_64.tar.gz"
|
||||
}
|
||||
},
|
||||
"crystalline-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1696955782,
|
||||
"narHash": "sha256-EMRq8FqVhzdrlH/HPlJnE3DhjdEIsdxFV69jA1VvTpk=",
|
||||
"owner": "elbywan",
|
||||
"repo": "crystalline",
|
||||
"rev": "48f4b48658ba9268db8b2d56d402ce659d019e54",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "elbywan",
|
||||
"ref": "v0.11.0",
|
||||
"repo": "crystalline",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1672152762,
|
||||
"narHash": "sha256-U8iWWHgabN07zfbgedogMVWrEP1Zywyf3Yx3OYHSSgE=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "19e0f88324d90509141e192664ded98bb88ef9b2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1705312285,
|
||||
|
@ -73,7 +224,7 @@
|
|||
"nix-colors": {
|
||||
"inputs": {
|
||||
"base16-schemes": "base16-schemes",
|
||||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
"nixpkgs-lib": "nixpkgs-lib_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1695388192,
|
||||
|
@ -106,6 +257,24 @@
|
|||
}
|
||||
},
|
||||
"nixpkgs-lib": {
|
||||
"locked": {
|
||||
"dir": "lib",
|
||||
"lastModified": 1671359686,
|
||||
"narHash": "sha256-3MpC6yZo+Xn9cPordGz2/ii6IJpP2n8LE8e/ebUXLrs=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "04f574a1c0fde90b51bf68198e2297ca4e7cccf4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"dir": "lib",
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-lib_2": {
|
||||
"locked": {
|
||||
"lastModified": 1694911725,
|
||||
"narHash": "sha256-8YqI+YU1DGclEjHsnrrGfqsQg3Wyga1DfTbJrN3Ud0c=",
|
||||
|
@ -136,6 +305,22 @@
|
|||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1688392541,
|
||||
"narHash": "sha256-lHrKvEkCPTUO+7tPfjIcb7Trk6k31rz18vkyqmkeJfY=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ea4c80b39be4c09702b0cb3b42eab59e2ba4f24b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-22.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1705331948,
|
||||
"narHash": "sha256-qjQXfvrAT1/RKDFAMdl8Hw3m4tLVvMCc8fMqzJv0pP4=",
|
||||
|
@ -153,10 +338,11 @@
|
|||
"root": {
|
||||
"inputs": {
|
||||
"catppuccin-vsc": "catppuccin-vsc",
|
||||
"crystal-flake": "crystal-flake",
|
||||
"hardware": "hardware",
|
||||
"home-manager": "home-manager",
|
||||
"nix-colors": "nix-colors",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nixpkgs": "nixpkgs_3",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
nix-colors.url = "github:misterio77/nix-colors";
|
||||
|
||||
catppuccin-vsc.url = "github:catppuccin/vscode";
|
||||
|
||||
crystal-flake.url = "github:manveru/crystal-flake";
|
||||
};
|
||||
|
||||
outputs = inputs @ {
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
# apps
|
||||
vivaldi telegram-desktop onlyoffice-bin mpv
|
||||
# compatilibility
|
||||
wine64
|
||||
wineWowPackages.waylandFull winetricks
|
||||
# misc
|
||||
cowsay file which tree gnused yt-dlp
|
||||
];
|
||||
|
@ -32,6 +32,10 @@
|
|||
hardware = {
|
||||
pipewire.enable = true;
|
||||
};
|
||||
dev = {
|
||||
enable = true;
|
||||
crystal.enable = true;
|
||||
};
|
||||
desktop = {
|
||||
envProto = "wayland";
|
||||
gnome.enable = true;
|
||||
|
|
|
@ -12,35 +12,41 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
env = {
|
||||
QT_QPA_PLATFORMTHEME = "gnome";
|
||||
QT_STYLE_OVERRIDE = "Adwaita";
|
||||
};
|
||||
config = mkMerge [
|
||||
{
|
||||
env = {
|
||||
QT_QPA_PLATFORMTHEME = "gnome";
|
||||
QT_STYLE_OVERRIDE = "Adwaita";
|
||||
};
|
||||
|
||||
modules.desktop.fonts.enable = true;
|
||||
modules.desktop.fonts.baseFonts = true;
|
||||
modules.desktop.fonts.enable = true;
|
||||
modules.desktop.fonts.baseFonts = true;
|
||||
|
||||
#xdg.portal = {
|
||||
# enable = true;
|
||||
# extraPortals = [pkgs.xdg-desktop-portal-gtk];
|
||||
# config.common.default = "*";
|
||||
#};
|
||||
|
||||
services.xserver.excludePackages = [ pkgs.xterm ];
|
||||
#xdg.portal = {
|
||||
# enable = true;
|
||||
# extraPortals = [pkgs.xdg-desktop-portal-gtk];
|
||||
# config.common.default = "*";
|
||||
#};
|
||||
|
||||
services.xserver.excludePackages = [ pkgs.xterm ];
|
||||
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
|
||||
# Bootloader
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
# Bootloader
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Speed up boot
|
||||
# https://discourse.nixos.org/t/boot-faster-by-disabling-udev-settle-and-nm-wait-online/6339
|
||||
systemd.services.systemd-udev-settle.enable = false;
|
||||
systemd.services.NetworkManager-wait-online.enable = false;
|
||||
};
|
||||
# Speed up boot
|
||||
# https://discourse.nixos.org/t/boot-faster-by-disabling-udev-settle-and-nm-wait-online/6339
|
||||
systemd.services.systemd-udev-settle.enable = false;
|
||||
systemd.services.NetworkManager-wait-online.enable = false;
|
||||
}
|
||||
(mkIf (cfg.envProto == "wayland") {
|
||||
# https://github.com/NixOS/nixpkgs/commit/b2eb5f62a7fd94ab58acafec9f64e54f97c508a6
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
})
|
||||
];
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
{ system, inputs, config, pkgs, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.dev.crystal;
|
||||
crpkgs = inputs.crystal-flake.packages.${system};
|
||||
in {
|
||||
options.modules.dev.crystal = {
|
||||
enable = mkEnableOption "Enable Crystal's development module, a Ruby-like compiled language";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
hm.home.packages = with pkgs; [
|
||||
shards
|
||||
ameba
|
||||
crystalline
|
||||
] ++ (with crpkgs; [
|
||||
crystal
|
||||
]);
|
||||
|
||||
hm.programs.vscode.extensions = pkgs.vscode-utils.extensionsFromVscodeMarketplace [ {
|
||||
name = "crystal-lang";
|
||||
publisher = "crystal-lang-tools";
|
||||
version = "0.8.4";
|
||||
sha256 = "sha256-hU6g4CqcCxXlhqSKL36vgzX2EJ7fIdbIuPCHbpRW/zE=";
|
||||
} ];
|
||||
|
||||
hm.programs.vscode.userSettings = {
|
||||
"crystal-lang.completion" = true;
|
||||
"crystal-lang.hover" = true;
|
||||
"crystal-lang.implementations" = true;
|
||||
|
||||
"crystal-lang.server" = getExe pkgs.crystalline;
|
||||
"crystal-lang.compiler" = getExe crpkgs.crystal;
|
||||
"crystal-lang.shards" = getExe pkgs.shards;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
{ lib, config, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.dev;
|
||||
in {
|
||||
options.modules.dev = {
|
||||
enable = mkEnableOption "general dev utilities";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
silent = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue