Skip to content

Commit

Permalink
refactor: Many Packages
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanmoy committed Jun 21, 2024
1 parent 0b6e5e6 commit 900bd8b
Show file tree
Hide file tree
Showing 11 changed files with 117 additions and 43 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions flake.lock

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

7 changes: 5 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
outputs = {
self,
nixpkgs,
nixpkgs-unstable,
home-manager,
...
} @ inputs: let
Expand All @@ -32,6 +33,8 @@
# This is a function that generates an attribute by calling a function you
# pass to it, with each system as an argument
forAllSystems = nixpkgs.lib.genAttrs systems;

pkgs-unstable = nixpkgs-unstable.legacyPackages.aarch64-linux;
in {
# Your custom packages
# Accessible through 'nix build', 'nix shell', etc
Expand All @@ -53,7 +56,7 @@
# Available through 'nixos-rebuild --flake .#your-hostname'
nixosConfigurations = {
aesthetique-labs = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;};
specialArgs = {inherit pkgs-unstable inputs outputs;};
modules = [
# > Our main nixos configuration file <
./nixos/configuration.nix
Expand All @@ -66,7 +69,7 @@
homeConfigurations = {
"bryanmoy@aesthetique-labs" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.aarch64-linux; # Home-manager requires 'pkgs' instance
extraSpecialArgs = {inherit inputs outputs;};
extraSpecialArgs = {inherit pkgs-unstable inputs outputs;};
modules = [
# > Our main home-manager configuration file <
./home-manager/home.nix
Expand Down
36 changes: 20 additions & 16 deletions home-manager/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,21 @@
imports = [
# If you want to use modules your own flake exports (from modules/home-manager):
# outputs.homeManagerModules.example
outputs.homeManagerModules.ssh
outputs.homeManagerModules.git
outputs.homeManagerModules.starship
outputs.homeManagerModules.alacritty
outputs.homeManagerModules.direnv
outputs.homeManagerModules.eza
outputs.homeManagerModules.foot
outputs.homeManagerModules.git
outputs.homeManagerModules.helix
outputs.homeManagerModules.hyprland
outputs.homeManagerModules.waybar
outputs.homeManagerModules.zsh
outputs.homeManagerModules.hyprpaper
outputs.homeManagerModules.ion
outputs.homeManagerModules.nushell
outputs.homeManagerModules.direnv
outputs.homeManagerModules.eza
outputs.homeManagerModules.helix
outputs.homeManagerModules.ssh
outputs.homeManagerModules.starship
outputs.homeManagerModules.waybar
outputs.homeManagerModules.wofi
outputs.homeManagerModules.zsh

# Or modules exported from other flakes (such as nix-colors):
# inputs.nix-colors.homeManagerModules.default
Expand Down Expand Up @@ -68,19 +70,21 @@
programs.home-manager.enable = true;

modules = {
ssh.enable = true;
git.enable = true;
starship.enable = true;
alacritty.enable = true;
direnv.enable = true;
eza.enable = true;
foot.enable = true;
git.enable = true;
helix.enable = true;
hyprland.enable = true;
waybar.enable = true;
zsh.enable = true;
hyprpaper.enable = true;
ion.enable = true;
nushell.enable = true;
direnv.enable = true;
eza.enable = true;
helix.enable = true;
ssh.enable = true;
starship.enable = true;
waybar.enable = true;
wofi.enable = true;
zsh.enable = true;
};

# Nicely reload system units when changing configs
Expand Down
18 changes: 10 additions & 8 deletions modules/home-manager/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,19 @@
{
# List your module files here
# my-module = import ./my-module.nix;
ssh = import ./ssh/default.nix;
git = import ./git/default.nix;
starship = import ./starship/default.nix;
alacritty = import ./alacritty/default.nix;
direnv = import ./direnv/default.nix;
eza = import ./eza/default.nix;
foot = import ./foot.nix;
git = import ./git/default.nix;
helix = import ./helix/default.nix;
hyprland = import ./hyprland/default.nix;
waybar = import ./waybar/default.nix;
zsh = import ./zsh/default.nix;
hyprpaper = import ./hyprpaper/default.nix;
ion = import ./ion/default.nix;
nushell = import ./nushell/default.nix;
direnv = import ./direnv/default.nix;
eza = import ./eza/default.nix;
helix = import ./helix/default.nix;
ssh = import ./ssh/default.nix;
starship = import ./starship/default.nix;
waybar = import ./waybar/default.nix;
wofi = import ./wofi/default.nix;
zsh = import ./zsh/default.nix;
}
14 changes: 5 additions & 9 deletions modules/home-manager/hyprland/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ in {
# See https://wiki.hyprland.org/Configuring/Keywords/

"$terminal" = "LIBGL_ALWAYS_SOFTWARE=1 alacritty";
"$fileManager" = "yazi";
"$menu" = "wofi --show drun";
"$w1" = "hyprctl hyprpaper wallpaper \",~/.dotfiles/nixos-config/assets/wallpapers/mountains-lake-water-body-minimal-4k-hz.jpg\"";

#################
### AUTOSTART ###
Expand All @@ -42,6 +45,7 @@ in {

exec-once = [
"waybar"
"hyprpaper"
"clipse -listen"
];

Expand Down Expand Up @@ -183,7 +187,7 @@ in {
"$mainMod, down, movefocus, d"
# Switch workspaces with mainMod + [0-9]
"$mainMod, 1, workspace, 1"
# bind = $mainMod, 1, exec, $w1
"$mainMod, 1, exec, $w1"
"$mainMod, 2, workspace, 2"
"$mainMod, 3, workspace, 3"
"$mainMod, 4, workspace, 4"
Expand Down Expand Up @@ -240,13 +244,5 @@ in {
];
};
};
# home.packages = with pkgs; [
# wofi
# swaybg
# wlsunset
# wl-clipboard
# hyprland
# ];
# home.file.".config/hypr/hyprland.conf".source = ./hyprland.conf;
};
}
7 changes: 6 additions & 1 deletion modules/home-manager/hyprland/hyprland.conf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
################

# See https://wiki.hyprland.org/Configuring/Monitors/
monitor=,preferred,auto,1.333333
# monitor=,preferred,auto,1.333333
monitor=,preferred,auto,1.2
# monitor=,3840x2160,auto,auto
# monitor=,2560x1440,auto,auto
# monitor=,1800x1169,auto,auto
Expand All @@ -30,6 +31,8 @@ monitor=,preferred,auto,1.333333
$terminal = LIBGL_ALWAYS_SOFTWARE=1 alacritty
$fileManager = yazi
$menu = wofi --show drun
# $w1 = hyprctl hyprpaper wallpaper ",~/.dotfiles/nixos-config/assets/wallpapers/mountains-lake-water-body-minimal-4k-hz.jpg"
# $w1 = hyprctl hyprpaper wallpaper ""


#################
Expand All @@ -43,6 +46,7 @@ $menu = wofi --show drun
# exec-once = nm-applet &
# exec-once = waybar & hyprpaper & firefox
exec-once = waybar
# exec-once = hyprpaper

exec-once = clipse -listen

Expand Down Expand Up @@ -198,6 +202,7 @@ bind = $mainMod, down, movefocus, d

# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
# bind = $mainMod, 1, exec, $w1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
Expand Down
26 changes: 26 additions & 0 deletions modules/home-manager/hyprpaper/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
inputs,
pkgs,
lib,
config,
...
}:
with lib; let
cfg = config.modules.hyprpaper;
in {
options.modules.hyprpaper = {enable = mkEnableOption "hyprpaper";};
config = mkIf cfg.enable {
services.hyprpaper = {
enable = true;
settings = {
ipc = "on";
preload = [
"~/.dotfiles/nixos-config/assets/wallpapers/mountains-lake-water-body-minimal-4k-hz.jpg"
];
wallpaper = [
",~/.dotfiles/nixos-config/assets/wallpapers/mountains-lake-water-body-minimal-4k-hz.jpg"
];
};
};
};
}
17 changes: 17 additions & 0 deletions modules/home-manager/template/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
pkgs,
lib,
config,
...
}:
with lib; let
cfg = config.modules.{replace};
in {
options.modules.{replace} = {enable = mkEnableOption "{replace}";};
config = mkIf cfg.enable {
programs.{replace} = {
enable = true;
settings = {};
};
};
}
17 changes: 17 additions & 0 deletions modules/home-manager/wofi/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
pkgs,
lib,
config,
...
}:
with lib; let
cfg = config.modules.wofi;
in {
options.modules.wofi = {enable = mkEnableOption "wofi";};
config = mkIf cfg.enable {
programs.wofi = {
enable = true;
settings = {};
};
};
}
6 changes: 5 additions & 1 deletion nixos/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
lib,
config,
pkgs,
pkgs-unstable,
...
}: {
# You can import other NixOS modules here
Expand Down Expand Up @@ -178,7 +179,10 @@
environment.systemPackages = with pkgs; [
clipse
devenv
];
wl-clipboard
] ++ ( with pkgs-unstable; [
hyprpaper
]);

fonts.packages = with pkgs; [
(nerdfonts.override {fonts = ["FiraCode"];})
Expand Down

0 comments on commit 900bd8b

Please sign in to comment.