mirror of
https://github.com/buckley310/nixos-config.git
synced 2024-12-21 19:24:15 +00:00
Compare commits
7 commits
0be59680b4
...
034d60c99e
Author | SHA1 | Date | |
---|---|---|---|
|
034d60c99e | ||
|
34f1600786 | ||
|
b0042ecd8f | ||
|
2a4b3bbb79 | ||
|
3997195644 | ||
|
237948a95d | ||
|
73fc62c6ba |
5 changed files with 76 additions and 43 deletions
|
@ -18,6 +18,7 @@
|
|||
jq
|
||||
lm_sensors
|
||||
ncdu
|
||||
nix-diff
|
||||
nix-index
|
||||
nix-prefetch-github
|
||||
nix-top
|
||||
|
|
38
modules/desktop/alacritty.nix
Normal file
38
modules/desktop/alacritty.nix
Normal file
|
@ -0,0 +1,38 @@
|
|||
{ lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
config = (pkgs.formats.toml { }).generate "alacritty.toml"
|
||||
{
|
||||
env.TERM = "xterm-256color";
|
||||
font.size = 12;
|
||||
window = {
|
||||
dynamic_padding = true;
|
||||
resize_increments = true;
|
||||
dimensions = { columns = 120; lines = 40; };
|
||||
};
|
||||
keyboard.bindings = [
|
||||
{ action = "ScrollHalfPageDown"; mods = "Shift"; key = "PageDown"; }
|
||||
{ action = "ScrollHalfPageUp"; mods = "Shift"; key = "PageUp"; }
|
||||
];
|
||||
colors = {
|
||||
primary.background = "0x1e1e1e";
|
||||
primary.foreground = "0xffffff";
|
||||
};
|
||||
import = [ "${pkgs.alacritty-theme}/tango_dark.toml" ];
|
||||
};
|
||||
|
||||
# Alacritty seems to not communicate well with gnome-shell. Quick fix:
|
||||
notify-fix = pkgs.runCommand "alacritty-fix" { } ''
|
||||
dt=share/applications/Alacritty.desktop
|
||||
install -D ${pkgs.alacritty}/$dt $out/$dt
|
||||
sed -i 's/^StartupNotify=.*//' $out/$dt
|
||||
'';
|
||||
|
||||
in
|
||||
{
|
||||
environment.etc."xdg/alacritty.toml".source = config;
|
||||
environment.systemPackages = [
|
||||
(lib.hiPrio notify-fix)
|
||||
pkgs.alacritty
|
||||
];
|
||||
}
|
|
@ -6,9 +6,10 @@ with lib;
|
|||
};
|
||||
|
||||
imports = [
|
||||
./alacritty.nix
|
||||
./chromium.nix
|
||||
./firefox.nix
|
||||
./kitty.nix
|
||||
./vscode.nix
|
||||
];
|
||||
|
||||
config = mkIf (config.sconfig.desktop.enable) {
|
||||
|
@ -25,7 +26,6 @@ with lib;
|
|||
};
|
||||
|
||||
# Pipewire
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
|
@ -68,39 +68,8 @@ with lib;
|
|||
yt-dlp-light
|
||||
|
||||
(mpv.override { scripts = [ mpvScripts.mpris ]; })
|
||||
|
||||
(vscode-with-extensions.override {
|
||||
vscodeExtensions = with pkgs.vscode-extensions; [
|
||||
esbenp.prettier-vscode
|
||||
jnoortheen.nix-ide
|
||||
ms-azuretools.vscode-docker
|
||||
# ms-python.python # currently broken (2023-10-26)
|
||||
redhat.vscode-yaml
|
||||
shardulm94.trailing-spaces
|
||||
];
|
||||
})
|
||||
];
|
||||
|
||||
environment.etc."my-settings.sh".text = ''
|
||||
mkdir -p ~/.config/Code/User
|
||||
ln -sf /etc/vscode-settings.json ~/.config/Code/User/settings.json
|
||||
ln -sf /etc/vscode-keybindings.json ~/.config/Code/User/keybindings.json
|
||||
'';
|
||||
|
||||
environment.etc."vscode-keybindings.json".source = ./vscode-keybindings.json;
|
||||
environment.etc."vscode-settings.json".text = builtins.toJSON (
|
||||
(
|
||||
builtins.fromJSON (builtins.readFile ./vscode-settings.json)
|
||||
) // {
|
||||
# NixOS-specific vscode settings:
|
||||
"extensions.autoCheckUpdates" = false;
|
||||
"extensions.autoUpdate" = false;
|
||||
"terminal.external.linuxExec" = "x-terminal-emulator";
|
||||
"terminal.integrated.fontFamily" = "DejaVuSansM Nerd Font";
|
||||
"update.mode" = "none";
|
||||
}
|
||||
);
|
||||
|
||||
boot.loader.timeout = 1;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = [ pkgs.kitty ];
|
||||
environment.etc."xdg/kitty/kitty.conf".text = ''
|
||||
include ${pkgs.kitty-themes}/share/kitty-themes/themes/Tango_Dark.conf
|
||||
term xterm-256color
|
||||
background #1e1e1e
|
||||
font_size 12
|
||||
'';
|
||||
}
|
35
modules/desktop/vscode.nix
Normal file
35
modules/desktop/vscode.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
(vscode-with-extensions.override {
|
||||
vscodeExtensions = with pkgs.vscode-extensions; [
|
||||
esbenp.prettier-vscode
|
||||
jnoortheen.nix-ide
|
||||
ms-azuretools.vscode-docker
|
||||
ms-python.python
|
||||
redhat.vscode-yaml
|
||||
shardulm94.trailing-spaces
|
||||
];
|
||||
})
|
||||
];
|
||||
|
||||
environment.etc."my-settings.sh".text = ''
|
||||
mkdir -p ~/.config/Code/User
|
||||
ln -sf /etc/vscode-settings.json ~/.config/Code/User/settings.json
|
||||
ln -sf /etc/vscode-keybindings.json ~/.config/Code/User/keybindings.json
|
||||
'';
|
||||
|
||||
environment.etc."vscode-keybindings.json".source = ./vscode-keybindings.json;
|
||||
environment.etc."vscode-settings.json".text = builtins.toJSON (
|
||||
(
|
||||
builtins.fromJSON (builtins.readFile ./vscode-settings.json)
|
||||
) // {
|
||||
# NixOS-specific vscode settings:
|
||||
"extensions.autoCheckUpdates" = false;
|
||||
"extensions.autoUpdate" = false;
|
||||
"terminal.external.linuxExec" = "x-terminal-emulator";
|
||||
"terminal.integrated.fontFamily" = "DejaVuSansM Nerd Font";
|
||||
"update.mode" = "none";
|
||||
}
|
||||
);
|
||||
}
|
Loading…
Reference in a new issue