Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flake lock update #929

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion docs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ let
# TODO this hides the other modules (e.g. microvm.nix)
# But they are stilled passed as options modules ???
if lib.strings.hasPrefix "ghaf" x.name then x else x // { visible = false; };
markdownByDefault = true;
}).optionsCommonMark;
combinedSrc = runCommandLocal "ghaf-doc-src" { } ''
mkdir $out
Expand Down
68 changes: 34 additions & 34 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 8 additions & 4 deletions lib.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,14 @@ nixpkgs.lib.extend (
lib.filterAttrs (
_: value:
let
platforms = lib.attrByPath [
"meta"
"platforms"
] [ ] value;
platforms =
lib.attrByPath
[
"meta"
"platforms"
]
[ ]
value;
in
lib.elem system platforms
);
Expand Down
3 changes: 2 additions & 1 deletion modules/common/boot/systemd-boot-dtb.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ in

config = mkIf cfg.enable {
boot.loader.systemd-boot = {
extraFiles."dtbs/${config.hardware.deviceTree.name}" = "${config.hardware.deviceTree.package}/${config.hardware.deviceTree.name}";
extraFiles."dtbs/${config.hardware.deviceTree.name}" =
"${config.hardware.deviceTree.package}/${config.hardware.deviceTree.name}";
extraInstallCommands = ''
# Find out the latest generation from loader.conf
default_cfg=$(${pkgs.coreutils}/bin/cat /boot/loader/loader.conf | ${pkgs.gnugrep}/bin/grep default | ${pkgs.gawk}/bin/awk '{print $2}')
Expand Down
6 changes: 5 additions & 1 deletion modules/desktop/graphics/fonts.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ let
in
{
config = lib.mkIf labwc.enable {
fonts.packages = builtins.attrValues { inherit (pkgs) inter fira-code-nerdfont hack-font; };
fonts.packages = [
pkgs.inter
pkgs.nerd-fonts.fira-code
pkgs.hack-font
];
};
}
50 changes: 21 additions & 29 deletions modules/desktop/graphics/labwc.config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,14 @@ let
</desktops>
<keyboard>
<default />
${
lib.concatStringsSep "\n" (
builtins.map (index: ''
<keybind key="W-${toString index}">
<action name="GoToDesktop" to="${toString index}" />
<action name="Execute" command="bash -c 'echo 1 > ~/.config/eww/workspace; ${ghaf-workspace}/bin/ghaf-workspace update ${toString index}'" />
</keybind>
'') (lib.lists.range 1 cfg.maxDesktops)
)
}
${lib.concatStringsSep "\n" (
builtins.map (index: ''
<keybind key="W-${toString index}">
<action name="GoToDesktop" to="${toString index}" />
<action name="Execute" command="bash -c 'echo 1 > ~/.config/eww/workspace; ${ghaf-workspace}/bin/ghaf-workspace update ${toString index}'" />
</keybind>
'') (lib.lists.range 1 cfg.maxDesktops)
)}
<keybind key="W-A-Right">
<action name="Execute" command="bash -c 'echo 1 > ~/.config/eww/workspace; ${ghaf-workspace}/bin/ghaf-workspace next'" />
</keybind>
Expand Down Expand Up @@ -162,31 +160,25 @@ let
<context name="Root">
<mousebind button="Left" action="Press" />
<mousebind button="Middle" action="Press" />
${
lib.optionalString (!config.ghaf.profiles.debug.enable) ''
<mousebind button="Right" action="Press" />
''
}
${lib.optionalString (!config.ghaf.profiles.debug.enable) ''
<mousebind button="Right" action="Press" />
''}
<!--Disable default scrolling behavior of switching workspaces-->
<mousebind direction="Up" action="Scroll" />
<mousebind direction="Down" action="Scroll" />
</context>
</mouse>
<windowRules>
${
lib.concatStringsSep "\n" (
map (rule: ''
<windowRule identifier="${rule.identifier}" borderColor="${rule.colour}" serverDecoration="yes" skipTaskbar="no" />
'') cfg.frameColouring
)
}
${
lib.concatStringsSep "\n" (
map (rule: ''
<windowRule sandboxAppId="${rule.identifier}" borderColor="${rule.color}" serverDecoration="yes" skipTaskbar="no" />
'') cfg.securityContext
)
}
${lib.concatStringsSep "\n" (
map (rule: ''
<windowRule identifier="${rule.identifier}" borderColor="${rule.colour}" serverDecoration="yes" skipTaskbar="no" />
'') cfg.frameColouring
)}
${lib.concatStringsSep "\n" (
map (rule: ''
<windowRule sandboxAppId="${rule.identifier}" borderColor="${rule.color}" serverDecoration="yes" skipTaskbar="no" />
'') cfg.securityContext
)}
</windowRules>
<libinput>
<device category="touchpad"><naturalScroll>yes</naturalScroll></device>
Expand Down
2 changes: 1 addition & 1 deletion modules/desktop/graphics/styles/lock-layout.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-License-Identifier: Apache-2.0

# Ghaf lock screen layout
# Base layout taken from gtklock upstream: https://github.com/jovanlanik/gtklock/blob/master/res/gtklock.ui
# Base layout taken from gtklock upstream: https://github.com/jovanlanik/gtklock/blob/master/res/gtklock.ui
{
writeText,
...
Expand Down
23 changes: 11 additions & 12 deletions modules/hardware/common/shared-mem.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ let
mkMerge
mkIf
mkOption
mdDoc
types
;
in
Expand All @@ -26,22 +25,22 @@ in
enable = mkOption {
type = types.bool;
default = false;
description = mdDoc ''
description = ''
Enables shared memory communication between virtual machines (VMs)
'';
};
memSize = mkOption {
type = types.int;
default = 16;
description = mdDoc ''
description = ''
Specifies the size of the shared memory region, measured in
megabytes (MB)
'';
};
hugePageSz = mkOption {
type = types.str;
default = "2M";
description = mdDoc ''
description = ''
Specifies the size of the large memory page area. Supported kernel
values are 2 MB and 1 GB
'';
Expand All @@ -55,15 +54,15 @@ in
hostSocketPath = mkOption {
type = types.path;
default = "/tmp/ivshmem_socket"; # The value is hardcoded in the application
description = mdDoc ''
description = ''
Specifies the path to the shared memory socket, used by QEMU
instances for inter-VM memory sharing and interrupt signaling
'';
};
flataddr = mkOption {
type = types.str;
default = "0x920000000";
description = mdDoc ''
description = ''
Maps the shared memory to a physical address if set to a non-zero value.
The address must be platform-specific and arbitrarily chosen to avoid
conflicts with other memory areas, such as PCI regions.
Expand All @@ -72,29 +71,29 @@ in
vms_enabled = mkOption {
type = types.listOf types.str;
default = [ ];
description = mdDoc ''
description = ''
List of vms having access to shared memory
'';
};
enable_host = mkOption {
type = types.bool;
default = false;
description = mdDoc ''
description = ''
Enables the memsocket functionality on the host system
'';
};
instancesCount = mkOption {
type = types.int;
default =
if cfg.enable_host then (builtins.length cfg.vms_enabled) + 1 else builtins.length cfg.vms_enabled;
description = mdDoc ''
description = ''
Number of memory slots allocated in the shared memory region
'';
};
serverSocketPath = mkOption {
type = types.path;
default = "/run/user/${builtins.toString config.ghaf.users.accounts.uid}/memsocket-server.sock";
description = mdDoc ''
description = ''
Specifies the path of the listening socket, which is used by Waypipe
or other server applications as the output socket in server mode for
data transmission
Expand All @@ -103,7 +102,7 @@ in
clientSocketPath = mkOption {
type = types.path;
default = "/run/user/${builtins.toString config.ghaf.users.accounts.uid}/memsocket-client.sock";
description = mdDoc ''
description = ''
Specifies the location of the output socket, which will connected to
in order to receive data from AppVMs. This socket must be created by
another application, such as Waypipe, when operating in client mode
Expand All @@ -112,7 +111,7 @@ in
display = mkOption {
type = types.bool;
default = false;
description = mdDoc ''
description = ''
Enables the use of shared memory with Waypipe for Wayland-enabled
applications running on virtual machines (VMs), facilitating
efficient inter-VM communication
Expand Down
Loading
Loading