fix: nixosConfigurations: deprecations
new: nixosConfigurations/common: future place of preconfigured modules
This commit is contained in:
parent
54a5884259
commit
7946912c2c
@ -17,7 +17,7 @@ in {
|
|||||||
group = "users";
|
group = "users";
|
||||||
uid = 1000;
|
uid = 1000;
|
||||||
initialPassword = "nixos";
|
initialPassword = "nixos";
|
||||||
shell = pkgs.fish;
|
shell = pkgs.nushell;
|
||||||
openssh.authorizedKeys.keys = [
|
openssh.authorizedKeys.keys = [
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG1YGp8AI48hJUSQBZpuKLpbj2+3Q09vq64NxFr0N1MS"
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG1YGp8AI48hJUSQBZpuKLpbj2+3Q09vq64NxFr0N1MS"
|
||||||
];
|
];
|
||||||
@ -40,6 +40,8 @@ in {
|
|||||||
inputs.catppuccin.homeManagerModules.catppuccin
|
inputs.catppuccin.homeManagerModules.catppuccin
|
||||||
inputs.ags.homeManagerModules.default
|
inputs.ags.homeManagerModules.default
|
||||||
#bonLib.preconfiguredModules.homeManager.hyprland
|
#bonLib.preconfiguredModules.homeManager.hyprland
|
||||||
|
../common/hm/helix.nix
|
||||||
|
../common/hm/nushell.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
@ -149,73 +151,6 @@ in {
|
|||||||
accent = "green";
|
accent = "green";
|
||||||
};
|
};
|
||||||
|
|
||||||
programs = {
|
|
||||||
nushell = {
|
|
||||||
enable = true;
|
|
||||||
# The config.nu can be anywhere you want if you like to edit your Nushell with Nu
|
|
||||||
#configFile.source = ./.../config.nu;
|
|
||||||
# for editing directly to config.nu
|
|
||||||
extraConfig = ''
|
|
||||||
let carapace_completer = {|spans|
|
|
||||||
carapace $spans.0 nushell ...$spans | from json
|
|
||||||
}
|
|
||||||
$env.config = {
|
|
||||||
show_banner: false,
|
|
||||||
completions: {
|
|
||||||
case_sensitive: false # case-sensitive completions
|
|
||||||
quick: true # set to false to prevent auto-selecting completions
|
|
||||||
partial: true # set to false to prevent partial filling of the prompt
|
|
||||||
algorithm: "fuzzy"
|
|
||||||
external: {
|
|
||||||
enable: true
|
|
||||||
max_results: 100
|
|
||||||
completer: $carapace_completer
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
carapace = {
|
|
||||||
enable = true;
|
|
||||||
enableNushellIntegration = true;
|
|
||||||
enableBashIntegration = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
starship = {
|
|
||||||
enable = true;
|
|
||||||
enableNushellIntegration = true;
|
|
||||||
enableBashIntegration = true;
|
|
||||||
settings = {
|
|
||||||
add_newline = true;
|
|
||||||
format = ''
|
|
||||||
$all $fill $time
|
|
||||||
$character
|
|
||||||
'';
|
|
||||||
fill = {
|
|
||||||
symbol = " ";
|
|
||||||
};
|
|
||||||
line_break = {
|
|
||||||
disabled = true;
|
|
||||||
};
|
|
||||||
directory = {
|
|
||||||
truncate_to_repo = false;
|
|
||||||
};
|
|
||||||
time = {
|
|
||||||
disabled = false;
|
|
||||||
use_12hr = true;
|
|
||||||
};
|
|
||||||
character = {
|
|
||||||
success_symbol = "[❯](bold green)";
|
|
||||||
error_symbol = "[❯](bold red)";
|
|
||||||
};
|
|
||||||
nix_shell = {
|
|
||||||
symbol = " ";
|
|
||||||
heuristic = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
# General
|
# General
|
||||||
fish = {
|
fish = {
|
||||||
|
@ -115,7 +115,7 @@
|
|||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
useACMEHost = "elnafo.ru";
|
useACMEHost = "elnafo.ru";
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://127.0.0.1:${toString config.services.grafana.port}";
|
proxyPass = "http://127.0.0.1:${toString config.services.grafana.settings.server.http_port}";
|
||||||
proxyWebsockets = true;
|
proxyWebsockets = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
72
nixosConfigurations/common/hm/helix.nix
Normal file
72
nixosConfigurations/common/hm/helix.nix
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
hmConfig,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
programs.helix = {
|
||||||
|
enable = true;
|
||||||
|
extraPackages = with pkgs; [wl-clipboard pyright ruff alejandra];
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
theme = "gruvbox";
|
||||||
|
editor.cursor-shape = {
|
||||||
|
normal = "block";
|
||||||
|
insert = "bar";
|
||||||
|
select = "underline";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
languages = {
|
||||||
|
language = [
|
||||||
|
{
|
||||||
|
name = "nix";
|
||||||
|
auto-format = true;
|
||||||
|
formatter.command = "alejandra";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
name = "python";
|
||||||
|
language-id = "python";
|
||||||
|
roots = ["pyproject.toml" "setup.py" "poetry.lock" "uv.lock" "pdm.lock"];
|
||||||
|
language-servers = ["ruff" "pyright"];
|
||||||
|
auto-format = true;
|
||||||
|
formatter = {
|
||||||
|
command = "ruff";
|
||||||
|
args = ["format" "-"];
|
||||||
|
};
|
||||||
|
file-types = ["py"];
|
||||||
|
comment-token = "#";
|
||||||
|
shebangs = ["python"];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
language-server = {
|
||||||
|
pyright = {
|
||||||
|
command = "pyright-langserver";
|
||||||
|
args = ["--stdio"];
|
||||||
|
config.python.analysis = {
|
||||||
|
venvPath = ".";
|
||||||
|
venv = ".venv";
|
||||||
|
lint = true;
|
||||||
|
inlayHint.enable = true;
|
||||||
|
autoSearchPaths = true;
|
||||||
|
diagnosticMode = "workspace";
|
||||||
|
useLibraryCodeForType = true;
|
||||||
|
logLevel = "Error";
|
||||||
|
typeCheckingMode = "off";
|
||||||
|
autoImoprtCompletion = true;
|
||||||
|
reportOptionalSubscript = false;
|
||||||
|
reportOptionalMemberAccess = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
ruff = {
|
||||||
|
command = "ruff";
|
||||||
|
args = ["server"];
|
||||||
|
environment = {RUFF_TRACE = "messages";};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
79
nixosConfigurations/common/hm/nushell.nix
Normal file
79
nixosConfigurations/common/hm/nushell.nix
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
hmConfig,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
programs.nushell = {
|
||||||
|
enable = true;
|
||||||
|
# The config.nu can be anywhere you want if you like to edit your Nushell with Nu
|
||||||
|
#configFile.source = ./.../config.nu;
|
||||||
|
# for editing directly to config.nu
|
||||||
|
extraConfig = ''
|
||||||
|
let carapace_completer = {|spans|
|
||||||
|
carapace $spans.0 nushell $spans | from json
|
||||||
|
}
|
||||||
|
$env.config = {
|
||||||
|
show_banner: false,
|
||||||
|
completions: {
|
||||||
|
case_sensitive: false # case-sensitive completions
|
||||||
|
quick: true # set to false to prevent auto-selecting completions
|
||||||
|
partial: true # set to false to prevent partial filling of the prompt
|
||||||
|
algorithm: "fuzzy"
|
||||||
|
external: {
|
||||||
|
enable: true
|
||||||
|
max_results: 100
|
||||||
|
completer: $carapace_completer
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
|
||||||
|
environmentVariables = {
|
||||||
|
GNUPGHOME = hmConfig.programs.gpg.homedir;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# completion
|
||||||
|
programs.carapace = {
|
||||||
|
enable = true;
|
||||||
|
enableNushellIntegration = true;
|
||||||
|
enableBashIntegration = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# prompt
|
||||||
|
programs.starship = {
|
||||||
|
enable = true;
|
||||||
|
enableNushellIntegration = true;
|
||||||
|
enableBashIntegration = true;
|
||||||
|
settings = {
|
||||||
|
add_newline = true;
|
||||||
|
format = ''
|
||||||
|
$all $fill $time
|
||||||
|
$character
|
||||||
|
'';
|
||||||
|
fill = {
|
||||||
|
symbol = " ";
|
||||||
|
};
|
||||||
|
line_break = {
|
||||||
|
disabled = true;
|
||||||
|
};
|
||||||
|
directory = {
|
||||||
|
truncate_to_repo = false;
|
||||||
|
};
|
||||||
|
time = {
|
||||||
|
disabled = false;
|
||||||
|
use_12hr = true;
|
||||||
|
};
|
||||||
|
character = {
|
||||||
|
success_symbol = "[❯](bold green)";
|
||||||
|
error_symbol = "[❯](bold red)";
|
||||||
|
};
|
||||||
|
nix_shell = {
|
||||||
|
symbol = " ";
|
||||||
|
heuristic = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -94,7 +94,7 @@
|
|||||||
networkmanager = {
|
networkmanager = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableStrongSwan = true;
|
enableStrongSwan = true;
|
||||||
packages = with pkgs; [
|
plugins = with pkgs; [
|
||||||
networkmanager-l2tp
|
networkmanager-l2tp
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user