templates: add gleam

This commit is contained in:
Daniel Flanagan 2024-05-28 10:14:04 -05:00
parent a86c25c85b
commit 998fccd132
9 changed files with 109 additions and 24 deletions

View file

@ -382,11 +382,11 @@
},
"nixpkgs_4": {
"locked": {
"lastModified": 1711703276,
"narHash": "sha256-iMUFArF0WCatKK6RzfUJknjem0H9m4KgorO/p3Dopkk=",
"lastModified": 1716330097,
"narHash": "sha256-8BO3B7e3BiyIDsaKA0tY8O88rClYRTjvAp66y+VBUeU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d8fe5e6c92d0d190646fb9f1056741a229980089",
"rev": "5710852ba686cc1fd0d3b8e22b3117d43ba374c2",
"type": "github"
},
"original": {
@ -462,11 +462,11 @@
"slippi-desktop": {
"flake": false,
"locked": {
"lastModified": 1711346593,
"narHash": "sha256-WWgGRT58w1a4UcEe924hqa4ZVodQtsbXC44aCOEj528=",
"lastModified": 1713234497,
"narHash": "sha256-UOZo3YybBldkn1McZRr0oAYEieTtjCGgcA4YqpEOyXI=",
"owner": "project-slippi",
"repo": "slippi-desktop-app",
"rev": "02f3f007cd03c6e2b0da57db65c90646efc04a86",
"rev": "ae8bb69e235b6e46b24bc966aeaa80f45030c6f9",
"type": "github"
},
"original": {
@ -504,11 +504,11 @@
"slippi-desktop": "slippi-desktop"
},
"locked": {
"lastModified": 1712071998,
"narHash": "sha256-k95NCkXJ61PGMFuqyMtfvP3yTLozED/7DkN+lBWK0gs=",
"lastModified": 1716565139,
"narHash": "sha256-kjfc9Mg/YdY8OQU+Irm8v9iIhtgIw5qW/6VAehjW6GA=",
"owner": "lytedev",
"repo": "ssbm-nix",
"rev": "eff966a97287d1d86b189d59a14bf744d86836b0",
"rev": "922b91f3f9c0dbdf2ce17921dfc07872d7d41c4b",
"type": "github"
},
"original": {

View file

@ -30,6 +30,7 @@
hyprland.url = "github:hyprwm/Hyprland";
ssbm.url = "github:lytedev/ssbm-nix";
# ssbm.url = "git+file:///home/daniel/code/open-source/ssbm-nix";
};
outputs = {

View file

@ -1,13 +1,13 @@
{inputs, ...}: {
imports = [
# {nixpkgs.overlays = [inputs.ssbm.overlay];}
# inputs.ssbm.homeManagerModules.default
{nixpkgs.overlays = [inputs.ssbm.overlay];}
inputs.ssbm.homeManagerModules.default
];
# ssbm = {
# slippi-launcher = {
# enable = false;
# launchMeleeOnPlay = false;
# };
# };
ssbm = {
slippi-launcher = {
enable = false;
launchMeleeOnPlay = false;
};
};
}

View file

@ -6,7 +6,7 @@
ssbm = {
cache.enable = true;
# overlay.enable = true;
overlay.enable = true;
gcc = {
rules.enable = true;

View file

@ -43,6 +43,7 @@
slack
godot_4
fractal
jdk17
prismlauncher
# variety
radeontop
@ -58,17 +59,17 @@
pass
firefox-no-tabs
# wallpaper-manager
# melee
melee
hyprland
];
services.mako.enable = lib.mkForce false; # don't use mako when using plasma
# ssbm = {
# slippi-launcher = {
# isoPath = "${config.home-manager.users.daniel.home.homeDirectory}/../games/roms/dolphin/melee.iso";
# };
# };
ssbm = {
slippi-launcher = {
isoPath = "${config.home-manager.users.daniel.home.homeDirectory}/../games/roms/dolphin/melee.iso";
};
};
wayland.windowManager.hyprland = {
settings = {

View file

@ -23,4 +23,8 @@
path = ./nim;
description = "A template for working on a Nim project";
};
gleam = {
path = ./gleam;
description = "A template for working on a Gleam project";
};
}

1
templates/gleam/.envrc Normal file
View file

@ -0,0 +1 @@
use flake

View file

@ -0,0 +1,13 @@
# secret files
*.secret.*
# sqlite databases
*.db
*.db-shm
*.db-wal
# nix build output
/result
# direnv cache
/.direnv

65
templates/gleam/flake.nix Normal file
View file

@ -0,0 +1,65 @@
{
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
outputs = inputs: let
supportedSystems = ["aarch64-linux" "x86_64-linux" "x86_64-darwin" "aarch64-darwin"];
forAllSystems = inputs.nixpkgs.lib.genAttrs supportedSystems;
nixpkgsFor = system: (import inputs.nixpkgs {inherit system;});
in {
devShells = forAllSystems (system: let
pkgs = nixpkgsFor system;
in {
default = pkgs.mkShell {
buildInputs = with pkgs; [
gleam
];
};
});
};
}
/*
# a useful overlay for setting packages to certain versions
overlay = final: prev: {
# erlangPackages = prev.beam.packagesWith prev.erlang_26;
# erlang = final.erlangPackages.erlang;
# elixir = final.erlangPackages.elixir_1_16;
# mixRelease = final.erlangPackages.mixRelease.override {
# elixir = final.elixir;
# };
# fetchMixDeps = final.erlangPackages.fetchMixDeps.override {
# elixir = final.elixir;
# };
# elixir-ls = prev.elixir-ls.override {elixir = final.elixir;};
};
# have a package
packages = forAllSystems (system: let
pkgs = nixpkgsFor system;
# inherit (pkgs) beamPackages;
# inherit (beamPackages) mixRelease fetchMixDeps;
version = "0.1.0";
src = ./.;
pname = "gleam-project";
in {
# this-package = mixRelease {
# inherit pname version src;
# mixFodDeps = fetchMixDeps {
# inherit version src;
# pname = "mix-deps-${pname}";
# hash = pkgs.lib.fakeSha256;
# };
# buildInputs = with pkgs; [sqlite];
# HOME = "$(pwd)";
# MIX_XDG = "$HOME";
# };
# default = outputs.packages.${system}.this-package;
});
*/