feat(flake, home): Add plasma component using plasma-manager

This commit is contained in:
xezo360hye 2024-08-06 15:56:59 +03:00
parent 93a6ef8c15
commit be0c828219
5 changed files with 171 additions and 3 deletions

45
flake.lock generated
View File

@ -167,6 +167,27 @@
"type": "github"
}
},
"home-manager_3": {
"inputs": {
"nixpkgs": [
"plasma-manager",
"nixpkgs"
]
},
"locked": {
"lastModified": 1714377222,
"narHash": "sha256-UsDsjWCKlWn8vbXi8Zza9Hkq3xyk8fpvFNo2VM5S74E=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "2af7c78b7bb9cf18406a193eba13ef9f99388f49",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"nethack": {
"locked": {
"lastModified": 1722805676,
@ -270,12 +291,34 @@
"type": "github"
}
},
"plasma-manager": {
"inputs": {
"home-manager": "home-manager_3",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1722804745,
"narHash": "sha256-l6N3QaiDqN2QmHDAxjczQPLPCTv+Kp7PsrtJBltmhTo=",
"owner": "nix-community",
"repo": "plasma-manager",
"rev": "61d9342fb471cd3c45a047406428fba7b6fb49ad",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "plasma-manager",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nethack": "nethack",
"nixpkgs": "nixpkgs",
"nixvim": "nixvim"
"nixvim": "nixvim",
"plasma-manager": "plasma-manager"
}
},
"systems": {

View File

@ -14,12 +14,17 @@
inputs.nixpkgs.follows = "nixpkgs";
};
plasma-manager = {
url = github:nix-community/plasma-manager;
inputs.nixpkgs.follows = "nixpkgs";
};
nethack = {
url = git+https://git.psf.lt/xezo360hye/nethack?shallow=1;
};
};
outputs = { self, nixpkgs, home-manager, nixvim, nethack, ... } @ inputs:
outputs = { self, nixpkgs, home-manager, nixvim, nethack, plasma-manager, ... } @ inputs:
let
inherit (self) outputs;
inherit (nixpkgs) lib;
@ -44,7 +49,7 @@
};
extractModule = { homeManagerModules, ... }: homeManagerModules."${lib.head (lib.attrNames homeManagerModules)}";
homeManagerModules = map extractModule [ nixvim nethack ];
homeManagerModules = map extractModule [ nixvim nethack plasma-manager ];
makeHome = hostname: {
"${username}@${hostname}" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;

119
home/components/plasma.nix Normal file
View File

@ -0,0 +1,119 @@
{
programs.plasma = {
enable = true;
overrideConfig = true;
input.touchpads = [{
enable = true;
name = "SynPS/2 Synaptics TouchPad";
vendorId = "0002";
productId = "0007";
disableWhileTyping = false;
naturalScroll = true;
}];
kwin.edgeBarrier = 0;
workspace = {
clickItemTo = "open";
theme = "breeze-dark";
colorScheme = "BreezeDark";
lookAndFeel = "org.kde.breezedark.desktop";
wallpaper = ../resources/wallpaper.png;
};
panels = [
{
screen = "all";
location = "bottom";
hiding = "dodgewindows";
widgets = [
{
kickoff.icon = "nix-snowflake-white";
}
"org.kde.plasma.pager"
{
iconTasks.launchers = [
"applications:systemsettings.desktop"
"applications:org.kde.dolphin.desktop"
"applications:firefox.desktop"
"applications:org.kde.konsole.desktop"
];
}
"org.kde.plasma.marginseparator"
{
systemTray = {};
}
{
digitalClock = {
date.format = "isoDate";
time.format = "24h";
time.showSeconds = "always";
calendar.firstDayOfWeek = "monday";
};
}
"org.kde.plasma.showdesktop"
];
}
];
window-rules = [
{
description = "Konsole";
match.window-class.value = "konsole org.kde.konsole";
apply = {
maximizehoriz = true;
maximizevert = true;
};
}
];
shortcuts = {
kwin = {
"Window Close" = "Alt+Q";
"Switch One Desktop Up" = "Ctrl+Alt+Up";
"Switch One Desktop Down" = "Ctrl+Alt+Down";
"Switch One Desktop to the Left" = "Ctrl+Alt+Left";
"Switch One Desktop to the Right" = "Ctrl+Alt+Right";
"Window One Desktop Up" = "Ctrl+Alt+Shift+Up";
"Window One Desktop Down" = "Ctrl+Alt+Shift+Down";
"Window One Desktop to the Left" = "Ctrl+Alt+Shift+Left";
"Window One Desktop to the Right" = "Ctrl+Alt+Shift+Right";
};
};
configFile = {
dolphinrc.General = {
RememberOpenedTabs = false;
UseTabForSwitchingSplitView = true;
};
kwinrc.TabBox = {
HighlightWindows = false;
MultiScreenMode = 1;
};
kwinrc.Desktops = {
Number = 4;
Rows = 2;
};
kwinrc.Windows = {
DelayFocusInterval = 0;
FocusPolicy = "FocusFollowsMouse";
NextFocusPrefersMouse = true;
FocusStealingPreventionLevel = 0;
};
kxkbrc.Layout = {
LayoutList = "us,ru";
DisplayNames = ",";
VariantList = ",";
Options = "caps:escape_shifted_capslock,grp:win_space_toggle";
ResetOldOptions = true;
};
};
};
}

View File

@ -1,5 +1,6 @@
{
imports = [
./components/hyprland.nix
./components/plasma.nix
];
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 529 KiB