Merge remote-tracking branch 'origin/main'

This commit is contained in:
Daniel Flanagan 2023-09-22 12:57:25 -05:00
commit 28cb913075
Signed by: lytedev
GPG key ID: 5B2020A0F9921EF4
8 changed files with 156 additions and 73 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
result
*.qcow2

View file

@ -135,6 +135,21 @@
"type": "github"
}
},
"flake-utils_4": {
"locked": {
"lastModified": 1644229661,
"narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"helix": {
"inputs": {
"crane": "crane",
@ -158,7 +173,9 @@
},
"home-manager": {
"inputs": {
"nixpkgs": "nixpkgs_4"
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1693208669,
@ -240,22 +257,6 @@
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1693771906,
"narHash": "sha256-32EnPCaVjOiEERZ+o/2Ir7JH9pkfwJZJ27SKHNvt4yk=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "da5adce0ffaff10f6d0fee72a02a5ed9d01b52fc",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_5": {
"locked": {
"lastModified": 1692794066,
"narHash": "sha256-H0aG8r16dj0x/Wz6wQhQxc9V7AsObOiHPaKxQgH6Y08=",
@ -271,7 +272,7 @@
"type": "github"
}
},
"nixpkgs_6": {
"nixpkgs_5": {
"locked": {
"lastModified": 1693844670,
"narHash": "sha256-t69F2nBB8DNQUWHD809oJZJVE+23XBrth4QZuVd6IE0=",
@ -287,7 +288,7 @@
"type": "github"
}
},
"nixpkgs_7": {
"nixpkgs_6": {
"locked": {
"lastModified": 1693844670,
"narHash": "sha256-t69F2nBB8DNQUWHD809oJZJVE+23XBrth4QZuVd6IE0=",
@ -309,15 +310,16 @@
"disko": "disko",
"helix": "helix",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs_5",
"nixpkgs": "nixpkgs_4",
"rtx": "rtx",
"sops-nix": "sops-nix"
"sops-nix": "sops-nix",
"utils": "utils"
}
},
"rtx": {
"inputs": {
"flake-utils": "flake-utils_3",
"nixpkgs": "nixpkgs_6"
"nixpkgs": "nixpkgs_5"
},
"locked": {
"lastModified": 1693923183,
@ -360,7 +362,7 @@
},
"sops-nix": {
"inputs": {
"nixpkgs": "nixpkgs_7",
"nixpkgs": "nixpkgs_6",
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
@ -406,6 +408,24 @@
"repo": "default",
"type": "github"
}
},
"utils": {
"inputs": {
"flake-utils": "flake-utils_4"
},
"locked": {
"lastModified": 1657226504,
"narHash": "sha256-GIYNjuq4mJlFgqKsZ+YrgzWm0IpA4axA3MCrdKYj7gs=",
"owner": "gytis-ivaskevicius",
"repo": "flake-utils-plus",
"rev": "2bf0f91643c2e5ae38c1b26893ac2927ac9bd82a",
"type": "github"
},
"original": {
"owner": "gytis-ivaskevicius",
"repo": "flake-utils-plus",
"type": "github"
}
}
},
"root": "root",

View file

@ -1,9 +1,15 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
utils.url = "github:gytis-ivaskevicius/flake-utils-plus";
# nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-channels/nixos-unstable";
api-lyte-dev.url = "git+ssh://gitea@git.lyte.dev/lytedev/api.lyte.dev.git";
home-manager.url = "github:nix-community/home-manager/release-23.05";
home-manager = {
url = "github:nix-community/home-manager/release-23.05";
inputs.nixpkgs.follows = "nixpkgs";
inputs.utils.follows = "utils";
};
disko.url = "github:nix-community/disko/master";
sops-nix.url = "github:Mic92/sops-nix";
helix.url = "github:helix-editor/helix";

View file

@ -159,12 +159,23 @@ in
command = "lexical";
args = [ "start" ];
};
next-ls = {
command = "next-ls";
args = [ "--stdout" ];
};
deno = {
command = "deno";
args = [ "lsp" ];
config = { enable = true; lint = true; unstable = true; };
};
};
language = [
{
name = "elixir";
language-servers = [ "elixir-ls" "lexical" ];
language-servers = [ "elixir-ls" "lexical" "next-ls" ];
auto-format = true;
}
{
@ -187,20 +198,63 @@ in
unit = "\t";
};
}
# TODO: deno:
#[[language]]
#name = "javascript"
#scope = "source.js"
#injection-regex = "^(js|javascript)$"
#file-types = [ "js", "jsx", "mjs" ]
#shebangs = [ "deno", "node" ]
#roots = [ "deno.jsonc", "deno.json", "package.json", "tsconfig.json" ]
#comment-token = "//"
# config = { enable = true, lint = true, unstable = true }
# language-server = { command = "typescript-language-server", args = ["--stdio"], language-id = "javascript" }
#indent = {
#tab-width = 2, unit = "\t" }
#auto-format = true
{
name = "javascript";
language-id = "javascript";
grammar = "javascript";
scope = "source.js";
injection-regex = "^(js|javascript)$";
file-types = [ "js" "mjs" ];
shebangs = [ "deno" ];
language-servers = [ "deno" ];
roots = [ "deno.jsonc" "deno.json" ];
formatter = {
command = "deno";
args = [ "fmt" ];
};
auto-format = true;
comment-token = "//";
indent = {
tab-width = 2;
unit = "\t";
};
}
{
name = "typescript";
language-id = "typescript";
grammar = "typescript";
scope = "source.ts";
injection-regex = "^(ts|typescript)$";
file-types = [ "ts" ];
shebangs = [ "deno" ];
language-servers = [ "deno" ];
roots = [ "deno.jsonc" "deno.json" ];
formatter = {
command = "deno";
args = [ "fmt" ];
};
auto-format = true;
comment-token = "//";
indent = {
tab-width = 2;
unit = "\t";
};
}
{
name = "jsonc";
language-id = "json";
grammar = "jsonc";
scope = "source.jsonc";
injection-regex = "^(jsonc)$";
roots = [ "deno.jsonc" "deno.json" ];
file-types = [ "jsonc" ];
language-servers = [ "deno" ];
indent = { tab-width = 2; unit = " "; };
auto-format = true;
}
# [[language]]
# name = "jsx"
@ -216,18 +270,6 @@ in
# grammar = "javascript"
# auto-format = true
# [[language]]
# name = "typescript"
# scope = "source.ts"
# injection-regex = "^(ts|typescript)$"
# file-types = ["ts"]
# shebangs = ["deno", "node"]
# roots = ["deno.jsonc", "deno.json", "package.json", "tsconfig.json"]
# config = { enable = true, lint = true, unstable = true }
# language-server = { command = "deno", args = ["lsp"], language-id = "typescript" }
# indent = { tab-width = 2, unit = " " }
# auto-format = true
# [[language]]
# name = "tsx"
# scope = "source.tsx"

View file

@ -31,7 +31,7 @@ in
{
# TODO: disko-fy rascal and beefcake?
beefcake = nixosSystem "x86-64-linux" [
beefcake = nixosSystem "x86_64-linux" [
./nixos/beefcake.nix
inputs.api-lyte-dev.nixosModules.x86_64-linux.api-lyte-dev
];

View file

@ -23,6 +23,7 @@ in
bind
bottom
btrfs-progs
cue
curl
dog
dua
@ -97,7 +98,7 @@ in
PasswordAuthentication = false;
};
# tailscale handles this I think
# TODO: tailscale can handle this I think...?
openFirewall = lib.mkDefault true;
# listenAddresses = [
@ -119,24 +120,24 @@ in
useXkbConfig = true;
earlySetup = true;
# colors = [
# "111111"
# "f92672"
# "a6e22e"
# "f4bf75"
# "66d9ef"
# "ae81ff"
# "a1efe4"
# "f8f8f2"
# "75715e"
# "f92672"
# "a6e22e"
# "f4bf75"
# "66d9ef"
# "ae81ff"
# "a1efe4"
# "f9f8f5"
# ];
colors = [
"111111"
"f92672"
"a6e22e"
"f4bf75"
"66d9ef"
"ae81ff"
"a1efe4"
"f8f8f2"
"75715e"
"f92672"
"a6e22e"
"f4bf75"
"66d9ef"
"ae81ff"
"a1efe4"
"f9f8f5"
];
};
networking = {

5
pre-commit.bash Executable file
View file

@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -eux
nix flake check

View file

@ -11,6 +11,12 @@ here is useful inspiration.
You don't have even have to clone this crap yourself. How cool is that!
But if you're gonna change stuff you had better setup the pre-commit hook:
```shell_session
ln -s $PWD/pre-commit.bash .git/hooks/pre-commit
```
## NixOS
```shell_session
@ -62,8 +68,9 @@ nix-shell --packages git --run "sudo nix run \
# install
nix-shell --packages git \
--run "sudo nixos-install \
--option substituters https://nix.h.lyte.dev
--flake 'git+https://git.lyte.dev/lytedev/nix#${FLAKE_ATTR}'"
--flake 'git+https://git.lyte.dev/lytedev/nix#${FLAKE_ATTR}' \
--option substituters 'https://nix.h.lyte.dev' \
--option trusted-public-keys 'h.lyte.dev:HeVWtne31ZG8iMf+c15VY3/Mky/4ufXlfTpT8+4Xbs0='"
```
# To Do