This commit is contained in:
Thomas Avé 2024-06-01 16:56:07 +02:00
parent 4c8460ce84
commit c643f70f98
9 changed files with 884 additions and 874 deletions

View File

@ -16,16 +16,18 @@
}; };
}; };
outputs = { outputs =
self, { self
nixpkgs, , nixpkgs
home-manager, , home-manager
split-monitor-workspaces, , split-monitor-workspaces
... , ...
}@inputs: let }@inputs:
let
system = "x86_64-linux"; system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
in { in
{
nixosConfigurations = { nixosConfigurations = {
nixos = nixpkgs.lib.nixosSystem { nixos = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; }; # allows access to flake inputs in nixos modules specialArgs = { inherit inputs; }; # allows access to flake inputs in nixos modules

View File

@ -5,7 +5,8 @@
{ {
imports = imports =
[ (modulesPath + "/profiles/qemu-guest.nix") [
(modulesPath + "/profiles/qemu-guest.nix")
]; ];
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ]; boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ];
@ -14,12 +15,14 @@
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" =
{ device = "/dev/disk/by-uuid/563963bd-8e27-4c9c-a1d6-d204ea7c43ff"; {
device = "/dev/disk/by-uuid/563963bd-8e27-4c9c-a1d6-d204ea7c43ff";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/9F3C-9F3B"; {
device = "/dev/disk/by-uuid/9F3C-9F3B";
fsType = "vfat"; fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ]; options = [ "fmask=0077" "dmask=0077" ];
}; };

View File

@ -2,10 +2,10 @@
{ {
imports = [ imports = [
(import ./modules/zsh/config.nix {inherit config pkgs;}) (import ./modules/zsh/config.nix { inherit config pkgs; })
(import ./modules/nvim/config.nix {inherit config pkgs;}) (import ./modules/nvim/config.nix { inherit config pkgs; })
(import ./modules/email/config.nix {inherit config pkgs;}) (import ./modules/email/config.nix { inherit config pkgs; })
(import ./modules/hyprland/config.nix {inherit inputs config pkgs;}) (import ./modules/hyprland/config.nix { inherit inputs config pkgs; })
]; ];
home.stateVersion = "24.11"; home.stateVersion = "24.11";

View File

@ -124,4 +124,4 @@
] ]
}; };
}; };
} }

View File

@ -1,9 +1,9 @@
{ { inputs
inputs, , config
config, , pkgs
pkgs, , ...
... }:
}: let let
hyprland = inputs.hyprland.packages.${pkgs.system}.hyprland; hyprland = inputs.hyprland.packages.${pkgs.system}.hyprland;
playerctl = "${pkgs.playerctl}/bin/playerctl"; playerctl = "${pkgs.playerctl}/bin/playerctl";
wl-paste = "${pkgs.wl-clipboard}/bin/wl-paste"; wl-paste = "${pkgs.wl-clipboard}/bin/wl-paste";
@ -51,7 +51,8 @@
fi fi
fi fi
''; '';
in { in
{
services.kdeconnect = { services.kdeconnect = {
enable = true; enable = true;
package = pkgs.kdePackages.kdeconnect-kde; package = pkgs.kdePackages.kdeconnect-kde;
@ -60,7 +61,7 @@ in {
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;
systemd.variables = ["--all"]; systemd.variables = [ "--all" ];
systemd.enable = true; systemd.enable = true;
systemd.enableXdgAutostart = true; systemd.enableXdgAutostart = true;
xwayland.enable = true; xwayland.enable = true;
@ -215,13 +216,17 @@ in {
++ ( ++ (
# workspaces # workspaces
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10} # binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
builtins.concatLists (builtins.genList ( builtins.concatLists (builtins.genList
x: let (
ws = let x:
let
ws =
let
c = (x + 1) / 10; c = (x + 1) / 10;
in in
builtins.toString (x + 1 - (c * 10)); builtins.toString (x + 1 - (c * 10));
in [ in
[
"$mainMod, ${ws}, split-workspace, ${toString (x + 1)}" "$mainMod, ${ws}, split-workspace, ${toString (x + 1)}"
"$mod SHIFT, ${ws}, split-movetoworkspace, ${toString (x + 1)}" "$mod SHIFT, ${ws}, split-movetoworkspace, ${toString (x + 1)}"
] ]