Doing it myself
This commit is contained in:
commit
7836090a08
105
configuration.nix
Executable file
105
configuration.nix
Executable file
@ -0,0 +1,105 @@
|
|||||||
|
# Edit this configuration file to define what should be installed on
|
||||||
|
# your system. Help is available in the configuration.nix(5) man page
|
||||||
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
# Include the results of the hardware scan.
|
||||||
|
./hardware-configuration.nix
|
||||||
|
./system/gnome.nix
|
||||||
|
inputs.home-manager.nixosModules.default
|
||||||
|
];
|
||||||
|
|
||||||
|
# Bootloader.
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
networking.hostName = "nixos"; # Define your hostname.
|
||||||
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
|
|
||||||
|
# Configure network proxy if necessary
|
||||||
|
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||||
|
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||||
|
|
||||||
|
# Enable networking
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
|
||||||
|
# Set your time zone.
|
||||||
|
time.timeZone = "America/New_York";
|
||||||
|
|
||||||
|
# Select internationalisation properties.
|
||||||
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
|
||||||
|
i18n.extraLocaleSettings = {
|
||||||
|
LC_ADDRESS = "en_US.UTF-8";
|
||||||
|
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||||
|
LC_MEASUREMENT = "en_US.UTF-8";
|
||||||
|
LC_MONETARY = "en_US.UTF-8";
|
||||||
|
LC_NAME = "en_US.UTF-8";
|
||||||
|
LC_NUMERIC = "en_US.UTF-8";
|
||||||
|
LC_PAPER = "en_US.UTF-8";
|
||||||
|
LC_TELEPHONE = "en_US.UTF-8";
|
||||||
|
LC_TIME = "en_US.UTF-8";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable CUPS to print documents.
|
||||||
|
services.printing.enable = true;
|
||||||
|
|
||||||
|
# Enable sound with pipewire.
|
||||||
|
services.pulseaudio.enable = false;
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
alsa.support32Bit = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
# If you want to use JACK applications, uncomment this
|
||||||
|
#jack.enable = true;
|
||||||
|
|
||||||
|
# use the example session manager (no others are packaged yet so this is enabled by default,
|
||||||
|
# no need to redefine it in your config for now)
|
||||||
|
#media-session.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable touchpad support (enabled default in most desktopManager).
|
||||||
|
# services.xserver.libinput.enable = true;
|
||||||
|
|
||||||
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
|
users.users.javi = {
|
||||||
|
isNormalUser = true;
|
||||||
|
description = "javi";
|
||||||
|
extraGroups = ["networkmanager" "wheel"];
|
||||||
|
packages = with pkgs; [
|
||||||
|
# thunderbird
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Install firefox.
|
||||||
|
programs.firefox.enable = true;
|
||||||
|
|
||||||
|
# Allow unfree packages
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
# List packages installed in system profile. To search, run:
|
||||||
|
# $ nix search wget
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
brave
|
||||||
|
neovim
|
||||||
|
git
|
||||||
|
];
|
||||||
|
|
||||||
|
system.stateVersion = "25.05"; # Did you read the comment?
|
||||||
|
|
||||||
|
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||||
|
|
||||||
|
home-manager = {
|
||||||
|
extraSpecialArgs = {inherit inputs;};
|
||||||
|
users = {
|
||||||
|
"javi" = import ./home.nix;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
48
flake.lock
generated
Executable file
48
flake.lock
generated
Executable file
@ -0,0 +1,48 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"home-manager": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1754613544,
|
||||||
|
"narHash": "sha256-ueR1mGX4I4DWfDRRxxMphbKDNisDeMPMusN72VV1+cc=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "cc2fa2331aebf9661d22bb507d362b39852ac73f",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1754498491,
|
||||||
|
"narHash": "sha256-erbiH2agUTD0Z30xcVSFcDHzkRvkRXOQ3lb887bcVrs=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "c2ae88e026f9525daf89587f3cbee584b92b6134",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"home-manager": "home-manager",
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
28
flake.nix
Executable file
28
flake.nix
Executable file
@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
description = "Javi's computer configuration";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||||
|
home-manager = {
|
||||||
|
url = "github:nix-community/home-manager";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = {
|
||||||
|
self,
|
||||||
|
nixpkgs,
|
||||||
|
...
|
||||||
|
} @ inputs: let
|
||||||
|
system = "x86_64-linux";
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
in {
|
||||||
|
nixosConfigurations.default = nixpkgs.lib.nixosSystem {
|
||||||
|
specialArgs = {inherit inputs;};
|
||||||
|
modules = [
|
||||||
|
inputs.home-manager.nixosModules.default
|
||||||
|
./configuration.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
43
hardware-configuration.nix
Executable file
43
hardware-configuration.nix
Executable file
@ -0,0 +1,43 @@
|
|||||||
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
|
# and may be overwritten by future invocations. Please make changes
|
||||||
|
# to /etc/nixos/configuration.nix instead.
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "sd_mod"];
|
||||||
|
boot.initrd.kernelModules = [];
|
||||||
|
boot.kernelModules = ["kvm-intel"];
|
||||||
|
boot.extraModulePackages = [];
|
||||||
|
|
||||||
|
fileSystems."/" = {
|
||||||
|
device = "/dev/disk/by-uuid/0c063318-1531-475e-b3bc-00bdd225dd45";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" = {
|
||||||
|
device = "/dev/disk/by-uuid/029C-659E";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = ["fmask=0077" "dmask=0077"];
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [];
|
||||||
|
|
||||||
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
100
home.nix
Executable file
100
home.nix
Executable file
@ -0,0 +1,100 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
./home/kitty.nix
|
||||||
|
./home/shell.nix
|
||||||
|
./home/starship.nix
|
||||||
|
./home/gnome.nix
|
||||||
|
./home/git.nix
|
||||||
|
];
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
# Home Manager needs a bit of information about you and the paths it should
|
||||||
|
# manage.
|
||||||
|
home.username = "javi";
|
||||||
|
home.homeDirectory = "/home/javi";
|
||||||
|
|
||||||
|
# This value determines the Home Manager release that your configuration is
|
||||||
|
# compatible with. This helps avoid breakage when a new Home Manager release
|
||||||
|
# introduces backwards incompatible changes.
|
||||||
|
#
|
||||||
|
# You should not change this value, even if you update Home Manager. If you do
|
||||||
|
# want to update the value, then make sure to first check the Home Manager
|
||||||
|
# release notes.
|
||||||
|
home.stateVersion = "25.05"; # Please read the comment before changing.
|
||||||
|
|
||||||
|
# The home.packages option allows you to install Nix packages into your
|
||||||
|
# environment.
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
# Basics
|
||||||
|
kitty
|
||||||
|
starship
|
||||||
|
|
||||||
|
# Terminal tools
|
||||||
|
yazi
|
||||||
|
ripgrep
|
||||||
|
fzf
|
||||||
|
bat
|
||||||
|
eza
|
||||||
|
|
||||||
|
# Dev tools
|
||||||
|
jetbrains.datagrip
|
||||||
|
vscode
|
||||||
|
neovim
|
||||||
|
alejandra # Nix formatting
|
||||||
|
|
||||||
|
# System tools
|
||||||
|
btop
|
||||||
|
fastfetch
|
||||||
|
|
||||||
|
# Util
|
||||||
|
xclip
|
||||||
|
flameshot
|
||||||
|
|
||||||
|
# Media
|
||||||
|
mpc
|
||||||
|
|
||||||
|
# Apps
|
||||||
|
discord
|
||||||
|
];
|
||||||
|
|
||||||
|
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
||||||
|
# plain files is through 'home.file'.
|
||||||
|
home.file = {
|
||||||
|
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
|
||||||
|
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
|
||||||
|
# # symlink to the Nix store copy.
|
||||||
|
# ".screenrc".source = dotfiles/screenrc;
|
||||||
|
|
||||||
|
# # You can also set the file content immediately.
|
||||||
|
# ".gradle/gradle.properties".text = ''
|
||||||
|
# org.gradle.console=verbose
|
||||||
|
# org.gradle.daemon.idletimeout=3600000
|
||||||
|
# '';
|
||||||
|
};
|
||||||
|
|
||||||
|
# Home Manager can also manage your environment variables through
|
||||||
|
# 'home.sessionVariables'. These will be explicitly sourced when using a
|
||||||
|
# shell provided by Home Manager. If you don't want to manage your shell
|
||||||
|
# through Home Manager then you have to manually source 'hm-session-vars.sh'
|
||||||
|
# located at either
|
||||||
|
#
|
||||||
|
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
|
||||||
|
#
|
||||||
|
# or
|
||||||
|
#
|
||||||
|
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
|
||||||
|
#
|
||||||
|
# or
|
||||||
|
#
|
||||||
|
# /etc/profiles/per-user/javi/etc/profile.d/hm-session-vars.sh
|
||||||
|
#
|
||||||
|
home.sessionVariables = {
|
||||||
|
# EDITOR = "emacs";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Let Home Manager install and manage itself.
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
}
|
109
home/development.nix
Executable file
109
home/development.nix
Executable file
@ -0,0 +1,109 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
# Development-specific configurations and tools
|
||||||
|
|
||||||
|
# Node.js development
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
# Node.js tools (system-wide installation handled in NixOS config)
|
||||||
|
nodePackages.npm
|
||||||
|
nodePackages.bun
|
||||||
|
|
||||||
|
# PHP development tools
|
||||||
|
phpPackages.composer
|
||||||
|
|
||||||
|
# JSON/YAML tools
|
||||||
|
jq
|
||||||
|
yq
|
||||||
|
];
|
||||||
|
|
||||||
|
# Development environment variables
|
||||||
|
home.sessionVariables = {
|
||||||
|
# Node.js
|
||||||
|
NODE_ENV = "development";
|
||||||
|
NPM_CONFIG_PREFIX = "${config.home.homeDirectory}/.npm-global";
|
||||||
|
|
||||||
|
# PHP
|
||||||
|
COMPOSER_HOME = "${config.home.homeDirectory}/.composer";
|
||||||
|
|
||||||
|
# Go
|
||||||
|
GOPATH = "${config.home.homeDirectory}/go";
|
||||||
|
GOBIN = "${config.home.homeDirectory}/go/bin";
|
||||||
|
|
||||||
|
# Laravel Valet (when using it with Nix)
|
||||||
|
PATH = "$PATH:${config.home.homeDirectory}/.composer/vendor/bin";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Create development directories
|
||||||
|
home.file.".keep-dirs" = {
|
||||||
|
text = "";
|
||||||
|
onChange = ''
|
||||||
|
mkdir -p ${config.home.homeDirectory}/projects
|
||||||
|
mkdir -p ${config.home.homeDirectory}/go/{bin,pkg,src}
|
||||||
|
mkdir -p ${config.home.homeDirectory}/.composer
|
||||||
|
mkdir -p ${config.home.homeDirectory}/.npm-global
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
# Yazi file manager configuration (replaces your yazi.sh script)
|
||||||
|
programs.yazi = {
|
||||||
|
enable = true;
|
||||||
|
enableBashIntegration = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
manager = {
|
||||||
|
show_hidden = true;
|
||||||
|
sort_by = "modified";
|
||||||
|
sort_reverse = true;
|
||||||
|
linemode = "permissions";
|
||||||
|
};
|
||||||
|
|
||||||
|
preview = {
|
||||||
|
max_width = 600;
|
||||||
|
max_height = 900;
|
||||||
|
};
|
||||||
|
|
||||||
|
opener = {
|
||||||
|
edit = [
|
||||||
|
{
|
||||||
|
run = "code \"$@\"";
|
||||||
|
block = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
open = [
|
||||||
|
{
|
||||||
|
run = "xdg-open \"$@\"";
|
||||||
|
desc = "Open";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
keymap = {
|
||||||
|
manager.prepend_keymap = [
|
||||||
|
{
|
||||||
|
on = ["<Esc>"];
|
||||||
|
run = "escape";
|
||||||
|
desc = "Exit visual mode, clear selected, or cancel search";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
on = ["q"];
|
||||||
|
run = "quit";
|
||||||
|
desc = "Exit the process";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
on = ["Q"];
|
||||||
|
run = "quit --no-cwd-file";
|
||||||
|
desc = "Exit the process without writing cwd-file";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
on = ["<C-q>"];
|
||||||
|
run = "close";
|
||||||
|
desc = "Close the current tab, or quit if it is last tab";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
53
home/git.nix
Executable file
53
home/git.nix
Executable file
@ -0,0 +1,53 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
home.packages = [
|
||||||
|
pkgs.git
|
||||||
|
];
|
||||||
|
|
||||||
|
# Git configuration
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
# User information (from your init.sh)
|
||||||
|
userName = "javif89";
|
||||||
|
userEmail = "javier0eduardo@hotmail.com";
|
||||||
|
|
||||||
|
# Git settings
|
||||||
|
extraConfig = {
|
||||||
|
init = {
|
||||||
|
defaultBranch = "main";
|
||||||
|
};
|
||||||
|
|
||||||
|
core = {
|
||||||
|
editor = "code --wait";
|
||||||
|
autocrlf = "input";
|
||||||
|
ignorecase = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
pull = {
|
||||||
|
rebase = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
push = {
|
||||||
|
default = "simple";
|
||||||
|
autoSetupRemote = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
merge = {
|
||||||
|
tool = "code";
|
||||||
|
};
|
||||||
|
|
||||||
|
diff = {
|
||||||
|
tool = "code";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Better diff output
|
||||||
|
color = {
|
||||||
|
ui = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
83
home/gnome.nix
Executable file
83
home/gnome.nix
Executable file
@ -0,0 +1,83 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
./gnome/keybinds.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
gnomeExtensions.blur-my-shell
|
||||||
|
gnomeExtensions.dash-to-dock
|
||||||
|
gnomeExtensions.space-bar
|
||||||
|
gnomeExtensions.just-perfection
|
||||||
|
];
|
||||||
|
|
||||||
|
dconf.enable = true;
|
||||||
|
|
||||||
|
# All the gnome configuration is under this
|
||||||
|
dconf.settings = {
|
||||||
|
# Interface settings
|
||||||
|
"org/gnome/desktop/interface" = {
|
||||||
|
color-scheme = "prefer-dark";
|
||||||
|
gtk-theme = "Adwaita-dark";
|
||||||
|
icon-theme = "Adwaita";
|
||||||
|
cursor-theme = "Adwaita";
|
||||||
|
font-name = "Cantarell 11";
|
||||||
|
document-font-name = "Cantarell 11";
|
||||||
|
monospace-font-name = "FiraCode Nerd Font 10";
|
||||||
|
show-battery-percentage = true;
|
||||||
|
clock-show-weekday = true;
|
||||||
|
clock-show-date = true;
|
||||||
|
clock-show-seconds = false;
|
||||||
|
clock-format = "12h";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Nautilus (file manager) preferences
|
||||||
|
"org/gnome/nautilus/preferences" = {
|
||||||
|
default-folder-viewer = "list-view";
|
||||||
|
search-filter-time-type = "last_modified";
|
||||||
|
show-hidden-files = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# GNOME Shell extensions
|
||||||
|
"org/gnome/shell" = {
|
||||||
|
enabled-extensions = [
|
||||||
|
"blur-my-shell@aunetx"
|
||||||
|
"space-bar@luchrioh"
|
||||||
|
"just-perfection-desktop@just-perfection"
|
||||||
|
];
|
||||||
|
disabled-extensions = [
|
||||||
|
"tiling-assistant@ubuntu.com"
|
||||||
|
"ubuntu-appindicators@ubuntu.com"
|
||||||
|
"ubuntu-dock@ubuntu.com"
|
||||||
|
"ding@rastersoft.com"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Dash to Dock settings
|
||||||
|
"org/gnome/shell/extensions/dash-to-dock" = {
|
||||||
|
dock-position = "BOTTOM";
|
||||||
|
dock-fixed = false;
|
||||||
|
intellihide-mode = "FOCUS_APPLICATION_WINDOWS";
|
||||||
|
show-favorites = true;
|
||||||
|
show-running = true;
|
||||||
|
show-apps-at-top = true;
|
||||||
|
click-action = "cycle-windows";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Power settings
|
||||||
|
"org/gnome/settings-daemon/plugins/power" = {
|
||||||
|
sleep-inactive-ac-type = "nothing";
|
||||||
|
sleep-inactive-battery-timeout = 1800;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Privacy settings
|
||||||
|
"org/gnome/desktop/privacy" = {
|
||||||
|
report-technical-problems = false;
|
||||||
|
send-software-usage-stats = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
119
home/gnome/keybinds.nix
Normal file
119
home/gnome/keybinds.nix
Normal file
@ -0,0 +1,119 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
# Helper function to create custom keybindings
|
||||||
|
mkCustomKeybinding = index: {
|
||||||
|
name,
|
||||||
|
command,
|
||||||
|
binding,
|
||||||
|
}: {
|
||||||
|
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom${toString index}" = {
|
||||||
|
inherit name command binding;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Helper function to generate custom keybinding paths
|
||||||
|
mkCustomKeybindingPaths = count:
|
||||||
|
lib.genList (i: "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom${toString i}/") count;
|
||||||
|
|
||||||
|
# Helper function to generate workspace keybindings
|
||||||
|
mkWorkspaceKeybindings = count:
|
||||||
|
lib.genAttrs
|
||||||
|
(lib.genList (i: "switch-to-workspace-${toString (i + 1)}") count)
|
||||||
|
(name: let
|
||||||
|
num = lib.strings.removePrefix "switch-to-workspace-" name;
|
||||||
|
in ["<Super>${num}"]);
|
||||||
|
|
||||||
|
# Helper function to disable application shortcuts
|
||||||
|
mkDisableAppShortcuts = count:
|
||||||
|
lib.genAttrs
|
||||||
|
(lib.genList (i: "switch-to-application-${toString (i + 1)}") count)
|
||||||
|
(name: []);
|
||||||
|
|
||||||
|
# Define custom keybindings
|
||||||
|
customKeybindings = [
|
||||||
|
{
|
||||||
|
name = "Flameshot";
|
||||||
|
command = "flameshot gui";
|
||||||
|
binding = "<Super><Shift>s";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "New Brave window";
|
||||||
|
command = "brave";
|
||||||
|
binding = "<Super><Shift>o";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "New Brave incognito window";
|
||||||
|
command = "brave --incognito";
|
||||||
|
binding = "<Super><Shift>p";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "Kitty";
|
||||||
|
command = "kitty";
|
||||||
|
binding = "<Super>q";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "File Explorer";
|
||||||
|
command = "nautilus --new-window";
|
||||||
|
binding = "<Super>e";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "Project selector";
|
||||||
|
command = "kitty --start-as=normal -- bash -ic 'proj'";
|
||||||
|
binding = "<Control><Shift>p";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "ChatGPT";
|
||||||
|
command = "brave --new-window --app=https://chatgpt.com";
|
||||||
|
binding = "<Super>Return";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "BTop";
|
||||||
|
command = "kitty --start-as=normal -- bash -ic 'btop'";
|
||||||
|
binding = "<Control><Shift>Escape";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "FastFetch";
|
||||||
|
command = "kitty --start-as=normal -- bash -ic 'fastfetch'";
|
||||||
|
binding = "<Control><Alt>1";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
# Generate all custom keybinding settings
|
||||||
|
customKeybindingSettings =
|
||||||
|
lib.foldl lib.mergeAttrs {}
|
||||||
|
(lib.imap0 (index: keybind: mkCustomKeybinding index keybind) customKeybindings);
|
||||||
|
in {
|
||||||
|
# GNOME desktop configuration (equivalent to your scripts/gnome/ files)
|
||||||
|
dconf.settings =
|
||||||
|
lib.mergeAttrs {
|
||||||
|
# Window manager keybindings (from keybinds.sh)
|
||||||
|
"org/gnome/desktop/wm/keybindings" = lib.mergeAttrs {
|
||||||
|
close = ["<Super>c"];
|
||||||
|
maximize = ["<Super>Up"];
|
||||||
|
toggle-fullscreen = ["<Shift>F11"];
|
||||||
|
} (mkWorkspaceKeybindings 6);
|
||||||
|
|
||||||
|
# Workspace settings
|
||||||
|
"org/gnome/mutter" = {
|
||||||
|
dynamic-workspaces = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
"org/gnome/desktop/wm/preferences" = {
|
||||||
|
num-workspaces = 6;
|
||||||
|
resize-with-right-button = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Disable Super+number for applications (to use for workspaces)
|
||||||
|
"org/gnome/shell/keybindings" = mkDisableAppShortcuts 9;
|
||||||
|
|
||||||
|
# Custom keybindings (from your keybinds.sh)
|
||||||
|
"org/gnome/settings-daemon/plugins/media-keys" = {
|
||||||
|
custom-keybindings = mkCustomKeybindingPaths (lib.length customKeybindings);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
customKeybindingSettings;
|
||||||
|
}
|
104
home/home.nix
Executable file
104
home/home.nix
Executable file
@ -0,0 +1,104 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
stable,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
./modules/shell.nix
|
||||||
|
./modules/git.nix
|
||||||
|
./modules/gnome.nix
|
||||||
|
./programs/vscode.nix
|
||||||
|
./programs/starship.nix
|
||||||
|
./programs/development.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
# Home Manager version
|
||||||
|
home.stateVersion = "24.05";
|
||||||
|
|
||||||
|
# User info
|
||||||
|
home = {
|
||||||
|
username = "javi";
|
||||||
|
homeDirectory = "/home/javi";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Let Home Manager manage itself
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
|
# User packages
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
# Terminal tools
|
||||||
|
yazi # File manager (replacing your yazi.sh script)
|
||||||
|
ripgrep # Better grep
|
||||||
|
fd # Better find
|
||||||
|
bat # Better cat
|
||||||
|
delta # Better git diff
|
||||||
|
|
||||||
|
# Development tools
|
||||||
|
jetbrains.datagrip # Database IDE (from your Ansible config)
|
||||||
|
|
||||||
|
# System monitoring
|
||||||
|
btop
|
||||||
|
neofetch
|
||||||
|
fastfetch
|
||||||
|
|
||||||
|
# Utilities
|
||||||
|
xclip
|
||||||
|
wl-clipboard
|
||||||
|
flameshot
|
||||||
|
|
||||||
|
# Archive tools
|
||||||
|
unzip
|
||||||
|
zip
|
||||||
|
p7zip
|
||||||
|
|
||||||
|
# Network tools
|
||||||
|
curl
|
||||||
|
wget
|
||||||
|
|
||||||
|
# Media
|
||||||
|
mpc
|
||||||
|
];
|
||||||
|
|
||||||
|
# XDG directories
|
||||||
|
xdg = {
|
||||||
|
enable = true;
|
||||||
|
userDirs = {
|
||||||
|
enable = true;
|
||||||
|
createDirectories = true;
|
||||||
|
desktop = "${config.home.homeDirectory}/Desktop";
|
||||||
|
documents = "${config.home.homeDirectory}/Documents";
|
||||||
|
download = "${config.home.homeDirectory}/Downloads";
|
||||||
|
music = "${config.home.homeDirectory}/Music";
|
||||||
|
pictures = "${config.home.homeDirectory}/Pictures";
|
||||||
|
videos = "${config.home.homeDirectory}/Videos";
|
||||||
|
templates = "${config.home.homeDirectory}/Templates";
|
||||||
|
publicShare = "${config.home.homeDirectory}/Public";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Environment variables
|
||||||
|
home.sessionVariables = {
|
||||||
|
EDITOR = "code";
|
||||||
|
BROWSER = "brave";
|
||||||
|
TERMINAL = "kitty";
|
||||||
|
};
|
||||||
|
|
||||||
|
# File associations
|
||||||
|
xdg.mimeApps = {
|
||||||
|
enable = true;
|
||||||
|
defaultApplications = {
|
||||||
|
"text/html" = "brave-browser.desktop";
|
||||||
|
"x-scheme-handler/http" = "brave-browser.desktop";
|
||||||
|
"x-scheme-handler/https" = "brave-browser.desktop";
|
||||||
|
"x-scheme-handler/about" = "brave-browser.desktop";
|
||||||
|
"x-scheme-handler/unknown" = "brave-browser.desktop";
|
||||||
|
"application/pdf" = "org.gnome.Evince.desktop";
|
||||||
|
"text/plain" = "code.desktop";
|
||||||
|
"application/json" = "code.desktop";
|
||||||
|
"application/javascript" = "code.desktop";
|
||||||
|
"text/x-php" = "code.desktop";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
31
home/kitty.nix
Normal file
31
home/kitty.nix
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
kittyConfig = ''
|
||||||
|
include current-theme.conf
|
||||||
|
|
||||||
|
font_size 16.0
|
||||||
|
|
||||||
|
background_opacity 0.9
|
||||||
|
background_blur 1
|
||||||
|
|
||||||
|
hide_window_decorations yes
|
||||||
|
|
||||||
|
map ctrl+shift+t new_tab_with_cwd
|
||||||
|
'';
|
||||||
|
in {
|
||||||
|
programs.kitty = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
extraConfig = kittyConfig;
|
||||||
|
|
||||||
|
# Optional: link extra files like `current-theme.conf`
|
||||||
|
# Add this if you have a custom theme file
|
||||||
|
# settings = {
|
||||||
|
# include = "~/.config/kitty/current-theme.conf";
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
}
|
87
home/shell.nix
Executable file
87
home/shell.nix
Executable file
@ -0,0 +1,87 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
# Bash configuration
|
||||||
|
programs.bash = {
|
||||||
|
enable = true;
|
||||||
|
enableCompletion = true;
|
||||||
|
|
||||||
|
# Shell aliases (equivalent to your script functions)
|
||||||
|
shellAliases = {
|
||||||
|
sudo = "sudo ";
|
||||||
|
# Better ls with eza
|
||||||
|
ls = "eza";
|
||||||
|
ll = "eza -la";
|
||||||
|
la = "eza -la";
|
||||||
|
tree = "eza --tree";
|
||||||
|
|
||||||
|
# Convenience
|
||||||
|
rp = "source ~/.bashrc";
|
||||||
|
|
||||||
|
# Nix
|
||||||
|
rb = "sudo nixos-rebuild switch --flake $HOME/nixos-config#default";
|
||||||
|
|
||||||
|
# Git shortcuts
|
||||||
|
gs = "git status";
|
||||||
|
ga = "git add";
|
||||||
|
gc = "git commit";
|
||||||
|
gp = "git push";
|
||||||
|
gl = "git pull";
|
||||||
|
gco = "git checkout";
|
||||||
|
gb = "git branch";
|
||||||
|
gd = "git diff";
|
||||||
|
glog = "git log --oneline --graph";
|
||||||
|
|
||||||
|
# Directory navigation
|
||||||
|
".." = "cd ..";
|
||||||
|
"..." = "cd ../..";
|
||||||
|
"...." = "cd ../../..";
|
||||||
|
|
||||||
|
# Development
|
||||||
|
a = "php artisan";
|
||||||
|
|
||||||
|
# System
|
||||||
|
grep = "rg";
|
||||||
|
|
||||||
|
# System monitoring
|
||||||
|
top = "btop";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Additional bash configuration
|
||||||
|
bashrcExtra = ''
|
||||||
|
# Custom functions
|
||||||
|
|
||||||
|
# Project selector function (equivalent to your custom keybinding)
|
||||||
|
proj() {
|
||||||
|
if [ -d "$HOME/projects" ]; then
|
||||||
|
cd "$HOME/projects"
|
||||||
|
if command -v eza > /dev/null 2>&1; then
|
||||||
|
eza -la
|
||||||
|
else
|
||||||
|
ls -la
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "Projects directory not found"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Make directory and cd into it
|
||||||
|
mkcd() {
|
||||||
|
mkdir -p "$1" && cd "$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Better completion
|
||||||
|
bind "set completion-ignore-case on"
|
||||||
|
bind "set show-all-if-ambiguous on"
|
||||||
|
bind "set show-all-if-unmodified on"
|
||||||
|
|
||||||
|
# Enable color support
|
||||||
|
if [ -x /usr/bin/dircolors ]; then
|
||||||
|
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
178
home/starship.nix
Executable file
178
home/starship.nix
Executable file
@ -0,0 +1,178 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
# Starship prompt configuration (equivalent to your starship-prompt.sh)
|
||||||
|
programs.starship = {
|
||||||
|
enable = true;
|
||||||
|
enableBashIntegration = true;
|
||||||
|
|
||||||
|
# settings = {
|
||||||
|
# # Main prompt format
|
||||||
|
# format = ''
|
||||||
|
# $username$hostname$directory$git_branch$git_status$nodejs$php$go$python$docker_context$nix_shell
|
||||||
|
# $character
|
||||||
|
# '';
|
||||||
|
#
|
||||||
|
# # Right side format
|
||||||
|
# right_format = "$cmd_duration$time";
|
||||||
|
#
|
||||||
|
# # Character (prompt indicator)
|
||||||
|
# character = {
|
||||||
|
# success_symbol = "[❯](bold green)";
|
||||||
|
# error_symbol = "[❯](bold red)";
|
||||||
|
# vicmd_symbol = "[❮](bold yellow)";
|
||||||
|
# };
|
||||||
|
#
|
||||||
|
# # Directory
|
||||||
|
# directory = {
|
||||||
|
# style = "bold cyan";
|
||||||
|
# truncation_length = 3;
|
||||||
|
# truncate_to_repo = false;
|
||||||
|
# format = "[$path]($style)[$lock_symbol]($lock_style) ";
|
||||||
|
# };
|
||||||
|
#
|
||||||
|
# # Git branch
|
||||||
|
# git_branch = {
|
||||||
|
# style = "bold purple";
|
||||||
|
# format = "on [$symbol$branch]($style) ";
|
||||||
|
# symbol = " ";
|
||||||
|
# };
|
||||||
|
#
|
||||||
|
# # Git status
|
||||||
|
# git_status = {
|
||||||
|
# style = "red";
|
||||||
|
# ahead = "⇡\${count}";
|
||||||
|
# diverged = "⇕⇡\${ahead_count}⇣\${behind_count}";
|
||||||
|
# behind = "⇣\${count}";
|
||||||
|
# conflicted = "=";
|
||||||
|
# deleted = "✘";
|
||||||
|
# modified = "!";
|
||||||
|
# renamed = "»";
|
||||||
|
# staged = "+";
|
||||||
|
# stashed = "$";
|
||||||
|
# untracked = "?";
|
||||||
|
# format = "([$all_status$ahead_behind]($style))";
|
||||||
|
# };
|
||||||
|
#
|
||||||
|
# # Username
|
||||||
|
# username = {
|
||||||
|
# style_user = "bold yellow";
|
||||||
|
# style_root = "bold red";
|
||||||
|
# format = "[$user]($style) ";
|
||||||
|
# disabled = false;
|
||||||
|
# show_always = false;
|
||||||
|
# };
|
||||||
|
#
|
||||||
|
# # Hostname
|
||||||
|
# hostname = {
|
||||||
|
# ssh_only = false;
|
||||||
|
# format = "[@$hostname]($style) ";
|
||||||
|
# style = "bold green";
|
||||||
|
# disabled = true;
|
||||||
|
# };
|
||||||
|
#
|
||||||
|
# # Language versions
|
||||||
|
# nodejs = {
|
||||||
|
# style = "bold green";
|
||||||
|
# format = "via [$symbol($version)]($style) ";
|
||||||
|
# symbol = " ";
|
||||||
|
# detect_extensions = ["js" "mjs" "cjs" "ts" "tsx" "vue"];
|
||||||
|
# detect_files = ["package.json" "package-lock.json" "yarn.lock"];
|
||||||
|
# };
|
||||||
|
#
|
||||||
|
# php = {
|
||||||
|
# style = "bold blue";
|
||||||
|
# format = "via [$symbol($version)]($style) ";
|
||||||
|
# symbol = " ";
|
||||||
|
# detect_extensions = ["php"];
|
||||||
|
# detect_files = ["composer.json" "composer.lock"];
|
||||||
|
# };
|
||||||
|
#
|
||||||
|
# go = {
|
||||||
|
# style = "bold cyan";
|
||||||
|
# format = "via [$symbol($version)]($style) ";
|
||||||
|
# symbol = " ";
|
||||||
|
# detect_extensions = ["go"];
|
||||||
|
# detect_files = ["go.mod" "go.sum"];
|
||||||
|
# };
|
||||||
|
#
|
||||||
|
# python = {
|
||||||
|
# style = "bold yellow";
|
||||||
|
# format = "via [$symbol$pyenv_prefix($version)]($style) ";
|
||||||
|
# symbol = " ";
|
||||||
|
# detect_extensions = ["py"];
|
||||||
|
# detect_files = ["requirements.txt" "pyproject.toml" "Pipfile"];
|
||||||
|
# };
|
||||||
|
#
|
||||||
|
# # Docker
|
||||||
|
# docker_context = {
|
||||||
|
# style = "blue bold";
|
||||||
|
# format = "via [$symbol$context]($style) ";
|
||||||
|
# symbol = " ";
|
||||||
|
# only_with_files = true;
|
||||||
|
# detect_files = ["docker-compose.yml" "docker-compose.yaml" "Dockerfile"];
|
||||||
|
# };
|
||||||
|
#
|
||||||
|
# # Nix shell
|
||||||
|
# nix_shell = {
|
||||||
|
# style = "bold blue";
|
||||||
|
# format = "via [$symbol$state( \\($name\\))]($style) ";
|
||||||
|
# symbol = "❄️ ";
|
||||||
|
# impure_msg = "[impure shell](bold red)";
|
||||||
|
# pure_msg = "[pure shell](bold green)";
|
||||||
|
# unknown_msg = "[unknown shell](bold yellow)";
|
||||||
|
# };
|
||||||
|
#
|
||||||
|
# # Command duration
|
||||||
|
# cmd_duration = {
|
||||||
|
# min_time = 2000;
|
||||||
|
# style = "bold yellow";
|
||||||
|
# format = "took [$duration]($style) ";
|
||||||
|
# };
|
||||||
|
#
|
||||||
|
# # Time
|
||||||
|
# time = {
|
||||||
|
# disabled = false;
|
||||||
|
# style = "bold white";
|
||||||
|
# format = "[$time]($style)";
|
||||||
|
# time_format = "%T";
|
||||||
|
# utc_time_offset = "local";
|
||||||
|
# };
|
||||||
|
#
|
||||||
|
# # Status
|
||||||
|
# status = {
|
||||||
|
# style = "bg:blue";
|
||||||
|
# symbol = "🔴";
|
||||||
|
# format = "[\\[$symbol $common_meaning$signal_name$maybe_int\\]]($style) ";
|
||||||
|
# map_symbol = true;
|
||||||
|
# disabled = false;
|
||||||
|
# };
|
||||||
|
#
|
||||||
|
# # Memory usage
|
||||||
|
# memory_usage = {
|
||||||
|
# disabled = false;
|
||||||
|
# threshold = 70;
|
||||||
|
# style = "bold dimmed white";
|
||||||
|
# format = "via $symbol[${ram}( | ${swap})]($style) ";
|
||||||
|
# symbol = " ";
|
||||||
|
# };
|
||||||
|
#
|
||||||
|
# # Package version
|
||||||
|
# package = {
|
||||||
|
# disabled = false;
|
||||||
|
# style = "208 bold";
|
||||||
|
# format = "is [$symbol$version]($style) ";
|
||||||
|
# symbol = "📦 ";
|
||||||
|
# };
|
||||||
|
#
|
||||||
|
# # AWS
|
||||||
|
# aws = {
|
||||||
|
# style = "bold orange";
|
||||||
|
# format = "on [$symbol($profile)(\\($region\\))(\\[$duration\\])]($style) ";
|
||||||
|
# symbol = "☁️ ";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
}
|
182
home/vscode.nix
Executable file
182
home/vscode.nix
Executable file
@ -0,0 +1,182 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
programs.vscode = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.vscode;
|
||||||
|
|
||||||
|
# Extensions (commonly used for development)
|
||||||
|
extensions = with pkgs.vscode-extensions; [
|
||||||
|
# Language support
|
||||||
|
ms-vscode.vscode-typescript-next
|
||||||
|
bradlc.vscode-tailwindcss
|
||||||
|
ms-python.python
|
||||||
|
ms-vscode.vscode-json
|
||||||
|
redhat.vscode-yaml
|
||||||
|
ms-vscode.vscode-css
|
||||||
|
|
||||||
|
# PHP
|
||||||
|
bmewburn.vscode-intelephense-client
|
||||||
|
xdebug.php-debug
|
||||||
|
|
||||||
|
# Git
|
||||||
|
eamodio.gitlens
|
||||||
|
mhutchie.git-graph
|
||||||
|
|
||||||
|
# Productivity
|
||||||
|
ms-vscode.vscode-eslint
|
||||||
|
esbenp.prettier-vscode
|
||||||
|
bradlc.vscode-tailwindcss
|
||||||
|
formulahendry.auto-rename-tag
|
||||||
|
ms-vscode.vscode-color-info
|
||||||
|
|
||||||
|
# Themes and appearance
|
||||||
|
pkief.material-icon-theme
|
||||||
|
zhuangtongfa.material-theme
|
||||||
|
|
||||||
|
# Docker
|
||||||
|
ms-azuretools.vscode-docker
|
||||||
|
|
||||||
|
# Remote development
|
||||||
|
ms-vscode-remote.remote-ssh
|
||||||
|
ms-vscode-remote.remote-containers
|
||||||
|
|
||||||
|
# Nix support
|
||||||
|
bbenoist.nix
|
||||||
|
jnoortheen.nix-ide
|
||||||
|
];
|
||||||
|
|
||||||
|
# User settings
|
||||||
|
userSettings = {
|
||||||
|
# Editor settings
|
||||||
|
"editor.fontSize" = 14;
|
||||||
|
"editor.fontFamily" = "'FiraCode Nerd Font', 'Droid Sans Mono', monospace";
|
||||||
|
"editor.fontLigatures" = true;
|
||||||
|
"editor.tabSize" = 2;
|
||||||
|
"editor.insertSpaces" = true;
|
||||||
|
"editor.wordWrap" = "on";
|
||||||
|
"editor.minimap.enabled" = false;
|
||||||
|
"editor.renderWhitespace" = "boundary";
|
||||||
|
"editor.rulers" = [80 120];
|
||||||
|
"editor.formatOnSave" = true;
|
||||||
|
"editor.codeActionsOnSave" = {
|
||||||
|
"source.fixAll.eslint" = "explicit";
|
||||||
|
"source.organizeImports" = "explicit";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Workbench
|
||||||
|
"workbench.colorTheme" = "Material Theme Darker High Contrast";
|
||||||
|
"workbench.iconTheme" = "material-icon-theme";
|
||||||
|
"workbench.startupEditor" = "newUntitledFile";
|
||||||
|
"workbench.sideBar.location" = "left";
|
||||||
|
|
||||||
|
# Files
|
||||||
|
"files.autoSave" = "onFocusChange";
|
||||||
|
"files.trimTrailingWhitespace" = true;
|
||||||
|
"files.insertFinalNewline" = true;
|
||||||
|
"files.exclude" = {
|
||||||
|
"**/node_modules" = true;
|
||||||
|
"**/vendor" = true;
|
||||||
|
"**/.git" = true;
|
||||||
|
"**/.svn" = true;
|
||||||
|
"**/.hg" = true;
|
||||||
|
"**/CVS" = true;
|
||||||
|
"**/.DS_Store" = true;
|
||||||
|
"**/Thumbs.db" = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Terminal
|
||||||
|
"terminal.integrated.fontFamily" = "'FiraCode Nerd Font'";
|
||||||
|
"terminal.integrated.fontSize" = 13;
|
||||||
|
"terminal.integrated.shell.linux" = "${pkgs.bash}/bin/bash";
|
||||||
|
|
||||||
|
# Git
|
||||||
|
"git.enableSmartCommit" = true;
|
||||||
|
"git.autofetch" = true;
|
||||||
|
"git.confirmSync" = false;
|
||||||
|
|
||||||
|
# Language-specific settings
|
||||||
|
"[javascript]" = {
|
||||||
|
"editor.defaultFormatter" = "esbenp.prettier-vscode";
|
||||||
|
};
|
||||||
|
"[typescript]" = {
|
||||||
|
"editor.defaultFormatter" = "esbenp.prettier-vscode";
|
||||||
|
};
|
||||||
|
"[json]" = {
|
||||||
|
"editor.defaultFormatter" = "esbenp.prettier-vscode";
|
||||||
|
};
|
||||||
|
"[html]" = {
|
||||||
|
"editor.defaultFormatter" = "esbenp.prettier-vscode";
|
||||||
|
};
|
||||||
|
"[css]" = {
|
||||||
|
"editor.defaultFormatter" = "esbenp.prettier-vscode";
|
||||||
|
};
|
||||||
|
"[php]" = {
|
||||||
|
"editor.defaultFormatter" = "bmewburn.vscode-intelephense-client";
|
||||||
|
};
|
||||||
|
"[nix]" = {
|
||||||
|
"editor.defaultFormatter" = "jnoortheen.nix-ide";
|
||||||
|
"editor.tabSize" = 2;
|
||||||
|
};
|
||||||
|
|
||||||
|
# PHP Intelephense
|
||||||
|
"intelephense.files.maxSize" = 5000000;
|
||||||
|
"intelephense.telemetry.enabled" = false;
|
||||||
|
|
||||||
|
# ESLint
|
||||||
|
"eslint.validate" = [
|
||||||
|
"javascript"
|
||||||
|
"javascriptreact"
|
||||||
|
"typescript"
|
||||||
|
"typescriptreact"
|
||||||
|
"vue"
|
||||||
|
];
|
||||||
|
|
||||||
|
# Prettier
|
||||||
|
"prettier.singleQuote" = true;
|
||||||
|
"prettier.trailingComma" = "es5";
|
||||||
|
"prettier.tabWidth" = 2;
|
||||||
|
"prettier.semi" = true;
|
||||||
|
|
||||||
|
# Docker
|
||||||
|
"docker.showStartPage" = false;
|
||||||
|
|
||||||
|
# Telemetry
|
||||||
|
"telemetry.telemetryLevel" = "off";
|
||||||
|
"extensions.ignoreRecommendations" = true;
|
||||||
|
|
||||||
|
# Security
|
||||||
|
"security.workspace.trust.enabled" = false;
|
||||||
|
|
||||||
|
# Window
|
||||||
|
"window.titleBarStyle" = "custom";
|
||||||
|
"window.menuBarVisibility" = "toggle";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Keybindings
|
||||||
|
keybindings = [
|
||||||
|
{
|
||||||
|
key = "ctrl+shift+p";
|
||||||
|
command = "workbench.action.showCommands";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "ctrl+p";
|
||||||
|
command = "workbench.action.quickOpen";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "ctrl+shift+n";
|
||||||
|
command = "workbench.action.files.newUntitledFile";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "ctrl+shift+f";
|
||||||
|
command = "workbench.action.findInFiles";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "ctrl+`";
|
||||||
|
command = "workbench.action.terminal.toggleTerminal";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
20
system/gnome.nix
Normal file
20
system/gnome.nix
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
services.xserver.enable = true;
|
||||||
|
services.displayManager.gdm.enable = true;
|
||||||
|
services.desktopManager.gnome.enable = true;
|
||||||
|
|
||||||
|
# Configure keymap in X11
|
||||||
|
services.xserver.xkb = {
|
||||||
|
layout = "us";
|
||||||
|
variant = "";
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
gnome-tweaks
|
||||||
|
];
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user