1
0
Fork 0

add plasma-manager, add shortcuts and hotkeys

This commit is contained in:
Philipp 2025-02-05 19:18:52 +01:00
parent a83c37a638
commit 01f8435ba7
Signed by: Philipp
GPG key ID: 9EBD8439AFBAB750
10 changed files with 211 additions and 73 deletions

24
flake.lock generated
View file

@ -454,6 +454,29 @@
"type": "github"
}
},
"plasma-manager": {
"inputs": {
"home-manager": [
"home-manager"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1736549395,
"narHash": "sha256-XzwkB62Tt5UYoL1jXiHzgk/qz2fUpGHExcSIbyGTtI0=",
"owner": "nix-community",
"repo": "plasma-manager",
"rev": "a53af7f1514ef4cce8620a9d6a50f238cdedec8b",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "plasma-manager",
"type": "github"
}
},
"plugin-aerial-nvim": {
"flake": false,
"locked": {
@ -3119,6 +3142,7 @@
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs",
"nvf": "nvf",
"plasma-manager": "plasma-manager",
"snowfall-lib": "snowfall-lib",
"unstable": "unstable"
}

View file

@ -20,6 +20,12 @@
};
nvf.url = "github:notashelf/nvf";
plasma-manager = {
url = "github:nix-community/plasma-manager";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
};
outputs =
@ -42,15 +48,15 @@
in
lib.mkFlake {
channels-config.allowUnfree = true;
home-manager.backupFileExtension = "hm-bk";
systems.modules.nixos = with inputs; [
home-manager.nixosModules.home-manager
home-manager.nixosModules.home-manager {
home-manager.sharedModules = [ inputs.plasma-manager.homeManagerModules.plasma-manager ];
home-manager.backupFileExtension = "bk-hm";
}
nvf.nixosModules.default
];
outputs-builder = channels: { formatter = channels.nixpkgs.nixfmt-rfc-style; };
}
// {
self = inputs.self;
};
}

View file

@ -6,6 +6,7 @@
cli-apps = {
fish.enable = true;
home-manager.enable = true;
lazygit.enable = true;
};
tools = {
@ -14,7 +15,13 @@
apps = {
librewolf.enable = true;
kitty.enable = true;
kitty = {
enable = true;
plasma.enable = true;
};
};
desktop = {
hotkeys.enable = true;
};
};
}

View file

@ -30,6 +30,7 @@ in
enable = mkBoolOpt false "Whether or not to enable kitty.";
settings = mkOpt attrs defaultSettings "Settings to apply to the profile.";
font = mkOpt attrs defaultFont "Customize default font settings.";
plasma.enable = mkBoolOpt false "Whether to enable plasma configs for kitty.";
};
config = mkIf cfg.enable {
@ -38,6 +39,15 @@ in
themeFile = "Dracula";
inherit (cfg) font settings;
};
programs.plasma = mkIf cfg.plasma.enable {
enable = true;
hotkeys.commands."launch-kitty" = {
name = "Launch kitty";
key = "Meta+Return";
command = "kitty";
};
};
};
}

View file

