restructure
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
{ self, inputs, ... }: {
|
||||
|
||||
flake.nixosModules.user-nathan = host: { config, lib, pkgs, ... }: {
|
||||
flake.nixosModules.user-nathan = { config, lib, pkgs, ... }: {
|
||||
|
||||
config = {
|
||||
|
||||
sops.secrets."nathan/pass".neededForUsers = true;
|
||||
|
||||
users.users.nathan = {
|
||||
shell = lib.mkDefault pkgs.zsh;
|
||||
shell = pkgs.zsh;
|
||||
name = lib.mkDefault "nathan";
|
||||
isNormalUser = lib.mkDefault true;
|
||||
#hashedPasswordFile = lib.mkIf (cfg.hashedPasswordFile != null) cfg.hashedPasswordFile;
|
||||
@@ -20,11 +20,18 @@
|
||||
packages = lib.mkIf (false) [ pkgs.home-manager ];
|
||||
|
||||
};
|
||||
wayland.windowManager.hyprland.extraConfig = if host == "laptop" then ''
|
||||
monitor=eDP-1,1920x1080@60,0x0,1
|
||||
bind = CTRL SHIFT, XF86Launch2, exec, bash -c 'if [[ $(hyprctl monitors | grep 0x0 | sed -n -e "s/\t*1920x1080@//" -e "s/.[1234567890]* at 0x0//p") == 300 ]]; then pkexec --user root /nix/var/nix/profiles/system/bin/switch-to-configuration switch; else pkexec --user root /nix/var/nix/profiles/system/specialisation/docked/bin/switch-to-configuration switch; fi'
|
||||
bind = ALT, Escape, exec, if [[ $(hyprctl monitors | grep 0x0 | sed -n -e "s/\t*1920x1080@//" -e "s/.[1234567890]* at 0x0//p") == 300 ]]; then hyprctl keyword monitor eDP-1,1920x1080@60,0x0,1; else hyprctl keyword monitor eDP-1,1920x1080@300,0x0,1; fi
|
||||
'' else '''';
|
||||
|
||||
home-manager.users.nathan = lib.mkMerge [
|
||||
self.homeModules.nathan
|
||||
|
||||
(lib.mkIf (config.networking.hostName == "laptop") {
|
||||
wayland.windowManager.hyprland.extraConfig = ''
|
||||
monitor=eDP-1,1920x1080@60,0x0,1
|
||||
bind = CTRL SHIFT, XF86Launch2, exec, bash -c 'if [[ $(hyprctl monitors | grep 0x0 | sed -n -e "s/\t*1920x1080@//" -e "s/.[1234567890]* at 0x0//p") == 300 ]]; then pkexec --user root /nix/var/nix/profiles/system/bin/switch-to-configuration switch; else pkexec --user root /nix/var/nix/profiles/system/specialisation/docked/bin/switch-to-configuration switch; fi'
|
||||
bind = ALT, Escape, exec, if [[ $(hyprctl monitors | grep 0x0 | sed -n -e "s/\t*1920x1080@//" -e "s/.[1234567890]* at 0x0//p") == 300 ]]; then hyprctl keyword monitor eDP-1,1920x1080@60,0x0,1; else hyprctl keyword monitor eDP-1,1920x1080@300,0x0,1; fi
|
||||
'';
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -33,14 +40,7 @@
|
||||
{
|
||||
|
||||
config = {
|
||||
homeconfig = {
|
||||
graphical = lib.mkDefault false;
|
||||
minimal = lib.mkDefault false;
|
||||
|
||||
hyprland.enable = lib.mkDefault false;
|
||||
};
|
||||
|
||||
|
||||
|
||||
nix = {
|
||||
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
||||
settings = {
|
||||
|
||||
Reference in New Issue
Block a user