chore: clean up
This commit is contained in:
parent
e190c5cbaa
commit
cd8c34f8da
18 changed files with 399 additions and 301 deletions
60
flake.lock
generated
60
flake.lock
generated
|
|
@ -27,6 +27,27 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"fenix": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"rust-analyzer-src": "rust-analyzer-src"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1751438379,
|
||||||
|
"narHash": "sha256-0u0rFAkdUIexx8r7+TkGjUsmauK6kKQ/RtE7vCEwLLE=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "fenix",
|
||||||
|
"rev": "9d776d59084355be7d187a047f64c36664249c4d",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "fenix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"flake-compat": {
|
"flake-compat": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
|
@ -172,6 +193,26 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nil": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1751341694,
|
||||||
|
"narHash": "sha256-zXag1+8iZC3H5yVFP7KhIi4ps9z8xKrFIkyaeXlZ7Uo=",
|
||||||
|
"owner": "oxalica",
|
||||||
|
"repo": "nil",
|
||||||
|
"rev": "b043bfe1f3f4c4be4b688e24c5ae96e81f525805",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "oxalica",
|
||||||
|
"repo": "nil",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nix": {
|
"nix": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat_2",
|
"flake-compat": "flake-compat_2",
|
||||||
|
|
@ -314,13 +355,32 @@
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"agenix": "agenix",
|
"agenix": "agenix",
|
||||||
|
"fenix": "fenix",
|
||||||
"ghostty": "ghostty",
|
"ghostty": "ghostty",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
|
"nil": "nil",
|
||||||
"nix": "nix",
|
"nix": "nix",
|
||||||
"nix-darwin": "nix-darwin",
|
"nix-darwin": "nix-darwin",
|
||||||
"nixpkgs": "nixpkgs_2"
|
"nixpkgs": "nixpkgs_2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"rust-analyzer-src": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1751377982,
|
||||||
|
"narHash": "sha256-eqf9Bxe3uBNG4xwcteIKt855wHuT+j6orPiABQ83dDw=",
|
||||||
|
"owner": "rust-lang",
|
||||||
|
"repo": "rust-analyzer",
|
||||||
|
"rev": "aa16885e6282a540ecfbffa0d886ed9904b425bc",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "rust-lang",
|
||||||
|
"ref": "nightly",
|
||||||
|
"repo": "rust-analyzer",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"systems": {
|
"systems": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1681028828,
|
"lastModified": 1681028828,
|
||||||
|
|
|
||||||
10
flake.nix
10
flake.nix
|
|
@ -20,6 +20,14 @@
|
||||||
ghostty = {
|
ghostty = {
|
||||||
url = "github:ghostty-org/ghostty";
|
url = "github:ghostty-org/ghostty";
|
||||||
};
|
};
|
||||||
|
fenix = {
|
||||||
|
url = "github:nix-community/fenix";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
nil = {
|
||||||
|
url = "github:oxalica/nil";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
# wrapper-manager = {
|
# wrapper-manager = {
|
||||||
# url = "github:viperML/wrapper-manager";
|
# url = "github:viperML/wrapper-manager";
|
||||||
# inputs.nixpkgs.follows = "nixpkgs";
|
# inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
@ -29,7 +37,7 @@
|
||||||
|
|
||||||
outputs = inputs@{ self, nixpkgs, nix-darwin, nix, ... }: let
|
outputs = inputs@{ self, nixpkgs, nix-darwin, nix, ... }: let
|
||||||
inherit (builtins) readDir;
|
inherit (builtins) readDir;
|
||||||
inherit (nixpkgs.lib) attrsToList const groupBy listToAttrs mapAttrs last mkOption splitString;
|
inherit (nixpkgs.lib) attrsToList const groupBy listToAttrs mapAttrs;
|
||||||
#nix.enable = false;
|
#nix.enable = false;
|
||||||
|
|
||||||
lib = nixpkgs.lib // nix-darwin.lib;
|
lib = nixpkgs.lib // nix-darwin.lib;
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
# your system. Help is available in the configuration.nix(5) man page, on
|
# your system. Help is available in the configuration.nix(5) man page, on
|
||||||
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
||||||
|
|
||||||
{ self, config, pkgs, lib, inputs, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ ./hardware-configuration.nix ];
|
imports = [ ./hardware-configuration.nix ];
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
# your system. Help is available in the configuration.nix(5) man page, on
|
# your system. Help is available in the configuration.nix(5) man page, on
|
||||||
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
||||||
|
|
||||||
{ self, config, pkgs, lib, inputs, ... }:
|
{ config, pkgs, inputs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ ./hardware-configuration.nix ./site.nix ./cache ];
|
imports = [ ./hardware-configuration.nix ./site.nix ./cache ];
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
{ lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, ... }: {
|
{
|
||||||
system.primaryUser = "thegeneralist";
|
system.primaryUser = "thegeneralist";
|
||||||
|
|
||||||
# TODO: explore this.
|
# TODO: explore this.
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
# your system. Help is available in the configuration.nix(5) man page, on
|
# your system. Help is available in the configuration.nix(5) man page, on
|
||||||
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
||||||
|
|
||||||
{ self, config, pkgs, lib, inputs, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ ./hardware-configuration.nix ./aerospace.nix ];
|
imports = [ ./hardware-configuration.nix ./aerospace.nix ];
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
# your system. Help is available in the configuration.nix(5) man page, on
|
# your system. Help is available in the configuration.nix(5) man page, on
|
||||||
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
||||||
|
|
||||||
{ self, config, pkgs, lib, inputs, ... }:
|
{ config, pkgs, inputs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ ./hardware-configuration.nix ];
|
imports = [ ./hardware-configuration.nix ];
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
{ config, lib, modulesPath, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, options, ... }: let
|
{ lib, ... }: let
|
||||||
inherit (lib) mkOption;
|
inherit (lib) mkOption;
|
||||||
in {
|
in {
|
||||||
options.dnsServers = mkOption {
|
options.dnsServers = mkOption {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{ lib, pkgs, config, ... }: let
|
{ lib, pkgs, ... }: let
|
||||||
inherit (lib) optionalAttrs getExe;
|
inherit (lib) getExe;
|
||||||
in {
|
in {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
gnupg
|
gnupg
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, pkgs, lib, ...}: let
|
{ config, pkgs, ...}: let
|
||||||
subs = [
|
subs = [
|
||||||
"https://cache.thegeneralist01.com/"
|
"https://cache.thegeneralist01.com/"
|
||||||
"https://cache.garnix.io/"
|
"https://cache.garnix.io/"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, pkgs, lib, wrapper-manager, ... }: let
|
{ config, pkgs, lib, ... }: let
|
||||||
inherit (lib) readFile getExe mkIf optionalAttrs;
|
inherit (lib) readFile getExe mkIf optionalAttrs;
|
||||||
in {
|
in {
|
||||||
# TODO: starship + change the zoxide src
|
# TODO: starship + change the zoxide src
|
||||||
|
|
|
||||||
31
modules/common/rust.nix
Normal file
31
modules/common/rust.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
# TODO: install nil (nix language server)
|
||||||
|
# TODO: check these out: https://github.com/RGBCube/ncc/blob/86212e148b2642a51814e873a81be73fbc494e86/modules/common/rust.nix#L15-L24
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
(fenix.complete.withComponents [
|
||||||
|
"cargo"
|
||||||
|
"clippy"
|
||||||
|
"rust-src"
|
||||||
|
"rustc"
|
||||||
|
"rustfmt"
|
||||||
|
])
|
||||||
|
rust-analyzer-nightly
|
||||||
|
|
||||||
|
# for nil
|
||||||
|
nil
|
||||||
|
nixfmt-rfc-style
|
||||||
|
];
|
||||||
|
|
||||||
|
# home-manager.sharedModules = [{
|
||||||
|
# extraWrapperArgs = [
|
||||||
|
# "--suffix"
|
||||||
|
# "LIBRARY_PATH"
|
||||||
|
# ":"
|
||||||
|
# "${lib.makeLibraryPath [ pkgs.stdenv.cc.cc pkgs.zlib ]}"
|
||||||
|
# "--suffix"
|
||||||
|
# "PKG_CONFIG_PATH"
|
||||||
|
# ":"
|
||||||
|
# "${lib.makeSearchPathOutput "dev" "lib/pkgconfig" [ pkgs.stdenv.cc.cc pkgs.zlib ]}"
|
||||||
|
# ];
|
||||||
|
# }];
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, ... }: {
|
{
|
||||||
services.tailscale = {
|
services.tailscale = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, ... }: let
|
let
|
||||||
numbers = [
|
numbers = [
|
||||||
"1" "2" "3" "4" "5" "6" "7" "8" "9" "0"
|
"1" "2" "3" "4" "5" "6" "7" "8" "9" "0"
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,13 @@
|
||||||
# TODO: this
|
{ lib, ... }: let
|
||||||
# { lib, ... }: let
|
sshOptions = {
|
||||||
# sshOptions = {
|
PermitRootLogin = "no";
|
||||||
# PermitRootLogin = "no";
|
PasswordAuthentication = "no";
|
||||||
# PasswordAuthentication = "no";
|
};
|
||||||
# };
|
in {
|
||||||
# in {
|
services.openssh = {
|
||||||
# services.openssh = {
|
enable = true;
|
||||||
# enable = true;
|
extraConfig = sshOptions
|
||||||
# extraConfig = sshOptions
|
|> lib.mapAttrsToList (name: value: "${name} ${value}")
|
||||||
# |> lib.mapAttrsToList (name: value: "${name} ${value}")
|
|> lib.concatStringsSep "\n";
|
||||||
# |> lib.concatStringsSep "\n";
|
};
|
||||||
# };
|
}
|
||||||
# }
|
|
||||||
{}
|
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@ return {
|
||||||
-- :get_install_path() .. "/node_modules/@vue/language-server" .. "/node_modules/@vue/typescript-plugin"
|
-- :get_install_path() .. "/node_modules/@vue/language-server" .. "/node_modules/@vue/typescript-plugin"
|
||||||
|
|
||||||
local capabilities = require("blink.cmp").get_lsp_capabilities()
|
local capabilities = require("blink.cmp").get_lsp_capabilities()
|
||||||
|
vim.lsp.enable("nil_ls")
|
||||||
require("mason-lspconfig").setup({
|
require("mason-lspconfig").setup({
|
||||||
automatic_enable = true,
|
automatic_enable = true,
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue