let's hope this doesn't break everything :3

This commit is contained in:
Noa Aarts 2024-05-11 00:44:17 +02:00
parent 608f093290
commit 2f85fb1b3b
21 changed files with 176 additions and 224 deletions

View file

@ -1,15 +0,0 @@
{ config, inputs, pkgs, ... }:
{
home.packages = [
inputs.automapaper.packages.${pkgs.system}.default
];
home.file = {
"${config.xdg.configHome}/automapaper/config.toml".source = ./config.toml;
"${config.xdg.configHome}/automapaper/config2nd.toml".source = ./config2nd.toml;
"${config.xdg.configHome}/automapaper/state.frag".source = ./state.frag;
"${config.xdg.configHome}/automapaper/init.frag".source = ./init.frag;
"${config.xdg.configHome}/automapaper/display.frag".source = ./display.frag;
};
}

View file

@ -1,7 +0,0 @@
{ config, pkgs, inputs, ... }:
{
services.dunst = {
enable = true;
};
}

View file

@ -1,13 +0,0 @@
{ config, pkgs, inputs, ... }:
{
home.packages = with pkgs; [
firefox
];
programs.firefox = {
enable = true;
# TODO add some default firefox settings
};
}

View file

@ -1,18 +0,0 @@
{ config, pkgs, inputs, ... }:
{
home.packages = with pkgs; [
git
];
programs.git = {
enable = true;
userName = "Noa Aarts";
userEmail = "itepastra@gmail.com";
extraConfig = {
init = { defaultBranch = "main"; };
safe.directory = "/etc/nixos";
pull.rebase = false;
};
};
}

View file

@ -1,14 +0,0 @@
{ config, pkgs, inputs, ... }:
{
home.packages = with pkgs; [
kitty
];
programs.kitty = {
enable = true;
settings = {
confirm_os_window_close = 0;
};
shellIntegration.enableZshIntegration = true;
};
}

View file

@ -579,6 +579,8 @@ require("lazy").setup({
python = { "black" }, python = { "black" },
go = { "gopls" }, go = { "gopls" },
nix = { "nixpkgs-fmt" },
-- --
-- You can use a sub-list to tell conform to run *until* a formatter -- You can use a sub-list to tell conform to run *until* a formatter
-- is found. -- is found.

View file

@ -1,120 +0,0 @@
{ config, pkgs, inputs, nix-colors, ... }:
{
imports = [
./colors.nix
];
home.packages = with pkgs; [
(writeShellScriptBin "wofi-launch" ''
${wofi}/bin/wofi --show drun
'')
(writeShellScriptBin "wofi-power" ''
lock="Lock"
poweroff="Poweroff"
reboot="Reboot"
sleep="Suspend"
selected_option=$(echo -e "$lock\n$sleep\n$reboot\n$poweroff" | wofi --dmenu -i -p "Powermenu")
if [ "$selected_option" == "$lock" ]
then
echo "lock"
swaylock
elif [ "$selected_option" == "$poweroff" ]
then
echo "poweroff"
poweroff
elif [ "$selected_option" == "$reboot" ]
then
echo "reboot"
reboot
elif [ "$selected_option" == "$sleep" ]
then
echo "sleep"
suspend
else
echo "No match"
fi
'')
];
programs.wofi = {
enable = true;
settings = {
};
style = ''
* {
outline: none;
outline-style: none;
}
#window {
margin: 10px;
border: none;
background-color: #${config.colorScheme.palette.background};
border-radius: 10px;
font-family:
JetBrains Mono NF,
monospace;
font-weight: bold;
font-size: 14px;
}
#outer-box {
margin: 10px;
border: 2px #${config.colorScheme.palette.backgroundMuted};
border-radius: 10px;
background-color: transparent;
}
#input {
border: none;
border-radius: 10px;
margin-left: 2px;
color: #${config.colorScheme.palette.info};
outline-style: none;
background-color: #${config.colorScheme.palette.background};
}
#scroll {
border: 10px solid #${config.colorScheme.palette.border};
border-radius: 10px;
/*padding-right: 10px;*/
outline: none;
background-color: #${config.colorScheme.palette.background};
}
#inner-box {
border: none;
border-radius: 10px;
background-color: transparent;
}
#entry {
border: none;
/*border-radius: 10px;
margin-right: 15px;
margin-left: 15px;*/
padding-right: 10px;
padding-left: 10px;
color: #${config.colorScheme.palette.text};
background-color: #${config.colorScheme.palette.background};
}
#entry:selected {
border: none;
background-color: #${config.colorScheme.palette.info};
}
#text:selected {
border: none;
color: #${config.colorScheme.palette.textMuted};
}
#img {
background-color: transparent;
margin-right: 6px;
}
'';
};
}

