formatting + some apps update

This commit is contained in:
Your Name 2024-03-28 21:52:20 +03:00
parent 57c8b128f5
commit 6e4537dd89
9 changed files with 241 additions and 87 deletions

View file

@ -8,6 +8,34 @@ let
Value = true; Value = true;
Status = "locked"; Status = "locked";
}; };
kitty_config = pkgs.writeText "kitty.conf" ''
# See https://sw.kovidgoyal.net/kitty/conf.html
shell_integration no-rc
allow_remote_control password
background #171717
background_opacity 0.8
color0 #3F3F3F
color1 #705050
color10 #72D5A3
color11 #F0DFAF
color12 #94BFF3
color13 #EC93D3
color14 #93E0E3
color15 #FFFFFF
color2 #60B48A
color3 #DFAF8F
color4 #9AB8D7
color5 #DC8CC3
color6 #8CD0D3
color7 #DCDCCC
color8 #709080
color9 #DCA3A3
foreground #DCDCCC
hide_window_decorations yes
remember_window_size yes
remote_control_password kitty-notification-password-fish ls
'';
in { in {
imports = [ imports = [
inputs.nixvim.nixosModules.nixvim inputs.nixvim.nixosModules.nixvim
@ -44,7 +72,18 @@ in {
wget wget
wlogout wlogout
nom nom
vesktop (vesktop.overrideAttrs (oldAttrs: {
desktopItems = [ (pkgs.makeDesktopItem {
name = "vesktop";
desktopName = "Discord";
exec = "vesktop %U";
icon = "discord";
startupWMClass = "Vesktop";
genericName = "Internet Messenger";
keywords = [ "discord" "vencord" "electron" "chat" ];
categories = [ "Network" "InstantMessaging" "Chat" ];
})];
}))
localsend localsend
trayscale trayscale
fishPlugins.done fishPlugins.done
@ -52,8 +91,35 @@ in {
inputs.telegram-desktop-patched.packages.${pkgs.system}.default inputs.telegram-desktop-patched.packages.${pkgs.system}.default
translate-shell translate-shell
tridactyl-native #firefox tridactyl addon tridactyl-native #firefox tridactyl addon
inputs.neovim.packages.${pkgs.system}.default ripgrep #ripgrep for neovim ripgrep gh # for nvim
lunarvim lunarvim # text edit
lexend # font from google (non-mono)
# (pkgs.writeScriptBin "kitty" "${pkgs.kitty}/bin/kitty --single-instance --config ${kitty_config} $@")
# (pkgs.writeScriptBin "kitten" "${pkgs.kitty}/bin/kitten $@")
# (pkgs.makeDesktopItem {
# type = "Application";
# name = "kitty";
# desktopName = "kitty";
# genericName = "Terminal Emulator";
# comment = "Fast, feature-rich, GPU based terminal";
# tryExec = "kitty";
# exec = "kitty";
# icon = "kitty";
# categories = [ "System" "TerminalEmulator"];
# })
# (pkgs.makeDesktopItem {
# type = "Application";
# name = "kitty URL Launcher";
# desktopName = "kitty URL Launcher";
# genericName = "Terminal Emulator";
# comment = "Open URLs with kitty";
# tryExec = "kitty";
# exec = "kitty +open %U";
# icon = "kitty";
# categories = [ "System" "TerminalEmulator"];
# noDisplay = true;
# mimeTypes = [ "image/*" "application/x-sh" "application/x-shellscript" "inode/directory" "text/*" "x-scheme-handler/kitty" "x-scheme-handler/ssh" ];
# })
]); ]);
programs.firefox = { programs.firefox = {
@ -170,25 +236,25 @@ in {
''; '';
}; };
programs.neovim = { #programs.neovim = {
enable = true;
#defaultEditor = true;
configure = {
customRC = ''
:set mouse=a
'';
#packages.myVimPackage = with pkgs.vimPlugins; {
# # loaded on launch
# start = [ fugitive nvchad nvchad-ui ];
# # manually loadable by calling `:packadd $plugin-name`
# opt = [ ];
#};
};
};
#programs.nixvim = {
# enable = true; # enable = true;
# extraPlugins = with pkgs.vimPlugins; [ # defaultEditor = true;
# nvchad nvchad-ui fugitive # configure = {
# ]; # customRC = ''
# :set mouse=a
# '';
# };
#}; #};
programs.nixvim = {
enable = true;
plugins.lightline.enable = true;
options= {
};
};
} }

View file

@ -31,8 +31,8 @@ in
]; ];
system.activationScripts."gnome_setup_misc".text = '' system.activationScripts."gnome_setup_misc".text = ''
# rm -f /home/delta/.config/gtk-4.0/gtk.css rm -f /home/delta/.config/gtk-4.0/gtk.css
# rm -f /home/delta/.config/gtk-3.0/gtk.css rm -f /home/delta/.config/gtk-3.0/gtk.css
# ${pkgs.glib}/bin/gsettings set org.gnome.desktop.interface cursor-size 16 # ${pkgs.glib}/bin/gsettings set org.gnome.desktop.interface cursor-size 16
''; '';
@ -73,7 +73,7 @@ in
"org/gnome/desktop/interface" = { "org/gnome/desktop/interface" = {
icon-theme = "Papirus-Dark"; icon-theme = "Papirus-Dark";
color-scheme = "prefer-dark"; color-scheme = "prefer-dark";
gtk-theme = "adw-gtk3-dark"; #gtk-theme = "adw-gtk3-dark";
}; };
"org/gnome/shell" = { "org/gnome/shell" = {
favorite-apps = [ favorite-apps = [
@ -171,6 +171,8 @@ in
pkgs.orca pkgs.orca
epiphany epiphany
geary geary
pkgs.gnome-console
gnome-terminal
gnome-backgrounds gnome-backgrounds
gnome-calendar gnome-calendar
gnome-characters gnome-characters

View file

@ -114,7 +114,7 @@ let
pid=$(${pkgs.procps}/bin/pgrep "kitty") pid=$(${pkgs.procps}/bin/pgrep "kitty")
if [[ -z $pid ]]; then if [[ -z $pid ]]; then
kitty --start-as maximized & kitty --start-as maximized --single-instance &
else else
${pkgs.glib}/bin/gdbus call --session --dest org.gnome.Shell --object-path /de/lucaswerkmeister/ActivateWindowByTitle --method de.lucaswerkmeister.ActivateWindowByTitle.activateByWmClass 'kitty' ${pkgs.glib}/bin/gdbus call --session --dest org.gnome.Shell --object-path /de/lucaswerkmeister/ActivateWindowByTitle --method de.lucaswerkmeister.ActivateWindowByTitle.activateByWmClass 'kitty'
fi fi

View file

@ -303,11 +303,11 @@
}, },
"nixpkgs-stable_2": { "nixpkgs-stable_2": {
"locked": { "locked": {
"lastModified": 1710628718, "lastModified": 1711233294,
"narHash": "sha256-y+l3eH53UlENaYa1lmnCBHusZb1kxBEFd2/c7lDsGpw=", "narHash": "sha256-eEu5y4J145BYDw9o/YEmeJyqh8blgnZwuz9k234zuWc=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "6dc11d9859d6a18ab0c5e5829a5b8e4810658de3", "rev": "ac6bdf6181666ebb4f90dd20f31e2fa66ede6b68",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -351,11 +351,11 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1710806803, "lastModified": 1711523803,
"narHash": "sha256-qrxvLS888pNJFwJdK+hf1wpRCSQcqA6W5+Ox202NDa0=", "narHash": "sha256-UKcYiHWHQynzj6CN/vTcix4yd1eCu1uFdsuarupdCQQ=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "b06025f1533a1e07b6db3e75151caa155d1c7eb3", "rev": "2726f127c15a4cc9810843b96cad73c7eb39e443",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -367,11 +367,11 @@
}, },
"nixpkgs_4": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1710534455, "lastModified": 1711200738,
"narHash": "sha256-huQT4Xs0y4EeFKn2BTBVYgEwJSv8SDlm82uWgMnCMmI=", "narHash": "sha256-dkJmk/ET/tRV4007O6kU101UEg1svUwiyk/zEEX9Tdg=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "9af9c1c87ed3e3ed271934cb896e0cdd33dae212", "rev": "20bc93ca7b2158ebc99b8cef987a2173a81cde35",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -468,11 +468,11 @@
"sops-nix": "sops-nix" "sops-nix": "sops-nix"
}, },
"locked": { "locked": {
"lastModified": 1711064484, "lastModified": 1711491546,
"narHash": "sha256-v/o2GSHunWVWtLwcVvaakxXaWDazLfs9n1afjb5cXMA=", "narHash": "sha256-FjDTqs+aT7DrDGDxIeUzur8ATnAKjHu0jvF/zFEZ/po=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "0da88dbba8f7aa71a1692019825912ac377a5d1b", "rev": "7c27f5f929eaa2f13e3d09b1d5373663fbb2115a",
"revCount": 2, "revCount": 9,
"type": "git", "type": "git",
"url": "ssh://git@github.com/deltathetawastaken/secrets.git" "url": "ssh://git@github.com/deltathetawastaken/secrets.git"
}, },
@ -487,11 +487,11 @@
"nixpkgs-stable": "nixpkgs-stable_2" "nixpkgs-stable": "nixpkgs-stable_2"
}, },
"locked": { "locked": {
"lastModified": 1710644594, "lastModified": 1711249319,
"narHash": "sha256-RquCuzxfy4Nr8DPbdp3D/AsbYep21JgQzG8aMH9jJ4A=", "narHash": "sha256-N+Pp3/8H+rd7cO71VNV/ovV/Kwt+XNeUHNhsmyTabdM=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "83b68a0e8c94b72cdd0a6e547a14ca7eb1c03616", "rev": "405987a66cce9a4a82f321f11b205982a7127c88",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -10,45 +10,47 @@
anyrun.inputs.nixpkgs.follows = "nixpkgs"; anyrun.inputs.nixpkgs.follows = "nixpkgs";
telegram-desktop-patched.url = "github:shwewo/telegram-desktop-patched"; telegram-desktop-patched.url = "github:shwewo/telegram-desktop-patched";
secrets.url = "git+ssh://git@github.com/deltathetawastaken/secrets.git"; secrets.url = "git+ssh://git@github.com/deltathetawastaken/secrets.git";
#nixvim.url = "github:nix-community/nixvim"; nixvim.url = "github:nix-community/nixvim";
neovim = {
url = "github:deltathetawastaken/neovim";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = inputs @ { self, nixpkgs, home-manager, anyrun, ... }: outputs = inputs@{ self, nixpkgs, home-manager, anyrun, ... }:
let let
pkgs = nixpkgs.legacyPackages."x86_64-linux"; pkgs = nixpkgs.legacyPackages."x86_64-linux";
stable = import inputs.nixpkgs-stable { system = "x86_64-linux"; config = { allowUnfree = true; }; }; stable = import inputs.nixpkgs-stable {
unstable = import inputs.nixpkgs-unstable { system = "x86_64-linux"; config = { allowUnfree = true; }; }; system = "x86_64-linux";
specialArgs = { inherit inputs self stable unstable homeSettings; }; config = { allowUnfree = true; };
homeSettings = { };
home-manager.useGlobalPkgs = true; unstable = import inputs.nixpkgs-unstable {
home-manager.useUserPackages = true; system = "x86_64-linux";
home-manager.users.delta = import ./home/home.nix; config = { allowUnfree = true; };
home-manager.extraSpecialArgs = specialArgs; };
specialArgs = { inherit inputs self stable unstable homeSettings; };
homeSettings = {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.delta = import ./home/home.nix;
home-manager.extraSpecialArgs = specialArgs;
};
in {
devShells."x86_64-linux".default = pkgs.mkShell {
name = "delta";
packages = with pkgs; [ gitleaks pre-commit ];
shellHook = "pre-commit install &> /dev/null && gitleaks detect -v";
};
nixosConfigurations.dlaptop = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = specialArgs;
modules = [ ./hosts/generic.nix ./hosts/dlaptop/system.nix ];
};
nixosConfigurations.intelnuc = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = specialArgs;
modules = [ ./hosts/generic.nix ./hosts/intelnuc/system.nix ];
};
nixosConfigurations.huanan = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = specialArgs;
modules = [ ./hosts/generic.nix ./hosts/huanan/system.nix ];
};
}; };
in { }
devShells."x86_64-linux".default = pkgs.mkShell {
name = "delta";
packages = with pkgs; [ gitleaks pre-commit ];
shellHook = ''pre-commit install &> /dev/null && gitleaks detect -v'';
};
nixosConfigurations.dlaptop = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = specialArgs;
modules = [ ./hosts/generic.nix ./hosts/dlaptop/system.nix ];
};
nixosConfigurations.intelnuc = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = specialArgs;
modules = [ ./hosts/generic.nix ./hosts/intelnuc/system.nix ];
};
nixosConfigurations.huanan = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = specialArgs;
modules = [ ./hosts/generic.nix ./hosts/huanan/system.nix ];
};
};
}

