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 = [
inputs.nix-colors.homeManagerModule
../opt/shell
../opt/nvim
./shell
] ++ (builtins.attrValues outputs.homeManagerModules);
nixpkgs = {

View file

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

View file

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

View file

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

View file

@ -1,15 +1,11 @@
{ lib, config, pkgs, ... }: {
imports = [
../standard
../standard/wayland
../music
../standard/wayland/eww
../standard/wayland/swaylock.nix
../../essentials #import essential wayland specific programs
../../../essentials #import essential programs
#./tty-init.nix
./binds.nix
./systemd-fix.nix
../env/hypr-variable.nix
./binds.nix #hyprland keybindings
./systemd-fix.nix #fix for systemd and hyprland
./environment-variables.nix #hyprland environment variables
];
wayland.windowManager.hyprland = {
@ -73,18 +69,22 @@
"fadeDim,1,3,easeout"
"border,1,3,easeout"
];
};
windowrulev2 = [
"float,move 191 15,size 924 396,class:(1Password)"
];
monitor = [
",prefered,auto,auto"
];
};
monitor = map (m: let
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 = [
"${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"
];
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 = [
./opt/nvim
./opt/shell
./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;
}

View file

@ -1,3 +1,4 @@
{
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.";
}];
};
}