Skip to content

Commit

Permalink
nix-colors + convert desktop addons to home modules
Browse files Browse the repository at this point in the history
  • Loading branch information
hzmmohamed committed Jan 6, 2024
1 parent fe1c55d commit a8130f4
Show file tree
Hide file tree
Showing 22 changed files with 210 additions and 203 deletions.
6 changes: 4 additions & 2 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
- [ ] Migrate VSCodium declaration from HM to https://github.com/nix-community/nix-vscode-extensions
- [ ] Add the Copy Relative Path and Line Numbers extension to VSCode
- [ ] Add samba shares using plusultra samba module
- [ ] Add wofi-emoji
- [x] Add wofi-emoji
- [ ] Add bitwarden wofi interace
- [ ] Migrate changes in vscode config from old repo again
- [ ] Test decreasing value of accelSpeed
- [x] Set up Lens
- [ ] Replace flameshot with shotman or grim+slurp commands or swappy https://discourse.nixos.org/t/screenshots-on-hyprland-on-nixos/29055/6?u=hfahmi
Expand All @@ -22,7 +21,10 @@
- [ ] Fix DBeaver GTK issues
- [ ] Ricing
- [ ] Downgrade Obsidian to latest working version
- [ ] Zellij
- kde connect
- Collect TODOs comments in the repo
-
- Add K8s setup

- Codium extensions:
Expand Down
51 changes: 51 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
# NixPkgs Unstable (nixos-unstable)
unstable.url = "github:nixos/nixpkgs/nixos-unstable";

nix-colors.url = "github:misterio77/nix-colors";

# Home Manager (release-23.11)
home-manager.url = "github:nix-community/home-manager/release-23.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
Expand Down Expand Up @@ -132,6 +134,10 @@
sops-nix.nixosModules.sops
];

homes.users."hfahmi@nixos".modules = with inputs; [
nix-colors.homeManagerModules.default
];

# deploy = lib.mkDeploy {inherit (inputs) self;};

# checks =
Expand Down
25 changes: 25 additions & 0 deletions homes/x86_64-linux/hfahmi@nixos/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
lib,
pkgs,
config,
osConfig ? {},
format ? "unknown",
inputs,
...
}:
with lib;
with lib.plusultra; {
colorScheme = inputs.nix-colors.colorSchemes.gruvbox-light-hard;
caramelmint = {
desktop = {
addons = {
alacritty = enabled;
gammastep = enabled;
mako = enabled;
wofi = enabled;
kanshi = enabled;
waybar = enabled;
};
};
};
}
55 changes: 55 additions & 0 deletions modules/home/desktop/addons/alacritty/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
options,
config,
lib,
pkgs,
inputs,
...
}:
with lib;
with lib.plusultra; let
cfg = config.caramelmint.desktop.addons.alacritty;
in {
options.caramelmint.desktop.addons.alacritty = with types; {
enable = mkBoolOpt false "Whether or not to enable and configure alacritty.";
defaultTerm = mkBoolOpt false "Whether to make the default terminal for WM.";
};

config = mkIf cfg.enable {
programs.alacritty = {
enable = true;
settings = {
colors = with config.colorScheme.colors; {
bright = {
black = "0x${base00}";
blue = "0x${base0D}";
cyan = "0x${base0C}";
green = "0x${base0B}";
magenta = "0x${base0E}";
red = "0x${base08}";
white = "0x${base06}";
yellow = "0x${base09}";
};
cursor = {
cursor = "0x${base06}";
text = "0x${base06}";
};
normal = {
black = "0x${base00}";
blue = "0x${base0D}";
cyan = "0x${base0C}";
green = "0x${base0B}";
magenta = "0x${base0E}";
red = "0x${base08}";
white = "0x${base06}";
yellow = "0x${base0A}";
};
primary = {
background = "0x${base00}";
foreground = "0x${base06}";
};
};
};
};
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@ in {
};

config = mkIf cfg.enable {
caramelmint.home.extraOptions = {
services.clipmenu = {
enable = true;
launcher = "rofi";
};
services.clipmenu = {
enable = true;
launcher = "${pkgs.wofi}/bin/wofi";
};
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,12 @@ in {
};

config = mkIf cfg.enable {
caramelmint.home.extraOptions = {
services.gammastep = {
#https://nixos.wiki/wiki/gamma-step
enable = true;
tray = true;
dawnTime = "05:00";
duskTime = "19:00";
};
services.gammastep = {
#https://nixos.wiki/wiki/gamma-step
enable = true;
tray = true;
dawnTime = "05:00";
duskTime = "19:00";
};
};
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,24 @@
with lib;
with lib.plusultra; let
cfg = config.caramelmint.desktop.addons.kanshi;
user = config.caramelmint.user;
home = config.users.users.${user.name}.home;
in {
options.caramelmint.desktop.addons.kanshi = with types; {
enable =
mkBoolOpt false "Whether to enable Kanshi in the desktop environment.";
};

config = mkIf cfg.enable {
caramelmint.home.configFile."kanshi/config".source = ./config;

environment.systemPackages = with pkgs; [kanshi];
xdg.configFile."kanshi/config".source = ./config;

# configuring kanshi
systemd.user.services.kanshi = {
description = "Kanshi output autoconfig ";
wantedBy = ["graphical-session.target"];
partOf = ["graphical-session.target"];
environment = {XDG_CONFIG_HOME = "${home}/.config";};
serviceConfig = {
Unit = {
Description = "Kanshi output autoconfig ";
WantedBy = ["graphical-session.target"];
PartOf = ["graphical-session.target"];
};

Service = {
ExecCondition = ''
${pkgs.bash}/bin/bash -c '[ -n "$WAYLAND_DISPLAY" ]'
'';
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,17 @@ in {
};

config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [mako libnotify];
home.packages = with pkgs; [mako libnotify];

systemd.user.services.mako = {
description = "Mako notification daemon";
wantedBy = ["graphical-session.target"];
partOf = ["graphical-session.target"];
after = ["graphical-session.target"];
serviceConfig = {
Unit = {
Description = "Mako notification daemon";
WantedBy = ["graphical-session.target"];
PartOf = ["graphical-session.target"];
After = ["graphical-session.target"];
};

Service = {
Type = "dbus";
BusName = "org.freedesktop.Notifications";

Expand All @@ -43,6 +46,6 @@ in {
};
};

caramelmint.home.configFile."mako/config".source = ./config;
xdg.configFile."mako/config".source = ./config;
};
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ in {
};

config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [waybar];
home.packages = with pkgs; [waybar];

# TODO: Will leave jake's config and add mine later.
caramelmint.home.configFile."waybar/config".source = ./config;
caramelmint.home.configFile."waybar/style.css".source = ./style.css;
xdg.configFile."waybar/config".source = ./config;
xdg.configFile."waybar/style.css".source = ./style.css;
};
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ in {
};

config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [wofi wofi-emoji];
home.packages = with pkgs; [wofi wofi-emoji];

# config -> .config/wofi/config
# css -> .config/wofi/style.css
# colors -> $XDG_CACHE_HOME/wal/colors
# caramelmint.home.configFile."foot/foot.ini".source = ./foot.ini;
caramelmint.home.configFile."wofi/config".source = ./config;
caramelmint.home.configFile."wofi/style.css".source = ./style.css;
# xdg.configFile."foot/foot.ini".source = ./foot.ini;
xdg.configFile."wofi/config".source = ./config;
xdg.configFile."wofi/style.css".source = ./style.css;
};
}
File renamed without changes.
Loading

0 comments on commit a8130f4

Please sign in to comment.