works now?
This commit is contained in:
1 parent
fd19e4398b
commit
08e34ab82f
25 files changed
+746
-211
No files matched your search
@@ -1,141 +0,0 @@
|
||||
# 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’).
|
||||
|
||||
{ pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
flake.nixosModules.desktopModule = { pkgs, ... }: {
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
# 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;
|
||||
|
||||
# audio
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
wireplumber.enable = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
i18n.extraLocales = ["ja_JP.UTF-8/UTF-8"];
|
||||
|
||||
fonts = {
|
||||
enableDefaultPackages = true;
|
||||
packages = with pkgs; [
|
||||
noto-fonts-cjk-sans
|
||||
];
|
||||
};
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "de_DE.UTF-8";
|
||||
LC_IDENTIFICATION = "de_DE.UTF-8";
|
||||
LC_MEASUREMENT = "de_DE.UTF-8";
|
||||
LC_MONETARY = "de_DE.UTF-8";
|
||||
LC_NAME = "de_DE.UTF-8";
|
||||
LC_NUMERIC = "de_DE.UTF-8";
|
||||
LC_PAPER = "de_DE.UTF-8";
|
||||
LC_TELEPHONE = "de_DE.UTF-8";
|
||||
LC_TIME = "de_DE.UTF-8";
|
||||
};
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver.xkb = {
|
||||
layout = "de";
|
||||
variant = "";
|
||||
};
|
||||
|
||||
# Configure console keymap
|
||||
console.keyMap = "de";
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.snurm = {
|
||||
isNormalUser = true;
|
||||
description = "snurm";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
packages = with pkgs; [];
|
||||
};
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
nixpkgs.overlays = [
|
||||
inputs.helium.overlays.default
|
||||
];
|
||||
environment.systemPackages = with pkgs; [
|
||||
git
|
||||
vim
|
||||
kitty
|
||||
wofi
|
||||
vesktop
|
||||
btop
|
||||
pavucontrol
|
||||
catppuccin-cursors.latteLavender
|
||||
nvimpager
|
||||
helium
|
||||
grim
|
||||
slurp
|
||||
wl-clipboard
|
||||
];
|
||||
programs.hyprland.enable = true;
|
||||
programs.hyprland.withUWSM = true;
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
defaultEditor = true;
|
||||
};
|
||||
environment.variables.EDITOR = "nvim";
|
||||
programs.firefox.enable = true;
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
# programs.gnupg.agent = {
|
||||
# enable = true;
|
||||
# enableSSHSupport = true;
|
||||
# };
|
||||
|
||||
# List services that you want to enable:
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
# services.openssh.enable = true;
|
||||
|
||||
# Open ports in the firewall.
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
# networking.firewall.enable = false;
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "25.11"; # Did you read the comment?
|
||||
|
||||
};
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{ inputs, self, ... } : {
|
||||
flake.nixosConfigurations.desktopSystem = inputs.nixpkgs.lib.nixosSystem {
|
||||
modules = [
|
||||
self.nixosModules.desktopModule
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{ self, ... }: {
|
||||
config.flake.factory.user = username: isAdmin: {
|
||||
nixos."${username}" =
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
users.users."${username}" = {
|
||||
isNormalUser = true;
|
||||
home = "/home/${username}";
|
||||
extraGroups = lib.optionals isAdmin [ "wheel" ];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
programs.zsh.enable = true;
|
||||
# required for zsh completion
|
||||
environment.pathsToLink = [ "/share/zsh" ];
|
||||
|
||||
home-manager.users."${username}" = {
|
||||
imports = [
|
||||
self.modules.homeManager."${username}"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
homeManager."${username}" = {
|
||||
home.username = "${username}";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
# 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 = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/80073df0-54bd-438e-bcbc-795d3d886385";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/2F17-7ACA";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/7810e79b-360b-48e1-a527-92ebeb4f628c"; }
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
{ config, pkgs, inputs, ...}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
inputs.home-manager.flakeModules.home-manager
|
||||
];
|
||||
|
||||
homeConfigurations.snurm = home-manager.lib.homeManagerConfiguration {
|
||||
home.username = "snurm";
|
||||
home.homeDirectory = "/home/snurm";
|
||||
home.stateVersion = "26.05";
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
settings.user = {
|
||||
name = "snurm";
|
||||
email = "user@example.com";
|
||||
};
|
||||
};
|
||||
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
font = {
|
||||
name = "JetBrains Mono";
|
||||
size = 10;
|
||||
};
|
||||
settings = {
|
||||
confirm_os_window_close = 0;
|
||||
enable_auto_bell = false;
|
||||
mouse_hide_wait = "-1.0";
|
||||
background_opacity = "0.5";
|
||||
background_blur = 5;
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
fastfetch
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{ inputs, ... }: {
|
||||
flake.modules.nixos.nixos-desktop = {
|
||||
imports =
|
||||
with inputs.self.modules.nixos;
|
||||
with inputs.self.factory;
|
||||
[
|
||||
system-desktop
|
||||
i18n-de
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
flake.modules.nixos.nixos-desktop = {
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/80073df0-54bd-438e-bcbc-795d3d886385";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/2F17-7ACA";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{ device = "/dev/disk/by-uuid/7810e79b-360b-48e1-a527-92ebeb4f628c"; }
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{ inputs, ... }: {
|
||||
flake.nixosConfigurations = inputs.self.lib.mkNixos "x86_64-linux" "nixos-desktop";
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{ inputs, ... }: {
|
||||
flake.modules.nixos.nixos-desktop = { lib, ... }: {
|
||||
boot.initrd.availableKernelModules = [
|
||||
"nvme"
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
nixpkgs.hostPlatform = "x86_64-linux";
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
hardware.cpu.amd.updateMicrocode = true;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{ inputs, ... }: {
|
||||
flake.modules.nixos.nixos-desktop = { config, ... } : {
|
||||
imports = with inputs.self.modules.nixos; [
|
||||
snurm
|
||||
];
|
||||
|
||||
home-manager.users.snurm = { config, ... }: {
|
||||
imports =
|
||||
with inputs.self.modules.homeManager;
|
||||
with inputs.self.factory;
|
||||
[
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{ inputs, ... }: {
|
||||
imports = [
|
||||
inputs.flake-parts.flakeModules.modules
|
||||
inputs.flake-file.flakeModules.default
|
||||
];
|
||||
|
||||
flake-file.inputs = {
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
flake-file.url = "github:vic/flake-file";
|
||||
import-tree.url = "github:vic/import-tree";
|
||||
};
|
||||
|
||||
flake-file.outputs = ''
|
||||
inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } (inputs.import-tree ./modules)
|
||||
'';
|
||||
|
||||
systems = [
|
||||
# f Darwin >:(
|
||||
"aarch64-linux"
|
||||
"x86_64-linux"
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
{ inputs, lib, ... }:
|
||||
{
|
||||
# Helper functions
|
||||
|
||||
options.flake.lib = lib.mkOption {
|
||||
type = lib.types.attrsOf lib.types.unspecified;
|
||||
default = { };
|
||||
};
|
||||
|
||||
config.flake.lib = {
|
||||
mkNixos = system: name: {
|
||||
${name} = inputs.nixpkgs.lib.nixosSystem {
|
||||
modules = [
|
||||
inputs.self.modules.nixos.${name}
|
||||
{ nixpkgs.hostPlatform = lib.mkDefault system; }
|
||||
{ nixpkgs.config.allowUnfree = true; }
|
||||
];
|
||||
};
|
||||
};
|
||||
mkHomeManager = system: name: {
|
||||
${name} = inputs.home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
||||
modules = [
|
||||
inputs.self.modules.homeManager.${name}
|
||||
{ nixpkgs.config.allowUnfree = true; }
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
inputs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
# Add home-manager input
|
||||
flake-file.inputs = {
|
||||
home-manager.url = "github:nix-community/home-manager/release-26.05";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
imports = [ inputs.home-manager.flakeModules.home-manager ];
|
||||
|
||||
flake.modules.nixos.home-manager = {
|
||||
imports = [
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
];
|
||||
|
||||
home-manager = {
|
||||
verbose = true;
|
||||
useGlobalPkgs = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
flake.modules.homeManager.btop = { pkgs, ... }: {
|
||||
programs.btop = {
|
||||
enable = true;
|
||||
settings = {
|
||||
vim_keys = true;
|
||||
proc_tree = true;
|
||||
proc_aggregate = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,365 @@
|
||||
-- This is an example Hyprland Lua config file.
|
||||
-- Refer to the wiki for more information.
|
||||
-- https://wiki.hypr.land/Configuring/Start/
|
||||
|
||||
-- Please note not all available settings / options are set here.
|
||||
-- For a full list, see the wiki
|
||||
|
||||
-- You can (and should!!) split this configuration into multiple files
|
||||
-- Create your files separately and then require them like this:
|
||||
-- require("myColors")
|
||||
|
||||
|
||||
------------------
|
||||
---- MONITORS ----
|
||||
------------------
|
||||
|
||||
-- See https://wiki.hypr.land/Configuring/Basics/Monitors/
|
||||
hl.monitor({
|
||||
output = "DP-2",
|
||||
mode = "highres",
|
||||
position = "auto",
|
||||
scale = "auto",
|
||||
})
|
||||
hl.monitor({
|
||||
output = "DP-3",
|
||||
mode = "highres",
|
||||
position = "auto-left",
|
||||
scale = "auto",
|
||||
})
|
||||
hl.monitor({
|
||||
output = "HDMI-A-1",
|
||||
mode = "highres",
|
||||
position = "auto-right",
|
||||
scale = "auto",
|
||||
})
|
||||
hl.monitor({
|
||||
output = "",
|
||||
mode = "preferred",
|
||||
position = "auto",
|
||||
scale = "auto",
|
||||
})
|
||||
---------------------
|
||||
---- MY PROGRAMS ----
|
||||
---------------------
|
||||
|
||||
-- Set programs that you use
|
||||
local terminal = "kitty"
|
||||
local fileManager = "dolphin"
|
||||
local menu = "wofi --show drun"
|
||||
local screenshot = "grim -g \"$(slurp)\" - | wl-copy"
|
||||
|
||||
-------------------
|
||||
---- AUTOSTART ----
|
||||
-------------------
|
||||
|
||||
-- See https://wiki.hypr.land/Configuring/Basics/Autostart/
|
||||
|
||||
-- Autostart necessary processes (like notifications daemons, status bars, etc.)
|
||||
-- Or execute your favorite apps at launch like this:
|
||||
--
|
||||
-- hl.on("hyprland.start", function ()
|
||||
-- hl.exec_cmd(terminal)
|
||||
-- hl.exec_cmd("nm-applet")
|
||||
-- hl.exec_cmd("waybar & hyprpaper & firefox")
|
||||
-- end)
|
||||
|
||||
|
||||
-------------------------------
|
||||
---- ENVIRONMENT VARIABLES ----
|
||||
-------------------------------
|
||||
|
||||
-- See https://wiki.hypr.land/Configuring/Advanced-and-Cool/Environment-variables/
|
||||
|
||||
hl.env("XCURSOR_SIZE", "24")
|
||||
hl.env("HYPRCURSOR_SIZE", "24")
|
||||
|
||||
|
||||
-----------------------
|
||||
----- PERMISSIONS -----
|
||||
-----------------------
|
||||
|
||||
-- See https://wiki.hypr.land/Configuring/Advanced-and-Cool/Permissions/
|
||||
-- Please note permission changes here require a Hyprland restart and are not applied on-the-fly
|
||||
-- for security reasons
|
||||
|
||||
-- hl.config({
|
||||
-- ecosystem = {
|
||||
-- enforce_permissions = true,
|
||||
-- },
|
||||
-- })
|
||||
|
||||
-- hl.permission("/usr/(bin|local/bin)/grim", "screencopy", "allow")
|
||||
-- hl.permission("/usr/(lib|libexec|lib64)/xdg-desktop-portal-hyprland", "screencopy", "allow")
|
||||
-- hl.permission("/usr/(bin|local/bin)/hyprpm", "plugin", "allow")
|
||||
|
||||
|
||||
-----------------------
|
||||
---- LOOK AND FEEL ----
|
||||
-----------------------
|
||||
|
||||
-- Refer to https://wiki.hypr.land/Configuring/Basics/Variables/
|
||||
hl.config({
|
||||
general = {
|
||||
gaps_in = 5,
|
||||
gaps_out = 0,
|
||||
|
||||
border_size = 2,
|
||||
|
||||
col = {
|
||||
active_border = { colors = {"rgba(33ccffee)", "rgba(00ff99ee)"}, angle = 45 },
|
||||
inactive_border = "rgba(595959aa)",
|
||||
},
|
||||
|
||||
-- Set to true to enable resizing windows by clicking and dragging on borders and gaps
|
||||
resize_on_border = false,
|
||||
|
||||
-- Please see https://wiki.hypr.land/Configuring/Advanced-and-Cool/Tearing/ before you turn this on
|
||||
allow_tearing = false,
|
||||
|
||||
layout = "dwindle",
|
||||
},
|
||||
|
||||
decoration = {
|
||||
rounding = 0,
|
||||
rounding_power = 0,
|
||||
|
||||
-- Change transparency of focused and unfocused windows
|
||||
active_opacity = 1.0,
|
||||
inactive_opacity = 1.0,
|
||||
|
||||
shadow = {
|
||||
enabled = true,
|
||||
range = 4,
|
||||
render_power = 3,
|
||||
color = 0xee1a1a1a,
|
||||
},
|
||||
|
||||
blur = {
|
||||
enabled = false,
|
||||
size = 3,
|
||||
passes = 1,
|
||||
vibrancy = 0.1696,
|
||||
},
|
||||
},
|
||||
|
||||
animations = {
|
||||
enabled = true,
|
||||
},
|
||||
})
|
||||
|
||||
-- Default curves and animations, see https://wiki.hypr.land/Configuring/Advanced-and-Cool/Animations/
|
||||
hl.curve("easeOutQuint", { type = "bezier", points = { {0.23, 1}, {0.32, 1} } })
|
||||
hl.curve("easeInOutCubic", { type = "bezier", points = { {0.65, 0.05}, {0.36, 1} } })
|
||||
hl.curve("linear", { type = "bezier", points = { {0, 0}, {1, 1} } })
|
||||
hl.curve("almostLinear", { type = "bezier", points = { {0.5, 0.5}, {0.75, 1} } })
|
||||
hl.curve("quick", { type = "bezier", points = { {0.15, 0}, {0.1, 1} } })
|
||||
|
||||
-- Default springs
|
||||
hl.curve("easy", { type = "spring", mass = 1, stiffness = 238.1191, dampening = 24.21279333 })
|
||||
|
||||
hl.animation({ leaf = "global", enabled = true, speed = 10, bezier = "default" })
|
||||
hl.animation({ leaf = "border", enabled = true, speed = 5.39, bezier = "easeOutQuint" })
|
||||
hl.animation({ leaf = "windows", enabled = true, speed = 4.79, spring = "easy" })
|
||||
hl.animation({ leaf = "windowsIn", enabled = true, speed = 4.1, spring = "easy", style = "popin 87%" })
|
||||
hl.animation({ leaf = "windowsOut", enabled = true, speed = 1.49, bezier = "linear", style = "popin 87%" })
|
||||
hl.animation({ leaf = "fadeIn", enabled = true, speed = 1.73, bezier = "almostLinear" })
|
||||
hl.animation({ leaf = "fadeOut", enabled = true, speed = 1.46, bezier = "almostLinear" })
|
||||
hl.animation({ leaf = "fade", enabled = true, speed = 3.03, bezier = "quick" })
|
||||
hl.animation({ leaf = "layers", enabled = true, speed = 3.81, bezier = "easeOutQuint" })
|
||||
hl.animation({ leaf = "layersIn", enabled = true, speed = 4, bezier = "easeOutQuint", style = "fade" })
|
||||
hl.animation({ leaf = "layersOut", enabled = true, speed = 1.5, bezier = "linear", style = "fade" })
|
||||
hl.animation({ leaf = "fadeLayersIn", enabled = true, speed = 1.79, bezier = "almostLinear" })
|
||||
hl.animation({ leaf = "fadeLayersOut", enabled = true, speed = 1.39, bezier = "almostLinear" })
|
||||
hl.animation({ leaf = "workspaces", enabled = true, speed = 1.94, bezier = "almostLinear", style = "fade" })
|
||||
hl.animation({ leaf = "workspacesIn", enabled = true, speed = 1.21, bezier = "almostLinear", style = "fade" })
|
||||
hl.animation({ leaf = "workspacesOut", enabled = true, speed = 1.94, bezier = "almostLinear", style = "fade" })
|
||||
hl.animation({ leaf = "zoomFactor", enabled = true, speed = 7, bezier = "quick" })
|
||||
|
||||
-- Ref https://wiki.hypr.land/Configuring/Basics/Workspace-Rules/
|
||||
-- "Smart gaps" / "No gaps when only"
|
||||
-- uncomment all if you wish to use that.
|
||||
-- hl.workspace_rule({ workspace = "w[tv1]", gaps_out = 0, gaps_in = 0 })
|
||||
-- hl.workspace_rule({ workspace = "f[1]", gaps_out = 0, gaps_in = 0 })
|
||||
-- hl.window_rule({
|
||||
-- name = "no-gaps-wtv1",
|
||||
-- match = { float = false, workspace = "w[tv1]" },
|
||||
-- border_size = 0,
|
||||
-- rounding = 0,
|
||||
-- })
|
||||
-- hl.window_rule({
|
||||
-- name = "no-gaps-f1",
|
||||
-- match = { float = false, workspace = "f[1]" },
|
||||
-- border_size = 0,
|
||||
-- rounding = 0,
|
||||
-- })
|
||||
|
||||
-- See https://wiki.hypr.land/Configuring/Layouts/Dwindle-Layout/ for more
|
||||
hl.config({
|
||||
dwindle = {
|
||||
preserve_split = true, -- You probably want this
|
||||
},
|
||||
})
|
||||
|
||||
-- See https://wiki.hypr.land/Configuring/Layouts/Master-Layout/ for more
|
||||
hl.config({
|
||||
master = {
|
||||
new_status = "master",
|
||||
},
|
||||
})
|
||||
|
||||
-- See https://wiki.hypr.land/Configuring/Layouts/Scrolling-Layout/ for more
|
||||
hl.config({
|
||||
scrolling = {
|
||||
fullscreen_on_one_column = true,
|
||||
},
|
||||
})
|
||||
|
||||
----------------
|
||||
---- MISC ----
|
||||
----------------
|
||||
|
||||
hl.config({
|
||||
misc = {
|
||||
force_default_wallpaper = -1, -- Set to 0 or 1 to disable the anime mascot wallpapers
|
||||
disable_hyprland_logo = false, -- If true disables the random hyprland logo / anime girl background. :(
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
---------------
|
||||
---- INPUT ----
|
||||
---------------
|
||||
hl.config({
|
||||
input = {
|
||||
kb_layout = "de,jp",
|
||||
kb_variant = "",
|
||||
kb_model = "",
|
||||
kb_options = "grp:alt_shift_toggle",
|
||||
kb_rules = "",
|
||||
repeat_delay = 400,
|
||||
repeat_rate = 35,
|
||||
follow_mouse = 1,
|
||||
sensitivity = -0.5, -- -1.0 - 1.0, 0 means no modification.
|
||||
|
||||
touchpad = {
|
||||
natural_scroll = false,
|
||||
},
|
||||
},
|
||||
})
|
||||
-- Example per-device config
|
||||
-- See https://wiki.hypr.land/Configuring/Advanced-and-Cool/Devices/ for more
|
||||
hl.device({
|
||||
name = "epic-mouse-v1",
|
||||
sensitivity = -1.0,
|
||||
})
|
||||
|
||||
|
||||
---------------------
|
||||
---- KEYBINDINGS ----
|
||||
---------------------
|
||||
|
||||
local mainMod = "SUPER" -- Sets "Windows" key as main modifier
|
||||
|
||||
-- Example binds, see https://wiki.hypr.land/Configuring/Basics/Binds/ for more
|
||||
hl.bind(mainMod .. " + Q", hl.dsp.exec_cmd(terminal))
|
||||
local closeWindowBind = hl.bind(mainMod .. " + C", hl.dsp.window.close())
|
||||
-- closeWindowBind:set_enabled(false)
|
||||
hl.bind(mainMod .. " + M", hl.dsp.exec_cmd("command -v hyprshutdown >/dev/null 2>&1 && hyprshutdown || hyprctl dispatch 'hl.dsp.exit()'"))
|
||||
hl.bind(mainMod .. " + E", hl.dsp.exec_cmd(fileManager))
|
||||
hl.bind(mainMod .. " + V", hl.dsp.window.float({ action = "toggle" }))
|
||||
hl.bind(mainMod .. " + D", hl.dsp.exec_cmd(menu))
|
||||
hl.bind(mainMod .. " + SHIFT + S", hl.dsp.exec_cmd(screenshot))
|
||||
|
||||
-- Move focus with mainMod + vim keys
|
||||
hl.bind(mainMod .. " + H", hl.dsp.focus({ direction = "left" }))
|
||||
hl.bind(mainMod .. " + L", hl.dsp.focus({ direction = "right" }))
|
||||
hl.bind(mainMod .. " + K", hl.dsp.focus({ direction = "up" }))
|
||||
hl.bind(mainMod .. " + J", hl.dsp.focus({ direction = "down" }))
|
||||
|
||||
-- Move windows with mainMod + SHIFT + vim keys
|
||||
hl.bind(mainMod .. " + SHIFT + H", hl.dsp.window.move({ direction = "left" }))
|
||||
hl.bind(mainMod .. " + SHIFT + L", hl.dsp.window.move({ direction = "right" }))
|
||||
hl.bind(mainMod .. " + SHIFT + K", hl.dsp.window.move({ direction = "up" }))
|
||||
hl.bind(mainMod .. " + SHIFT + J", hl.dsp.window.move({ direction = "down" }))
|
||||
|
||||
-- Switch workspaces with mainMod + [0-9]
|
||||
-- Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||
for i = 1, 10 do
|
||||
local key = i % 10 -- 10 maps to key 0
|
||||
hl.bind(mainMod .. " + " .. key, hl.dsp.focus({ workspace = i}))
|
||||
hl.bind(mainMod .. " + SHIFT + " .. key, hl.dsp.window.move({ workspace = i }))
|
||||
end
|
||||
|
||||
-- Scroll through existing workspaces with mainMod + scroll
|
||||
hl.bind(mainMod .. " + mouse_down", hl.dsp.focus({ workspace = "e+1" }))
|
||||
hl.bind(mainMod .. " + mouse_up", hl.dsp.focus({ workspace = "e-1" }))
|
||||
|
||||
-- Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
hl.bind(mainMod .. " + mouse:272", hl.dsp.window.drag(), { mouse = true })
|
||||
hl.bind(mainMod .. " + mouse:273", hl.dsp.window.resize(), { mouse = true })
|
||||
|
||||
-- Laptop multimedia keys for volume and LCD brightness
|
||||
hl.bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd("wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"), { locked = true, repeating = true })
|
||||
hl.bind("XF86AudioLowerVolume", hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"), { locked = true, repeating = true })
|
||||
hl.bind("XF86AudioMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"), { locked = true, repeating = true })
|
||||
hl.bind("XF86AudioMicMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"), { locked = true, repeating = true })
|
||||
hl.bind("XF86MonBrightnessUp", hl.dsp.exec_cmd("brightnessctl -e4 -n2 set 5%+"), { locked = true, repeating = true })
|
||||
hl.bind("XF86MonBrightnessDown",hl.dsp.exec_cmd("brightnessctl -e4 -n2 set 5%-"), { locked = true, repeating = true })
|
||||
|
||||
-- Requires playerctl
|
||||
hl.bind("XF86AudioNext", hl.dsp.exec_cmd("playerctl next"), { locked = true })
|
||||
hl.bind("XF86AudioPause", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true })
|
||||
hl.bind("XF86AudioPlay", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true })
|
||||
hl.bind("XF86AudioPrev", hl.dsp.exec_cmd("playerctl previous"), { locked = true })
|
||||
|
||||
|
||||
--------------------------------
|
||||
---- WINDOWS AND WORKSPACES ----
|
||||
--------------------------------
|
||||
|
||||
-- See https://wiki.hypr.land/Configuring/Basics/Window-Rules/
|
||||
-- and https://wiki.hypr.land/Configuring/Basics/Workspace-Rules/
|
||||
|
||||
-- Example window rules that are useful
|
||||
|
||||
local suppressMaximizeRule = hl.window_rule({
|
||||
-- Ignore maximize requests from all apps. You'll probably like this.
|
||||
name = "suppress-maximize-events",
|
||||
match = { class = ".*" },
|
||||
|
||||
suppress_event = "maximize",
|
||||
})
|
||||
-- suppressMaximizeRule:set_enabled(false)
|
||||
|
||||
hl.window_rule({
|
||||
-- Fix some dragging issues with XWayland
|
||||
name = "fix-xwayland-drags",
|
||||
match = {
|
||||
class = "^$",
|
||||
title = "^$",
|
||||
xwayland = true,
|
||||
float = true,
|
||||
fullscreen = false,
|
||||
pin = false,
|
||||
},
|
||||
|
||||
no_focus = true,
|
||||
})
|
||||
|
||||
-- Layer rules also return a handle.
|
||||
-- local overlayLayerRule = hl.layer_rule({
|
||||
-- name = "no-anim-overlay",
|
||||
-- match = { namespace = "^my-overlay$" },
|
||||
-- no_anim = true,
|
||||
-- })
|
||||
-- overlayLayerRule:set_enabled(false)
|
||||
|
||||
-- Hyprland-run windowrule
|
||||
hl.window_rule({
|
||||
name = "move-hyprland-run",
|
||||
match = { class = "hyprland-run" },
|
||||
|
||||
move = "20 monitor_h-120",
|
||||
float = true,
|
||||
})
|
||||
@@ -0,0 +1,19 @@
|
||||
{ inputs, ... }: {
|
||||
flake.modules.nixos.hyprland = { pkgs, ... }: {
|
||||
programs.hyprland.enable = true;
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
home-manager.sharedModules = [
|
||||
inputs.self.modules.homeManager.hyprland
|
||||
];
|
||||
};
|
||||
|
||||
flake.modules.homeManager.hyprland = { pkgs, ... }: {
|
||||
wayland.windowManager.hyprland.enable = true;
|
||||
services.hyprpolkitagent.enable = true;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
hyprpicker
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
flake.modules.homeManager.hyprland = {
|
||||
wayland.windowManager.hyprland.configType = "lua";
|
||||
wayland.windowManager.hyprland.extraConfig = builtins.readFile ./config.lua;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
flake.modules.homeManager.kitty = {
|
||||
programs.kitty = {
|
||||
settings = {
|
||||
confirm_os_window_close = 0;
|
||||
enable_auto_bell = false;
|
||||
mouse_hide_wait = "-1.0";
|
||||
background_opacity = "0.5";
|
||||
background_blur = 5;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
flake.modules.homeManager.kitty = {
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
enableGitIntegration = true;
|
||||
font = {
|
||||
name = "JetBrains Mono";
|
||||
size = 10;
|
||||
};
|
||||
shellIntegration.enableZshIntegration = true;
|
||||
settings = {
|
||||
confirm_os_window_close = 0;
|
||||
enable_auto_bell = false;
|
||||
mouse_hide_wait = "-1.0";
|
||||
background_opacity = "0.5";
|
||||
background_blur = 5;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{ inputs, ... }: {
|
||||
flake.modules.homeManager.system-base = { config, ... }: {
|
||||
imports = with inputs.self.modules.homeManager; [
|
||||
];
|
||||
|
||||
home.homeDirectory = "/home/${config.home.username}";
|
||||
home.stateVersion = "26.05";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
{ inputs, ... }: {
|
||||
flake-file.inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-26.05";
|
||||
nixpkgs-unstable.url = "github:nixos/nixpkgs-unstable";
|
||||
};
|
||||
|
||||
flake.modules.nixos.system-base = { pkgs, ... }: {
|
||||
imports = with inputs.self.modules.nixos; [
|
||||
home-manager
|
||||
zsh
|
||||
linux-latest
|
||||
];
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(final: _prev: {
|
||||
unstable = import inputs.nixpkgs-unstable {
|
||||
inherit (final) config;
|
||||
system = pkgs.stdenv.hostPlatform.system;
|
||||
};
|
||||
})
|
||||
];
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
nix.settings = {
|
||||
substituters = [
|
||||
# high priority since it's almost always used
|
||||
"https://cache.nixos.org?priority=10"
|
||||
"https://install.determinate.systems"
|
||||
"https://nix-community.cachix.org"
|
||||
];
|
||||
|
||||
trusted-public-keys = [
|
||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
"cache.flakehub.com-3:hJuILl5sVK4iKm86JzgdXW12Y2Hwd5G07qKtHTOcDCM"
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
];
|
||||
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
|
||||
download-buffer-size = 1024 * 1024 * 1024;
|
||||
|
||||
trusted-users = [
|
||||
"root"
|
||||
"@wheel"
|
||||
];
|
||||
};
|
||||
system.stateVersion = "26.05";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{ inputs, ... }: {
|
||||
flake.modules.nixos.system-desktop = {
|
||||
imports = with inputs.self.modules.nixos; [
|
||||
system-base
|
||||
hyprland
|
||||
pipewire
|
||||
];
|
||||
|
||||
home-manager.sharedModules = [
|
||||
inputs.self.modules.homeManager.system-desktop
|
||||
];
|
||||
};
|
||||
|
||||
flake.modules.homeManager.system-desktop = {
|
||||
imports = with inputs.self.modules.homeManager; [
|
||||
system-base
|
||||
|
||||
kitty
|
||||
|
||||
browser
|
||||
zsh
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
flake.modules.homeManager.snurm-git = {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
settings = {
|
||||
user = {
|
||||
email = "user@example.com";
|
||||
name = "snurm";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
inputs,
|
||||
self,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
flake.homeConfiguration = inputs.self.lib.mkHomeManager "x86_64-linux" "snurm";
|
||||
|
||||
flake.modules = lib.mkMerge [
|
||||
(self.factory.user "snurm" true)
|
||||
{
|
||||
nixos.snurm = {
|
||||
imports =
|
||||
with self.modules.nixos;
|
||||
with self.factory;
|
||||
[
|
||||
|
||||
];
|
||||
|
||||
users.users.snurm.extraGroups = [
|
||||
"networkmanager"
|
||||
];
|
||||
};
|
||||
|
||||
homeManager.snurm = { pkgs, ... }: {
|
||||
imports = with self.modules.homeManager; [
|
||||
snurm-git
|
||||
btop
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
Reference in new issue
Block a user