add plasma-manager, add shortcuts and hotkeys
This commit is contained in:
parent
a83c37a638
commit
01f8435ba7
10 changed files with 211 additions and 73 deletions
24
flake.lock
generated
24
flake.lock
generated
|
@ -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"
|
||||
}
|
||||
|
|
16
flake.nix
16
flake.nix
|
@ -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;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
23
modules/home/cli-apps/lazygit/default.nix
Normal file
23
modules/home/cli-apps/lazygit/default.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
26
modules/home/desktop/shortcuts/default.nix
Normal file
26
modules/home/desktop/shortcuts/default.nix
Normal 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" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
|
@ -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
|
||||
];
|
||||
}
|
||||
|
|
64
modules/nixos/cli/neovim/vim-config.nix
Normal file
64
modules/nixos/cli/neovim/vim-config.nix
Normal 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";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
|
@ -1,4 +1,9 @@
|
|||
{ lib, config, pkgs, namespace, ... }:
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with lib.${namespace};
|
||||
let
|
||||
|
|
|
@ -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.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; }
|
||||
{
|
||||
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?
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue