main
  1{inputs, ...}: {
  2  flake-file.inputs.noctalia = {
  3    url = "github:noctalia-dev/noctalia";
  4    inputs.nixpkgs.follows = "nixpkgs";
  5  };
  6
  7  den.aspects.desktop.env.shell.noctalia = {
  8    persistHome = {config, ...}: {
  9      directories = [
 10        "${config.xdg.stateHome}/noctalia"
 11      ];
 12    };
 13
 14    homeManager = {
 15      user,
 16      config,
 17      ...
 18    }: {
 19      imports = [inputs.noctalia.homeModules.default];
 20
 21      programs.noctalia = {
 22        enable = true;
 23
 24        settings = {
 25          battery.warning_threshold = 20;
 26          notification.layer = "overlay";
 27          osd.position_vertical = "top_right";
 28          shell = {
 29            avatar_path = "/var/lib/AccountsService/icons/${user.userName}.png";
 30            lang = "zh_CN.UTF-8";
 31            panel = {
 32              open_near_click_control_center = true;
 33              transparency_mode = "glass";
 34            };
 35            screenshot = {
 36              directory = "${config.xdg.userDirs.pictures}/Screenshots";
 37              filename_pattern = "Screenshot_%Y-%m-%d_%H-%M-%S";
 38            };
 39          };
 40          bar = {
 41            order = ["default"];
 42            default = {
 43              background_opacity = 0.9;
 44              margin_edge = 8;
 45              margin_ends = 8;
 46              radius = 14;
 47              start = ["launcher" "privacy" "media"];
 48              center = ["workspaces"];
 49              end = [
 50                "tray"
 51                "notifications"
 52                "clipboard"
 53                "network"
 54                "bluetooth"
 55                "volume"
 56                "brightness"
 57                "battery"
 58                "clock"
 59                "control-center"
 60              ];
 61            };
 62          };
 63          widget = {
 64            battery = {
 65              display_mode = "graphic";
 66              show_label = false;
 67            };
 68            brightness.show_label = false;
 69            clock = {
 70              capsule = true;
 71              capsule_opacity = 0.9;
 72              capsule_padding = 10.0;
 73              format = "{:%Y-%m-%d %H:%M}";
 74            };
 75            control-center = {
 76              capsule = true;
 77              capsule_opacity = 0.9;
 78            };
 79            launcher = {
 80              capsule = true;
 81              capsule_opacity = 0.9;
 82            };
 83            media = {
 84              capsule = true;
 85              capsule_opacity = 0.9;
 86            };
 87            network.show_label = false;
 88            privacy = {
 89              capsule = true;
 90              capsule_opacity = 0.9;
 91            };
 92            tray = {drawer = true;};
 93            volume.show_label = false;
 94            workspaces.hide_when_empty = true;
 95          };
 96        };
 97      };
 98    };
 99  };
100
101  den.aspects.desktop.env.shell.noctalia.themes = {
102    catppuccin = {
103      homeManager = {pkgs, ...}: {
104        programs.noctalia = {
105          settings = {
106            theme = {
107              source = "builtin";
108              builtin = "Catppuccin";
109            };
110            wallpaper.default = pkgs.nixos-artwork.wallpapers.catppuccin-mocha;
111          };
112        };
113      };
114    };
115  };
116}