Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2025-06-08 15:46:38 +01:00
parent 8b23486d4a
commit 090ae66aa6
17 changed files with 80 additions and 167 deletions

View File

@@ -1,29 +0,0 @@
{ config, pkgs, ... }:
{
virtualisation.docker = {
enable = true;
enableOnBoot = false;
storageDriver = "btrfs";
daemon.settings = {
experimental = true;
ipv6 = true;
fixed-cidr-v6 = "fd00::/80";
};
autoPrune = {
enable = true;
flags = [ "--all" ];
};
};
environment = {
persistence."/persist/state"."/var/lib/docker".create = "directory";
systemPackages = with pkgs; [ docker-compose ];
};
systemd = {
services.docker.after = [ config.environment.persistence."/persist/state"."/var/lib/docker".mount ];
sockets.docker.after = [ config.environment.persistence."/persist/state"."/var/lib/docker".mount ];
};
}

View File

@@ -16,8 +16,7 @@ in
home.packages = with pkgs; [ dive ];
xdg.configFile."dive/config.yaml" = lib.mkIf (
(config.virtualisation.podman.enable || hmConfig.services.podman.enable)
&& !(config.virtualisation.docker.enable || config.virtualisation.docker.rootless.enable)
config.virtualisation.podman.enable || hmConfig.services.podman.enable
) { source = (pkgs.formats.yaml { }).generate "config.yaml" { container-engine = "podman"; }; };
};
}

View File

@@ -1,52 +0,0 @@
{
user ? throw "user argument is required",
home ? throw "home argument is required",
rootless ? true,
}:
{
config,
lib,
pkgs,
...
}:
lib.mkMerge [
{
virtualisation.docker.rootless = {
enable = rootless;
setSocketVariable = true;
enableOnBoot = false;
storageDriver = "btrfs";
daemon.settings = {
experimental = true;
ipv6 = true;
fixed-cidr-v6 = "fd00::/80";
};
autoPrune = {
enable = true;
flags = [ "--all" ];
};
};
home-manager.users.${user} = {
home = {
packages = with pkgs; [ docker-compose ];
sessionVariables.DOCKER_CONFIG = "${home}/.config/docker";
};
};
}
(lib.mkIf rootless {
environment.persistence."/persist/state"."${home}/.local/share/docker".create = "directory";
systemd.user = {
services.docker.after = [
config.environment.persistence."/persist/state"."${home}/.local/share/docker".mount
];
sockets.docker.after = [
config.environment.persistence."/persist/state"."${home}/.local/share/docker".mount
];
};
})
(lib.mkIf (!rootless) { users.users.${user}.extraGroups = [ "docker" ]; })
]

View File

@@ -4,7 +4,9 @@ export default () => (
<button
className="launcher"
onClickRelease={() =>
execAsync('bash -c "rofi -cache-dir $XDG_CACHE_HOME/rofi -show drun -run-command \"uwsm app -- {cmd}\""')
execAsync(
'bash -c "rofi -cache-dir $XDG_CACHE_HOME/rofi -show drun -run-command \"uwsm app -- {cmd}\""',
)
}
>
<icon className="icon" icon="nix-snowflake-symbolic" />;

View File

@@ -11,8 +11,6 @@
let
hyprpicker = lib.meta.getExe pkgs.hyprpicker;
in
[
"$mod_Shift, C, exec, uwsm app -- ${hyprpicker} -anrql"
];
[ "$mod_Shift, C, exec, uwsm app -- ${hyprpicker} -anrql" ];
};
}

View File

@@ -1,11 +0,0 @@
{
config,
lib,
pkgs,
...
}:
lib.mkIf config.programs.vscode.languages.docker.enable {
programs.vscode.profiles.default.extensions = with pkgs.vscode-extensions; [
ms-azuretools.vscode-docker
];
}

View File