View file

@ -1,5 +1,4 @@
{ stable, unstable, inputs, home, config, lib, pkgs, specialArgs, ... }: { stable, unstable, inputs, home, config, lib, pkgs, specialArgs, ... }:
{ {
home.username = "delta"; home.username = "delta";
home.stateVersion = "23.11"; home.stateVersion = "23.11";
@ -12,7 +11,8 @@
#services.network-manager-applet.enable = true; #services.network-manager-applet.enable = true;
programs.vscode = { programs.vscode = {
enable = true; enable = true;
package = pkgs.vscodium; package = pkgs.vscode;
extensions = with pkgs.vscode-extensions; [ extensions = with pkgs.vscode-extensions; [
matklad.rust-analyzer matklad.rust-analyzer
jnoortheen.nix-ide jnoortheen.nix-ide
@ -26,7 +26,7 @@
"nix.serverSettings" = { "nix.serverSettings" = {
nil = { nil = {
formatting = { formatting = {
command = [ "${pkgs.nixfmt}/bin/nixfmt" ]; command = [ "${pkgs.alejandra}/bin/alejandra" ];
}; };
}; };
}; };
@ -159,5 +159,44 @@
]; ];
}; };
programs.helix = {
enable = true;
languages.language = [{
name = "nix";
auto-format = true;
formatter.command = "${pkgs.nixfmt}/bin/nixfmt";
}];
themes = {
fleet_dark_transparent = {
"inherits" = "fleet_dark";
"ui.background" = { };
};
};
settings = {
theme = "fleet_dark_transparent";
editor = {
line-number = "relative";
mouse = true;
lsp.display-messages = true;
cursor-shape = {
normal = "block";
insert = "bar";
select = "underline";
};
file-picker.hidden = false;
};
keys.normal = {
space.space = "file_picker";
space.w = ":w";
space.q = ":q";
esc = [ "collapse_selection" "keep_primary_selection" ];
};
};
};
#programs.dircolors.enable = true; #programs.dircolors.enable = true;
} }

