From 0545051a1b252579cdc1a55a2478d370b4b41a3a Mon Sep 17 00:00:00 2001 From: Leyla Becker Date: Tue, 3 Sep 2024 00:16:33 -0500 Subject: [PATCH] added thin user option to leyla --- hosts/defiant/configuration.nix | 2 +- users/leyla/default.nix | 8 +- users/leyla/home.nix | 29 -------- users/leyla/packages.nix | 126 ++++++++++++++------------------ 4 files changed, 64 insertions(+), 101 deletions(-) diff --git a/hosts/defiant/configuration.nix b/hosts/defiant/configuration.nix index b5276c8..123d612 100644 --- a/hosts/defiant/configuration.nix +++ b/hosts/defiant/configuration.nix @@ -17,10 +17,10 @@ sops.age.keyFile = "/home/leyla/.config/sops/age/keys.txt"; users.leyla.isNormalUser = true; + users.leyla.isThinInstallation = true; users.ester.isNormalUser = false; users.eve.isNormalUser = false; - boot.loader.grub = { enable = true; device = "/dev/sda"; diff --git a/users/leyla/default.nix b/users/leyla/default.nix index 41daeb2..78a9261 100644 --- a/users/leyla/default.nix +++ b/users/leyla/default.nix @@ -9,6 +9,7 @@ in options.users.leyla = { isNormalUser = lib.mkEnableOption "create usable leyla user"; + isThinInstallation = lib.mkEnableOption "are most programs going to be installed or not"; hasPiperMouse = lib.mkEnableOption "install programs for managing piper supported mouses"; hasOpenRGBHardware = lib.mkEnableOption "install programs for managing openRGB supported hardware"; hasViaKeyboard = lib.mkEnableOption "install programs for managing via supported keyboards"; @@ -35,7 +36,12 @@ in ( if cfg.isNormalUser then { isNormalUser = true; - extraGroups = [ "networkmanager" "wheel" "adbusers" "docker" ]; + extraGroups = lib.mkMerge [ + ["networkmanager" "wheel" "docker"] + ( + lib.mkIf (!cfg.isThinInstallation) [ "adbusers" ] + ) + ]; hashedPasswordFile = config.sops.secrets."passwords/leyla".path; } else { diff --git a/users/leyla/home.nix b/users/leyla/home.nix index dd9b57e..1ae0057 100644 --- a/users/leyla/home.nix +++ b/users/leyla/home.nix @@ -120,33 +120,4 @@ }; }; }; - - # dconf.settings = { - # "org/gnome/settings-daemon/plugins/media-keys" = { - # custom-keybindings = [ - # "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/" - # ]; - # }; - # }; - - # "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = { - # binding = "t"; - # command = "kgx"; - # name = "Open Terminal"; - # }; - - - # services.xserver.desktopManager.gnome3 = { - # extraGSettingsOverridePackages = with pkgs; [ gnome3.gnome-settings-daemon ]; - # extraGSettingsOverrides = '' - # [org.gnome.settings-daemon.plugins.media-keys] - # custom-keybindings=['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/'] - - - # [org.gnome.settings-daemon.plugins.media-keys.custom-keybindings.custom0] - # binding='t' - # command='kgx' - # name='Open terminal' - # ''; - # } } diff --git a/users/leyla/packages.nix b/users/leyla/packages.nix index 2266dd1..d6e39b4 100644 --- a/users/leyla/packages.nix +++ b/users/leyla/packages.nix @@ -27,79 +27,65 @@ in ]; users.users.leyla.packages = lib.mkIf cfg.isNormalUser ( - with pkgs; [ - #foss platforms - signal-desktop - bitwarden - firefox - ungoogled-chromium - libreoffice - inkscape - gimp - krita - freecad - # cura - kicad-small - makemkv - transmission_4-gtk - onionshare - easytag - # rhythmbox - (lib.mkIf cfg.hasGPU obs-studio) - # wireshark - # rpi-imager - # fritzing + lib.mkMerge [ + ( + with pkgs; [ + # comand line tools + yt-dlp + ffmpeg + imagemagick + ] + ) + ( + lib.mkIf (!cfg.isThinInstallation) ( + with pkgs; [ + #foss platforms + signal-desktop + bitwarden + firefox + ungoogled-chromium + libreoffice + inkscape + gimp + krita + freecad + # cura + kicad-small + makemkv + transmission_4-gtk + onionshare + easytag + # rhythmbox + (lib.mkIf cfg.hasGPU obs-studio) + # wireshark + # rpi-imager + # fritzing - # comand line tools - yt-dlp - ffmpeg - imagemagick + # proprietary platforms + discord + obsidian + steam + (lib.mkIf cfg.hasGPU davinci-resolve) + + # development tools + vscodium + androidStudioPackages.canary + jetbrains.idea-community + dbeaver-bin + bruno - # proprietary platforms - discord - obsidian - steam - (lib.mkIf cfg.hasGPU davinci-resolve) - - # development tools - vscodium - androidStudioPackages.canary - jetbrains.idea-community - dbeaver-bin - bruno + # system tools + protonvpn-gui + nextcloud-client + noisetorch - # system tools - protonvpn-gui - nextcloud-client - noisetorch - - # hardware managment tools - (lib.mkIf cfg.hasPiperMouse piper) - (lib.mkIf cfg.hasOpenRGBHardware openrgb) - (lib.mkIf cfg.hasViaKeyboard via) - - # # gaming - # # emulators - # # nintendo - # # TODO: replace this with self hosted flake - # # (lib.mkIf cfg.hasGPU yuzu-mainline) # Switch Emulator - # # TODO: replace this with self hosted flake - # # citra-canary # 3DS emulator - # (lib.mkIf cfg.hasGPU cemu) # Wii-U emulator - # dolphin-emu # GameCube and Wii Emulator - # desmume # DS Emulator - # mupen64plus # N64 Emulator - # zsnes # SNES Emulator - # vbam # Game Boy Advanced Emulator - # fceux # NES Emulator - # # play station - # rpcs3 # PS3 Emulator - # pcsx2 # PS2 Emulator - # pcsxr # PS1 Emulator - # # TODO: more play station emulators here when they come out - # #misc - # stella # Atari 2600 Emulator - # mame # mame Emulator + # hardware managment tools + (lib.mkIf cfg.hasPiperMouse piper) + (lib.mkIf cfg.hasOpenRGBHardware openrgb) + (lib.mkIf cfg.hasViaKeyboard via) + ] + ) + ) ] ); } \ No newline at end of file