@ -0,0 +1,23 @@
{
config,
lib,
namespace,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.cli-apps.lazygit;
in
{
options.${namespace}.cli-apps.lazygit = with types; {
enable = mkBoolOpt false "Whether or not to enable lazygit.";
};
config = mkIf cfg.enable {
programs.lazygit = {
enable = true;
};
};
}

View file

@ -0,0 +1,26 @@
{
config,
lib,
namespace,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.desktop.hotkeys;
in
{
options.${namespace}.desktop.hotkeys = with types; {
enable = mkBoolOpt false "Whether or not to enable kitty.";
};
config = mkIf cfg.enable {
programs.plasma = {
enable = true;
shortcuts.kwin = {
"Window Close" = [ "Meta+Shift+Q" "Alt+F4" ];
};
};
};
}

View file

@ -1,55 +1,5 @@
{
options,
config,
lib,
pkgs,
namespace,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.cli.neovim;
in
{
options.${namespace}.cli.neovim = with types; {
enable = mkBoolOpt false "Whether or not to enable neovim.";
};
config = mkIf cfg.enable {
programs.nvf = {
enable = true;
settings = {
vim.viAlias = true;
vim.vimAlias = true;
vim.lsp.enable = true;
vim.theme.enable = true;
vim.theme.name = "tokyonight";
vim.theme.style = "night";
vim.languages.nix.enable = true;
vim.statusline.lualine.enable = true;
vim.telescope.enable = true;
vim.autocomplete.nvim-cmp.enable = true;
vim.languages.enableLSP = true;
vim.languages.enableTreesitter = true;
vim.options.tabstop = 2;
vim.undoFile.enable = true;
vim.options.shiftwidth = 2;
vim.filetree.neo-tree = {
enable = true;
setupOpts = {
};
};
vim.keymaps = [
{
key = "<C-n>";
mode = [ "n" ];
action = "<CMD>Neotree toggle<CR>";
desc = "Toggles neo-tree";
}
];
};
};
};
imports = [
./vim-config.nix
];
}

View file

@ -0,0 +1,64 @@
{
config,
lib,
namespace,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.cli.neovim;
in
{
options.${namespace}.cli.neovim = with types; {
enable = mkBoolOpt false "Whether or not to enable neovim.";
};
config = mkIf cfg.enable {
programs.nvf = {
enable = true;
settings = {
vim = {
viAlias = true;
vimAlias = true;
options = {
tabstop = 2;
shiftwidth = 2;
};
undoFile.enable = true;
theme = {
enable = true;
name = "tokyonight";
style = "night";
};
lsp.enable = true;
statusline.lualine.enable = true;
telescope.enable = true;
autocomplete.nvim-cmp.enable = true;
languages = {
enableLSP = true;
enableTreesitter = true;
nix.enable = true;
};
filetree.neo-tree = {
enable = true;
setupOpts = {
};
};
keymaps = [
{
key = "<C-n>";
mode = [ "n" ];
action = "<CMD>Neotree toggle<CR>";
desc = "Toggles neo-tree";
}
];
};
};
};
};
}

View file

@ -1,4 +1,9 @@
{ lib, config, pkgs, namespace, ... }:
{
lib,
config,
namespace,
...
}:
with lib;
with lib.${namespace};
let

View file

@ -1,4 +1,12 @@
{ pkgs, config, lib, modulesPath, inputs, namespace, ... }:
{
pkgs,
config,
lib,
modulesPath,
inputs,
namespace,
...
}:
with lib;
with lib.${namespace};
{
@ -14,14 +22,28 @@ with lib.${namespace};
networking.hostName = "blarm"; # Define your hostname.
networking.networkmanager.enable = true;
networking.interfaces.end0.ipv4.addresses = [ { address = "192.168.1.202"; prefixLength = 32; } ];
networking.interfaces.end0.ipv6.addresses = [
{ address = "fd00:192:168:1::202"; prefixLength = 64; }
{ address = "fd00:192:168:1::251"; prefixLength = 64; }
networking.interfaces.end0.ipv4.addresses = [
{
address = "192.168.1.202";
prefixLength = 32;
}
];
networking.interfaces.end0.ipv6.addresses = [
{
address = "fd00:192:168:1::202";
prefixLength = 64;
}
{
address = "fd00:192:168:1::251";
prefixLength = 64;
}
];
networking.firewall.enable = false;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
# Set your time zone.
time.timeZone = "Europe/Berlin";
@ -32,12 +54,14 @@ with lib.${namespace};
users.users.philipp = {
isNormalUser = true;
description = "Philipp Boehm";
extraGroups = [ "wheel" "caddy" ];
openssh.authorizedKeys.keys =
[
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDwUGxdwTgjc61VNh7QNfrrZwz5yHkJ6AGsRsgoDV3a4 philipp-mobile"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJqbT8AdnS++ZoL7TYg2skQUvfWx29Iq+mEYv2Ok2QHb arbeit"
];
extraGroups = [
"wheel"
"caddy"
];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDwUGxdwTgjc61VNh7QNfrrZwz5yHkJ6AGsRsgoDV3a4 philipp-mobile"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJqbT8AdnS++ZoL7TYg2skQUvfWx29Iq+mEYv2Ok2QHb arbeit"
];
};
environment.systemPackages = with pkgs; [
@ -54,4 +78,3 @@ with lib.${namespace};
system.stateVersion = "24.11"; # Did you read the comment?
}