From 11f6a9b73664b3ffb30ea89ee9c42286fa5a8bcd Mon Sep 17 00:00:00 2001 From: Uttarayan Mondal Date: Tue, 14 May 2024 02:08:59 +0530 Subject: [PATCH] feat: Add sketchybar and format --- common/home.nix | 2 ++ flake.lock | 2 +- linux/gtk.nix | 6 +++++- macos/default.nix | 9 +++++++++ macos/sketchybar.nix | 4 ++++ modules/default.nix | 15 ++++++++++----- modules/sketchybar.nix | 23 +++++++++++++++++++++++ neovim/nvim.nix | 3 +-- nixos/ryu.nix | 2 +- 9 files changed, 56 insertions(+), 10 deletions(-) create mode 100644 macos/default.nix create mode 100644 macos/sketchybar.nix create mode 100644 modules/sketchybar.nix diff --git a/common/home.nix b/common/home.nix index d3019422..a2f32ce4 100644 --- a/common/home.nix +++ b/common/home.nix @@ -47,6 +47,7 @@ in { ../modules ] ++ lib.optionals device.isLinux [../linux] + # ++ lib.optionals.device.isMac [../macos] ++ lib.optionals device.isServer [../server]; home.packages = with pkgs; @@ -121,6 +122,7 @@ in { }; programs = { + sketchybar.enable = true; atuin = { settings = { auto_sync = true; diff --git a/flake.lock b/flake.lock index f8ecc9bf..0c81a98c 100644 --- a/flake.lock +++ b/flake.lock @@ -1498,7 +1498,7 @@ }, "locked": { "lastModified": 1, - "narHash": "sha256-IgVjk0l4snGVpLlanIC43+qQx/AKMuVv0JBoCZy7oxA=", + "narHash": "sha256-JVbSYTJfcy9GUhEuD9PSXvgnHc5QwQIFQkf/xu9r0vI=", "path": "./neovim", "type": "path" }, diff --git a/linux/gtk.nix b/linux/gtk.nix index 5a88832a..7fc95a00 100644 --- a/linux/gtk.nix +++ b/linux/gtk.nix @@ -1,4 +1,8 @@ -{pkgs, device, ...}: { +{ + pkgs, + device, + ... +}: { gtk = { enable = device.hasGui; theme = { diff --git a/macos/default.nix b/macos/default.nix new file mode 100644 index 00000000..93b953e6 --- /dev/null +++ b/macos/default.nix @@ -0,0 +1,9 @@ +{ + pkgs, + device, + ... +}: { + # imports = [ + # # ./sketchybar.nix + # ]; +} diff --git a/macos/sketchybar.nix b/macos/sketchybar.nix new file mode 100644 index 00000000..61867435 --- /dev/null +++ b/macos/sketchybar.nix @@ -0,0 +1,4 @@ +{pkgs, ...}: { + programs.sketchybar = { + }; +} diff --git a/modules/default.nix b/modules/default.nix index 12cd696a..2a62b038 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -1,6 +1,11 @@ -{...}: { - imports = [ - ./goread.nix - ./hyprpaper.nix - ]; +{ + pkgs, + lib, + ... +}: { + imports = [ + ./goread.nix + ./hyprpaper.nix + ./sketchybar.nix + ]; } diff --git a/modules/sketchybar.nix b/modules/sketchybar.nix new file mode 100644 index 00000000..af36d94b --- /dev/null +++ b/modules/sketchybar.nix @@ -0,0 +1,23 @@ +{ + pkgs, + config, + lib, + ... +}: +with lib; let + cfg = config.programs.sketchybar; +in { + options = { + programs.sketchybar = { + enable = mkEnableOption "sketchybar - a status bar for macOS"; + # config = with types; { + # }; + }; + }; + config = { + home.packages = mkIf cfg.enable [pkgs.sketchybar]; + # home.file = { + # ".config/sketchybar/sketchybarrc".text = ""; + # }; + }; +} diff --git a/neovim/nvim.nix b/neovim/nvim.nix index 714d53ff..10b7b5ab 100644 --- a/neovim/nvim.nix +++ b/neovim/nvim.nix @@ -516,8 +516,7 @@ in rec { -- your options here }) else - vim.o.guifont = "Monaspace Krypton:h13" - -- vim.o.guifont = "Hasklug Nerd Font Mono:h13" + vim.o.guifont = "Hasklug Nerd Font Mono:h13" vim.g.neovide_cursor_vfx_mode = "railgun" end diff --git a/nixos/ryu.nix b/nixos/ryu.nix index 4095518c..a5241fb7 100644 --- a/nixos/ryu.nix +++ b/nixos/ryu.nix @@ -73,7 +73,7 @@ device = "/dev/disk/by-uuid/64099f91-d4d6-44fa-92d4-9e905b3e7829"; fsType = "ext4"; neededForBoot = true; - options = [ "noatime" ]; + options = ["noatime"]; }; fileSystems."/boot" = {