pinwheel: Use hyprland instead of sway

This commit is contained in:
Alexander Heldt
2023-07-23 18:48:32 +02:00
parent 0c396248e8
commit e519a47fd1
3 changed files with 103 additions and 33 deletions

32
flake.lock generated
View File

@@ -3,20 +3,19 @@
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nixpkgs2305" "nixpkgs"
] ]
}, },
"locked": { "locked": {
"lastModified": 1687871164, "lastModified": 1690027126,
"narHash": "sha256-bBFlPthuYX322xOlpJvkjUBz0C+MOBjZdDOOJJ+G2jU=", "narHash": "sha256-DeUhQQxbu41Qn0uHyNazPBiTJ0lNsf26ThFopWBRRnM=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "07c347bb50994691d7b0095f45ebd8838cf6bc38", "rev": "76dd6c66190db0d46ac6b3ca816cc17b581df42c",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "release-23.05",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
@@ -37,6 +36,22 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs": {
"locked": {
"lastModified": 1690031011,
"narHash": "sha256-kzK0P4Smt7CL53YCdZCBbt9uBFFhE0iNvCki20etAf4=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "12303c652b881435065a98729eb7278313041e49",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs2211": { "nixpkgs2211": {
"locked": { "locked": {
"lastModified": 1688392541, "lastModified": 1688392541,
@@ -55,11 +70,11 @@
}, },
"nixpkgs2305": { "nixpkgs2305": {
"locked": { "locked": {
"lastModified": 1689605451, "lastModified": 1689956312,
"narHash": "sha256-u2qp2k9V1smCfk6rdUcgMKvBj3G9jVvaPHyeXinjN9E=", "narHash": "sha256-NV9yamMhE5jgz+ZSM2IgXeYqOvmGIbIIJ+AFIhfD7Ek=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "53657afe29748b3e462f1f892287b7e254c26d77", "rev": "6da4bc6cb07cba1b8e53d139cbf1d2fb8061d967",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -73,6 +88,7 @@
"inputs": { "inputs": {
"home-manager": "home-manager", "home-manager": "home-manager",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs",
"nixpkgs2211": "nixpkgs2211", "nixpkgs2211": "nixpkgs2211",
"nixpkgs2305": "nixpkgs2305" "nixpkgs2305": "nixpkgs2305"
} }

View File

@@ -2,16 +2,17 @@
description = "nixos configs"; description = "nixos configs";
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs2305.url = "github:nixos/nixpkgs/nixos-23.05"; nixpkgs2305.url = "github:nixos/nixpkgs/nixos-23.05";
nixpkgs2211.url = "github:nixos/nixpkgs/nixos-22.11"; nixpkgs2211.url = "github:nixos/nixpkgs/nixos-22.11";
nixos-hardware.url = "github:nixos/nixos-hardware/master"; nixos-hardware.url = "github:nixos/nixos-hardware/master";
home-manager.url = "github:nix-community/home-manager/release-23.05"; home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs2305"; home-manager.inputs.nixpkgs.follows = "nixpkgs";
}; };
outputs = { self, nixpkgs2305, nixpkgs2211, nixos-hardware, home-manager, ... }: { outputs = { self, nixpkgs, nixpkgs2305, nixpkgs2211, nixos-hardware, home-manager, ... }: {
nixosConfigurations = { nixosConfigurations = {
pinwheel = nixpkgs2305.lib.nixosSystem { pinwheel = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
nixos-hardware.nixosModules.lenovo-thinkpad-x1-10th-gen nixos-hardware.nixosModules.lenovo-thinkpad-x1-10th-gen

View File

@@ -11,6 +11,7 @@
gnumake gnumake
tig tig
firefox-devedition-unwrapped firefox-devedition-unwrapped
bemenu
]; ];
programs.git = { programs.git = {
@@ -89,36 +90,88 @@
''; '';
}; };
wayland.windowManager.sway = { wayland.windowManager.hyprland = {
enable = true; enable = true;
config = rec { xwayland = {
modifier = "Mod4"; enable = true;
hidpi = true;
};
keybindings = lib.mkOptionDefault { extraConfig = ''
"${modifier}+space" = "exec ${pkgs.dmenu}/bin/dmenu_run"; exec-once = waybar
"${modifier}+0" = "workspace 10"; '';
};
settings = {
"$mod" = "SUPER";
input = { input = {
"type:keyboard"= { kb_layout = "se";
xkb_layout = "se";
};
"type:touchpad" = {
tap = "enabled";
drag = "disabled";
accel_profile = "flat";
pointer_accel = "0.7";
};
}; };
output = { decoration = {
"eDP-1" = { shadow_offset = "0 5";
mode = "1020x1200@60Hz"; "col.shadow" = "rgba(00000099)";
};
bind = let
ws = x:
let n = if (x + 1) < 10
then (x + 1)
else 0;
in
builtins.toString n;
select = builtins.genList (x: "$mod, ${ws x}, workspace, ${builtins.toString (x + 1)}") 10;
move = builtins.genList (x: "$mod SHIFT, ${ws x}, movetoworkspacesilent, ${builtins.toString (x + 1)}") 10;
in
select ++ move ++ [
"$mod, RETURN, exec, foot"
"$mod, SPACE, exec, bemenu-run"
"$mod, h, movefocus, l"
"$mod, j, movefocus, d"
"$mod, k, movefocus, u"
"$mod, l, movefocus, r"
];
bindm = [
# mouse movements
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
"$mod ALT, mouse:272, resizewindow"
];
};
};
programs.waybar = {
enable = true;
settings = {
mainBar = {
layer = "top";
position = "top";
height = 30;
output = [
"eDP-1"
"HDMI-A-1"
];
modules-left = [ "hyprland/workspaces" ];
modules-center = [ "custom/hello-from-waybar" ];
modules-right = [ ];
"custom/hello-from-waybar" = {
format = "hello {}";
max-length = 40;
interval = "once";
exec = pkgs.writeShellScript "hello-from-waybar" ''
echo "from within waybar"
'';
}; };
}; };
}; };
style = '''';
}; };
home.stateVersion = "23.05"; home.stateVersion = "23.05";