View file

@ -13,6 +13,15 @@
# NIXOS_OZONE_WL = "1"; # NIXOS_OZONE_WL = "1";
MOZ_ENABLE_WAYLAND = "1"; MOZ_ENABLE_WAYLAND = "1";
XCURSOR_SIZE = ""; XCURSOR_SIZE = "";
EDITOR = "hx";
BROWSER = "firefox";
TERMINAL = "foot";
};
environment.variables = lib.mkForce {
EDITOR = "hx";
BROWSER = "firefox";
TERMINAL = "foot";
}; };
services.xserver = { services.xserver = {

View file

@ -1,4 +1,4 @@
{ unstable, inputs, config, pkgs, ... }: { unstable, inputs, config, pkgs, lib, ... }:
let let
run = pkgs.writeScriptBin "run" '' run = pkgs.writeScriptBin "run" ''
#!/usr/bin/env bash #!/usr/bin/env bash
@ -72,8 +72,7 @@ in {
run run
shell shell
git git
micro helix micro
nano
fishPlugins.grc grc fishPlugins.grc grc
fishPlugins.autopair fishPlugins.autopair
fishPlugins.z fishPlugins.z
@ -92,9 +91,14 @@ in {
tree tree
lsd # better ls, will check what's better lsd # better ls, will check what's better
eza # better ls, will check what's better eza # better ls, will check what's better
htop
btop
(pkgs.writeScriptBin "reboot" ''read -p "Do you REALLY want to reboot? (y/N) " answer; [[ $answer == [Yy]* ]] && ${pkgs.systemd}/bin/reboot'') (pkgs.writeScriptBin "reboot" ''read -p "Do you REALLY want to reboot? (y/N) " answer; [[ $answer == [Yy]* ]] && ${pkgs.systemd}/bin/reboot'')
]; ];
environment.variables.EDITOR = "hx";
programs.command-not-found.enable = false; programs.command-not-found.enable = false;
programs.fish = { programs.fish = {
enable = true; enable = true;

View file

@ -122,5 +122,37 @@
''; '';
}; };
services.forgejo = {
enable = true;
settings = {
service.DISABLE_REGISTRATION = true;
server = {
DOMAIN = inputs.secrets.hosts.intelnuc.forgejo.domain;
DISABLE_SSH = true;
HTTP_PORT = 3838;
ROOT_URL = "https://[REDACTED]";
};
};
database = {
type = "sqlite3";
};
};
services.cloudflared.enable = true;
services.cloudflared.tunnels = {
"intelnuc" = {
default = "http_status:404";
credentialsFile = "${config.sops.secrets.cloudflared.path}";
};
};
services.ntfy-sh = {
enable = true;
settings = {
base-url = inputs.secrets.hosts.intelnuc.ntfy.url;
listen-http = ":3333";
};
};
system.stateVersion = "22.11"; system.stateVersion = "22.11";
} }