refactor: obsidian to flatpak version
This commit is contained in:
33
flake.lock
generated
33
flake.lock
generated
@@ -16,6 +16,21 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"flatpaks": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1704403850,
|
||||||
|
"narHash": "sha256-VYa/EvYY0xjuK/oei2hOgE2fJIv+yZgFw0WgoBuzwBc=",
|
||||||
|
"owner": "gmodena",
|
||||||
|
"repo": "nix-flatpak",
|
||||||
|
"rev": "f43640ecb03e9e008076932a87987cf5c16d8cf9",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "gmodena",
|
||||||
|
"repo": "nix-flatpak",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"home-manager": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@@ -55,22 +70,6 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nix-flatpak": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1702538294,
|
|
||||||
"narHash": "sha256-TvmXiqPqrTRdHqReS5z10xk3QMG5fRyxwHm+4W5d5L8=",
|
|
||||||
"owner": "Tomaszal",
|
|
||||||
"repo": "nix-flatpak",
|
|
||||||
"rev": "7e816f75146124a8ac0dc2ec86ade27768f50a63",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "Tomaszal",
|
|
||||||
"ref": "feature/overrides",
|
|
||||||
"repo": "nix-flatpak",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1703961334,
|
"lastModified": 1703961334,
|
||||||
@@ -104,9 +103,9 @@
|
|||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"flatpaks": "flatpaks",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nix-colors": "nix-colors",
|
"nix-colors": "nix-colors",
|
||||||
"nix-flatpak": "nix-flatpak",
|
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"tmux-plugin-manager": "tmux-plugin-manager"
|
"tmux-plugin-manager": "tmux-plugin-manager"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,8 +10,8 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Declaratively install flatpaks
|
# Declaratively install flatpaks
|
||||||
# nix-flatpak.url = "github:gmodena/nix-flatpak"; -- Fork is being used until #24 merges
|
flatpaks.url = "github:gmodena/nix-flatpak"; # Fork is being used until #24 merges
|
||||||
nix-flatpak.url = "github:Tomaszal/nix-flatpak/feature/overrides";
|
# flatpaks.url = "github:Tomaszal/nix-flatpak/feature/overrides";
|
||||||
|
|
||||||
# Used for theming the OS, see modules/home-manager/theme.nix
|
# Used for theming the OS, see modules/home-manager/theme.nix
|
||||||
nix-colors.url = "github:misterio77/nix-colors";
|
nix-colors.url = "github:misterio77/nix-colors";
|
||||||
|
|||||||
@@ -4,136 +4,24 @@
|
|||||||
imports = [
|
imports = [
|
||||||
../../modules/home-manager/theme.nix
|
../../modules/home-manager/theme.nix
|
||||||
../../modules/home-manager/config/terminal.nix
|
../../modules/home-manager/config/terminal.nix
|
||||||
|
../../modules/home-manager/programs/hyprland.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
wayland.windowManager.hyprland.enable = true;
|
hyprland.enable = true;
|
||||||
wayland.windowManager.hyprland.settings = {
|
monitors = [
|
||||||
|
{
|
||||||
|
name = "monitor1";
|
||||||
|
resolution = "2560x1080";
|
||||||
|
id = "HDMI-A-1";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "monitor2";
|
||||||
|
resolution = "1920x1080";
|
||||||
|
id = "DVI-D-1";
|
||||||
|
offset = "2560x0";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
"$monitor1" = "HDMI-A-1";
|
|
||||||
"$monitor2" = "DVI-D-1";
|
|
||||||
|
|
||||||
monitor = [
|
|
||||||
"$monitor1,2560x1080@60,0x0,1"
|
|
||||||
"$monitor2,1920x1080@60,2560x0,1"
|
|
||||||
];
|
|
||||||
|
|
||||||
env = [
|
|
||||||
"XCURSOR_SIZE,24"
|
|
||||||
"MOZ_ENABLE_WAYLAND,1"
|
|
||||||
];
|
|
||||||
|
|
||||||
windowrulev2 = [
|
|
||||||
"opacity 0.0 override 0.0 override,class:^(xwaylandvideobridge)$"
|
|
||||||
"noanim,class:^(xwaylandvideobridge)$"
|
|
||||||
"nofocus,class:^(xwaylandvideobridge)$"
|
|
||||||
"noinitialfocus,class:^(xwaylandvideobridge)$"
|
|
||||||
];
|
|
||||||
|
|
||||||
input = {
|
|
||||||
kb_layout = "br";
|
|
||||||
kb_variant = "abnt2";
|
|
||||||
|
|
||||||
follow_mouse = "1";
|
|
||||||
|
|
||||||
sensitivity = "0";
|
|
||||||
};
|
|
||||||
|
|
||||||
general = {
|
|
||||||
gaps_in = "5";
|
|
||||||
gaps_out = "10";
|
|
||||||
border_size = "0";
|
|
||||||
"col.active_border" = "rgba(ffffff99) rgba(ffffff33) 90deg";
|
|
||||||
"col.inactive_border" = "rgba(18181800)";
|
|
||||||
layout = "dwindle";
|
|
||||||
};
|
|
||||||
|
|
||||||
decoration = {
|
|
||||||
rounding = "5";
|
|
||||||
|
|
||||||
dim_inactive = "true";
|
|
||||||
dim_strength = "0.2";
|
|
||||||
dim_around = "0.4";
|
|
||||||
|
|
||||||
blur = {
|
|
||||||
enabled = "false";
|
|
||||||
size = "20";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
animations = {
|
|
||||||
enabled = "yes";
|
|
||||||
|
|
||||||
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
|
|
||||||
|
|
||||||
animation = [
|
|
||||||
"windows, 1, 7, myBezier"
|
|
||||||
"windowsOut, 1, 7, default, popin 80%"
|
|
||||||
"border, 1, 10, default"
|
|
||||||
"borderangle, 1, 8, default"
|
|
||||||
"fade, 1, 7, default"
|
|
||||||
"workspaces, 1, 6, default"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
dwindle = {
|
|
||||||
pseudotile = "yes";
|
|
||||||
preserve_split = "yes";
|
|
||||||
};
|
|
||||||
|
|
||||||
master = {
|
|
||||||
new_is_master = "true";
|
|
||||||
};
|
|
||||||
|
|
||||||
gestures = {
|
|
||||||
workspace_swipe = "off";
|
|
||||||
};
|
|
||||||
|
|
||||||
"$mod" = "SUPER";
|
|
||||||
|
|
||||||
workspace = [
|
|
||||||
"1,monitor:$monitor1,default:true"
|
|
||||||
"2,monitor:$monitor1"
|
|
||||||
"3,monitor:$monitor1"
|
|
||||||
|
|
||||||
"4,monitor:$monitor2,default:true"
|
|
||||||
"5,monitor:$monitor2"
|
|
||||||
"6,monitor:$monitor2"
|
|
||||||
];
|
|
||||||
|
|
||||||
bind = [
|
|
||||||
"$mod, Q, exec, ${pkgs.wezterm}/bin/wezterm"
|
|
||||||
"$mod, C, killactive"
|
|
||||||
"$mod, M, exit"
|
|
||||||
"$mod, E, exec, ${pkgs.gnome.nautilus}/bin/nautilus"
|
|
||||||
"$mod, V, togglefloating"
|
|
||||||
"$mod, F, fullscreen"
|
|
||||||
"$mod, Z, togglesplit"
|
|
||||||
"$mod, S, exec, ${pkgs.rofi}/bin/rofi -show drun -show-icons"
|
|
||||||
|
|
||||||
"$mod, 1, workspace, 1"
|
|
||||||
"$mod, 2, workspace, 2"
|
|
||||||
"$mod, 3, workspace, 3"
|
|
||||||
"$mod + SHIFT, 1, movetoworkspace, 1"
|
|
||||||
"$mod + SHIFT, 2, movetoworkspace, 2"
|
|
||||||
"$mod + SHIFT, 3, movetoworkspace, 3"
|
|
||||||
|
|
||||||
"$mod, 8, workspace, 4"
|
|
||||||
"$mod, 9, workspace, 5"
|
|
||||||
"$mod, 0, workspace, 6"
|
|
||||||
"$mod + SHIFT, 8, movetoworkspace, 4"
|
|
||||||
"$mod + SHIFT, 9, movetoworkspace, 5"
|
|
||||||
"$mod + SHIFT, 0, movetoworkspace, 6"
|
|
||||||
|
|
||||||
"$mod, H, movefocus, l"
|
|
||||||
"$mod, L, movefocus, r"
|
|
||||||
"$mod, K, movefocus, u"
|
|
||||||
"$mod, J, movefocus, d"
|
|
||||||
];
|
|
||||||
bindm = [
|
|
||||||
"$mod, mouse:272, movewindow"
|
|
||||||
"$mod, mouse:273, resizewindow"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.bash = {
|
programs.bash = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -144,16 +32,14 @@
|
|||||||
|
|
||||||
services.flatpak.packages = [
|
services.flatpak.packages = [
|
||||||
"nz.mega.MEGAsync"
|
"nz.mega.MEGAsync"
|
||||||
|
"md.obsidian.Obsidian"
|
||||||
];
|
];
|
||||||
|
# services.flatpak.overrides = { };
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
nixpkgs.config.allowUnfreePredicate = _: true;
|
nixpkgs.config.allowUnfreePredicate = _: true;
|
||||||
nixpkgs.config.permittedInsecurePackages = [
|
|
||||||
"electron-25.9.0"
|
|
||||||
];
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
## Programs
|
## Programs
|
||||||
obsidian
|
|
||||||
firefox
|
firefox
|
||||||
|
|
||||||
# (pkgs.writeShellScriptBin "my-hello" ''
|
# (pkgs.writeShellScriptBin "my-hello" ''
|
||||||
|
|||||||
177
modules/home-manager/programs/hyprland.nix
Normal file
177
modules/home-manager/programs/hyprland.nix
Normal file
@@ -0,0 +1,177 @@
|
|||||||
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.hyprland;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.hyprland = {
|
||||||
|
enable = lib.mkEnableOption "";
|
||||||
|
monitors = lib.mkOption {
|
||||||
|
default = [ ];
|
||||||
|
type = {
|
||||||
|
name = lib.types.str;
|
||||||
|
resolution = lib.types.str;
|
||||||
|
hz = lib.types.nullOr lib.types.int;
|
||||||
|
offset = lib.types.nullOr lib.types.str;
|
||||||
|
scale = lib.types.nullOr lib.types.int;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
wayland.windowManager.hyprland.enable = true;
|
||||||
|
|
||||||
|
# wayland.windowManager.hyprland.settings = { };
|
||||||
|
|
||||||
|
wayland.windowManager.hyprland.settings = lib.mkMerge [
|
||||||
|
# Sets monitor variables ("$name" = "id") so it can be used in rules later
|
||||||
|
(builtins.listToAttrs (map
|
||||||
|
(m: {
|
||||||
|
name = "\$${m.name}";
|
||||||
|
value = "${m.id}";
|
||||||
|
})
|
||||||
|
cfg.monitors)
|
||||||
|
)
|
||||||
|
{
|
||||||
|
monitor = (map
|
||||||
|
(m:
|
||||||
|
"${
|
||||||
|
m.name
|
||||||
|
},${
|
||||||
|
m.resolution
|
||||||
|
}@${
|
||||||
|
toString (if m?hz then m.hz else 60)
|
||||||
|
},${
|
||||||
|
if m?offset then m.offset else "0x0"
|
||||||
|
},${
|
||||||
|
toString (if m?scale then m.scale else 1)
|
||||||
|
}")
|
||||||
|
cfg.monitors
|
||||||
|
);
|
||||||
|
|
||||||
|
/*[
|
||||||
|
"$monitor1,2560x1080@60,0x0,1"
|
||||||
|
"$monitor2,1920x1080@60,2560x0,1"
|
||||||
|
];*/
|
||||||
|
|
||||||
|
env = [
|
||||||
|
"XCURSOR_SIZE,24"
|
||||||
|
"MOZ_ENABLE_WAYLAND,1"
|
||||||
|
];
|
||||||
|
|
||||||
|
windowrulev2 = [
|
||||||
|
"opacity 0.0 override 0.0 override,class:^(xwaylandvideobridge)$"
|
||||||
|
"noanim,class:^(xwaylandvideobridge)$"
|
||||||
|
"nofocus,class:^(xwaylandvideobridge)$"
|
||||||
|
"noinitialfocus,class:^(xwaylandvideobridge)$"
|
||||||
|
];
|
||||||
|
|
||||||
|
input = {
|
||||||
|
kb_layout = "br";
|
||||||
|
kb_variant = "abnt2";
|
||||||
|
|
||||||
|
follow_mouse = "1";
|
||||||
|
|
||||||
|
sensitivity = "0";
|
||||||
|
};
|
||||||
|
|
||||||
|
general = {
|
||||||
|
gaps_in = "5";
|
||||||
|
gaps_out = "10";
|
||||||
|
border_size = "0";
|
||||||
|
"col.active_border" = "rgba(ffffff99) rgba(ffffff33) 90deg";
|
||||||
|
"col.inactive_border" = "rgba(18181800)";
|
||||||
|
layout = "dwindle";
|
||||||
|
};
|
||||||
|
|
||||||
|
decoration = {
|
||||||
|
rounding = "5";
|
||||||
|
|
||||||
|
dim_inactive = "true";
|
||||||
|
dim_strength = "0.2";
|
||||||
|
dim_around = "0.4";
|
||||||
|
|
||||||
|
blur = {
|
||||||
|
enabled = "false";
|
||||||
|
size = "20";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
animations = {
|
||||||
|
enabled = "yes";
|
||||||
|
|
||||||
|
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
|
||||||
|
|
||||||
|
animation = [
|
||||||
|
"windows, 1, 7, myBezier"
|
||||||
|
"windowsOut, 1, 7, default, popin 80%"
|
||||||
|
"border, 1, 10, default"
|
||||||
|
"borderangle, 1, 8, default"
|
||||||
|
"fade, 1, 7, default"
|
||||||
|
"workspaces, 1, 6, default"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
dwindle = {
|
||||||
|
pseudotile = "yes";
|
||||||
|
preserve_split = "yes";
|
||||||
|
};
|
||||||
|
|
||||||
|
master = {
|
||||||
|
new_is_master = "true";
|
||||||
|
};
|
||||||
|
|
||||||
|
gestures = {
|
||||||
|
workspace_swipe = "off";
|
||||||
|
};
|
||||||
|
|
||||||
|
"$mod" = "SUPER";
|
||||||
|
|
||||||
|
workspace = [
|
||||||
|
"1,monitor:$monitor1,default:true"
|
||||||
|
"2,monitor:$monitor1"
|
||||||
|
"3,monitor:$monitor1"
|
||||||
|
|
||||||
|
"4,monitor:$monitor2,default:true"
|
||||||
|
"5,monitor:$monitor2"
|
||||||
|
"6,monitor:$monitor2"
|
||||||
|
];
|
||||||
|
|
||||||
|
bind = [
|
||||||
|
"$mod, Q, exec, ${pkgs.wezterm}/bin/wezterm"
|
||||||
|
"$mod, C, killactive"
|
||||||
|
"$mod, M, exit"
|
||||||
|
"$mod, E, exec, ${pkgs.gnome.nautilus}/bin/nautilus"
|
||||||
|
"$mod, V, togglefloating"
|
||||||
|
"$mod, F, fullscreen"
|
||||||
|
"$mod, Z, togglesplit"
|
||||||
|
"$mod, S, exec, ${pkgs.rofi}/bin/rofi -show drun -show-icons"
|
||||||
|
|
||||||
|
"$mod, 1, workspace, 1"
|
||||||
|
"$mod, 2, workspace, 2"
|
||||||
|
"$mod, 3, workspace, 3"
|
||||||
|
"$mod + SHIFT, 1, movetoworkspace, 1"
|
||||||
|
"$mod + SHIFT, 2, movetoworkspace, 2"
|
||||||
|
"$mod + SHIFT, 3, movetoworkspace, 3"
|
||||||
|
|
||||||
|
"$mod, 8, workspace, 4"
|
||||||
|
"$mod, 9, workspace, 5"
|
||||||
|
"$mod, 0, workspace, 6"
|
||||||
|
"$mod + SHIFT, 8, movetoworkspace, 4"
|
||||||
|
"$mod + SHIFT, 9, movetoworkspace, 5"
|
||||||
|
"$mod + SHIFT, 0, movetoworkspace, 6"
|
||||||
|
|
||||||
|
"$mod, H, movefocus, l"
|
||||||
|
"$mod, L, movefocus, r"
|
||||||
|
"$mod, K, movefocus, u"
|
||||||
|
"$mod, J, movefocus, d"
|
||||||
|
];
|
||||||
|
bindm = [
|
||||||
|
"$mod, mouse:272, movewindow"
|
||||||
|
"$mod, mouse:273, resizewindow"
|
||||||
|
];
|
||||||
|
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
@@ -27,7 +27,7 @@ in
|
|||||||
(
|
(
|
||||||
if user?flatpak && !user.flatpak
|
if user?flatpak && !user.flatpak
|
||||||
then null
|
then null
|
||||||
else inputs.nix-flatpak.homeManagerModules.nix-flatpak
|
else inputs.flatpaks.homeManagerModules.nix-flatpak
|
||||||
)
|
)
|
||||||
];
|
];
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user