formatted everything, things are looking nice now.

This commit is contained in:
Charlie Root 2024-05-15 00:14:59 +02:00
commit d2d4054aa5
57 changed files with 2269 additions and 2311 deletions

View file

@ -1,7 +1 @@
_: {
imports = [
./pipewire.nix
./ssh.nix
./greetd.nix
];
}
_: { imports = [ ./pipewire.nix ./ssh.nix ./greetd.nix ]; }

View file

@ -1,46 +1,56 @@
{ config, inputs, lib, pkgs, ... }:
with lib; let
cfg = config.modules.services.greetd;
inherit (config.modules.other.system) username;
with lib;
let
cfg = config.modules.services.greetd;
inherit (config.modules.other.system) username;
hyprlandConfig = pkgs.writeText "greetd-hyprland-config" ''
misc {
force_default_wallpaper=0
focus_on_activate=1
}
hyprlandConfig = pkgs.writeText "greetd-hyprland-config" ''
misc {
force_default_wallpaper=0
focus_on_activate=1
}
animations {
enabled=0
first_launch_animation=0
}
animations {
enabled=0
first_launch_animation=0
}
workspace=1,default:true,gapsout:0,gapsin:0,border:false,decorate:false
workspace=1,default:true,gapsout:0,gapsin:0,border:false,decorate:false
#exec-once=[workspace 1;fullscreen;noanim] ${pkgs.greetd.${cfg.greeter}}/bin/${cfg.greeter} -l; ${inputs.hyprland.packages.${pkgs.system}.hyprland}/bin/hyprctl dispatch exit
#exec-once=${inputs.hyprland.packages.${pkgs.system}.hyprland}/bin/hyprctl dispatch focuswindow ${cfg.greeter}
'';
#exec-once=[workspace 1;fullscreen;noanim] ${
pkgs.greetd.${cfg.greeter}
}/bin/${cfg.greeter} -l; ${
inputs.hyprland.packages.${pkgs.system}.hyprland
}/bin/hyprctl dispatch exit
#exec-once=${
inputs.hyprland.packages.${pkgs.system}.hyprland
}/bin/hyprctl dispatch focuswindow ${cfg.greeter}
'';
in {
options.modules.services.greetd = {
enable = mkEnableOption "greetd";
greeter = mkOption {
description = "greetd frontend to use";
type = types.str;
};
launchOptions = mkOption {
description = "/etc/greetd/environments as list of strings";
type = with types; listOf str;
};
options.modules.services.greetd = {
enable = mkEnableOption "greetd";
greeter = mkOption {
description = "greetd frontend to use";
type = types.str;
};
launchOptions = mkOption {
description = "/etc/greetd/environments as list of strings";
type = with types; listOf str;
};
};
config = mkIf cfg.enable {
services.greetd = {
enable = true;
settings.default_session = {
command = "${
inputs.hyprland.packages.${pkgs.system}.hyprland
}/bin/Hyprland --config ${hyprlandConfig}";
user = username;
};
};
config = mkIf cfg.enable {
services.greetd = {
enable = true;
settings.default_session = {
command = "${inputs.hyprland.packages.${pkgs.system}.hyprland}/bin/Hyprland --config ${hyprlandConfig}";
user = username;
};
};
environment.etc."greetd/environments".text = concatStringsSep "\n" cfg.launchOptions;
};
environment.etc."greetd/environments".text =
concatStringsSep "\n" cfg.launchOptions;
};
}

View file

@ -1,6 +1,6 @@
{ config, lib, ... }:
with lib; let
cfg = config.modules.services.pipewire;
with lib;
let cfg = config.modules.services.pipewire;
in {
options.modules.services.pipewire.enable = mkEnableOption "pipewire";

View file

@ -1,14 +1,11 @@
{ config, lib, pkgs, ... }:
with lib; let
cfg = config.modules.programs.ssh;
username = config.modules.other.system.username;
in {
options.modules.programs.ssh.enable = mkEnableOption "ssh";
with lib;
let
cfg = config.modules.programs.ssh;
username = config.modules.other.system.username;
in {
options.modules.programs.ssh.enable = mkEnableOption "ssh";
config = mkIf cfg.enable {
programs.ssh = {
startAgent = true;
};
};
config = mkIf cfg.enable { programs.ssh = { startAgent = true; }; };
}
}