Reorganize modules

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2024-06-18 14:40:06 +03:00
parent 7bd1c06cd8
commit e06aa045b4
15 changed files with 52 additions and 25 deletions

View File

@@ -4,9 +4,9 @@
imports = [ imports = [
inputs.impermanence.nixosModules.impermanence inputs.impermanence.nixosModules.impermanence
inputs.sops-nix.nixosModules.sops inputs.sops-nix.nixosModules.sops
./configs/zsh.nix ./configs/zsh
./configs/neovim.nix ./configs/neovim
./configs/tmux.nix ./configs/tmux
]; ];
fileSystems."/persist".neededForBoot = true; fileSystems."/persist".neededForBoot = true;

View File

@@ -4,7 +4,7 @@
imports = [ imports = [
../common ../common
../../users/nick ../../users/nick
./configs/pipewire.nix ./configs/pipewire
]; ];
time.timeZone = "Europe/Athens"; time.timeZone = "Europe/Athens";

View File

@@ -1,20 +1,21 @@
{ inputs, ... }: { config, inputs, lib, ... }:
{ {
imports = [ imports = [
inputs.disko.nixosModules.disko inputs.disko.nixosModules.disko
(import ../format.nix { device = "/dev/vda"; }) (import ../format.nix { device = "/dev/vda"; })
./hardware-configuration.nix ./hardware-configuration.nix
../default.nix ../.
]; ];
networking.hostName = "eirene-vm"; networking.hostName = "eirene-vm";
boot.kernelParams = [ "video=Virtual-1:2560x1600@60" ]; boot.kernelParams = [ "video=Virtual-1:2560x1600@60" ];
home-manager.sharedModules = [{ wayland.windowManager.hyprland.settings.monitor = "Virtual-1, 2560x1600@60, 0x0, 1"; }];
fileSystems."/host" = { fileSystems."/host" = {
device = "host"; device = "host";
fsType = "virtiofs"; fsType = "virtiofs";
}; };
home-manager.sharedModules = lib.mkIf config.programs.hyprland.enable [{ wayland.windowManager.hyprland.settings.monitor = "Virtual-1, 2560x1600@60, 0x0, 1"; }];
} }

View File

@@ -10,6 +10,30 @@
"$mod, r, exec, rofi -show drun" "$mod, r, exec, rofi -show drun"
"$mod, b, exec, firefox" "$mod, b, exec, firefox"
"$mod, 1, workspace, 1"
"$mod, 2, workspace, 2"
"$mod, 3, workspace, 3"
"$mod, 4, workspace, 4"
"$mod, 5, workspace, 5"
"$mod, 6, workspace, 6"
"$mod, 7, workspace, 7"
"$mod, 8, workspace, 8"
"$mod, 9, workspace, 9"
"$mod, 0, workspace, 10"
"$mod_SHIFT, 1, movetoworkspace, 1"
"$mod_SHIFT, 2, movetoworkspace, 2"
"$mod_SHIFT, 3, movetoworkspace, 3"
"$mod_SHIFT, 4, movetoworkspace, 4"
"$mod_SHIFT, 5, movetoworkspace, 5"
"$mod_SHIFT, 6, movetoworkspace, 6"
"$mod_SHIFT, 7, movetoworkspace, 7"
"$mod_SHIFT, 8, movetoworkspace, 8"
"$mod_SHIFT, 9, movetoworkspace, 9"
"$mod_SHIFT, 0, movetoworkspace, 10"
"$mod_CTRL, Space, workspaceopt, allfloat"
"$mod, left, movefocus, l" "$mod, left, movefocus, l"
"$mod, h, movefocus, l" "$mod, h, movefocus, l"
"$mod, down, movefocus, d" "$mod, down, movefocus, d"
@@ -43,6 +67,7 @@
"$mod_SHIFT, Tab, bringactivetotop" "$mod_SHIFT, Tab, bringactivetotop"
"$mod, f, fullscreen, 0" "$mod, f, fullscreen, 0"
"$mod, p, pin"
"$mod, Space, togglefloating" "$mod, Space, togglefloating"
"$mod, Space, centerwindow" "$mod, Space, centerwindow"
"$mod, q, killactive" "$mod, q, killactive"
@@ -61,4 +86,10 @@
}; };
}; };
}; };
programs.zsh.loginExtra = ''
if [ -z "''${WAYLAND_DISPLAY}" ] && [ ! -z "''${XDG_VTNR}" ] && [ "''${XDG_VTNR}" -eq 1 ]; then
hyprland &> /tmp/hyprland.log
fi
'';
} }

View File

@@ -9,10 +9,5 @@
historySubstringSearch.enable = true; historySubstringSearch.enable = true;
autosuggestion.enable = true; autosuggestion.enable = true;
syntaxHighlighting.enable = true; syntaxHighlighting.enable = true;
loginExtra = ''
if [ -z "''${WAYLAND_DISPLAY}" ] && [ ! -z "''${XDG_VTNR}" ] && [ "''${XDG_VTNR}" -eq 1 ]; then
hyprland &> /tmp/hyprland.log
fi
'';
}; };
} }

View File

@@ -22,12 +22,12 @@ in
imports = [ imports = [
inputs.impermanence.nixosModules.home-manager.impermanence inputs.impermanence.nixosModules.home-manager.impermanence
inputs.stylix.homeManagerModules.stylix inputs.stylix.homeManagerModules.stylix
./configs/stylix.nix ./configs/stylix
./configs/hyprland.nix ./configs/hyprland
./configs/git.nix ./configs/git
./configs/zsh.nix ./configs/zsh
./configs/kitty.nix ./configs/kitty
./configs/firefox.nix ./configs/firefox
]; ];
home = { home = {
@@ -41,13 +41,8 @@ in
systemd.user.startServices = "sd-switch"; systemd.user.startServices = "sd-switch";
}]; }];
};
systemd.tmpfiles.rules = [ "d /persist/home/ 0755 root root -" ] ++ lib.attrsets.mapAttrsToList (user: config: users = lib.attrsets.mapAttrs' (user: config: lib.attrsets.nameValuePair
"d /persist${config.home} 0700 ${user} users -"
) normalUsers;
home-manager.users = lib.attrsets.mapAttrs' (user: config: lib.attrsets.nameValuePair
(user) (user)
(let (let
init = pkgs.pkgs.writeShellScriptBin "hyprland-init" '' init = pkgs.pkgs.writeShellScriptBin "hyprland-init" ''
@@ -93,4 +88,9 @@ in
wayland.windowManager.hyprland.settings.exec-once = "${init}/bin/hyprland-init"; wayland.windowManager.hyprland.settings.exec-once = "${init}/bin/hyprland-init";
}) })
) normalUsers; ) normalUsers;
};
systemd.tmpfiles.rules = [ "d /persist/home/ 0755 root root -" ] ++ lib.attrsets.mapAttrsToList (user: config:
"d /persist${config.home} 0700 ${user} users -"
) normalUsers;
} }

View File

@@ -20,6 +20,6 @@
linger = true; linger = true;
uid = 1000; uid = 1000;
wallpaper = ./wallpapers/clouds.png; wallpaper = ./wallpapers/clouds.png;
base16Scheme = "${pkgs.base16-schemes}/share/themes/da-one-sea.yaml"; base16Scheme = "${pkgs.base16-schemes}/share/themes/seti.yaml";
}; };
} }