Skip to content

Commit

Permalink
feat: nm and hyprland bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
bddvlpr committed May 12, 2024
1 parent c7541d6 commit 125e72f
Show file tree
Hide file tree
Showing 7 changed files with 90 additions and 3 deletions.
4 changes: 3 additions & 1 deletion modules/home/default.nix
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
{}
{
hyprland = import ./hyprland;
}
44 changes: 44 additions & 0 deletions modules/home/hyprland/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
lib,
config,
...
}: let
inherit (lib) mkIf mkOption types;

cfg = config.sysc.hyprland;
in {
options.sysc.hyprland = {
enable = mkOption {
type = types.bool;
default = true;
description = "Whether to enable Hyprland.";
};
};

config = mkIf cfg.enable {
wayland.windowManager.hyprland = {
enable = true;

settings = {
"$mod" = "SUPER";

bind =
[]
++ (
builtins.concatLists (
builtins.genList (x: let
ws = let
c = (x + 1) / 10;
in
builtins.toString (x + 1 - (c + 1));
in [
"$mod, ${ws}, workspace, ${toString (x + 1)}"
"$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}"
])
10
)
);
};
};
};
}
8 changes: 8 additions & 0 deletions modules/nixos/impermanence/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,12 @@ in {
description = "Whether to enable tmpfs-as-root.";
};
};

config.environment.persistence."/persist" = {
enable = cfg.enable;
directories = [
"/etc/nixos"
"/var/log"
];
};
}
21 changes: 19 additions & 2 deletions modules/nixos/networking/default.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
{host, ...}: {
networking.hostName = host;
{
config,
host,
...
}: let
isImpermanent = config.sysc.impermanence.enable;
in {
networking = {
hostName = host;

networkmanager = {
enable = true;
};
};

environment.persistence."/persist" = {
enable = isImpermanent;
directories = ["/etc/NetworkManager"];
};
}
1 change: 1 addition & 0 deletions systems/module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@
in {
flake.nixosConfigurations = lib.mkMerge [
(mkSystem "dissension" "x86_64-linux")
(mkSystem "solaris" "x86_64-linux")
];
}
3 changes: 3 additions & 0 deletions systems/solaris/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
system.stateVersion = "24.05";
}
12 changes: 12 additions & 0 deletions systems/solaris/hardware.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{inputs, ...}: {
imports = with inputs.hardware.nixosModules; [
common-pc-ssd
common-cpu-intel
#common-gpu-nvidia-nonprime
];

sysc.disko.luks-btrfs.device = "/dev/nvme0n1";

boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "sd_mod"];
boot.kernelModules = ["kvm-intel"];
}

0 comments on commit 125e72f

Please sign in to comment.