Compare commits

...

2 commits

Author SHA1 Message Date
Ingolf Wagner
286e6d7578
📦 add ferdium
All checks were successful
Build all NixOS Configurations / nix build (push) Successful in 12m51s
2024-10-23 00:20:17 +09:00
Ingolf Wagner
b201ee77c0
📦 add navi 2024-10-23 00:20:05 +09:00
3 changed files with 54 additions and 1 deletions

View file

@ -23,7 +23,9 @@ with lib;
gimoji
tldr
#tldr
tealdeer
navi # cheatsheet manager
bandwhich # todo : put this to common/networking.nix

View file

@ -23,6 +23,8 @@
./ssh-chungus.nix
./ssh-cherry.nix
./ferdium.nix
];
#time.timeZone = lib.mkForce "Asia/Bangkok";

View file

@ -0,0 +1,49 @@
{
config,
pkgs,
lib,
...
}:
with lib;
let
ferdium = pkgs.writeShellScriptBin "ferdium" ''
/var/run/wrappers/bin/sudo -u ferdium -i ${pkgs.ferdium}/bin/ferdium $@
'';
in
{
environment.systemPackages = [
ferdium
(pkgs.makeDesktopItem {
terminal = false;
exec = "${ferdium}/bin/ferdium";
name = "ferdium";
desktopName = "Ferdium";
icon = "${pkgs.ferdium}/share/icons/hicolor/512x512/apps/ferdium.png";
})
pkgs.xorg.xhost
];
users.users.ferdium = {
isNormalUser = false;
isSystemUser = true;
home = "/home/ferdium";
createHome = true;
extraGroups = [
"audio"
"input"
"video"
"pipewire"
];
group = "ferdium";
shell = pkgs.bashInteractive;
};
users.groups.ferdium = { };
security.sudo.extraConfig = ''
${config.users.extraUsers.mainUser.name} ALL=(ferdium) NOPASSWD: ALL
'';
}