View file

@ -1,30 +0,0 @@
{ config, lib, pkgs, inputs, ... }:
{
home.packages = with pkgs; [
zsh
];
programs.direnv = {
enable=true;
enableZshIntegration=true;
nix-direnv.enable=true;
};
programs.zsh = {
enable=true;
shellAliases = {
ll = "lsd -l";
lt = "lsd -l --tree";
update = "nix flake update --commit-lock-file $HOME/nixos && sudo nixos-rebuild switch --flake $HOME/nixos";
};
history = {
path = "${config.xdg.dataHome}/zsh/history";
size = 10000;
};
oh-my-zsh = {
enable = true;
plugins = [ "git" ];
theme = "frisk";
};
};
}

View file

@ -4,16 +4,12 @@
imports = imports =
[ [
inputs.nixvim.homeManagerModules.nixvim inputs.nixvim.homeManagerModules.nixvim
../../common/zsh.nix
../../modules/hyprland.nix ../../modules/hyprland.nix
../../modules/games ../../modules/games
../../common/kitty.nix ../../modules/applications
../../common/git.nix
../../common/nvim/nvim.nix ../../common/nvim/nvim.nix
../../common/discord/discord.nix ../../common/discord/discord.nix
../../common/spotify.nix ../../common/spotify.nix
../../common/automapaper/automapaper.nix
../../common/firefox.nix
]; ];
# Home Manager needs a bit of information about you and the paths it should # Home Manager needs a bit of information about you and the paths it should
# manage. # manage.
@ -34,6 +30,13 @@
modules = { modules = {
hyprland.enable = true; hyprland.enable = true;
games.enable = true; games.enable = true;
apps = {
enable = true;
git = {
name = "Noa Aarts";
email = "itepastra@gmail.com";
};
};
}; };
# The home.packages option allows you to install Nix packages into your # The home.packages option allows you to install Nix packages into your

View file

@ -0,0 +1,25 @@
{ lib, config, pkgs, ... }:
let
cfg = config.modules.apps;
in
{
options.modules.apps = {
enable = lib.mkEnableOption "enable desktop applications";
};
imports = [
./firefox.nix
./git.nix
./kitty.nix
./zsh.nix
];
config = lib.mkIf cfg.enable {
modules.apps = {
firefox.enable = true;
git.enable = true;
kitty.enable = true;
zsh.enable = true;
};
};
}

View file

@ -0,0 +1,17 @@
{ lib, config, pkgs, ... }:
let
cfg = config.modules.apps.firefox;
in
{
options.modules.apps.firefox = {
enable = lib.mkEnableOption "enable firefox";
};
config = lib.mkIf cfg.enable {
programs.firefox = {
enable = true;
# TODO: add some default firefox settings
};
};
}

View file

@ -0,0 +1,34 @@
{ lib, config, pkgs, ... }:
let
cfg = config.modules.apps.git;
in
{
options.modules.apps.git = {
enable = lib.mkEnableOption "enable git";
name = lib.mkOption {
example = "Jill Doe";
description = "the git user Name";
type = lib.types.str;
};
email = lib.mkOption {
example = "jilldoe@test.local";
description = "the git user Name";
type = lib.types.str;
};
};
config = lib.mkIf cfg.enable {
programs.git = {
enable = true;
userName = cfg.name;
userEmail = cfg.email;
extraConfig = {
init = { defaultBranch = "main"; };
safe.directory = "/etc/nixos";
pull.rebase = false;
};
};
};
}