@@ -0,0 +1,15 @@
{
config,
lib,
pkgs,
...
}:
lib.mkIf config.programs.vscode.languages.podman.enable {
programs.vscode.profiles.default = {
extensions = with pkgs.vscode-extensions; [ ms-azuretools.vscode-containers ];
userSettings = {
"containers.containerClient" = "com.microsoft.visualstudio.containers.podman";
};
};
}

View File

@@ -11,13 +11,13 @@ in
options.programs.vscode = with lib; {
languages = {
c.enable = mkEnableOption "C";
docker.enable = mkEnableOption "Docker";
go.enable = mkEnableOption "Go";
java.enable = mkEnableOption "Java";
jinja.enable = mkEnableOption "Jinja";
lua.enable = mkEnableOption "Lua";
markdown.enable = mkEnableOption "Markdown";
nix.enable = mkEnableOption "Nix";
podman.enable = mkEnableOption "Podman";
python.enable = mkEnableOption "Python";
rest.enable = mkEnableOption "REST";
rust.enable = mkEnableOption "Rust";
@@ -33,13 +33,13 @@ in
imports = [
./langs/c
./langs/docker
./langs/go
./langs/java
./langs/jinja
./langs/lua
./langs/markdown
./langs/nix
./langs/podman
./langs/python
./langs/rest
./langs/rust

View File

@@ -4,24 +4,21 @@
}:
{ ... }:
{
home-manager.users.${user}.programs.vscode = {
copilot.enable = true;
languages = {
c.enable = true;
go.enable = true;
java.enable = true;
jinja.enable = true;
lua.enable = true;
markdown.enable = true;
nix.enable = true;
python.enable = true;
rest.enable = true;
rust.enable = true;
sas.enable = true;
sops.enable = true;
typescript.enable = true;
yaml.enable = true;
};
home-manager.users.${user}.programs.vscode.languages = {
c.enable = true;
go.enable = true;
java.enable = true;
jinja.enable = true;
lua.enable = true;
markdown.enable = true;
nix.enable = true;
podman.enable = true;
python.enable = true;
rest.enable = true;
rust.enable = true;
sas.enable = true;
sops.enable = true;
typescript.enable = true;
yaml.enable = true;
};
}

View File

@@ -45,11 +45,8 @@
];
};
nvidia-container-toolkit.enable = (
config.virtualisation.containerd.enable
|| config.virtualisation.docker.enable
|| config.virtualisation.podman.enable
);
nvidia-container-toolkit.enable =
config.virtualisation.containerd.enable || config.virtualisation.podman.enable;
};
boot = {
@@ -124,15 +121,14 @@
environment.persistence."/persist/state"."/etc/asusd/aura_19b6.ron" = { };
programs.gamescope.env = {
__NV_PRIME_RENDER_OFFLOAD = "1";
__VK_LAYER_NV_optimus = "NVIDIA_only";
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
};
home-manager.sharedModules = [
{
wayland.windowManager.hyprland.settings.env = [ "AQ_DRM_DEVICES,/dev/dri/card0:/dev/dri/card1" ];
wayland.windowManager.hyprland.settings.env = [
"AQ_DRM_DEVICES,/dev/dri/card0:/dev/dri/card1"
"__NV_PRIME_RENDER_OFFLOAD,1"
"__VK_LAYER_NV_optimus,NVIDIA_only"
"__GLX_VENDOR_LIBRARY_NAME,nvidia"
];
theme = {
template.".config/asusctl/keyboard".source =

View File

@@ -11,6 +11,7 @@
lua.enable = true;
markdown.enable = true;
nix.enable = true;
podman.enable = true;
python.enable = true;
rest.enable = true;
rust.enable = true;

View File

@@ -41,11 +41,8 @@
];
};
nvidia-container-toolkit.enable = (
config.virtualisation.containerd.enable
|| config.virtualisation.docker.enable
|| config.virtualisation.podman.enable
);
nvidia-container-toolkit.enable =
config.virtualisation.containerd.enable || config.virtualisation.docker.enable;
};
boot = {