working on fixing my build

This commit is contained in:
Chris Kruining 2025-03-19 15:29:02 +01:00
parent d5e7b0dfbe
commit b893fbf7ed
No known key found for this signature in database
GPG key ID: EB894A3560CCCAD2
5 changed files with 170 additions and 16 deletions

View file

@ -1,7 +1,9 @@
{ ... }:
{
# full_name = "WOOOP WOOOP";
# is_trusted = false;
user = {
full_name = "Chris Kruining";
is_trusted = true;
};
themes = {
enable = true;
@ -16,7 +18,10 @@
};
desktop = {
plasma.enable = true;
plasma = {
enable = true;
autoLogin = true;
};
applications = {
communication.enable = true;

View file

@ -1,7 +1,10 @@
{ ... }:
{
# full_name = "Chris Kruining";
# is_trusted = true;
user = {
full_name = "Chris Kruining";
is_trusted = true;
};
themes = {
enable = true;
theme = "everforest";
@ -15,7 +18,10 @@
};
desktop = {
plasma.enable = true;
plasma = {
enable = true;
autoLogin = true;
};
applications = {
communication.enable = true;
@ -29,9 +35,9 @@
};
editors = {
default = "vscodium";
default = "zed";
vscodium.enable = true;
# zed.enable = true;
zed.enable = true;
nvim.enable = true;
nano.enable = true;
};

View file

@ -6,16 +6,10 @@
in rec
{
mkSysUser = path: let
user = {
full_name = "TODO";
is_trusted = true;
};
name = removeSuffix ".nix" (baseNameOf path);
in
{
inherit name;
description = user.full_name;
extraGroups = (user.groups or []) ++ (if user.is_trusted then [ "wheel" ] else []);
isNormalUser = true;
initialPassword = "kaas";
home = "/home/${name}";

View file

@ -47,14 +47,122 @@ in
home-manager.users.${user}.programs = {
plasma = {
enable = true;
workspace = {
lookAndFeel = "org.kde.breezedark.desktop";
wallpaper = "${pkgs.kdePackages.plasma-workspace-wallpapers}/share/wallpapers/Patak/contents/images/1080x1920.png";
};
hotkeys.commands."spectable" = {
name = "Launch Spectable";
key = "Meta+Shift+S";
command = "spectable captureRectangularRegion";
};
kwin = {
edgeBarrier = 0;
cornerBarrier = false;
};
spectacle.shortcuts = {
captureRectangularRegion = "Meta+Shift+S";
panels = [
# Windows-like panel at the bottom
{
location = "bottom";
widgets = [
# We can configure the widgets by adding the name and config
# attributes. For example to add the the kickoff widget and set the
# icon to "nix-snowflake-white" use the below configuration. This will
# add the "icon" key to the "General" group for the widget in
# ~/.config/plasma-org.kde.plasma.desktop-appletsrc.
{
name = "org.kde.plasma.kickoff";
config = {
General = {
icon = "nix-snowflake-white";
alphaSort = true;
};
};
}
# Or you can configure the widgets by adding the widget-specific options for it.
# See modules/widgets for supported widgets and options for these widgets.
# For example:
{
kickoff = {
sortAlphabetically = true;
icon = "nix-snowflake-white";
};
}
# Adding configuration to the widgets can also for example be used to
# pin apps to the task-manager, which this example illustrates by
# pinning dolphin and konsole to the task-manager by default with widget-specific options.
{
iconTasks = {
launchers = [
"applications:org.kde.dolphin.desktop"
"applications:org.kde.konsole.desktop"
];
};
}
# Or you can do it manually, for example:
{
name = "org.kde.plasma.icontasks";
config = {
General = {
launchers = [
"applications:org.kde.dolphin.desktop"
"applications:org.kde.konsole.desktop"
];
};
};
}
# If no configuration is needed, specifying only the name of the
# widget will add them with the default configuration.
"org.kde.plasma.marginsseparator"
# If you need configuration for your widget, instead of specifying the
# the keys and values directly using the config attribute as shown
# above, plasma-manager also provides some higher-level interfaces for
# configuring the widgets. See modules/widgets for supported widgets
# and options for these widgets. The widgets below shows two examples
# of usage, one where we add a digital clock, setting 12h time and
# first day of the week to Sunday and another adding a systray with
# some modifications in which entries to show.
{
digitalClock = {
calendar.firstDayOfWeek = "sunday";
time.format = "12h";
};
}
{
systemTray.items = {
# We explicitly show bluetooth and battery
shown = [
"org.kde.plasma.battery"
"org.kde.plasma.bluetooth"
];
# And explicitly hide networkmanagement and volume
hidden = [
"org.kde.plasma.networkmanagement"
"org.kde.plasma.volume"
];
};
}
];
}
];
configFile = {
baloofilerc."Basic Settings"."Indexing-Enabled" = false;
kwinrc."org.kde.kdecoration2".ButtonsOnLeft = "SF";
kwinrc.Desktops.Number = {
value = 1;
immutable = true;
};
kscreenlockerrc = {
Greeter.WallpaperPlugin = "org.kde.potd";
# To use nested groups use / as a separator. In the below example,
# Provider will be added to [Greeter][Wallpaper][org.kde.potd][General].
"Greeter/Wallpaper/org.kde.potd/General".Provider = "bing";
};
};
};
};

41
modules/home/user.nix Normal file
View file

@ -0,0 +1,41 @@
{ options, config, lib, pkgs, user, ... }:
let
inherit (lib.attrsets) attrValues;
inherit (lib.modules) mkIf mkMerge;
cfg = config.modules.${user}.user;
in
{
options.modules.${user}.user = let
inherit (lib.options) mkOption mkEnableOption;
inherit (lib.types) nullOr enum;
in with lib.types; {
full_name = mkOption {
type = nullOr str;
default = null;
example = "John Doe";
description = "Full name of the user, this is used as the kde plasma display name for example";
};
is_trusted = mkOption {
type = bool;
default = false;
example = true;
description = "this is used to grant sudo priviledges for the user";
};
groups = mkOption {
type = listOf str;
default = [];
example = [ "some" "group" "names" ];
description = "groups to add the user to";
};
};
config = {
users.users.${user} = {
description = (cfg.full_name or user);
extraGroups = cfg.groups ++ (if cfg.is_trusted then [ "wheel" ] else []);
};
};
}