View file

@ -0,0 +1,19 @@
{ lib, config, pkgs, ... }:
let
cfg = config.modules.apps.kitty;
in
{
options.modules.apps.kitty = {
enable = lib.mkEnableOption "enable the kitty terminal emulator";
};
config = lib.mkIf cfg.enable {
programs.kitty = {
enable = true;
settings = {
confirm_os_window_close = 0;
};
shellIntegration.enableZshIntegration = true;
};
};
}

View file

@ -0,0 +1,36 @@
{ lib, config, pkgs, ... }:
let
cfg = config.modules.apps.zsh;
in
{
options.modules.apps.zsh = {
enable = lib.mkEnableOption "enable zsh with oh-my-zsh";
enableAliases = lib.mkEnableOption "whether to enable shellAliases";
};
config = lib.mkIf cfg.enable {
programs.direnv = {
enable=true;
enableZshIntegration=true;
nix-direnv.enable=true;
};
programs.zsh = {
enable=true;
shellAliases = lib.mkIf cfg.enableAliases {
ll = "lsd -l";
lt = "lsd -l --tree";
update = "nix flake update --commit-lock-file $HOME/nixos && sudo nixos-rebuild switch --flake $HOME/nixos";
};
history = {
path = "${config.xdg.dataHome}/zsh/history";
size = 10000;
};
oh-my-zsh = {
enable = true;
plugins = [ "git" ];
theme = "frisk";
};
};
};
}

View file

@ -0,0 +1,25 @@
{ lib, config, pkgs, inputs, ... }:
let
cfg = config.modules.automapaper;
in
{
options.modules.automapaper = {
enable = lib.mkEnableOption "enable automapaper";
};
config = lib.mkIf cfg.enable {
home.packages = [
inputs.automapaper.packages.${pkgs.system}.default
];
home.file = {
"${config.xdg.configHome}/automapaper/config.toml".source = ./config.toml;
"${config.xdg.configHome}/automapaper/config2nd.toml".source = ./config2nd.toml;
"${config.xdg.configHome}/automapaper/state.frag".source = ./state.frag;
"${config.xdg.configHome}/automapaper/init.frag".source = ./init.frag;
"${config.xdg.configHome}/automapaper/display.frag".source = ./display.frag;
};
};
}

View file

@ -15,15 +15,23 @@ in
default = pkgs.kitty; default = pkgs.kitty;
description = "What terminal emulator should be used in hyprland"; description = "What terminal emulator should be used in hyprland";
}; };
wallpapers.automapaper = {
enable = lib.mkEnableOption "enable automapaper";
};
}; };
imports = [ imports = [
./waybar/default.nix ./waybar/default.nix
./wofi.nix ./wofi.nix
./dunst.nix ./dunst.nix
./automapaper/automapaper.nix
]; ];
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
modules = { modules = {
automapaper = {
enable = true;
};
waybar = { waybar = {
modules = { modules = {
left = [ "hyprland/workspaces" "tray" "hyprland/window" ]; left = [ "hyprland/workspaces" "tray" "hyprland/window" ];
@ -70,8 +78,8 @@ in
exec-once = [ exec-once = [
"waybar" "waybar"
"dunst" "dunst"
"automapaper -C ${config.xdg.configHome}/automapaper/config.toml" (lib.mkIf cfg.wallpapers.automapaper.enable "automapaper -C ${config.xdg.configHome}/automapaper/config.toml")
"automapaper -C ${config.xdg.configHome}/automapaper/config2nd.toml" (lib.mkIf cfg.wallpapers.automapaper.enable "automapaper -C ${config.xdg.configHome}/automapaper/config2nd.toml")
"hyprctl dispatcher focusmonitor 1" "hyprctl dispatcher focusmonitor 1"
"hypridle" "hypridle"
]; ];