mirror of
https://github.com/jbowdre/dotfiles.git
synced 2024-12-22 12:22:17 +00:00
initial hyprland work
This commit is contained in:
parent
892b886d66
commit
21481c10e6
8 changed files with 196 additions and 18 deletions
145
flake.lock
145
flake.lock
|
@ -74,18 +74,65 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"hyprland": {
|
||||
"inputs": {
|
||||
"hyprland-protocols": "hyprland-protocols",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"systems": "systems",
|
||||
"wlroots": "wlroots",
|
||||
"xdph": "xdph"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1695346609,
|
||||
"narHash": "sha256-jur+AjgRvablLA2oBvC4FD89zCXttVQDwi6OXk5x/14=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e9b4b56e5a20ac322c0c01ccab7ec697ab076ea0",
|
||||
"lastModified": 1695650428,
|
||||
"narHash": "sha256-gAUMixbeGqRjmh1IK3N6ffEcLiG5NxQNvxBjTVbpbFA=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "Hyprland",
|
||||
"rev": "ffacd2efd1ca7fdf364a519c9d8d8644da28412b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-23.05",
|
||||
"owner": "hyprwm",
|
||||
"repo": "Hyprland",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hyprland-protocols": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"hyprland",
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": [
|
||||
"hyprland",
|
||||
"systems"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1691753796,
|
||||
"narHash": "sha256-zOEwiWoXk3j3+EoF3ySUJmberFewWlagvewDRuWYAso=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprland-protocols",
|
||||
"rev": "0c2ce70625cb30aef199cb388f99e19a61a6ce03",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprland-protocols",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1694767346,
|
||||
"narHash": "sha256-5uH27SiVFUwsTsqC5rs3kS7pBoNhtoy9QfTP9BmknGk=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ace5093e36ab1e95cb9463863491bee90d5a4183",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
|
@ -106,14 +153,94 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1695346609,
|
||||
"narHash": "sha256-jur+AjgRvablLA2oBvC4FD89zCXttVQDwi6OXk5x/14=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e9b4b56e5a20ac322c0c01ccab7ec697ab076ea0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-23.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"firefox-addons": "firefox-addons",
|
||||
"hardware": "hardware",
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"hyprland": "hyprland",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1689347949,
|
||||
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default-linux",
|
||||
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default-linux",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"wlroots": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"host": "gitlab.freedesktop.org",
|
||||
"lastModified": 1695277534,
|
||||
"narHash": "sha256-LEIUGXvKR5DYFQUTavC3yifcObvG4XZUUHfxXmu8nEM=",
|
||||
"owner": "wlroots",
|
||||
"repo": "wlroots",
|
||||
"rev": "98a745d926d8048bc30aef11b421df207a01c279",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
"host": "gitlab.freedesktop.org",
|
||||
"owner": "wlroots",
|
||||
"repo": "wlroots",
|
||||
"rev": "98a745d926d8048bc30aef11b421df207a01c279",
|
||||
"type": "gitlab"
|
||||
}
|
||||
},
|
||||
"xdph": {
|
||||
"inputs": {
|
||||
"hyprland-protocols": [
|
||||
"hyprland",
|
||||
"hyprland-protocols"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"hyprland",
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": [
|
||||
"hyprland",
|
||||
"systems"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1694628480,
|
||||
"narHash": "sha256-Qg9hstRw0pvjGu5hStkr2UX1D73RYcQ9Ns/KnZMIm9w=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "xdg-desktop-portal-hyprland",
|
||||
"rev": "8f45a6435069b9e24ebd3160eda736d7a391cbf2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hyprwm",
|
||||
"repo": "xdg-desktop-portal-hyprland",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
|
|
@ -18,6 +18,9 @@
|
|||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# Hyprland
|
||||
hyprland.url = "github:hyprwm/Hyprland";
|
||||
|
||||
# Hardware
|
||||
hardware.url = "github:nixos/nixos-hardware";
|
||||
|
||||
|
|
26
home/features/desktop/hyprland.nix
Normal file
26
home/features/desktop/hyprland.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{config, pkgs, ... }: {
|
||||
wayland.windowManager.hyprland.extraConfig = ''
|
||||
$mod = SUPER
|
||||
|
||||
bind = $mod, F, exec, firefox
|
||||
bind = , Print, exec, grimblast copy area
|
||||
bind = $mod, Q, exec, kitty
|
||||
|
||||
# workspaces
|
||||
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
|
||||
${builtins.concatStringsSep "\n" (builtins.genList (
|
||||
x: let
|
||||
ws = let
|
||||
c = (x + 1) / 10;
|
||||
in
|
||||
builtins.toString (x + 1 - (c * 10));
|
||||
in ''
|
||||
bind = $mod, ${ws}, workspace, ${toString (x + 1)}
|
||||
bind = $mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}
|
||||
''
|
||||
)
|
||||
10)}
|
||||
|
||||
# ...
|
||||
'';
|
||||
}
|
|
@ -3,10 +3,12 @@
|
|||
./global
|
||||
./features/cli/extras
|
||||
./features/desktop
|
||||
./features/desktop/hyprland.nix
|
||||
];
|
||||
|
||||
# packages
|
||||
home.packages = with pkgs; [
|
||||
kitty
|
||||
vagrant
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,20 +1,12 @@
|
|||
{
|
||||
services = {
|
||||
xserver = {
|
||||
enable = true;
|
||||
displayManager = {
|
||||
gdm = {
|
||||
enable = true;
|
||||
autoSuspend = false;
|
||||
};
|
||||
};
|
||||
desktopManager = {
|
||||
gnome.enable = true;
|
||||
};
|
||||
layout = "us";
|
||||
xkbVariant = "";
|
||||
};
|
||||
logind.lidSwitch = "ignore";
|
||||
};
|
||||
security.polkit.extraConfig = ''
|
||||
polkit.addRule(function(action, subject) {
|
||||
|
|
14
hosts/common/optional/hyprland.nix
Normal file
14
hosts/common/optional/hyprland.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{pkgs, ... }: {
|
||||
|
||||
services.xserver = {
|
||||
displayManager.gdm = {
|
||||
wayland = true;
|
||||
};
|
||||
};
|
||||
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
};
|
||||
|
||||
}
|
12
hosts/common/optional/xserver.nix
Normal file
12
hosts/common/optional/xserver.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
services = {
|
||||
xserver = {
|
||||
enable = true;
|
||||
displayManager.gdm = {
|
||||
enable = true;
|
||||
autoSuspend = false;
|
||||
};
|
||||
};
|
||||
logind.lidSwitch = "ignore";
|
||||
};
|
||||
}
|
|
@ -9,11 +9,13 @@
|
|||
../common/users/john
|
||||
|
||||
../common/optional/docker.nix
|
||||
../common/optional/gnome.nix
|
||||
#../common/optional/gnome.nix
|
||||
# ../common/optional/hyprland.nix
|
||||
../common/optional/libvirtd.nix
|
||||
../common/optional/pipewire.nix
|
||||
../common/optional/printing.nix
|
||||
../common/optional/sshd.nix
|
||||
../common/optional/xserver.nix
|
||||
];
|
||||
|
||||
networking = {
|
||||
|
|
Loading…
Reference in a new issue