some helix changes but mainly removing a user

This commit is contained in:
cnst
2024-09-04 15:35:27 +02:00
parent fcbd868789
commit 52e3b73c6d
23 changed files with 421 additions and 179 deletions

71
flake.lock generated
View File

@@ -21,32 +21,11 @@
"type": "github"
}
},
"ags": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"systems": "systems_2"
},
"locked": {
"lastModified": 1721306136,
"narHash": "sha256-VKPsIGf3/a+RONBipx4lEE4LXG2sdMNkWQu22LNQItg=",
"owner": "Aylur",
"repo": "ags",
"rev": "344ea72cd3b8d4911f362fec34bce7d8fb37028c",
"type": "github"
},
"original": {
"owner": "Aylur",
"repo": "ags",
"type": "github"
}
},
"anyrun": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs_2",
"systems": "systems_3"
"systems": "systems_2"
},
"locked": {
"lastModified": 1721135360,
@@ -119,7 +98,7 @@
"home-manager": "home-manager_2",
"jovian": "jovian",
"nixpkgs": "nixpkgs_3",
"systems": "systems_4",
"systems": "systems_3",
"yafas": "yafas"
},
"locked": {
@@ -442,7 +421,7 @@
},
"flake-utils_2": {
"inputs": {
"systems": "systems_5"
"systems": "systems_4"
},
"locked": {
"lastModified": 1710146030,
@@ -480,7 +459,7 @@
},
"flake-utils_4": {
"inputs": {
"systems": "systems_6"
"systems": "systems_5"
},
"locked": {
"lastModified": 1709126324,
@@ -498,7 +477,7 @@
},
"flake-utils_5": {
"inputs": {
"systems": "systems_9"
"systems": "systems_8"
},
"locked": {
"lastModified": 1710146030,
@@ -764,7 +743,7 @@
"hyprutils": "hyprutils",
"hyprwayland-scanner": "hyprwayland-scanner",
"nixpkgs": "nixpkgs_5",
"systems": "systems_7",
"systems": "systems_6",
"xdph": "xdph"
},
"locked": {
@@ -1392,7 +1371,6 @@
"root": {
"inputs": {
"agenix": "agenix",
"ags": "ags",
"anyrun": "anyrun",
"chaotic": "chaotic",
"fenix": "fenix_2",
@@ -1415,7 +1393,7 @@
"nixpak": "nixpak",
"nixpkgs": "nixpkgs_8",
"nixpkgs-small": "nixpkgs-small",
"systems": "systems_8",
"systems": "systems_7",
"wezterm": "wezterm"
}
},
@@ -1567,16 +1545,16 @@
},
"systems_4": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"repo": "default",
"type": "github"
}
},
@@ -1597,16 +1575,16 @@
},
"systems_6": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"repo": "default-linux",
"type": "github"
}
},
@@ -1626,21 +1604,6 @@
}
},
"systems_8": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
}
},
"systems_9": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",

View File

