moved to sway <3 ty esteban
This commit is contained in:
parent
b891aeeb46
commit
6d6f665d06
9 changed files with 218 additions and 68 deletions
|
|
@ -2,15 +2,15 @@
|
||||||
description = "Modular and minimalist NixOS configuration";
|
description = "Modular and minimalist NixOS configuration";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
# Nixos
|
# nixos
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable-small";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable-small";
|
||||||
home-manager.url = "github:nix-community/home-manager";
|
home-manager.url = "github:nix-community/home-manager";
|
||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
# Spotify
|
# spotify
|
||||||
spicetify-nix.url = "github:Gerg-L/spicetify-nix";
|
spicetify-nix.url = "github:Gerg-L/spicetify-nix";
|
||||||
|
|
||||||
# Nvim
|
# nvim
|
||||||
nixvim = {
|
nixvim = {
|
||||||
url = "github:nix-community/nixvim";
|
url = "github:nix-community/nixvim";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,8 @@
|
||||||
./packages.nix
|
./packages.nix
|
||||||
|
|
||||||
# hyprland
|
# hyprland
|
||||||
./modules/hyprland/default.nix
|
# ./modules/hyprland/default.nix
|
||||||
|
./modules/wm/sway/default.nix
|
||||||
|
|
||||||
# editors
|
# editors
|
||||||
./modules/ide/nvim/default.nix
|
./modules/ide/nvim/default.nix
|
||||||
|
|
|
||||||
150
home/modules/wm/sway/default.nix
Normal file
150
home/modules/wm/sway/default.nix
Normal file
|
|
@ -0,0 +1,150 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
wallpaperScript = pkgs.writeShellScriptBin "random-wallpaper" ''
|
||||||
|
WALP=$(find "$HOME/wallpapers" -type f \( -iname "*.jpg" -o -iname "*.png" \) | shuf -n 1)
|
||||||
|
[ -n "$WALP" ] && ${pkgs.swaybg}/bin/swaybg -i "$WALP" --mode fill &
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home.packages = [
|
||||||
|
wallpaperScript
|
||||||
|
];
|
||||||
|
|
||||||
|
wayland.windowManager.sway = {
|
||||||
|
enable = true;
|
||||||
|
xwayland = true;
|
||||||
|
|
||||||
|
config = rec {
|
||||||
|
modifier = "Mod4";
|
||||||
|
terminal = "foot";
|
||||||
|
menu = "exec $(tofi-drun)";
|
||||||
|
|
||||||
|
# monitor configuration
|
||||||
|
output = {
|
||||||
|
"*" = {
|
||||||
|
resolution = "1920x1080";
|
||||||
|
scale = "1";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# startup commands
|
||||||
|
startup = [
|
||||||
|
{ command = "${wallpaperScript}/bin/random-wallpaper"; }
|
||||||
|
];
|
||||||
|
|
||||||
|
# input configuration
|
||||||
|
input = {
|
||||||
|
"type:keyboard" = {
|
||||||
|
xkb_layout = "es,ru";
|
||||||
|
xkb_options = "grp:alt_space_toggle";
|
||||||
|
xkb_numlock = "enabled";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# window appearance
|
||||||
|
gaps = {
|
||||||
|
inner = 0;
|
||||||
|
outer = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
window = {
|
||||||
|
border = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
floating = {
|
||||||
|
border = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
# focus settings
|
||||||
|
focus = {
|
||||||
|
followMouse = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# keybindings
|
||||||
|
keybindings = lib.mkOptionDefault {
|
||||||
|
# screenshots
|
||||||
|
"${modifier}+Shift+Print" = "exec ~/bin/grimblast copy screen";
|
||||||
|
"${modifier}+Print" = "exec ~/bin/grimblast copy area";
|
||||||
|
|
||||||
|
# application launchers
|
||||||
|
"${modifier}+space" = "exec ${menu}";
|
||||||
|
"${modifier}+w" = "exec ${wallpaperScript}/bin/random-wallpaper";
|
||||||
|
"${modifier}+s" = "sticky toggle";
|
||||||
|
"${modifier}+t" = "exec ${terminal}";
|
||||||
|
"${modifier}+z" = "exec librewolf";
|
||||||
|
|
||||||
|
# Window management
|
||||||
|
"${modifier}+q" = "kill";
|
||||||
|
"${modifier}+Shift+m" = "exit";
|
||||||
|
"${modifier}+v" = "floating toggle";
|
||||||
|
|
||||||
|
# focus movement
|
||||||
|
"${modifier}+Left" = "focus left";
|
||||||
|
"${modifier}+Right" = "focus right";
|
||||||
|
"${modifier}+Up" = "focus up";
|
||||||
|
"${modifier}+Down" = "focus down";
|
||||||
|
|
||||||
|
# workspace switching
|
||||||
|
"${modifier}+1" = "workspace number 1";
|
||||||
|
"${modifier}+2" = "workspace number 2";
|
||||||
|
"${modifier}+3" = "workspace number 3";
|
||||||
|
"${modifier}+4" = "workspace number 4";
|
||||||
|
"${modifier}+5" = "workspace number 5";
|
||||||
|
"${modifier}+6" = "workspace number 6";
|
||||||
|
"${modifier}+7" = "workspace number 7";
|
||||||
|
"${modifier}+8" = "workspace number 8";
|
||||||
|
"${modifier}+9" = "workspace number 9";
|
||||||
|
"${modifier}+0" = "workspace number 10";
|
||||||
|
|
||||||
|
# move to workspace
|
||||||
|
"${modifier}+Shift+1" = "move container to workspace number 1";
|
||||||
|
"${modifier}+Shift+2" = "move container to workspace number 2";
|
||||||
|
"${modifier}+Shift+3" = "move container to workspace number 3";
|
||||||
|
"${modifier}+Shift+4" = "move container to workspace number 4";
|
||||||
|
"${modifier}+Shift+5" = "move container to workspace number 5";
|
||||||
|
"${modifier}+Shift+6" = "move container to workspace number 6";
|
||||||
|
"${modifier}+Shift+7" = "move container to workspace number 7";
|
||||||
|
"${modifier}+Shift+8" = "move container to workspace number 8";
|
||||||
|
"${modifier}+Shift+9" = "move container to workspace number 9";
|
||||||
|
"${modifier}+Shift+0" = "move container to workspace number 10";
|
||||||
|
};
|
||||||
|
|
||||||
|
# mouse bindings for moving/resizing windows
|
||||||
|
modes = {
|
||||||
|
resize = {
|
||||||
|
Left = "resize shrink width 10 px";
|
||||||
|
Right = "resize grow width 10 px";
|
||||||
|
Up = "resize shrink height 10 px";
|
||||||
|
Down = "resize grow height 10 px";
|
||||||
|
Escape = "mode default";
|
||||||
|
Return = "mode default";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
bars = [ ];
|
||||||
|
};
|
||||||
|
|
||||||
|
extraConfig = ''
|
||||||
|
# window borders
|
||||||
|
default_border pixel 0
|
||||||
|
default_floating_border pixel 0
|
||||||
|
|
||||||
|
# mouse bindings
|
||||||
|
floating_modifier ${config.wayland.windowManager.sway.config.modifier} normal
|
||||||
|
|
||||||
|
# cursor theme
|
||||||
|
seat seat0 xcursor_theme macOS 24
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
# environment variables
|
||||||
|
home.sessionVariables = {
|
||||||
|
XCURSOR_THEME = "macOS";
|
||||||
|
XCURSOR_SIZE = "24";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,31 +1,46 @@
|
||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports = [
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" ];
|
boot.initrd.availableKernelModules = [
|
||||||
|
"xhci_pci"
|
||||||
|
"ahci"
|
||||||
|
"nvme"
|
||||||
|
"usb_storage"
|
||||||
|
"sd_mod"
|
||||||
|
];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{ device = "/dev/disk/by-uuid/90ae88e4-a293-4e43-94ff-311f194d84d6";
|
device = "/dev/disk/by-uuid/90ae88e4-a293-4e43-94ff-311f194d84d6";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" = {
|
||||||
{ device = "/dev/disk/by-uuid/AF0B-79BE";
|
device = "/dev/disk/by-uuid/4E27-4F9D";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
options = [ "fmask=0077" "dmask=0077" ];
|
options = [
|
||||||
|
"fmask=0077"
|
||||||
|
"dmask=0077"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices =
|
swapDevices = [
|
||||||
[ { device = "/dev/disk/by-uuid/9553ce42-c192-47b4-8d3d-c4d3e9dc0f74"; }
|
{ device = "/dev/disk/by-uuid/9553ce42-c192-47b4-8d3d-c4d3e9dc0f74"; }
|
||||||
];
|
];
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,11 @@
|
||||||
nerd-fonts.jetbrains-mono
|
nerd-fonts.jetbrains-mono
|
||||||
maple-mono.NF
|
maple-mono.NF
|
||||||
];
|
];
|
||||||
|
|
||||||
fontconfig.defaultFonts = {
|
fontconfig.defaultFonts = {
|
||||||
serif = [ "Noto Nerd Font" ];
|
serif = [ "Maple Mono NF" ];
|
||||||
sansSerif = [ "Noto Nerd Font" ];
|
sansSerif = [ "Maple Mono NF" ];
|
||||||
monospace = [ "Noto Nerd Font" ];
|
monospace = [ "Maple Mono NF" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,29 +1,6 @@
|
||||||
{
|
{
|
||||||
networking.hostName = "nixos";
|
networking.hostName = "nixos";
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
|
|
||||||
services.blueman.enable = true;
|
|
||||||
hardware.bluetooth = {
|
|
||||||
enable = true;
|
|
||||||
powerOnBoot = true;
|
|
||||||
settings = {
|
|
||||||
General = {
|
|
||||||
# Shows battery charge of connected devices on supported
|
|
||||||
# Bluetooth adapters. Defaults to 'false'.
|
|
||||||
Experimental = true;
|
|
||||||
# When enabled other devices can connect faster to us, however
|
|
||||||
# the tradeoff is increased power consumption. Defaults to
|
|
||||||
# 'false'.
|
|
||||||
FastConnectable = true;
|
|
||||||
};
|
|
||||||
Policy = {
|
|
||||||
# Enable all controllers when they are found. This includes
|
|
||||||
# adapters present on start as well as adapters that are plugged
|
|
||||||
# in later on. Defaults to 'true'.
|
|
||||||
AutoEnable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
# Configure network proxy if necessary
|
# Configure network proxy if necessary
|
||||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||||
|
|
|
||||||
|
|
@ -4,17 +4,18 @@ let
|
||||||
spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system};
|
spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
programs.hyprland = {
|
|
||||||
enable = true;
|
|
||||||
withUWSM = true;
|
|
||||||
xwayland.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.sessionVariables = {
|
environment.sessionVariables = {
|
||||||
WLR_NO_HARDWARE_CURSORS = "1";
|
WLR_NO_HARDWARE_CURSORS = "1";
|
||||||
NIXOS_OZONE_WL = "1";
|
NIXOS_OZONE_WL = "1";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
security.polkit.enable = true;
|
||||||
|
|
||||||
|
programs.sway = {
|
||||||
|
enable = true;
|
||||||
|
wrapperFeatures.gtk = true;
|
||||||
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# essential
|
# essential
|
||||||
curl
|
curl
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, ... }:
|
{ config, pkgs, ... }:
|
||||||
{
|
{
|
||||||
services.xserver.enable = true;
|
services.xserver.enable = true;
|
||||||
services.xserver.videoDrivers = [ "nvidia" ];
|
services.xserver.videoDrivers = [ "nvidia" ];
|
||||||
|
|
@ -20,23 +20,28 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
services.xserver.xkb = {
|
services.xserver.xkb = {
|
||||||
layout = "es";
|
layout = "es,ru";
|
||||||
variant = "";
|
variant = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.greetd = {
|
||||||
|
enable = true;
|
||||||
|
settings = rec {
|
||||||
|
initial_session = {
|
||||||
|
command = "${pkgs.sway}/bin/sway --unsupported-gpu";
|
||||||
|
user = "elisiei";
|
||||||
|
};
|
||||||
|
default_session = initial_session;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
console.keyMap = "es";
|
console.keyMap = "es";
|
||||||
|
|
||||||
services.displayManager.sddm.enable = true;
|
#environment.etc."xdg/sessions/hyprland.desktop".text = ''
|
||||||
services.displayManager.defaultSession = "hyprland-uwsm";
|
# [Desktop Entry]
|
||||||
services.displayManager.autoLogin.enable = true;
|
# Name=Hyprland
|
||||||
services.displayManager.autoLogin.user = "elisiei";
|
# Comment=Hyprland Wayland Compositor
|
||||||
services.displayManager.sddm.wayland.enable = true;
|
# Exec=Hyprland
|
||||||
|
# Type=Application
|
||||||
environment.etc."xdg/sessions/hyprland.desktop".text = ''
|
#'';
|
||||||
[Desktop Entry]
|
|
||||||
Name=Hyprland
|
|
||||||
Comment=Hyprland Wayland Compositor
|
|
||||||
Exec=Hyprland
|
|
||||||
Type=Application
|
|
||||||
'';
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue