diff --git a/flake.lock b/flake.lock index 7ba9d89..f631926 100644 --- a/flake.lock +++ b/flake.lock @@ -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" } diff --git a/flake.nix b/flake.nix index 79f2233..ebb010a 100644 --- a/flake.nix +++ b/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; }; } diff --git a/homes/x86_64-linux/philipp/default.nix b/homes/x86_64-linux/philipp/default.nix index 9540c63..29fa9b0 100644 --- a/homes/x86_64-linux/philipp/default.nix +++ b/homes/x86_64-linux/philipp/default.nix @@ -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; }; }; } diff --git a/modules/home/apps/kitty/default.nix b/modules/home/apps/kitty/default.nix index d995eda..aac3832 100644 --- a/modules/home/apps/kitty/default.nix +++ b/modules/home/apps/kitty/default.nix @@ -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"; + }; + }; }; } diff --git a/modules/home/cli-apps/lazygit/default.nix b/modules/home/cli-apps/lazygit/default.nix new file mode 100644 index 0000000..74bbf29 --- /dev/null +++ b/modules/home/cli-apps/lazygit/default.nix @@ -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; + }; + }; + +} diff --git a/modules/home/desktop/shortcuts/default.nix b/modules/home/desktop/shortcuts/default.nix new file mode 100644 index 0000000..4cad745 --- /dev/null +++ b/modules/home/desktop/shortcuts/default.nix @@ -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" ]; + }; + }; + }; + +} diff --git a/modules/nixos/cli/neovim/default.nix b/modules/nixos/cli/neovim/default.nix index 6526785..4ddc756 100644 --- a/modules/nixos/cli/neovim/default.nix +++ b/modules/nixos/cli/neovim/default.nix @@ -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 = ""; - mode = [ "n" ]; - action = "Neotree toggle"; - desc = "Toggles neo-tree"; - } - ]; - }; - }; - }; + imports = [ + ./vim-config.nix + ]; } diff --git a/modules/nixos/cli/neovim/vim-config.nix b/modules/nixos/cli/neovim/vim-config.nix new file mode 100644 index 0000000..7b2dced --- /dev/null +++ b/modules/nixos/cli/neovim/vim-config.nix @@ -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 = ""; + mode = [ "n" ]; + action = "Neotree toggle"; + desc = "Toggles neo-tree"; + } + ]; + }; + }; + }; + }; + +} diff --git a/modules/nixos/virtualisation/podman/technitium/default.nix b/modules/nixos/virtualisation/podman/technitium/default.nix index 16105b5..73b9fc1 100644 --- a/modules/nixos/virtualisation/podman/technitium/default.nix +++ b/modules/nixos/virtualisation/podman/technitium/default.nix @@ -1,4 +1,9 @@ -{ lib, config, pkgs, namespace, ... }: +{ + lib, + config, + namespace, + ... +}: with lib; with lib.${namespace}; let diff --git a/systems/aarch64-linux/blarm/default.nix b/systems/aarch64-linux/blarm/default.nix index d87ceb1..95f4766 100644 --- a/systems/aarch64-linux/blarm/default.nix +++ b/systems/aarch64-linux/blarm/default.nix @@ -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? } -