@@ -107,10 +107,6 @@
anyrun.url = "github:anyrun-org/anyrun";
microfetch.url = "github:NotAShelf/microfetch";
agenix.url = "github:ryantm/agenix";
ags = {
url = "github:Aylur/ags";
inputs.nixpkgs.follows = "nixpkgs";
};
# rust toolchain
fenix = {
url = "github:nix-community/fenix";

View File

@@ -16,7 +16,6 @@
"${userModules}/userd/copyq"
"${userModules}/userd/mako"
"${userModules}/userd/udiskie"
"${userModules}/utils/ags"
"${userModules}/utils/anyrun"
"${userModules}/utils/misc"
"${userModules}/utils/rofi"

View File

@@ -8,7 +8,10 @@
inherit (lib) mkIf mkEnableOption;
cfg = config.modules.devtools.helix;
in {
imports = [./languages.nix];
imports = [
./lang.nix
./theme.nix
];
options = {
modules.devtools.helix.enable = mkEnableOption "Enable helix";
@@ -20,16 +23,17 @@ in {
package = inputs.helix.packages.${pkgs.system}.default;
settings = {
theme = "gruvbox_material_dark_soft";
theme = "gruvbox_custom";
editor = {
color-modes = true;
scrolloff = 0;
cursorline = true;
cursor-shape = {
insert = "bar";
normal = "block";
select = "underline";
};
indent-guides.render = true;
indent-guides.render = false;
inline-diagnostics = {
cursor-line = "hint";
other-lines = "error";
@@ -43,18 +47,41 @@ in {
};
};
keys = {
keys = let
spaceMode = {
space = "file_picker";
n = "global_search";
f = ":format";
c = "toggle_comments";
t = {
d = "goto_type_definition";
i = "goto_implementation";
r = "goto_reference";
t = "goto_definition";
w = "trim_selections";
};
x = ":buffer-close";
w = ":w";
q = ":q";
y = "yank";
p = "paste_after";
P = "paste_before";
R = "replace_with_yanked";
};
in {
normal = {
y = "yank_to_clipboard";
p = "paste_clipboard_after";
space.u = {
f = ":format"; # format using LSP formatter
w = ":set whitespace.render all";
W = ":set whitespace.render none";
};
C-a = "select_all";
del = "delete_selection";
space = spaceMode;
};
insert = {
C-v = "paste_clipboard_after";
C-c = "yank_to_clipboard";
};
select = {
space = spaceMode;
};
};
};

View File

@@ -78,6 +78,24 @@
auto-format = true;
language-servers = ["dprint" "typescript-language-server"];
}
{
name = "php";
auto-format = true;
}
{
name = "css";
auto-format = true;
language-servers = ["vscode-css-language-server"];
}
{
name = "rust";
auto-format = true;
file-types = ["rs"];
language-servers = ["rust-analyzer"];
formatter = {
command = lib.getExe pkgs.rustfmt;
};
}
]
++ prettierLangs langs;
@@ -175,7 +193,7 @@
};
vscode-css-language-server = {
command = "${pkgs.nodePackages.vscode-langservers-extracted}/bin/vscode-css-languageserver";
command = "${pkgs.nodePackages.vscode-langservers-extracted}/bin/vscode-css-language-server";
args = ["--stdio"];
config = {
provideFormatter = true;

View File

@@ -0,0 +1,201 @@
{
programs.helix.themes = {
gruvbox_custom = let
bg0 = "#32302f";
bg1 = "#3c3836";
bg2 = "#3c3836";
bg3 = "#504945";
bg4 = "#504945";
fg0 = "#d4be98";
red = "#ea6962";
orange = "#e78a4e";
yellow = "#d8a657";
bg_visual_yellow = "#574833";
green = "#a9b665";
aqua = "#89b482";
blue = "#7daea3";
purple = "#d3869b";
grey0 = "#7c6f64";
grey2 = "#a89984";
in {
"type" = yellow;
"constant" = purple;
"constant.numeric" = purple;
"constant.character.escape" = orange;
"string" = green;
"string.regexp" = blue;
"comment" = grey0;
"variable" = fg0;
"variable.builtin" = blue;
"variable.parameter" = fg0;
"variable.other.member" = fg0;
"label" = aqua;
"punctuation" = grey2;
"punctuation.delimiter" = grey2;
"punctuation.bracket" = fg0;
"keyword" = red;
"keyword.directive" = aqua;
"operator" = orange;
"function" = green;
"function.builtin" = blue;
"function.macro" = aqua;
"tag" = yellow;
"namespace" = aqua;
"attribute" = aqua;
"constructor" = yellow;
"module" = blue;
"special" = orange;
"markup.heading.marker" = grey2;
"markup.heading.1" = {
fg = red;
modifiers = ["bold"];
};
"markup.heading.2" = {
fg = orange;
modifiers = ["bold"];
};
"markup.heading.3" = {
fg = yellow;
modifiers = ["bold"];
};
"markup.heading.4" = {
fg = green;
modifiers = ["bold"];
};
"markup.heading.5" = {
fg = blue;
modifiers = ["bold"];
};
"markup.heading.6" = {
fg = fg0;
modifiers = ["bold"];
};
"markup.list" = red;
"markup.bold" = {modifiers = ["bold"];};
"markup.italic" = {modifiers = ["italic"];};
"markup.link.url" = {
fg = blue;
modifiers = ["underlined"];
};
"markup.link.text" = purple;
"markup.quote" = grey2;
"markup.raw" = green;
"diff.plus" = green;
"diff.delta" = orange;
"diff.minus" = red;
"ui.background" = {bg = bg0;};
"ui.background.separator" = grey0;
"ui.cursor" = {
fg = bg0;
bg = fg0;
};
"ui.cursor.match" = {
fg = orange;
bg = bg_visual_yellow;
};
"ui.cursor.insert" = {
fg = bg0;
bg = grey2;
};
"ui.cursor.select" = {
fg = bg0;
bg = blue;
};
"ui.cursorline.primary" = {bg = bg1;};
"ui.cursorline.secondary" = {bg = bg1;};
"ui.selection" = {bg = bg3;};
"ui.linenr" = grey0;
"ui.linenr.selected" = fg0;
"ui.statusline" = {
fg = fg0;
bg = bg3;
};
"ui.statusline.inactive" = {
fg = grey0;
bg = bg1;
};
"ui.statusline.normal" = {
fg = bg0;
bg = fg0;
modifiers = ["bold"];
};
"ui.statusline.insert" = {
fg = bg0;
bg = yellow;
modifiers = ["bold"];
};
"ui.statusline.select" = {
fg = bg0;
bg = blue;
modifiers = ["bold"];
};
"ui.bufferline" = {
fg = grey0;
bg = bg1;
};
"ui.bufferline.active" = {
fg = fg0;
bg = bg3;
modifiers = ["bold"];
};
"ui.popup" = {
fg = grey2;
bg = bg2;
};
"ui.window" = {
fg = grey0;
bg = bg0;
};
"ui.help" = {
fg = fg0;
bg = bg2;
};
"ui.text" = fg0;
"ui.text.focus" = fg0;
"ui.menu" = {
fg = fg0;
bg = bg3;
};
"ui.menu.selected" = {
fg = bg0;
bg = blue;
modifiers = ["bold"];
};
"ui.virtual.whitespace" = {fg = bg4;};
"ui.virtual.indent-guide" = {fg = bg4;};
"ui.virtual.ruler" = {bg = bg3;};
"hint" = blue;
"info" = aqua;
"warning" = yellow;
"error" = red;
"diagnostic" = {underline = {style = "curl";};};
"diagnostic.hint" = {
underline = {
color = blue;
style = "dotted";
};
};
"diagnostic.info" = {
underline = {
color = aqua;
style = "dotted";
};
};
"diagnostic.warning" = {
underline = {
color = yellow;
style = "curl";
};
};
"diagnostic.error" = {
underline = {
color = red;
style = "curl";
};
};
};
};
}

View File

@@ -1,3 +0,0 @@
style.css
style.css.map
types

View File

@@ -1,57 +0,0 @@
{
inputs,
pkgs,
lib,
config,
...
}: let
requiredDeps = with pkgs; [
bash
bun
coreutils
dart-sass
gawk
imagemagick
procps
ripgrep
util-linux
];
guiDeps = with pkgs; [
gnome.gnome-control-center
mission-center
overskride
wlogout
];
dependencies = requiredDeps ++ guiDeps;
inherit (lib) mkIf mkEnableOption;
cfg = config.modules.utils.ags;
in {
imports = [
inputs.ags.homeManagerModules.default
];
options = {
modules.utils.ags.enable = mkEnableOption "Enables ags";
};
config = mkIf cfg.enable {
programs.ags.enable = true;
systemd.user.services.ags = {
Unit = {
Description = "Aylur's Gtk Shell";
PartOf = [
"tray.target"
"graphical-session.target"
];
};
Service = {
Environment = "PATH=/run/wrappers/bin:${lib.makeBinPath dependencies}";
ExecStart = "${cfg.package}/bin/ags";
Restart = "on-failure";
};
Install.WantedBy = ["graphical-session.target"];
};
};
}

View File

@@ -2,9 +2,11 @@
lib,
config,
pkgs,
osConfig,
...
}: let
inherit (lib) mkIf mkEnableOption;
modKey = if osConfig.networking.hostName == "cnixpad" then "ALT_L" else "SUPER";
cfg = config.modules.wm.hyprland.cnst.keybinds;
in {
options = {
@@ -22,7 +24,7 @@ in {
"$yazi" = "wezterm -e yazi";
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
"$mod" = "SUPER";
"$mod" = modKey;
bind = let
grimblast = lib.getExe pkgs.grimblast;

View File

@@ -0,0 +1,107 @@
{lib, ...}: let
inherit (lib) mkForce;
in {
modules = {
# browsers = {
# firefox = {
# enable = mkForce true;
# };
# chromium = {
# enable = mkForce true;
# };
# };
# comm = {
# discord = {
# enable = mkForce true;
# };
# };
# devtools = {
# neovim = {
# enable = mkForce true;
# };
# vscode = {
# enable = mkForce false;
# };
# helix = {
# enable = mkForce true;
# };
# };
# gaming = {
# lutris = {
# enable = mkForce false;
# };
# mangohud = {
# enable = mkForce false;
# };
# };
# terminal = {
# alacritty = {
# enable = mkForce true;
# };
# foot = {
# enable = mkForce true;
# };
# kitty = {
# enable = mkForce true;
# };
# wezterm = {
# enable = mkForce true;
# };
# zellij = {
# enable = mkForce false;
# };
# };
# userd = {
# copyq = {
# enable = mkForce true;
# };
# mako = {
# enable = mkForce true;
# };
# udiskie = {
# enable = mkForce true;
# };
# };
# utils = {
# anyrun = {
# enable = mkForce false;
# };
# rofi = {
# enable = mkForce false;
# };
# waybar = {
# enable = mkForce true;
# };
# yazi = {
# enable = mkForce true;
# };
# zathura = {
# enable = mkForce true;
# };
# misc = {
# enable = mkForce true;
# };
# };
# wm = {
# hyprland = {
# cnst = {
# enable = mkForce true;
# };
# toothpick = {
# enable = mkForce false;
# };
# };
# utils = {
# hypridle = {
# enable = mkForce true;
# };
# hyprlock = {
# enable = mkForce true;
# };
# hyprpaper = {
# enable = mkForce true;
# };
# };
# };
};
}

View File

@@ -1,9 +1,17 @@
{pkgs, ...}: {
{
pkgs,
lib,
osConfig,
...
}: let
isCnixpad = osConfig.networking.hostName == "cnixpad";
in {
imports = [
./modules.nix
./git.nix
./shell.nix
];
]
++ lib.optionals isCnixpad [ ./cpmodules.nix ];
home = {
username = "cnst";
homeDirectory = "/home/cnst";
@@ -15,7 +23,7 @@
];
sessionVariables = {
BROWSER = "firefox";
EDITOR = "nvim";
EDITOR = "hx";
TERM = "xterm-256color";
STEAM_EXTRA_COMPAT_TOOLS_PATHS = "/home/cnst/.steam/root/compatibilitytools.d"; # proton and steam compat

View File

@@ -1,4 +0,0 @@
let
modules = import ./modules.nix;
in
builtins.toJSON modules

View File

@@ -61,9 +61,6 @@
};
};
utils = {
ags = {
enable = false;
};
anyrun = {
enable = false;
};
@@ -91,9 +88,6 @@
toothpick = {
enable = false;
};
adam = {
enable = false;
};
};
utils = {
hypridle = {

View File

@@ -7,18 +7,18 @@
syntaxHighlighting.enable = true;
shellAliases = {
usermodules = "nvim /home/cnst/.nix-config/home/users/cnst/modules.nix";
umod = "nvim /home/cnst/.nix-config/home/users/cnst/modules.nix";
systemmodules = "nvim /home/cnst/.nix-config/hosts/cnix/modules.nix";
smod = "nvim /home/cnst/.nix-config/hosts/cnix/modules.nix";
nixclean = "sudo nix run /home/cnst/.nix-config#cleanup-boot";
usermodules = "$EDITOR /home/$USER/.nix-config/home/users/$USER/modules.nix";
umod = "$EDITOR /home/$USER/.nix-config/home/users/$USER/modules.nix";
systemmodules = "$EDITOR /home/$USER/.nix-config/hosts/$HOST/modules.nix";
smod = "$EDITOR /home/$USER/.nix-config/hosts/$HOST/modules.nix";
nixclean = "sudo nix run /home/$USER/.nix-config#cleanup-boot";
nixdev = "nix develop ~/.nix-config -c $SHELL";
nixconfig = "cd /home/cnst/.nix-config/";
nixconfig = "cd /home/$USER/.nix-config/";
ll = "ls -l";
nixupdate = "nh os switch -v -H cnix && sudo nix run /home/cnst/.nix-config#cleanup-boot";
nixup = "nh os switch -H cnix && sudo nix run /home/cnst/.nix-config#cleanup-boot";
flakeupdate = "nh os switch -u -v -H cnix && sudo nix run /home/cnst/.nix-config#cleanup-boot";
flakeup = "nh os switch -u -H cnix && sudo nix run /home/cnst/.nix-config#cleanup-boot";
nixupdate = "nh os switch -v -H $HOST && sudo nix run /home/$USER/.nix-config#cleanup-boot";
nixup = "nh os switch -H $HOST && sudo nix run /home/$USER/.nix-config#cleanup-boot";
flakeupdate = "nh os switch -u -v -H $HOST && sudo nix run /home/$USER/.nix-config#cleanup-boot";
flakeup = "nh os switch -u -H $HOST && sudo nix run /home/$USER/.nix-config#cleanup-boot";
};
history = {
size = 1000;
@@ -28,7 +28,6 @@
enable = true;
plugins = [
"git"
# "thefuck"
];
theme = "robbyrussell";
};

View File

@@ -6,7 +6,7 @@
}: let
ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
in {
users.users.adam = {
users.users.cnst = {
isNormalUser = true;
shell = pkgs.zsh;
# openssh.authorizedKeys.keys = [];

View File

@@ -42,7 +42,7 @@
};
network = {
enable = true;
hostName = "adampad";
hostName = "cnixpad";
interfaces = {
"wlp6s0" = {
allowedTCPPorts = [22 80 443];
@@ -113,7 +113,7 @@
utils = {
agenix = {
enable = true;
adampad = {
cnixpad = {
enable = true;
};
};

View File

@@ -13,7 +13,6 @@
cnstConfig = "${self}/home/users/cnst";
toothpickConfig = "${self}/home/users/toothpick";
adamConfig = "${self}/home/users/adam";
userModules = "${self}/home/modules";
systemModules = "${self}/system/modules";
@@ -26,7 +25,7 @@
inherit (import "${systemConfig}") shared;
# get these into the module system
specialArgs = {inherit inputs self userConfig systemConfig hostConfig cnstConfig toothpickConfig adamConfig userModules systemModules;};
specialArgs = {inherit inputs self userConfig systemConfig hostConfig cnstConfig toothpickConfig userModules systemModules;};
in {
cnix = nixosSystem {
inherit specialArgs;
@@ -35,7 +34,7 @@
++ [
./cnix
"${mod}/boot/lanzaboote"
"${mod}/nix/nh/cnix"
"${mod}/nix/nh/cnst"
"${mod}/dev"
{
home-manager = {
@@ -54,7 +53,7 @@
++ [
./toothpc
"${mod}/boot/lanzaboote"
"${mod}/nix/nh/toothpc"
"${mod}/nix/nh/toothpick"
"${mod}/dev"
{
home-manager = {
@@ -66,18 +65,18 @@
inputs.agenix.nixosModules.default
];
};
adampad = nixosSystem {
cnixpad = nixosSystem {
inherit specialArgs;
modules =
shared
++ [
./adampad
./cnixpad
"${mod}/boot"
"${mod}/nix/nh/adampad"
"${mod}/nix/nh/cnst"
"${mod}/dev"
{
home-manager = {
users.adam.imports = homeImports."adam@adampad";
users.cnst.imports = homeImports."cnst@cnixpad";
extraSpecialArgs = specialArgs;
};
}

View File

@@ -37,6 +37,7 @@
clang-tools
marksman
pyright
nodePackages_latest.intelephense
# Formatters
alejandra

View File

@@ -16,6 +16,7 @@ in {
pkgs.ripgrep
pkgs.fd
pkgs.beekeeper-studio
pkgs.gnused
];
};
}

View File

@@ -1,9 +0,0 @@
{
environment.variables.FLAKE = "/home/adam/.nix-config";
programs = {
nh = {
enable = true;
flake = "/home/adam/.nix-config";
};
};
}