mirror of
https://github.com/kp2pml30/dotfiles.git
synced 2026-04-14 14:21:45 +04:00
chore: update
This commit is contained in:
parent
eaccf45596
commit
d3790a167b
27 changed files with 715 additions and 229 deletions
|
|
@ -6,6 +6,8 @@
|
|||
}@args:
|
||||
let
|
||||
cfg = config.kp2pml30;
|
||||
startsWith = prefix: str:
|
||||
builtins.substring 0 (builtins.stringLength prefix) str == prefix;
|
||||
in {
|
||||
options.kp2pml30 = {
|
||||
username = lib.mkOption {
|
||||
|
|
@ -65,22 +67,17 @@ in {
|
|||
fish
|
||||
fishPlugins.grc
|
||||
fishPlugins.bass
|
||||
nushell
|
||||
carapace
|
||||
|
||||
python312 # needed for bass
|
||||
grc
|
||||
];
|
||||
|
||||
nixpkgs.config.allowUnfreePredicate = pkg:
|
||||
builtins.any (x: startsWith x (pkgs.lib.getName pkg)) [ "vscode" "steam" "nvidia" ] ||
|
||||
builtins.elem (pkgs.lib.getName pkg) [
|
||||
"anytype-heart"
|
||||
"vscode"
|
||||
"steam"
|
||||
"steam-run"
|
||||
"steam-original"
|
||||
"steam-unwrapped"
|
||||
"nvidia-x11"
|
||||
"nvidia-settings"
|
||||
"nvidia-persistenced"
|
||||
"opera"
|
||||
"discord"
|
||||
"slack"
|
||||
|
|
|
|||
|
|
@ -17,37 +17,49 @@ in {
|
|||
./messengers-work.nix
|
||||
];
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||
config = {
|
||||
assertions = [
|
||||
{ assertion = cfg.kitty -> cfg.xserver; message = "kp2pml30.kitty requires kp2pml30.xserver"; }
|
||||
{ assertion = cfg.vscode -> cfg.xserver; message = "kp2pml30.vscode requires kp2pml30.xserver"; }
|
||||
{ assertion = cfg.opera -> cfg.xserver; message = "kp2pml30.opera requires kp2pml30.xserver"; }
|
||||
{ assertion = cfg.steam -> cfg.xserver; message = "kp2pml30.steam requires kp2pml30.xserver"; }
|
||||
{ assertion = cfg.messengers.personal -> cfg.xserver; message = "kp2pml30.messengers.personal requires kp2pml30.xserver"; }
|
||||
{ assertion = cfg.messengers.work -> cfg.xserver; message = "kp2pml30.messengers.work requires kp2pml30.xserver"; }
|
||||
];
|
||||
} // lib.mkIf cfg.xserver {
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||
config.common.default = "*";
|
||||
};
|
||||
services.flatpak.enable = true;
|
||||
systemd.services.flatpak-repo = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = [ pkgs.flatpak ];
|
||||
script = ''
|
||||
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||
'';
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
#anytype
|
||||
flatpak
|
||||
gnome-software
|
||||
firefox
|
||||
feh
|
||||
vlc
|
||||
];
|
||||
|
||||
fonts.enableDefaultPackages = true;
|
||||
fonts.packages = with pkgs; [
|
||||
noto-fonts
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-cjk-sans
|
||||
|
||||
fira-code
|
||||
fira-code-symbols
|
||||
|
||||
nerd-fonts.fira-code
|
||||
];
|
||||
};
|
||||
services.flatpak.enable = true;
|
||||
systemd.services.flatpak-repo = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = [ pkgs.flatpak ];
|
||||
script = ''
|
||||
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||
'';
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
anytype
|
||||
flatpak
|
||||
gnome-software
|
||||
|
||||
nodePackages.npm
|
||||
nodejs
|
||||
];
|
||||
|
||||
fonts.enableDefaultPackages = true;
|
||||
fonts.packages = with pkgs; [
|
||||
noto-fonts
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-cjk-sans
|
||||
|
||||
fira-code
|
||||
fira-code-symbols
|
||||
|
||||
nerd-fonts.fira-code
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,9 +9,9 @@ let
|
|||
in lib.mkIf cfg.steam {
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = false;
|
||||
remotePlay.openFirewall = true;
|
||||
dedicatedServer.openFirewall = false;
|
||||
localNetworkGameTransfers.openFirewall = false;
|
||||
localNetworkGameTransfers.openFirewall = true;
|
||||
};
|
||||
|
||||
hardware.steam-hardware.enable = true;
|
||||
|
|
|
|||
|
|
@ -10,15 +10,16 @@ in lib.mkIf cfg.vscode {
|
|||
home-manager.users.${cfg.username} = {
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
package = (pkgs.vscode.overrideAttrs (oldAttrs: rec {
|
||||
src = (builtins.fetchTarball {
|
||||
url = "https://update.code.visualstudio.com/1.104.1/linux-x64/stable";
|
||||
sha256 = "sha256:109mdk1v323dyhzrq0444gjjhfpjxbllkqkhsapfj44ypjzdjcy8";
|
||||
});
|
||||
version = "1.102.2";
|
||||
}));
|
||||
package = pkgs.vscode.overrideAttrs (oldAttrs: {
|
||||
buildInputs = (oldAttrs.buildInputs or []) ++ [
|
||||
pkgs.curl
|
||||
pkgs.openssl
|
||||
pkgs.webkitgtk_4_1
|
||||
pkgs.libsoup_3
|
||||
];
|
||||
});
|
||||
mutableExtensionsDir = false;
|
||||
userSettings = lib.importJSON("${rootPath}/vscode/settings.json");
|
||||
profiles.default.userSettings = lib.importJSON("${rootPath}/vscode/settings.json");
|
||||
# extensions = with pkgs; [
|
||||
# vscode-extensions.eamodio.gitlens
|
||||
# vscode-extensions.editorconfig.editorconfig
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ in {
|
|||
|
||||
home-manager.users.${cfg.username} = { lib, ... }: {
|
||||
home = {
|
||||
stateVersion = "24.05";
|
||||
stateVersion = "25.11";
|
||||
username = cfg.username;
|
||||
homeDirectory = "/home/${cfg.username}";
|
||||
packages = with pkgs; [
|
||||
|
|
@ -41,16 +41,16 @@ in {
|
|||
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
frequency = "weekly";
|
||||
dates = "weekly";
|
||||
};
|
||||
|
||||
programs = {
|
||||
git = {
|
||||
enable = true;
|
||||
userName = cfg.username;
|
||||
userEmail = "kp2pml30@gmail.com";
|
||||
lfs.enable = true;
|
||||
extraConfig = {
|
||||
settings = {
|
||||
user.name = cfg.username;
|
||||
user.email = "kp2pml30@gmail.com";
|
||||
init.defaultBranch = "main";
|
||||
};
|
||||
};
|
||||
|
|
@ -60,6 +60,12 @@ in {
|
|||
shellInitLast = builtins.readFile (rootPath + "/home/.config/fish/config.fish");
|
||||
};
|
||||
|
||||
nushell = {
|
||||
enable = true;
|
||||
extraEnv = builtins.readFile (rootPath + "/home/.config/nushell/env.nu");
|
||||
extraConfig = builtins.readFile (rootPath + "/home/.config/nushell/config.nu");
|
||||
};
|
||||
|
||||
starship = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
|
@ -80,7 +86,50 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
dconf.settings = {
|
||||
xdg.desktopEntries = lib.mkIf config.kp2pml30.xserver {
|
||||
yazi = {
|
||||
name = "Yazi";
|
||||
comment = "Terminal file manager";
|
||||
exec = "kitty -- yazi %u";
|
||||
terminal = false;
|
||||
mimeType = [ "inode/directory" ];
|
||||
categories = [ "System" "FileManager" ];
|
||||
};
|
||||
nvim = {
|
||||
name = "Neovim";
|
||||
comment = "Terminal text editor";
|
||||
exec = "kitty -- nvim %F";
|
||||
terminal = false;
|
||||
mimeType = [ "text/plain" ];
|
||||
categories = [ "Utility" "TextEditor" ];
|
||||
};
|
||||
};
|
||||
|
||||
xdg.mimeApps = lib.mkIf config.kp2pml30.xserver (let
|
||||
mimeMap = desktop: types:
|
||||
builtins.listToAttrs (map (t: { name = t; value = [ desktop ]; }) types);
|
||||
in {
|
||||
enable = true;
|
||||
defaultApplications =
|
||||
{ "inode/directory" = [ "yazi.desktop" ]; }
|
||||
// mimeMap "nvim.desktop" [
|
||||
"text/plain" "text/html" "text/css" "text/xml" "text/markdown"
|
||||
"text/x-csrc" "text/x-chdr" "text/x-c++src" "text/x-c++hdr"
|
||||
"text/x-python" "text/x-shellscript" "text/x-makefile"
|
||||
"application/json" "application/xml" "application/x-yaml"
|
||||
"application/toml" "application/javascript" "application/x-shellscript"
|
||||
"application/x-nix"
|
||||
]
|
||||
// mimeMap "feh.desktop" [
|
||||
"image/png" "image/jpeg" "image/gif" "image/webp" "image/bmp" "image/svg+xml"
|
||||
]
|
||||
// mimeMap "vlc.desktop" [
|
||||
"video/mp4" "video/x-matroska" "video/webm" "video/x-msvideo"
|
||||
"video/quicktime" "video/x-flv"
|
||||
];
|
||||
});
|
||||
|
||||
dconf.settings = lib.mkIf config.kp2pml30.xserver {
|
||||
"org/gnome/desktop/interface" = {
|
||||
color-scheme = "prefer-dark";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ let
|
|||
cfg = config.kp2pml30;
|
||||
in {
|
||||
config = {
|
||||
nixpkgs.overlays = [ inputs.claude-code.overlays.default ];
|
||||
programs = {
|
||||
tmux.enable = true;
|
||||
yazi.enable = true;
|
||||
|
|
@ -18,6 +19,8 @@ in {
|
|||
ncdu
|
||||
timewarrior
|
||||
p7zip
|
||||
claude-code
|
||||
lazydocker
|
||||
];
|
||||
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue