From c5dda60b3aeb87cfa80698366476aaf3aa999d9a Mon Sep 17 00:00:00 2001 From: bricked Date: Wed, 3 Jul 2024 08:44:43 +0200 Subject: [PATCH] personal: add user --- configs/home/personal/default.nix | 46 +++++++++++++++++++++++++ configs/nixos/desktop/default.nix | 5 +++ modules/home/ags/default.nix | 2 +- modules/home/ags/package.json | 2 +- modules/home/ags/widget/Bar.ts | 2 +- modules/home/ags/widget/PowerMenu.ts | 20 +++++------ modules/home/ags/widget/VolumeSlider.ts | 10 +++--- 7 files changed, 70 insertions(+), 17 deletions(-) create mode 100644 configs/home/personal/default.nix diff --git a/configs/home/personal/default.nix b/configs/home/personal/default.nix new file mode 100644 index 0000000..148095d --- /dev/null +++ b/configs/home/personal/default.nix @@ -0,0 +1,46 @@ +{...}: { + home = { + username = "personal"; + homeDirectory = "/home/personal"; + }; + + # Terminal + programs.zsh.enable = true; + programs.starship.enable = true; + programs.kitty.enable = true; + programs.fastfetch.enable = true; + programs.git = { + enable = true; + extraConfig = { + push.autoSetupRemote = true; + pull.rebase = true; + }; + }; + programs.gh.enable = true; + + # Desktop environment + wayland.windowManager.hyprland = { + enable = true; + settings.input.kb_layout = "de"; + }; + programs.wpaperd.enable = true; + programs.ags.enable = true; + programs.rofi = { + enable = true; + keybind.enable = true; + }; + services.cliphist.enable = true; + + # Editor + programs.nixvim = { + enable = true; + defaultEditor = true; + }; + + # Music + programs.spotify-player.enable = true; + programs.cava.enable = true; + + # Apps + programs.librewolf.enable = true; +} diff --git a/configs/nixos/desktop/default.nix b/configs/nixos/desktop/default.nix index 90de211..a753a63 100644 --- a/configs/nixos/desktop/default.nix +++ b/configs/nixos/desktop/default.nix @@ -46,6 +46,11 @@ description = "Bricked"; extraGroups = ["networkmanager" "wheel"]; }; + personal = { + isNormalUser = true; + description = "Personal"; + extraGroups = ["networkmanager" "wheel"]; + }; john = { isNormalUser = true; description = "John"; diff --git a/modules/home/ags/default.nix b/modules/home/ags/default.nix index 115f668..c1222d7 100644 --- a/modules/home/ags/default.nix +++ b/modules/home/ags/default.nix @@ -13,7 +13,7 @@ in { configDir = pkgs.buildNpmPackage { name = "ags-dots"; src = ./.; - npmDepsHash = "sha256-0Phl7IrrKSd8j4yQ3nefJ4xT/QgrvDnlN68G7bDHCfE="; + npmDepsHash = "sha256-0Phl7IrrKSd8j4yQ3nefJ4xT/QgrvDnlN68G7bDHCfE="; nativeBuildInputs = with pkgs; [bun]; postPatch = '' diff --git a/modules/home/ags/package.json b/modules/home/ags/package.json index 416ebb5..6759925 100644 --- a/modules/home/ags/package.json +++ b/modules/home/ags/package.json @@ -1,6 +1,6 @@ { "name": "@bricked/ags-dots", - "version": "0.1.0", + "version": "0.1.0", "module": "src/index.ts", "devDependencies": { "@types/bun": "latest", diff --git a/modules/home/ags/widget/Bar.ts b/modules/home/ags/widget/Bar.ts index 8e90baf..b658214 100644 --- a/modules/home/ags/widget/Bar.ts +++ b/modules/home/ags/widget/Bar.ts @@ -30,7 +30,7 @@ export const End = () => Widget.Box({ hexpand: true, hpack: "end", - children: [VolumeSlider(), PowerMenu()] + children: [VolumeSlider(), PowerMenu()], }); export const Bar = (monitor = 0) => diff --git a/modules/home/ags/widget/PowerMenu.ts b/modules/home/ags/widget/PowerMenu.ts index bc3d398..8910a78 100644 --- a/modules/home/ags/widget/PowerMenu.ts +++ b/modules/home/ags/widget/PowerMenu.ts @@ -1,13 +1,13 @@ -export const PowerButton = (command: string, icon: string) => Widget.Button({ - onClicked: () => Utils.exec(command), - child: Widget.Icon(icon) -}) +export const PowerButton = (command: string, icon: string) => + Widget.Button({ + onClicked: () => Utils.exec(command), + child: Widget.Icon(icon), + }); -export const PowerMenu = () => Widget.Box({ - className: "powermenu", - children: [ - PowerButton("shutdown now", "nixos-symbolic") - ] -}) +export const PowerMenu = () => + Widget.Box({ + className: "powermenu", + children: [PowerButton("shutdown now", "nixos-symbolic")], + }); export default PowerMenu; diff --git a/modules/home/ags/widget/VolumeSlider.ts b/modules/home/ags/widget/VolumeSlider.ts index e3398ab..a4c20ce 100644 --- a/modules/home/ags/widget/VolumeSlider.ts +++ b/modules/home/ags/widget/VolumeSlider.ts @@ -2,11 +2,13 @@ const audio = await Service.import("audio"); export const VolumeSlider = (type: "speaker" | "microphone" = "speaker") => Widget.Box({ - className: "volume-slider", + className: "volume-slider", children: [ - Widget.Label({ - label: audio[type].bind("volume").transform(v => Math.round(v * 100).toString()), - }), + Widget.Label({ + label: audio[type] + .bind("volume") + .transform((v) => Math.round(v * 100).toString()), + }), Widget.Slider({ className: "slider", hexpand: true,