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" "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": { "helix": {
"inputs": { "inputs": {
"crane": "crane", "crane": "crane",
@ -158,7 +173,9 @@
}, },
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_4" "nixpkgs": [
"nixpkgs"
]
}, },
"locked": { "locked": {
"lastModified": 1693208669, "lastModified": 1693208669,
@ -240,22 +257,6 @@
} }
}, },
"nixpkgs_4": { "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": { "locked": {
"lastModified": 1692794066, "lastModified": 1692794066,
"narHash": "sha256-H0aG8r16dj0x/Wz6wQhQxc9V7AsObOiHPaKxQgH6Y08=", "narHash": "sha256-H0aG8r16dj0x/Wz6wQhQxc9V7AsObOiHPaKxQgH6Y08=",
@ -271,7 +272,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_6": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1693844670, "lastModified": 1693844670,
"narHash": "sha256-t69F2nBB8DNQUWHD809oJZJVE+23XBrth4QZuVd6IE0=", "narHash": "sha256-t69F2nBB8DNQUWHD809oJZJVE+23XBrth4QZuVd6IE0=",
@ -287,7 +288,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_7": { "nixpkgs_6": {
"locked": { "locked": {
"lastModified": 1693844670, "lastModified": 1693844670,
"narHash": "sha256-t69F2nBB8DNQUWHD809oJZJVE+23XBrth4QZuVd6IE0=", "narHash": "sha256-t69F2nBB8DNQUWHD809oJZJVE+23XBrth4QZuVd6IE0=",
@ -309,15 +310,16 @@
"disko": "disko", "disko": "disko",
"helix": "helix", "helix": "helix",
"home-manager": "home-manager", "home-manager": "home-manager",
"nixpkgs": "nixpkgs_5", "nixpkgs": "nixpkgs_4",
"rtx": "rtx", "rtx": "rtx",
"sops-nix": "sops-nix" "sops-nix": "sops-nix",
"utils": "utils"
} }
}, },
"rtx": { "rtx": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_3", "flake-utils": "flake-utils_3",
"nixpkgs": "nixpkgs_6" "nixpkgs": "nixpkgs_5"
}, },
"locked": { "locked": {
"lastModified": 1693923183, "lastModified": 1693923183,
@ -360,7 +362,7 @@
}, },
"sops-nix": { "sops-nix": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_7", "nixpkgs": "nixpkgs_6",
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
@ -406,6 +408,24 @@
"repo": "default", "repo": "default",
"type": "github" "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", "root": "root",

View file

@ -1,9 +1,15 @@
{ {
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05"; 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"; # 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"; 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"; disko.url = "github:nix-community/disko/master";
sops-nix.url = "github:Mic92/sops-nix"; sops-nix.url = "github:Mic92/sops-nix";
helix.url = "github:helix-editor/helix"; helix.url = "github:helix-editor/helix";

View file

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

View file

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

View file

@ -23,6 +23,7 @@ in
bind bind
bottom bottom
btrfs-progs btrfs-progs
cue
curl curl
dog dog
dua dua
@ -97,7 +98,7 @@ in
PasswordAuthentication = false; PasswordAuthentication = false;
}; };
# tailscale handles this I think # TODO: tailscale can handle this I think...?
openFirewall = lib.mkDefault true; openFirewall = lib.mkDefault true;
# listenAddresses = [ # listenAddresses = [
@ -119,24 +120,24 @@ in
useXkbConfig = true; useXkbConfig = true;
earlySetup = true; earlySetup = true;
# colors = [ colors = [
# "111111" "111111"
# "f92672" "f92672"
# "a6e22e" "a6e22e"
# "f4bf75" "f4bf75"
# "66d9ef" "66d9ef"
# "ae81ff" "ae81ff"
# "a1efe4" "a1efe4"
# "f8f8f2" "f8f8f2"
# "75715e" "75715e"
# "f92672" "f92672"
# "a6e22e" "a6e22e"
# "f4bf75" "f4bf75"
# "66d9ef" "66d9ef"
# "ae81ff" "ae81ff"
# "a1efe4" "a1efe4"
# "f9f8f5" "f9f8f5"
# ]; ];
}; };
networking = { 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! 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 ## NixOS
```shell_session ```shell_session
@ -62,8 +68,9 @@ nix-shell --packages git --run "sudo nix run \
# install # install
nix-shell --packages git \ nix-shell --packages git \
--run "sudo nixos-install \ --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 # To Do