feat: a bunch of changes i forgot to commit
This commit is contained in:
parent
57c72d9ac7
commit
8141140de9
21 changed files with 2871 additions and 186 deletions
|
@ -13,5 +13,8 @@
|
|||
./xonsh.nix
|
||||
./aliases.nix
|
||||
./libvirt.nix
|
||||
./users.nix
|
||||
./support.nix
|
||||
./river.nix
|
||||
];
|
||||
}
|
||||
|
|
33
computers/shared/river.nix
Normal file
33
computers/shared/river.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{config, lib, pkgs, ...}: let
|
||||
cfg = config.alqueva.river;
|
||||
in {
|
||||
options.alqueva.river = {
|
||||
enable = lib.mkEnableOption "River";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
alqueva.support.wayland = true;
|
||||
|
||||
programs.river = {
|
||||
enable = true;
|
||||
xwayland.enable = false;
|
||||
extraPackages = [
|
||||
pkgs.swaybg
|
||||
pkgs.kanshi
|
||||
];
|
||||
};
|
||||
|
||||
xdg.portal.wlr = {
|
||||
enable = true;
|
||||
settings = {
|
||||
screencast = {
|
||||
output_name = "HDMI-A-1";
|
||||
chooser_type = "simple";
|
||||
chooser_cmd = "${pkgs.slurp}/bin/slurp -f %o -or";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
};
|
||||
}
|
|
@ -10,7 +10,10 @@ in {
|
|||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.ssh.enableAskPassword = true;
|
||||
programs = {
|
||||
ssh.enableAskPassword = true;
|
||||
seahorse.enable = true;
|
||||
};
|
||||
services.openssh.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
40
computers/shared/support.nix
Normal file
40
computers/shared/support.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
{config, lib, pkgs, ...}: let
|
||||
cfg = config.alqueva.support;
|
||||
inherit (lib) mkEnableOption;
|
||||
in {
|
||||
options.alqueva.support = {
|
||||
wayland = mkEnableOption "wayland support";
|
||||
};
|
||||
config = lib.mkIf cfg.wayland {
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
config.common = {
|
||||
default = [
|
||||
"gtk"
|
||||
"kde"
|
||||
];
|
||||
};
|
||||
extraPortals = [
|
||||
pkgs.xdg-desktop-portal-gtk
|
||||
pkgs.xdg-desktop-portal-kde
|
||||
];
|
||||
};
|
||||
|
||||
environment = {
|
||||
systemPackages = builtins.attrValues {
|
||||
inherit (pkgs)
|
||||
slurp
|
||||
grim
|
||||
wf-recorder
|
||||
fuzzel
|
||||
alacritty
|
||||
wl-clipboard
|
||||
;
|
||||
};
|
||||
sessionVariables = {
|
||||
"NIXOS_OZONE_WL" = "1";
|
||||
"QT_QPA_PLATFORM" = "wayland";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
51
computers/shared/users.nix
Normal file
51
computers/shared/users.nix
Normal file
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) types mkOption;
|
||||
createTmpfilesEntries = entries: builtins.attrValues (builtins.mapAttrs (dest: path: "L+ %h/${dest} - - - - ${path}") entries);
|
||||
cfg = config.alqueva.users;
|
||||
in {
|
||||
options.alqueva.users = mkOption {
|
||||
description = "Users to have on the system.";
|
||||
default = {};
|
||||
type = types.attrsOf (types.submodule {
|
||||
options = {
|
||||
tmpfiles = mkOption {
|
||||
description = "tmpfiles";
|
||||
type = types.attrsOf types.path;
|
||||
default = {};
|
||||
};
|
||||
packages = mkOption {
|
||||
type = types.listOf types.package;
|
||||
default = [];
|
||||
description = "Packages installed to the the defined user.";
|
||||
};
|
||||
groups = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [];
|
||||
description = "Groups to add the defined user to.";
|
||||
};
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
config = {
|
||||
users.users =
|
||||
builtins.mapAttrs (user: ucfg: {
|
||||
description = user;
|
||||
isNormalUser = true;
|
||||
extraGroups = ucfg.groups;
|
||||
inherit (ucfg) packages;
|
||||
shell = config.programs.xonsh.package;
|
||||
})
|
||||
cfg;
|
||||
|
||||
systemd.user.tmpfiles.users =
|
||||
builtins.mapAttrs (_: ucfg: {
|
||||
rules = createTmpfilesEntries ucfg.tmpfiles;
|
||||
})
|
||||
cfg;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue