restructure: home-manager config

This commit is contained in:
ooks-io 2023-11-10 17:14:05 +13:00
parent c305458223
commit f9646bec23
49 changed files with 110 additions and 25 deletions

View file

@ -5,8 +5,7 @@ in
{ {
imports = [ imports = [
inputs.nix-colors.homeManagerModule inputs.nix-colors.homeManagerModule
../opt/shell ./shell
../opt/nvim
] ++ (builtins.attrValues outputs.homeManagerModules); ] ++ (builtins.attrValues outputs.homeManagerModules);
nixpkgs = { nixpkgs = {

View file

@ -1,6 +1,8 @@
{ pkgs, ... }: { { pkgs, ... }: {
imports = [ imports = [
./bat.nix ./bat.nix
./nvim.nix
./fzf.nix
./git.nix ./git.nix
./bash.nix ./bash.nix
./fish.nix ./fish.nix
@ -33,8 +35,4 @@
acpi acpi
]; ];
programs = {
fzf.enable = true;
};
} }

View file

@ -0,0 +1,5 @@
{
programs.fzf = {
enable = true;
};
}

View file

@ -6,6 +6,7 @@
./fonts.nix ./fonts.nix
./playerctl.nix ./playerctl.nix
./pavucontrol.nix ./pavucontrol.nix
./music.nix
./yt-dlp.nix ./yt-dlp.nix
./playerctl.nix ./playerctl.nix
]; ];

View file

@ -1,16 +1,12 @@
{ lib, config, pkgs, ... }: { { lib, config, pkgs, ... }: {
imports = [ imports = [
../standard ../../essentials #import essential wayland specific programs
../standard/wayland ../../../essentials #import essential programs
../music #./tty-init.nix
../standard/wayland/eww ./binds.nix #hyprland keybindings
../standard/wayland/swaylock.nix ./systemd-fix.nix #fix for systemd and hyprland
./environment-variables.nix #hyprland environment variables
# ./tty-init.nix ];
./binds.nix
./systemd-fix.nix
../env/hypr-variable.nix
];
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;
@ -73,18 +69,22 @@
"fadeDim,1,3,easeout" "fadeDim,1,3,easeout"
"border,1,3,easeout" "border,1,3,easeout"
]; ];
};
windowrulev2 = [ windowrulev2 = [
"float,move 191 15,size 924 396,class:(1Password)" "float,move 191 15,size 924 396,class:(1Password)"
]; ];
monitor = [ monitor = map (m: let
",prefered,auto,auto" resolution = "${toString m.width}x${toString m.height}@${toString m.refreshRate}";
]; position = "${toString m.x}x${toString m.y}";
}; transform = if m.transform != 0 then ",transform,${toString m.transform}" else "";
in
"${m.name},${if m.enabled then "${resolution},${position},1${transform}" else "disable"}"
) (config.monitors);
exec = [ exec = [
"${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1" "pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"
"${pkgs.swaybg}/bin/swaybg -i ~/.dotfiles/nix/walls/gruvbox/gruvbox-blank.png --mode fill" "${pkgs.swaybg}/bin/swaybg -i ~/.dotfiles/nix/walls/gruvbox/gruvbox-blank.png --mode fill"
]; ];
exec-once = [ exec-once = [

11
home/ooks/ooksmicro.nix Normal file
View file

@ -0,0 +1,11 @@
{ inputs, outputs, ... }:
{
imports = [
./opt/desktop/hyprland
./base
];
colorscheme = inputs.nix-colors.colorSchemes.gruvbox-dark-soft;
}

View file

@ -2,12 +2,20 @@
{ {
imports = [ imports = [
./opt/nvim
./opt/shell
./opt/desktop/hyprland ./opt/desktop/hyprland
./standard ./features/essentials
./base
]; ];
monitor = [{
name = "eDP-1";
width = "1920";
height = "1080";
workspace = "1";
primary = true;
transform = "0";
}];
colorscheme = inputs.nix-colors.colorSchemes.gruvbox-dark-soft; colorscheme = inputs.nix-colors.colorSchemes.gruvbox-dark-soft;
} }

View file

@ -1,3 +1,4 @@
{ {
fonts = import ./fonts.nix; fonts = import ./fonts.nix;
monitors = import ./monitors.nix;
} }

View file

@ -0,0 +1,62 @@
{ lib, config, ... }:
let
inherit (lib) mkOption types;
cfg = config.monitors;
in
{
options.monitors = mkOption {
type = types.listOf (types.submodule {
options = {
name = mkOption {
type = types.str;
example = "DP-1";
};
primary = mkOption {
type = types.bool;
default = false;
};
width = mkOption {
type = types.int;
example = 1920;
};
height = mkOption {
type = types.int;
example = 1080;
};
refreshRate = mkOption {
type = types.int;
default = 60;
};
x = mkOption {
type = types.int;
default = 0;
};
y = mkOption {
type = types.int;
default = 0;
};
transform = mkOption {
type = types.int;
default = 0;
};
enabled = mkOption {
type = types.bool;
default = true;
};
workspace = mkOption {
type = types.nullOr types.str;
default = null;
};
};
});
default = [ ];
};
config = {
assertions = [{
assertion = ((lib.length config.monitors) != 0) ->
((lib.length (lib.filter (m: m.primary) config.monitors)) == 1);
message = "Exactly one monitor must be set to primary.";
}];
};
}