add niri wm
This commit is contained in:
parent
e75cd528d0
commit
8b79ccd411
|
@ -1,9 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./nixpkgs.nix
|
||||
./globalinstalls.nix
|
||||
./i18n.nix
|
||||
./networking.nix
|
||||
];
|
||||
}
|
94
flake.lock
94
flake.lock
|
@ -89,6 +89,66 @@
|
|||
"url": "https://git.lix.systems/lix-project/nixos-module/archive/2.91.1-1.tar.gz"
|
||||
}
|
||||
},
|
||||
"niri": {
|
||||
"inputs": {
|
||||
"niri-stable": "niri-stable",
|
||||
"niri-unstable": "niri-unstable",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs-stable": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"xwayland-satellite-stable": "xwayland-satellite-stable",
|
||||
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1742032096,
|
||||
"narHash": "sha256-/vWpgh3DCdoREIoydTfUnZLYSxKa0yRczOJaT0dDT0o=",
|
||||
"owner": "sodiboo",
|
||||
"repo": "niri-flake",
|
||||
"rev": "e2614d598a86eb892e4d98d18458ee2633285c00",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "sodiboo",
|
||||
"repo": "niri-flake",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"niri-stable": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1740117926,
|
||||
"narHash": "sha256-mTTHA0RAaQcdYe+9A3Jx77cmmyLFHmRoZdd8RpWa+m8=",
|
||||
"owner": "YaLTeR",
|
||||
"repo": "niri",
|
||||
"rev": "b94a5db8790339cf9134873d8b490be69e02ac71",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "YaLTeR",
|
||||
"ref": "v25.02",
|
||||
"repo": "niri",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"niri-unstable": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1742026950,
|
||||
"narHash": "sha256-pd00WzjmAxxS3Da0e4eEzfgauAfX5HwMGfs3nm2hwwA=",
|
||||
"owner": "YaLTeR",
|
||||
"repo": "niri",
|
||||
"rev": "9e560e7e607638da4f47b6dfef5a83b18711f75d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "YaLTeR",
|
||||
"repo": "niri",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1741325094,
|
||||
|
@ -125,6 +185,7 @@
|
|||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"lix-module": "lix-module",
|
||||
"niri": "niri",
|
||||
"nixos-hardware": "nixos-hardware",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
|
@ -143,6 +204,39 @@
|
|||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"xwayland-satellite-stable": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1739246919,
|
||||
"narHash": "sha256-/hBM43/Gd0/tW+egrhlWgOIISeJxEs2uAOIYVpfDKeU=",
|
||||
"owner": "Supreeeme",
|
||||
"repo": "xwayland-satellite",
|
||||
"rev": "44590a416d4a3e8220e19e29e0b6efe64a80315d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Supreeeme",
|
||||
"ref": "v0.5.1",
|
||||
"repo": "xwayland-satellite",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"xwayland-satellite-unstable": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1741910413,
|
||||
"narHash": "sha256-z9bvteu0rf+xmUDj4VifN06XAFJZQGRSOvdN7rn/oDs=",
|
||||
"owner": "Supreeeme",
|
||||
"repo": "xwayland-satellite",
|
||||
"rev": "0325cb1f48a292d873a6844772cca00251cbf945",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Supreeeme",
|
||||
"repo": "xwayland-satellite",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
|
31
flake.nix
31
flake.nix
|
@ -12,6 +12,12 @@
|
|||
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.91.1-1.tar.gz";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
niri = {
|
||||
url = "github:sodiboo/niri-flake";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.nixpkgs-stable.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
|
@ -21,6 +27,7 @@
|
|||
home-manager,
|
||||
lix-module,
|
||||
nixos-hardware,
|
||||
niri,
|
||||
}:
|
||||
let
|
||||
devices = {
|
||||
|
@ -29,6 +36,10 @@
|
|||
hetzner-vpn2 = "aarch64-linux";
|
||||
forgejo-runner-1 = "aarch64-linux";
|
||||
};
|
||||
homeDevices = [
|
||||
"vinzenz-lpt2"
|
||||
"vinzenz-pc2"
|
||||
];
|
||||
forDevice = f: nixpkgs.lib.mapAttrs f devices;
|
||||
in
|
||||
{
|
||||
|
@ -36,18 +47,30 @@
|
|||
device: system:
|
||||
nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = [
|
||||
modules =
|
||||
[
|
||||
lix-module.nixosModules.default
|
||||
home-manager.nixosModules.home-manager
|
||||
|
||||
{ networking.hostName = device; }
|
||||
|
||||
./common
|
||||
./modules/globalinstalls.nix
|
||||
./modules/networking.nix
|
||||
./modules/nixpkgs.nix
|
||||
|
||||
./hosts/${device}/hardware.nix
|
||||
./hosts/${device}/imports.nix
|
||||
./hosts/${device}/configuration.nix
|
||||
];
|
||||
]
|
||||
++ (nixpkgs.lib.optionals (builtins.elem device homeDevices) [
|
||||
home-manager.nixosModules.home-manager
|
||||
{ home-manager.extraSpecialArgs = { inherit device; }; }
|
||||
./modules/home-manager.nix
|
||||
|
||||
./modules/i18n.nix
|
||||
|
||||
niri.nixosModules.niri
|
||||
{ nixpkgs.overlays = [ niri.overlays.niri ]; }
|
||||
]);
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
config = {
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
sharedModules = import ./shared-modules.nix;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,44 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
imports = [ ../modules/gnome.nix ];
|
||||
config = {
|
||||
home-manager.sharedModules = [
|
||||
{
|
||||
home.packages =
|
||||
with pkgs;
|
||||
[
|
||||
gitg
|
||||
meld
|
||||
simple-scan
|
||||
pinta
|
||||
dconf-editor
|
||||
gpaste
|
||||
|
||||
# graphical installer for flatpak apps
|
||||
gnome-software
|
||||
]
|
||||
++ (with gnomeExtensions; [
|
||||
caffeine
|
||||
appindicator
|
||||
]);
|
||||
|
||||
dconf.settings = import ./gnome-shared-dconf.nix;
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
iconTheme.name = "Adwaita";
|
||||
cursorTheme.name = "Adwaita";
|
||||
theme = {
|
||||
name = "adw-gtk3-dark";
|
||||
package = pkgs.adw-gtk3;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [ trayscale ] ++ (with gnomeExtensions; [ tailscale-qs ]);
|
||||
dconf.settings."org/gnome/shell".enabled-extensions = [ "tailscale@joaophi.github.com" ];
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,55 +0,0 @@
|
|||
[
|
||||
# set stateVersion
|
||||
{ home.stateVersion = "22.11"; }
|
||||
# make nano the default editor
|
||||
{
|
||||
home = {
|
||||
sessionVariables.EDITOR = "nano";
|
||||
file.".nanorc".text = ''
|
||||
set linenumbers
|
||||
set mouse
|
||||
'';
|
||||
};
|
||||
}
|
||||
# command line niceness
|
||||
{
|
||||
programs = {
|
||||
command-not-found.enable = true;
|
||||
dircolors.enable = true;
|
||||
|
||||
zsh = {
|
||||
enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
autosuggestion.enable = true;
|
||||
enableVteIntegration = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
# common git config
|
||||
{
|
||||
programs = {
|
||||
git = {
|
||||
enable = true;
|
||||
extraConfig.init.defaultBranch = "main";
|
||||
};
|
||||
|
||||
gh = {
|
||||
enable = true;
|
||||
gitCredentialHelper.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
# Templates
|
||||
{
|
||||
home.file = {
|
||||
"Templates/Empty file".text = "";
|
||||
"Templates/Empty bash script".text = ''
|
||||
#!/usr/bin/env bash
|
||||
# abort on error, undefined variables
|
||||
set -eu
|
||||
# print commands before execution
|
||||
set -x
|
||||
'';
|
||||
};
|
||||
}
|
||||
]
|
50
home/vinzenz/configuration.nix
Normal file
50
home/vinzenz/configuration.nix
Normal file
|
@ -0,0 +1,50 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
programs = {
|
||||
home-manager.enable = true;
|
||||
fzf.enable = true;
|
||||
git-credential-oauth.enable = true;
|
||||
|
||||
direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
eza = {
|
||||
enable = true;
|
||||
git = true;
|
||||
icons = "auto";
|
||||
extraOptions = [
|
||||
"--group-directories-first"
|
||||
"--header"
|
||||
];
|
||||
};
|
||||
|
||||
thefuck = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
keepassxc
|
||||
insync
|
||||
|
||||
telegram-desktop
|
||||
element-desktop
|
||||
|
||||
wireguard-tools
|
||||
wirelesstools
|
||||
|
||||
kdiff3
|
||||
jetbrains-toolbox
|
||||
|
||||
blanket
|
||||
vlc
|
||||
];
|
||||
|
||||
home.file."policy.json" = {
|
||||
target = ".config/containers/policy.json";
|
||||
text = builtins.readFile ./.config/containers/policy.json;
|
||||
};
|
||||
}
|
|
@ -1,66 +1,14 @@
|
|||
{ ... }:
|
||||
{ pkgs, config, ... }:
|
||||
{
|
||||
config.home-manager.users.vinzenz =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./configuration.nix
|
||||
./editorconfig.nix
|
||||
./git.nix
|
||||
./gnome.nix
|
||||
./niri.nix
|
||||
./ssh.nix
|
||||
./vscode.nix
|
||||
./waybar.nix
|
||||
./zsh.nix
|
||||
];
|
||||
|
||||
config = {
|
||||
|
||||
programs = {
|
||||
home-manager.enable = true;
|
||||
fzf.enable = true;
|
||||
git-credential-oauth.enable = true;
|
||||
|
||||
direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
eza = {
|
||||
enable = true;
|
||||
git = true;
|
||||
icons = "auto";
|
||||
extraOptions = [
|
||||
"--group-directories-first"
|
||||
"--header"
|
||||
];
|
||||
};
|
||||
|
||||
thefuck = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
keepassxc
|
||||
insync
|
||||
|
||||
telegram-desktop
|
||||
element-desktop
|
||||
|
||||
wireguard-tools
|
||||
wirelesstools
|
||||
|
||||
kdiff3
|
||||
jetbrains-toolbox
|
||||
|
||||
blanket
|
||||
vlc
|
||||
];
|
||||
|
||||
home.file."policy.json" = {
|
||||
target = ".config/containers/policy.json";
|
||||
text = builtins.readFile ./.config/containers/policy.json;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
290
home/vinzenz/niri.nix
Normal file
290
home/vinzenz/niri.nix
Normal file
|
@ -0,0 +1,290 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
config = {
|
||||
home.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
home.packages = with pkgs; [
|
||||
xwayland-satellite
|
||||
alacritty
|
||||
fuzzel
|
||||
swaylock
|
||||
];
|
||||
|
||||
programs.niri.settings = {
|
||||
input.keyboard.xkb.layout = "de";
|
||||
|
||||
outputs."eDP-1" = {
|
||||
scale = 1.0;
|
||||
variable-refresh-rate = true;
|
||||
background-color = "#000000";
|
||||
};
|
||||
|
||||
layout.gaps = 8;
|
||||
|
||||
# defaults taken from https://github.com/sodiboo/niri-flake/issues/483
|
||||
binds = {
|
||||
# Keys consist of modifiers separated by + signs, followed by an XKB key name
|
||||
# in the end. To find an XKB name for a particular key, you may use a program
|
||||
# like wev.
|
||||
#
|
||||
# "Mod" is a special modifier equal to Super when running on a TTY, and to Alt
|
||||
# when running as a winit window.
|
||||
#
|
||||
# Most actions that you can bind here can also be invoked programmatically with
|
||||
# `niri msg action do-something`.
|
||||
|
||||
# Mod-Shift-/, which is usually the same as Mod-?,
|
||||
# shows a list of important hotkeys.
|
||||
"Mod+Shift+Slash".action.show-hotkey-overlay = { };
|
||||
|
||||
# Suggested binds for running programs: terminal, app launcher, screen locker.
|
||||
"Mod+T".action.spawn = "alacritty";
|
||||
"Mod+D".action.spawn = "fuzzel";
|
||||
"Super+Alt+L".action.spawn = "swaylock";
|
||||
|
||||
# You can also use a shell. Do this if you need pipes, multiple commands, etc.
|
||||
# Note: the entire command goes as a single argument in the end.
|
||||
# Mod+T { spawn "bash" "-c" "notify-send hello && exec alacritty"; }
|
||||
|
||||
# Example volume keys mappings for PipeWire & WirePlumber.
|
||||
# The allow-when-locked=true property makes them work even when the session is locked.
|
||||
"XF86AudioRaiseVolume" = {
|
||||
allow-when-locked = true;
|
||||
action.spawn = [
|
||||
"wpctl"
|
||||
"set-volume"
|
||||
"@DEFAULT_AUDIO_SINK@"
|
||||
"0.1+"
|
||||
];
|
||||
};
|
||||
"XF86AudioLowerVolume" = {
|
||||
allow-when-locked = true;
|
||||
action.spawn = [
|
||||
"wpctl"
|
||||
"set-volume"
|
||||
"@DEFAULT_AUDIO_SINK@"
|
||||
"0.1-"
|
||||
];
|
||||
};
|
||||
"XF86AudioMute" = {
|
||||
allow-when-locked = true;
|
||||
action.spawn = [
|
||||
"wpctl"
|
||||
"set-mute"
|
||||
"@DEFAULT_AUDIO_SINK@"
|
||||
"toggle"
|
||||
];
|
||||
};
|
||||
"XF86AudioMicMute" = {
|
||||
allow-when-locked = true;
|
||||
action.spawn = [
|
||||
"wpctl"
|
||||
"set-mute"
|
||||
"@DEFAULT_AUDIO_SOURCE@"
|
||||
"toggle"
|
||||
];
|
||||
};
|
||||
|
||||
"Mod+Q".action.close-window = { };
|
||||
|
||||
"Mod+Left".action.focus-column-left = { };
|
||||
"Mod+Down".action.focus-window-down = { };
|
||||
"Mod+Up".action.focus-window-up = { };
|
||||
"Mod+Right".action.focus-column-right = { };
|
||||
"Mod+H".action.focus-column-left = { };
|
||||
"Mod+J".action.focus-window-down = { };
|
||||
"Mod+K".action.focus-window-up = { };
|
||||
"Mod+L".action.focus-column-right = { };
|
||||
|
||||
"Mod+Ctrl+Left".action.move-column-left = { };
|
||||
"Mod+Ctrl+Down".action.move-window-down = { };
|
||||
"Mod+Ctrl+Up".action.move-window-up = { };
|
||||
"Mod+Ctrl+Right".action.move-column-right = { };
|
||||
"Mod+Ctrl+H".action.move-column-left = { };
|
||||
"Mod+Ctrl+J".action.move-window-down = { };
|
||||
"Mod+Ctrl+K".action.move-window-up = { };
|
||||
"Mod+Ctrl+L".action.move-column-right = { };
|
||||
|
||||
# Alternative commands that move across workspaces when reaching
|
||||
# the first or last window in a column.
|
||||
# Mod+J { focus-window-or-workspace-down; }
|
||||
# Mod+K { focus-window-or-workspace-up; }
|
||||
# Mod+Ctrl+J { move-window-down-or-to-workspace-down; }
|
||||
# Mod+Ctrl+K { move-window-up-or-to-workspace-up; }
|
||||
|
||||
"Mod+Home".action.focus-column-first = { };
|
||||
"Mod+End".action.focus-column-last = { };
|
||||
"Mod+Ctrl+Home".action.move-column-to-first = { };
|
||||
"Mod+Ctrl+End".action.move-column-to-last = { };
|
||||
|
||||
"Mod+Shift+Left".action.focus-monitor-left = { };
|
||||
"Mod+Shift+Down".action.focus-monitor-down = { };
|
||||
"Mod+Shift+Up".action.focus-monitor-up = { };
|
||||
"Mod+Shift+Right".action.focus-monitor-right = { };
|
||||
"Mod+Shift+H".action.focus-monitor-left = { };
|
||||
"Mod+Shift+J".action.focus-monitor-down = { };
|
||||
"Mod+Shift+K".action.focus-monitor-up = { };
|
||||
"Mod+Shift+L".action.focus-monitor-right = { };
|
||||
|
||||
"Mod+Shift+Ctrl+Left".action.move-column-to-monitor-left = { };
|
||||
"Mod+Shift+Ctrl+Down".action.move-column-to-monitor-down = { };
|
||||
"Mod+Shift+Ctrl+Up".action.move-column-to-monitor-up = { };
|
||||
"Mod+Shift+Ctrl+Right".action.move-column-to-monitor-right = { };
|
||||
"Mod+Shift+Ctrl+H".action.move-column-to-monitor-left = { };
|
||||
"Mod+Shift+Ctrl+J".action.move-column-to-monitor-down = { };
|
||||
"Mod+Shift+Ctrl+K".action.move-column-to-monitor-up = { };
|
||||
"Mod+Shift+Ctrl+L".action.move-column-to-monitor-right = { };
|
||||
|
||||
# Alternatively, there are commands to move just a single window:
|
||||
# Mod+Shift+Ctrl+Left { move-window-to-monitor-left; }
|
||||
# ...
|
||||
|
||||
# And you can also move a whole workspace to another monitor:
|
||||
# Mod+Shift+Ctrl+Left { move-workspace-to-monitor-left; }
|
||||
# ...
|
||||
|
||||
"Mod+Page_Down".action.focus-workspace-down = { };
|
||||
"Mod+Page_Up".action.focus-workspace-up = { };
|
||||
"Mod+U".action.focus-workspace-down = { };
|
||||
"Mod+I".action.focus-workspace-up = { };
|
||||
"Mod+Ctrl+Page_Down".action.move-column-to-workspace-down = { };
|
||||
"Mod+Ctrl+Page_Up".action.move-column-to-workspace-up = { };
|
||||
"Mod+Ctrl+U".action.move-column-to-workspace-down = { };
|
||||
"Mod+Ctrl+I".action.move-column-to-workspace-up = { };
|
||||
|
||||
# Alternatively, there are commands to move just a single window:
|
||||
# Mod+Ctrl+Page_Down { move-window-to-workspace-down; }
|
||||
# ...
|
||||
|
||||
"Mod+Shift+Page_Down".action.move-workspace-down = { };
|
||||
"Mod+Shift+Page_Up".action.move-workspace-up = { };
|
||||
"Mod+Shift+U".action.move-workspace-down = { };
|
||||
"Mod+Shift+I".action.move-workspace-up = { };
|
||||
|
||||
# You can bind mouse wheel scroll ticks using the following syntax.
|
||||
# These binds will change direction based on the natural-scroll setting.
|
||||
#
|
||||
# To avoid scrolling through workspaces really fast, you can use
|
||||
# the cooldown-ms property. The bind will be rate-limited to this value.
|
||||
# You can set a cooldown on any bind, but it's most useful for the wheel.
|
||||
"Mod+WheelScrollDown" = {
|
||||
cooldown-ms = 150;
|
||||
action.focus-workspace-down = { };
|
||||
};
|
||||
"Mod+WheelScrollUp" = {
|
||||
cooldown-ms = 150;
|
||||
action.focus-workspace-up = { };
|
||||
};
|
||||
"Mod+Ctrl+WheelScrollDown" = {
|
||||
cooldown-ms = 150;
|
||||
action.move-column-to-workspace-down = { };
|
||||
};
|
||||
"Mod+Ctrl+WheelScrollUp" = {
|
||||
cooldown-ms = 150;
|
||||
action.move-column-to-workspace-up = { };
|
||||
};
|
||||
|
||||
"Mod+WheelScrollRight".action.focus-column-right = { };
|
||||
"Mod+WheelScrollLeft".action.focus-column-left = { };
|
||||
"Mod+Ctrl+WheelScrollRight".action.move-column-right = { };
|
||||
"Mod+Ctrl+WheelScrollLeft".action.move-column-left = { };
|
||||
|
||||
# Usually scrolling up and down with Shift in applications results in
|
||||
# horizontal scrolling; these binds replicate that.
|
||||
"Mod+Shift+WheelScrollDown".action.focus-column-right = { };
|
||||
"Mod+Shift+WheelScrollUp".action.focus-column-left = { };
|
||||
"Mod+Ctrl+Shift+WheelScrollDown".action.move-column-right = { };
|
||||
"Mod+Ctrl+Shift+WheelScrollUp".action.move-column-left = { };
|
||||
|
||||
# Similarly, you can bind touchpad scroll "ticks".
|
||||
# Touchpad scrolling is continuous, so for these binds it is split into
|
||||
# discrete intervals.
|
||||
# These binds are also affected by touchpad's natural-scroll, so these
|
||||
# example binds are "inverted", since we have natural-scroll enabled for
|
||||
# touchpads by default.
|
||||
# Mod+TouchpadScrollDown { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02+"; }
|
||||
# Mod+TouchpadScrollUp { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02-"; }
|
||||
|
||||
# You can refer to workspaces by index. However, keep in mind that
|
||||
# niri is a dynamic workspace system, so these commands are kind of
|
||||
# "best effort". Trying to refer to a workspace index bigger than
|
||||
# the current workspace count will instead refer to the bottommost
|
||||
# (empty) workspace.
|
||||
#
|
||||
# For example, with 2 workspaces + 1 empty, indices 3, 4, 5 and so on
|
||||
# will all refer to the 3rd workspace.
|
||||
"Mod+1".action.focus-workspace = 1;
|
||||
"Mod+2".action.focus-workspace = 2;
|
||||
"Mod+3".action.focus-workspace = 3;
|
||||
"Mod+4".action.focus-workspace = 4;
|
||||
"Mod+5".action.focus-workspace = 5;
|
||||
"Mod+6".action.focus-workspace = 6;
|
||||
"Mod+7".action.focus-workspace = 7;
|
||||
"Mod+8".action.focus-workspace = 8;
|
||||
"Mod+9".action.focus-workspace = 9;
|
||||
"Mod+Ctrl+1".action.move-column-to-workspace = 1;
|
||||
"Mod+Ctrl+2".action.move-column-to-workspace = 2;
|
||||
"Mod+Ctrl+3".action.move-column-to-workspace = 3;
|
||||
"Mod+Ctrl+4".action.move-column-to-workspace = 4;
|
||||
"Mod+Ctrl+5".action.move-column-to-workspace = 5;
|
||||
"Mod+Ctrl+6".action.move-column-to-workspace = 6;
|
||||
"Mod+Ctrl+7".action.move-column-to-workspace = 7;
|
||||
"Mod+Ctrl+8".action.move-column-to-workspace = 8;
|
||||
"Mod+Ctrl+9".action.move-column-to-workspace = 9;
|
||||
|
||||
# Alternatively, there are commands to move just a single window:
|
||||
# Mod+Ctrl+1 { move-window-to-workspace 1; }
|
||||
|
||||
# Switches focus between the current and the previous workspace.
|
||||
# Mod+Tab { focus-workspace-previous; }
|
||||
|
||||
"Mod+Comma".action.consume-window-into-column = { };
|
||||
"Mod+Period".action.expel-window-from-column = { };
|
||||
|
||||
# There are also commands that consume or expel a single window to the side.
|
||||
# Mod+BracketLeft { consume-or-expel-window-left; }
|
||||
# Mod+BracketRight { consume-or-expel-window-right; }
|
||||
|
||||
"Mod+R".action.switch-preset-column-width = { };
|
||||
"Mod+Shift+R".action.reset-window-height = { };
|
||||
"Mod+F".action.maximize-column = { };
|
||||
"Mod+Shift+F".action.fullscreen-window = { };
|
||||
"Mod+C".action.center-column = { };
|
||||
|
||||
# Finer width adjustments.
|
||||
# This command can also:
|
||||
# * set width in pixels: "1000"
|
||||
# * adjust width in pixels: "-5" or "+5"
|
||||
# * set width as a percentage of screen width: "25%"
|
||||
# * adjust width as a percentage of screen width: "-10%" or "+10%"
|
||||
# Pixel sizes use logical, or scaled, pixels. I.e. on an output with scale 2.0,
|
||||
# set-column-width "100" will make the column occupy 200 physical screen pixels.
|
||||
"Mod+Minus".action.set-column-width = "-10%";
|
||||
"Mod+Equal".action.set-column-width = "+10%";
|
||||
|
||||
# Finer height adjustments when in column with other windows.
|
||||
"Mod+Shift+Minus".action.set-window-height = "-10%";
|
||||
"Mod+Shift+Equal".action.set-window-height = "+10%";
|
||||
|
||||
# Actions to switch layouts.
|
||||
# Note: if you uncomment these, make sure you do NOT have
|
||||
# a matching layout switch hotkey configured in xkb options above.
|
||||
# Having both at once on the same hotkey will break the switching,
|
||||
# since it will switch twice upon pressing the hotkey (once by xkb, once by niri).
|
||||
# Mod+Space { switch-layout "next"; }
|
||||
# Mod+Shift+Space { switch-layout "prev"; }
|
||||
|
||||
"Print".action.screenshot = { };
|
||||
"Ctrl+Print".action.screenshot-screen = { };
|
||||
"Alt+Print".action.screenshot-window = { };
|
||||
|
||||
# The quit action will show a confirmation dialog to avoid accidental exits.
|
||||
"Mod+Shift+E".action.quit = { };
|
||||
|
||||
# Powers off the monitors. To turn them back on, do any input like
|
||||
# moving the mouse or pressing any other key.
|
||||
"Mod+Shift+P".action.power-off-monitors = { };
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
120
home/vinzenz/waybar.nix
Normal file
120
home/vinzenz/waybar.nix
Normal file
|
@ -0,0 +1,120 @@
|
|||
{ pkgs, device, ... }:
|
||||
{
|
||||
config.programs.waybar = {
|
||||
enable = true;
|
||||
settings = {
|
||||
mainBar = {
|
||||
layer = "top";
|
||||
position = "top";
|
||||
output = [
|
||||
"eDP-1"
|
||||
"HDMI-A-1"
|
||||
];
|
||||
mode = "dock";
|
||||
spacing = "8";
|
||||
modules-left = [
|
||||
"niri/workspaces"
|
||||
"niri/window"
|
||||
];
|
||||
modules-center = [
|
||||
"clock"
|
||||
];
|
||||
modules-right = [
|
||||
"tray"
|
||||
"mpd"
|
||||
|
||||
"temperature"
|
||||
"cpu"
|
||||
|
||||
"disk"
|
||||
"backlight"
|
||||
"pulseaudio"
|
||||
"bluetooth"
|
||||
"memory"
|
||||
"network"
|
||||
"battery"
|
||||
];
|
||||
"niri/workspaces" = {
|
||||
format = "{icon}";
|
||||
};
|
||||
|
||||
"niri/window" = {
|
||||
separate-outputs = true;
|
||||
icon = true;
|
||||
};
|
||||
network = {
|
||||
interface = "wlo1";
|
||||
format = "{ifname}";
|
||||
format-wifi = " ";
|
||||
format-ethernet = " ";
|
||||
format-linked = " ";
|
||||
format-disconnected = " ";
|
||||
tooltip-format = "{ifname} via {gwaddr}";
|
||||
tooltip-format-wifi = "{essid} ({signalStrength}%)";
|
||||
tooltip-format-ethernet = "{ifname} {ipaddr}/{cidr}";
|
||||
tooltip-format-disconnected = "Disconnected";
|
||||
max-length = 50;
|
||||
};
|
||||
clock = {
|
||||
format = "{:%a, %d. %b %H:%M}";
|
||||
tooltip-format = "<tt><small>{calendar}</small></tt>";
|
||||
calendar = {
|
||||
mode = "month";
|
||||
weeks-pos = "right";
|
||||
on-scroll = 1;
|
||||
on-click-right = "mode";
|
||||
format = {
|
||||
#months = "<span color='#ffead3'><b>{}</b></span>";
|
||||
#days = "<span color='#ecc6d9'><b>{}</b></span>";
|
||||
#weeks = "<span color='#99ffdd'><b>W{}</b></span>";
|
||||
#weekdays = "<span color='#ffcc66'><b>{}</b></span>";
|
||||
#weekdays = "<b>{}</b>";
|
||||
today = "<span color='#0FBB0F'><b>{}</b></span>";
|
||||
};
|
||||
};
|
||||
actions = {
|
||||
on-click-right = "mode";
|
||||
on-click-forward = "tz_up";
|
||||
on-click-backward = "tz_down";
|
||||
on-scroll-up = "shift_down";
|
||||
on-scroll-down = "shift_up";
|
||||
};
|
||||
};
|
||||
battery = {
|
||||
format = "{capacity}% {icon}";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
backlight = {
|
||||
device = "intel_backlight";
|
||||
format = "{percent}% ";
|
||||
};
|
||||
cpu = {
|
||||
"interval" = 1;
|
||||
"format" =
|
||||
"{usage}%@{avg_frequency} "
|
||||
+ (builtins.getAttr device {
|
||||
"vinzenz-lpt2" =
|
||||
"{icon0}{icon1}{icon2}{icon3}{icon4}{icon5}{icon6}{icon7}{icon8}{icon9}{icon10}{icon11}{icon12}{icon13}{icon14}{icon15}{icon16}{icon17}{icon18}{icon19}";
|
||||
})
|
||||
+ " ";
|
||||
"format-icons" = [
|
||||
"<span color='#69ff94'>▁</span>"
|
||||
"<span color='#2aa9ff'>▂</span>"
|
||||
"<span color='#f8f8f2'>▃</span>"
|
||||
"<span color='#f8f8f2'>▄</span>"
|
||||
"<span color='#ffffa5'>▅</span>"
|
||||
"<span color='#ffffa5'>▆</span>"
|
||||
"<span color='#ff9977'>▇</span>"
|
||||
"<span color='#dd532e'>█</span>"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -18,6 +18,8 @@
|
|||
# Configure console keymap
|
||||
console.keyMap = "de";
|
||||
|
||||
home-manager.users.vinzenz = import ../../home/vinzenz;
|
||||
|
||||
users.users.vinzenz.openssh.authorizedKeys.keys = [
|
||||
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFCJUpbpB3KEKVoKWsKoar9J4RNah8gmQoSH6jQEw5dY vinzenz-pixel-JuiceSSH''
|
||||
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO1CRn4yYTL4XUdCebE8Z4ZeuMujBjorTdWifg911EOv vinzenz-pc2 home roaming''
|
||||
|
|
|
@ -1,16 +1,13 @@
|
|||
{
|
||||
imports = [
|
||||
../../home/gnome.nix
|
||||
../../users/vinzenz.nix
|
||||
|
||||
../../modules/gnome.nix
|
||||
../../modules/gaming.nix
|
||||
../../modules/printing.nix
|
||||
../../modules/podman.nix
|
||||
|
||||
../../home
|
||||
../../modules/niri.nix
|
||||
../../modules/desktop-environment.nix
|
||||
../../modules/desktop-hardware.nix
|
||||
|
||||
../../home/vinzenz
|
||||
];
|
||||
}
|
||||
|
|
|
@ -20,6 +20,11 @@
|
|||
# Configure console keymap
|
||||
console.keyMap = "de";
|
||||
|
||||
home-manager.users = {
|
||||
vinzenz = import ../../home/vinzenz;
|
||||
ronja = import ../../home/ronja;
|
||||
};
|
||||
|
||||
users.users.vinzenz.openssh.authorizedKeys.keys = [
|
||||
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINrY6tcgnoC/xbgL7vxSjddEY9MBxRXe9n2cAHt88/TT home roaming''
|
||||
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFCJUpbpB3KEKVoKWsKoar9J4RNah8gmQoSH6jQEw5dY vinzenz-pixel-JuiceSSH''
|
||||
|
|
|
@ -1,17 +1,13 @@
|
|||
{
|
||||
imports = [
|
||||
../../home/gnome.nix
|
||||
../../users/vinzenz.nix
|
||||
../../users/ronja.nix
|
||||
|
||||
../../modules/gnome.nix
|
||||
../../modules/gaming.nix
|
||||
../../modules/printing.nix
|
||||
../../modules/podman.nix
|
||||
|
||||
../../home
|
||||
../../modules/niri.nix
|
||||
../../modules/desktop-environment.nix
|
||||
../../modules/desktop-hardware.nix
|
||||
|
||||
../../home/vinzenz
|
||||
];
|
||||
}
|
||||
|
|
|
@ -64,5 +64,44 @@
|
|||
|
||||
# RDP connections
|
||||
networking.firewall.allowedTCPPorts = [ 3389 ];
|
||||
|
||||
home-manager.sharedModules = [
|
||||
{
|
||||
home.packages =
|
||||
with pkgs;
|
||||
[
|
||||
gitg
|
||||
meld
|
||||
simple-scan
|
||||
pinta
|
||||
dconf-editor
|
||||
gpaste
|
||||
|
||||
# graphical installer for flatpak apps
|
||||
gnome-software
|
||||
]
|
||||
++ (with gnomeExtensions; [
|
||||
caffeine
|
||||
appindicator
|
||||
]);
|
||||
|
||||
dconf.settings = import ./gnome-shared-dconf.nix;
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
iconTheme.name = "Adwaita";
|
||||
cursorTheme.name = "Adwaita";
|
||||
theme = {
|
||||
name = "adw-gtk3-dark";
|
||||
package = pkgs.adw-gtk3;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [ trayscale ] ++ (with gnomeExtensions; [ tailscale-qs ]);
|
||||
dconf.settings."org/gnome/shell".enabled-extensions = [ "tailscale@joaophi.github.com" ];
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
61
modules/home-manager.nix
Normal file
61
modules/home-manager.nix
Normal file
|
@ -0,0 +1,61 @@
|
|||
_: {
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
sharedModules = [
|
||||
# set stateVersion
|
||||
{ home.stateVersion = "22.11"; }
|
||||
# make nano the default editor
|
||||
{
|
||||
home = {
|
||||
sessionVariables.EDITOR = "nano";
|
||||
file.".nanorc".text = ''
|
||||
set linenumbers
|
||||
set mouse
|
||||
'';
|
||||
};
|
||||
}
|
||||
# command line niceness
|
||||
{
|
||||
programs = {
|
||||
command-not-found.enable = true;
|
||||
dircolors.enable = true;
|
||||
|
||||
zsh = {
|
||||
enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
autosuggestion.enable = true;
|
||||
enableVteIntegration = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
# common git config
|
||||
{
|
||||
programs = {
|
||||
git = {
|
||||
enable = true;
|
||||
extraConfig.init.defaultBranch = "main";
|
||||
};
|
||||
|
||||
gh = {
|
||||
enable = true;
|
||||
gitCredentialHelper.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
# Templates
|
||||
{
|
||||
home.file = {
|
||||
"Templates/Empty file".text = "";
|
||||
"Templates/Empty bash script".text = ''
|
||||
#!/usr/bin/env bash
|
||||
# abort on error, undefined variables
|
||||
set -eu
|
||||
# print commands before execution
|
||||
set -x
|
||||
'';
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
7
modules/niri.nix
Normal file
7
modules/niri.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
programs.niri = {
|
||||
enable = true;
|
||||
package = pkgs.niri-stable;
|
||||
};
|
||||
}
|
|
@ -17,11 +17,13 @@
|
|||
"https://cache.nixos.org/"
|
||||
"https://nix-community.cachix.org"
|
||||
"https://cache.lix.systems"
|
||||
"https://niri.cachix.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
"cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o="
|
||||
"niri.cachix.org-1:Wv0OmO7PsuocRKzfDoJ3mulSl7Z6oezYhGhR+3W2964="
|
||||
];
|
||||
experimental-features = [
|
||||
"nix-command"
|
|
@ -15,6 +15,7 @@
|
|||
"nginx"
|
||||
"adbusers"
|
||||
"kvm"
|
||||
"input"
|
||||
];
|
||||
shell = pkgs.zsh;
|
||||
autoSubUidGidRange = true;
|
||||
|
|
Loading…
Reference in a new issue