some housecleaning
This commit is contained in:
36
flake.nix
36
flake.nix
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
description = "My (i.e. fufexan's) NixOS flake configuration";
|
description = "Flake config, _heavily_ influenced by fufexan's";
|
||||||
|
|
||||||
outputs = inputs:
|
outputs = inputs:
|
||||||
inputs.flake-parts.lib.mkFlake {inherit inputs;} {
|
inputs.flake-parts.lib.mkFlake {inherit inputs;} {
|
||||||
@@ -23,12 +23,13 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
# nix environs
|
# Nix environment
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
nixpkgs-small.url = "github:NixOS/nixpkgs/nixos-unstable-small";
|
nixpkgs-small.url = "github:NixOS/nixpkgs/nixos-unstable-small";
|
||||||
systems.url = "github:nix-systems/default-linux";
|
systems.url = "github:nix-systems/default-linux";
|
||||||
hardware.url = "github:nixos/nixos-hardware";
|
hardware.url = "github:nixos/nixos-hardware";
|
||||||
lanzaboote.url = "github:nix-community/lanzaboote";
|
lanzaboote.url = "github:nix-community/lanzaboote";
|
||||||
|
|
||||||
nixpak = {
|
nixpak = {
|
||||||
url = "github:nixpak/nixpak";
|
url = "github:nixpak/nixpak";
|
||||||
inputs = {
|
inputs = {
|
||||||
@@ -36,31 +37,30 @@
|
|||||||
flake-parts.follows = "flake-parts";
|
flake-parts.follows = "flake-parts";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
flake-utils = {
|
flake-utils = {
|
||||||
url = "github:numtide/flake-utils";
|
url = "github:numtide/flake-utils";
|
||||||
inputs.systems.follows = "systems";
|
inputs.systems.follows = "systems";
|
||||||
};
|
};
|
||||||
flake-compat.url = "github:edolstra/flake-compat";
|
flake-compat.url = "github:edolstra/flake-compat";
|
||||||
|
|
||||||
hm = {
|
hm = {
|
||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
flake-parts = {
|
flake-parts = {
|
||||||
url = "github:hercules-ci/flake-parts";
|
url = "github:hercules-ci/flake-parts";
|
||||||
inputs.nixpkgs-lib.follows = "nixpkgs";
|
inputs.nixpkgs-lib.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
# cachyos
|
|
||||||
chaotic.url = "https://flakehub.com/f/chaotic-cx/nyx/*.tar.gz";
|
|
||||||
|
|
||||||
#hmm
|
# Hyprland environment
|
||||||
helix.url = "github:SoraTenshi/helix/new-daily-driver";
|
|
||||||
|
|
||||||
# hyprland environ
|
|
||||||
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
|
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
|
||||||
hyprland-contrib = {
|
hyprland-contrib = {
|
||||||
url = "github:hyprwm/contrib";
|
url = "github:hyprwm/contrib";
|
||||||
inputs.nixpkgs.follows = "hyprland/nixpkgs";
|
inputs.nixpkgs.follows = "hyprland/nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
hyprlock = {
|
hyprlock = {
|
||||||
url = "github:hyprwm/hyprlock";
|
url = "github:hyprwm/hyprlock";
|
||||||
inputs = {
|
inputs = {
|
||||||
@@ -70,6 +70,7 @@
|
|||||||
systems.follows = "hyprland/systems";
|
systems.follows = "hyprland/systems";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
hypridle = {
|
hypridle = {
|
||||||
url = "github:hyprwm/hypridle";
|
url = "github:hyprwm/hypridle";
|
||||||
inputs = {
|
inputs = {
|
||||||
@@ -79,6 +80,7 @@
|
|||||||
systems.follows = "hyprland/systems";
|
systems.follows = "hyprland/systems";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
hyprpaper = {
|
hyprpaper = {
|
||||||
url = "github:hyprwm/hyprpaper";
|
url = "github:hyprwm/hyprpaper";
|
||||||
inputs = {
|
inputs = {
|
||||||
@@ -88,6 +90,12 @@
|
|||||||
systems.follows = "hyprland/systems";
|
systems.follows = "hyprland/systems";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Cachyos
|
||||||
|
chaotic.url = "https://flakehub.com/f/chaotic-cx/nyx/*.tar.gz";
|
||||||
|
|
||||||
|
# Miscellaneous
|
||||||
|
helix.url = "github:SoraTenshi/helix/new-daily-driver";
|
||||||
nix-gaming = {
|
nix-gaming = {
|
||||||
url = "github:fufexan/nix-gaming";
|
url = "github:fufexan/nix-gaming";
|
||||||
inputs = {
|
inputs = {
|
||||||
@@ -95,30 +103,30 @@
|
|||||||
flake-parts.follows = "flake-parts";
|
flake-parts.follows = "flake-parts";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
firefox-nightly = {
|
firefox-nightly = {
|
||||||
url = "github:nix-community/flake-firefox-nightly";
|
url = "github:nix-community/flake-firefox-nightly";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
# Third party programs, packaged with nix
|
|
||||||
firefox-addons = {
|
firefox-addons = {
|
||||||
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
|
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
anyrun.url = "github:anyrun-org/anyrun";
|
anyrun.url = "github:anyrun-org/anyrun";
|
||||||
microfetch.url = "github:NotAShelf/microfetch";
|
microfetch.url = "github:NotAShelf/microfetch";
|
||||||
agenix.url = "github:ryantm/agenix";
|
agenix.url = "github:ryantm/agenix";
|
||||||
# rust toolchain
|
|
||||||
|
# Rust toolchain
|
||||||
fenix = {
|
fenix = {
|
||||||
url = "github:nix-community/fenix";
|
url = "github:nix-community/fenix";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
wezterm = {
|
wezterm = {
|
||||||
url = "github:wez/wezterm/main?dir=nix";
|
url = "github:wez/wezterm/main?dir=nix";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
# naersk = {
|
|
||||||
# url = "github:nix-community/naersk";
|
|
||||||
# inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
# };
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ in {
|
|||||||
color-modes = true;
|
color-modes = true;
|
||||||
scrolloff = 0;
|
scrolloff = 0;
|
||||||
cursorline = true;
|
cursorline = true;
|
||||||
|
completion-replace = true;
|
||||||
cursor-shape = {
|
cursor-shape = {
|
||||||
insert = "bar";
|
insert = "bar";
|
||||||
normal = "block";
|
normal = "block";
|
||||||
@@ -38,8 +39,36 @@ in {
|
|||||||
cursor-line = "hint";
|
cursor-line = "hint";
|
||||||
other-lines = "error";
|
other-lines = "error";
|
||||||
};
|
};
|
||||||
lsp.display-inlay-hints = true;
|
lsp = {
|
||||||
statusline.center = ["position-percentage"];
|
display-messages = true;
|
||||||
|
display-inlay-hints = true;
|
||||||
|
};
|
||||||
|
gutters = ["diagnostics" "line-numbers" "spacer" "diff"];
|
||||||
|
statusline = {
|
||||||
|
separator = "of";
|
||||||
|
left = [
|
||||||
|
"mode"
|
||||||
|
"selections"
|
||||||
|
"file-type"
|
||||||
|
"register"
|
||||||
|
"spinner"
|
||||||
|
"diagnostics"
|
||||||
|
];
|
||||||
|
center = ["file-name"];
|
||||||
|
right = [
|
||||||
|
"file-encoding"
|
||||||
|
"file-line-ending"
|
||||||
|
"position-percentage"
|
||||||
|
"spacer"
|
||||||
|
"separator"
|
||||||
|
"total-line-numbers"
|
||||||
|
];
|
||||||
|
mode = {
|
||||||
|
normal = "NOR";
|
||||||
|
insert = "INS";
|
||||||
|
select = "SEL";
|
||||||
|
};
|
||||||
|
};
|
||||||
true-color = true;
|
true-color = true;
|
||||||
whitespace.characters = {
|
whitespace.characters = {
|
||||||
newline = "↴";
|
newline = "↴";
|
||||||
@@ -70,8 +99,17 @@ in {
|
|||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
normal = {
|
normal = {
|
||||||
y = "yank_to_clipboard";
|
d = {
|
||||||
p = "paste_clipboard_after";
|
d = ["extend_to_line_bounds" "yank_main_selection_to_clipboard" "delete_selection"];
|
||||||
|
s = ["surround_delete"];
|
||||||
|
};
|
||||||
|
x = "delete_selection";
|
||||||
|
y = {
|
||||||
|
y = ["extend_to_line_bounds" "yank_main_selection_to_clipboard" "normal_mode" "collapse_selection"];
|
||||||
|
};
|
||||||
|
Y = ["extend_to_line_end" "yank_main_selection_to_clipboard" "collapse_selection"];
|
||||||
|
P = ["paste_clipboard_before" "collapse_selection"];
|
||||||
|
p = ["paste_clipboard_after" "collapse_selection"];
|
||||||
C-a = "select_all";
|
C-a = "select_all";
|
||||||
del = "delete_selection";
|
del = "delete_selection";
|
||||||
space = spaceMode;
|
space = spaceMode;
|
||||||
@@ -79,9 +117,18 @@ in {
|
|||||||
insert = {
|
insert = {
|
||||||
C-v = "paste_clipboard_after";
|
C-v = "paste_clipboard_after";
|
||||||
C-c = "yank_to_clipboard";
|
C-c = "yank_to_clipboard";
|
||||||
|
C-x = "completion";
|
||||||
|
del = "delete_selection";
|
||||||
|
esc = ["collapse_selection" "normal_mode"];
|
||||||
};
|
};
|
||||||
select = {
|
select = {
|
||||||
space = spaceMode;
|
space = spaceMode;
|
||||||
|
d = ["yank_main_selection_to_clipboard" "delete_selection"];
|
||||||
|
x = ["yank_main_selection_to_clipboard" "delete_selection"];
|
||||||
|
y = ["yank_main_selection_to_clipboard" "normal_mode" "flip_selections" "collapse_selection"];
|
||||||
|
Y = ["extend_to_line_bounds" "yank_main_selection_to_clipboard" "goto_line_start" "collapse_selection" "normal_mode"];
|
||||||
|
p = ["replace_selections_with_clipboard"];
|
||||||
|
P = ["paste_clipboard_before"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -56,6 +56,16 @@
|
|||||||
auto-format = true;
|
auto-format = true;
|
||||||
language-servers = ["dprint" "typescript-language-server"];
|
language-servers = ["dprint" "typescript-language-server"];
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
name = "nix";
|
||||||
|
auto-format = true;
|
||||||
|
file-types = ["nix"];
|
||||||
|
language-servers = ["nil"];
|
||||||
|
formatter = {
|
||||||
|
command = lib.getExe pkgs.alejandra;
|
||||||
|
args = ["-q"];
|
||||||
|
};
|
||||||
|
}
|
||||||
{
|
{
|
||||||
name = "json";
|
name = "json";
|
||||||
formatter = deno "json";
|
formatter = deno "json";
|
||||||
@@ -67,7 +77,7 @@
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
name = "python";
|
name = "python";
|
||||||
language-servers = ["pyright"];
|
language-servers = ["pylsp"];
|
||||||
formatter = {
|
formatter = {
|
||||||
command = lib.getExe pkgs.black;
|
command = lib.getExe pkgs.black;
|
||||||
args = ["-" "--quiet" "--line-length 100"];
|
args = ["-" "--quiet" "--line-length 100"];
|
||||||
@@ -100,6 +110,11 @@
|
|||||||
++ prettierLangs langs;
|
++ prettierLangs langs;
|
||||||
|
|
||||||
language-server = {
|
language-server = {
|
||||||
|
gpt = {
|
||||||
|
command = "helix-gpt";
|
||||||
|
args = ["--copilotApiKey" "cat /run/agenix/helix-gpt"];
|
||||||
|
};
|
||||||
|
|
||||||
bash-language-server = {
|
bash-language-server = {
|
||||||
command = lib.getExe pkgs.bash-language-server;
|
command = lib.getExe pkgs.bash-language-server;
|
||||||
args = ["start"];
|
args = ["start"];
|
||||||
@@ -148,7 +163,6 @@
|
|||||||
|
|
||||||
nil = {
|
nil = {
|
||||||
command = lib.getExe pkgs.nil;
|
command = lib.getExe pkgs.nil;
|
||||||
config.nil.formatting.command = ["${lib.getExe pkgs.alejandra}" "-q"];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
pyright = {
|
pyright = {
|
||||||
|
|||||||
@@ -10,11 +10,6 @@ in {
|
|||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
# hashedPasswordFile = config.age.secrets.openai.path;
|
# hashedPasswordFile = config.age.secrets.openai.path;
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
openssh.authorizedKeys.keys = [
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPTdWHnYsr+sWg1tMSPRUaQhB8msdCoanaJOtP8v1ZBX root@cnix"
|
|
||||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCtk/N0vZIangyccQoDq1e+k+t9gdymaYvjIs+Xh6TIMuDEO2piaiAs5PvIPQI3FPlPG4rQKgJwE3RwTCM1XXX/euhXzzmae32E/eLBF7fOtT0YjA07sXAW+vjKI7xhEdh+3D2Vi59taV/sw8QsNwTYFo1BQjjwqSHN+xhM3myFKEMquTxo6LqfFMR8oLSTyC4qUwk+H2w/6kmVFJa/7qGVhbEpryM/Oj+LMqzG6PYfmWzZ2qPFJ4FWHLTLVstBxpvT4p91lm0Z6aC+4KyYo52vwzEk2U/GGwzzc5DbXgyAzhaU8BM8IWkaRiE7RU8PNM1vRQ05L1JJ1T2o9a92QeZiJxz+3cgV/yZUYOKdZNrfskKpOzdm00yfhznVpI8y1lfgyvd+eJRLLpeOkGnAO3fW7RLLcwVKX6st8gBWf2SKWNFyuWdTU9SJC/sgttiBrsCiBTItKYLE8ihdJLrJn+cIxUoFe6WjZa9bv0WWetiW3g1WgiJeIWnlWERdDsxKfatwkE8mfPJtt6mZio/cLyC16HN57fNkqMqelca9deaXu2hwWBuE0dsOsL6HlhY8lFwQ5P+x7D3gZGpYWMZl35uqDt2AzFGje3Rrzv0NO7UUixeIit6c5BWhSxIpSgpl6065Uo5+jfeQlbaO1Kri4wwCR6VvQ/F0v+4IQZLSzOC3Gw== root@cnix"
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJMWwiz9YWBMUKFtAmF3xTEdBW27zkBH8UYaqWWcs70d cnst@cnix"
|
|
||||||
];
|
|
||||||
extraGroups = ifTheyExist [
|
extraGroups = ifTheyExist [
|
||||||
"wheel"
|
"wheel"
|
||||||
"networkmanager"
|
"networkmanager"
|
||||||
@@ -51,6 +46,8 @@ in {
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# environment.variables.COPILOT_API_KEY = config.age.secrets.cnstcopilot.path;
|
||||||
|
|
||||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||||
system.stateVersion = lib.mkDefault "23.11";
|
system.stateVersion = lib.mkDefault "23.11";
|
||||||
}
|
}
|
||||||
|
|||||||
9
secrets/helix-gpt.age
Normal file
9
secrets/helix-gpt.age
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
age-encryption.org/v1
|
||||||
|
-> ssh-ed25519 13OpUQ pp2AqYbrvBHQuDxP0vwYHqXGEfROAZyps5PJDRXxuFI
|
||||||
|
T6eZEJkyAhhjxCLOmNRQxi5810m714gLOjOhJmQbJKw
|
||||||
|
-> ssh-ed25519 /lVW0g amS6bihZ4oqY1Pbih6i95c8xMCZzhb905YgmNNWJWzI
|
||||||
|
l/hJ7Smi1lXELNSAiFR/5cBpttwaLi6IJ0oHMvlXbOk
|
||||||
|
--- 5hrzVRt5StWSeQvk1hrMEi+ReC2HqWDJFOOFkqNwAkE
|
||||||
|
<1D><><EFBFBD>{.`<60><><1F>D4e<07>/X
|
||||||
|
$<24><1F>[<5B> 74S{
|
||||||
|
6<1A>OV<><56><18>V<EFBFBD><56>?-<2D>v<>I챒7:i<>@ոא<D5B8>"
|
||||||
@@ -5,4 +5,5 @@ let
|
|||||||
in {
|
in {
|
||||||
"cnstssh.age".publicKeys = [cnst cnix];
|
"cnstssh.age".publicKeys = [cnst cnix];
|
||||||
"cnixssh.age".publicKeys = [cnst cnix];
|
"cnixssh.age".publicKeys = [cnst cnix];
|
||||||
|
"helix-gpt.age".publicKeys = [cnst cnix];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,6 +38,7 @@
|
|||||||
marksman
|
marksman
|
||||||
pyright
|
pyright
|
||||||
nodePackages_latest.intelephense
|
nodePackages_latest.intelephense
|
||||||
|
helix-gpt
|
||||||
|
|
||||||
# Formatters
|
# Formatters
|
||||||
alejandra
|
alejandra
|
||||||
|
|||||||
@@ -36,6 +36,11 @@ in {
|
|||||||
secrets = {
|
secrets = {
|
||||||
cnstssh.file = "${self}/secrets/cnstssh.age";
|
cnstssh.file = "${self}/secrets/cnstssh.age";
|
||||||
cnixssh.file = "${self}/secrets/cnixssh.age";
|
cnixssh.file = "${self}/secrets/cnixssh.age";
|
||||||
|
helix-gpt = {
|
||||||
|
file = "${self}/secrets/helix-gpt.age";
|
||||||
|
owner = "cnst";
|
||||||
|
group = "users";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
(mkIf cfg.toothpc.enable {
|
(mkIf cfg.toothpc.enable {
|
||||||
|
|||||||
Reference in New Issue
Block a user