imported laptop configs
This commit is contained in:
72
modules/hosts/laptop/configuration.nix
Normal file
72
modules/hosts/laptop/configuration.nix
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
{self, inputs, ...}: {
|
||||||
|
flake.nixosModules.laptopConfig = { pkgs, ... }: {
|
||||||
|
imports =
|
||||||
|
[ # Include the results of the hardware scan.
|
||||||
|
#./hardware-configuration.nix
|
||||||
|
# ../../modules/nixos/localization.nix
|
||||||
|
# ../../modules/nixos/applications.nix
|
||||||
|
# ../../modules/nixos/fonts.nix
|
||||||
|
# ../../modules/nixos/programming.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
# Bootloader.
|
||||||
|
boot.loader = {
|
||||||
|
systemd-boot.enable = true;
|
||||||
|
efi.canTouchEfiVariables = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.hostName = "lily-laptop"; networking.networkmanager.enable = true;
|
||||||
|
|
||||||
|
# Enable the X11 windowing system.
|
||||||
|
# You can disable this if you're only using the Wayland session.
|
||||||
|
services.xserver.enable = true;
|
||||||
|
services.displayManager.sddm.enable = true;
|
||||||
|
#services.displayManager.cosmic-greeter.enable = true;
|
||||||
|
services.desktopManager.cosmic.enable = true;
|
||||||
|
services.desktopManager.plasma6.enable = true;
|
||||||
|
|
||||||
|
# Enable CUPS to print documents.
|
||||||
|
services.printing.enable = true;
|
||||||
|
|
||||||
|
# Enable sound with pipewire.
|
||||||
|
services.pulseaudio.enable = false;
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
alsa.support32Bit = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
};
|
||||||
|
programs = {
|
||||||
|
firefox.enable = true;
|
||||||
|
niri = {
|
||||||
|
enable = true;
|
||||||
|
package = self.packages.${pkgs.stdenv.hostPlatform.system}.niri;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
environment.systemPackages = [
|
||||||
|
pkgs.vim
|
||||||
|
pkgs.noctalia-shell
|
||||||
|
pkgs.quickshell
|
||||||
|
pkgs.git
|
||||||
|
pkgs.gimp
|
||||||
|
pkgs.home-manager
|
||||||
|
pkgs.bluez
|
||||||
|
pkgs.kdePackages.plasma-keyboard
|
||||||
|
pkgs.kdePackages.bluedevil
|
||||||
|
pkgs.kdePackages.bluez-qt
|
||||||
|
pkgs.lf
|
||||||
|
pkgs.fuzzel
|
||||||
|
pkgs.alacritty
|
||||||
|
|
||||||
|
self.packages.${pkgs.stdenv.hostPlatform.system}.nh
|
||||||
|
# wget
|
||||||
|
];
|
||||||
|
|
||||||
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
|
||||||
|
system.stateVersion = "25.11"; # Did you read the com
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
45
modules/hosts/laptop/hardware-configuration.nix
Normal file
45
modules/hosts/laptop/hardware-configuration.nix
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
{
|
||||||
|
flake.nixosModules.laptopHardware = { config, lib, modulesPath, ... }: {
|
||||||
|
imports = [
|
||||||
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot = {
|
||||||
|
initrd = {
|
||||||
|
availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" ];
|
||||||
|
kernelModules = [ ];
|
||||||
|
luks.devices."luks-fbc12fd4-a2b8-44b1-a89a-e502662b1fce".device = "/dev/disk/by-uuid/fbc12fd4-a2b8-44b1-a89a-e502662b1fce";
|
||||||
|
};
|
||||||
|
kernelModules = [ "kvm-intel" ];
|
||||||
|
extraModulePackages = [ ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems = {
|
||||||
|
"/" = {
|
||||||
|
device = "/dev/mapper/luks-fbc12fd4-a2b8-44b1-a89a-e502662b1fce";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=@" ];
|
||||||
|
};
|
||||||
|
"/home" = {
|
||||||
|
device = "/dev/mapper/luks-fbc12fd4-a2b8-44b1-a89a-e502662b1fce";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=@home" ];
|
||||||
|
};
|
||||||
|
"/media/nvme" = {
|
||||||
|
device = "/dev/mapper/luks-fbc12fd4-a2b8-44b1-a89a-e502662b1fce";
|
||||||
|
fsType = "btrfs";
|
||||||
|
};
|
||||||
|
"/boot" = {
|
||||||
|
device = "/dev/disk/by-uuid/C51E-CE6C";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [ "fmask=0077" "dmask=0077" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [ ];
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
14
modules/hosts/laptop/laptop.nix
Normal file
14
modules/hosts/laptop/laptop.nix
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{ inputs, self, ... }: {
|
||||||
|
flake.nixosConfigurations.lily-laptop = inputs.nixpkgs.lib.nixosSystem {
|
||||||
|
modules = [
|
||||||
|
self.nixosModules.laptopConfig
|
||||||
|
self.nixosModules.laptopHardware
|
||||||
|
|
||||||
|
self.nixosModules.lily
|
||||||
|
|
||||||
|
self.nixosModules.localization
|
||||||
|
self.nixosModules.applications
|
||||||
|
self.nixosModules.fonts
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
7
modules/nixosModules/applications.nix
Normal file
7
modules/nixosModules/applications.nix
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{self, inputs, ...}: {
|
||||||
|
flake.nixosModules.applications = { pkgs, ... }: {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
libreoffice-fresh
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
14
modules/nixosModules/fonts.nix
Normal file
14
modules/nixosModules/fonts.nix
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{self, inputs, ...}: {
|
||||||
|
flake.nixosModules.fonts = { pkgs, ... }: {
|
||||||
|
fonts.packages = with pkgs; [
|
||||||
|
nerd-fonts.jetbrains-mono
|
||||||
|
nerd-fonts.noto
|
||||||
|
corefonts
|
||||||
|
unifont
|
||||||
|
font-awesome
|
||||||
|
noto-fonts
|
||||||
|
noto-fonts-cjk-sans
|
||||||
|
noto-fonts-cjk-serif
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
26
modules/nixosModules/localization.nix
Normal file
26
modules/nixosModules/localization.nix
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
{self, inputs, ...}: {
|
||||||
|
flake.nixosModules.localization = { pkgs, ... }: {
|
||||||
|
time.timeZone = "America/Chicago";
|
||||||
|
|
||||||
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
|
||||||
|
i18n.extraLocaleSettings = {
|
||||||
|
LC_ADDRESS = "en_US.UTF-8";
|
||||||
|
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||||
|
LC_MEASUREMENT = "en_US.UTF-8";
|
||||||
|
LC_MONETARY = "en_US.UTF-8";
|
||||||
|
LC_NAME = "en_US.UTF-8";
|
||||||
|
LC_NUMERIC = "en_US.UTF-8";
|
||||||
|
LC_PAPER = "en_US.UTF-8";
|
||||||
|
LC_TELEPHONE = "en_US.UTF-8";
|
||||||
|
LC_TIME = "en_US.UTF-8";
|
||||||
|
};
|
||||||
|
|
||||||
|
services.xserver.xkb = {
|
||||||
|
layout = "us";
|
||||||
|
variant = "";
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
164
modules/wrappedPrograms/niri.nix
Normal file
164
modules/wrappedPrograms/niri.nix
Normal file
@@ -0,0 +1,164 @@
|
|||||||
|
{ inputs, self, lib, ... }: let
|
||||||
|
inherit (lib) getExe;
|
||||||
|
in {
|
||||||
|
perSystem = { pkgs, self', ... }: {
|
||||||
|
packages.niri =
|
||||||
|
(inputs.wrappers.wrapperModules.niri.apply {
|
||||||
|
inherit pkgs;
|
||||||
|
settings = {
|
||||||
|
prefer-no-csd = null;
|
||||||
|
|
||||||
|
input = {
|
||||||
|
focus-follows-mouse = null;
|
||||||
|
|
||||||
|
keyboard = {
|
||||||
|
xkb = {
|
||||||
|
layout = "us";
|
||||||
|
options = "grp:alt_shift_toggle,caps:escape";
|
||||||
|
};
|
||||||
|
repeat-rate = 40;
|
||||||
|
repeat-delay = 250;
|
||||||
|
};
|
||||||
|
|
||||||
|
touchpad = {
|
||||||
|
natural-scroll = null;
|
||||||
|
tap = null;
|
||||||
|
};
|
||||||
|
|
||||||
|
mouse = {
|
||||||
|
accel-profile = "flat";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
binds = {
|
||||||
|
"Mod+Return".spawn = ''${getExe pkgs.alacritty}'';
|
||||||
|
|
||||||
|
"Mod+O".toggle-overview = null;
|
||||||
|
"Mod+Shift+Slash".show-hotkey-overlay = null;
|
||||||
|
"Mod+Shift+Q".quit = null;
|
||||||
|
|
||||||
|
"Mod+Q".close-window = null;
|
||||||
|
"Mod+F".maximize-column = null;
|
||||||
|
"Mod+G".fullscreen-window = null;
|
||||||
|
"Mod+Shift+F".toggle-window-floating = null;
|
||||||
|
"Mod+C".center-column = null;
|
||||||
|
|
||||||
|
"Mod+H".focus-column-left = null;
|
||||||
|
"Mod+L".focus-column-right = null;
|
||||||
|
"Mod+K".focus-window-up = null;
|
||||||
|
"Mod+J".focus-window-down = null;
|
||||||
|
|
||||||
|
"Mod+Left".focus-column-left = null;
|
||||||
|
"Mod+Right".focus-column-right = null;
|
||||||
|
"Mod+Up".focus-window-up = null;
|
||||||
|
"Mod+Down".focus-window-down = null;
|
||||||
|
|
||||||
|
"Mod+Shift+H".move-column-left = null;
|
||||||
|
"Mod+Shift+L".move-column-right = null;
|
||||||
|
"Mod+Shift+K".move-window-up = null;
|
||||||
|
"Mod+Shift+J".move-window-down = null;
|
||||||
|
|
||||||
|
"Mod+1".focus-workspace = "w0";
|
||||||
|
"Mod+2".focus-workspace = "w1";
|
||||||
|
"Mod+3".focus-workspace = "w2";
|
||||||
|
"Mod+4".focus-workspace = "w3";
|
||||||
|
"Mod+5".focus-workspace = "w4";
|
||||||
|
"Mod+6".focus-workspace = "w5";
|
||||||
|
"Mod+7".focus-workspace = "w6";
|
||||||
|
"Mod+8".focus-workspace = "w7";
|
||||||
|
"Mod+9".focus-workspace = "w8";
|
||||||
|
"Mod+0".focus-workspace = "w9";
|
||||||
|
|
||||||
|
"Mod+Shift+1".move-column-to-workspace = "w0";
|
||||||
|
"Mod+Shift+2".move-column-to-workspace = "w1";
|
||||||
|
"Mod+Shift+3".move-column-to-workspace = "w2";
|
||||||
|
"Mod+Shift+4".move-column-to-workspace = "w3";
|
||||||
|
"Mod+Shift+5".move-column-to-workspace = "w4";
|
||||||
|
"Mod+Shift+6".move-column-to-workspace = "w5";
|
||||||
|
"Mod+Shift+7".move-column-to-workspace = "w6";
|
||||||
|
"Mod+Shift+8".move-column-to-workspace = "w7";
|
||||||
|
"Mod+Shift+9".move-column-to-workspace = "w8";
|
||||||
|
"Mod+Shift+0".move-column-to-workspace = "w9";
|
||||||
|
|
||||||
|
"Mod+S".spawn-sh = "noctalia-shell ipc call launcher toggle";
|
||||||
|
"Mod+V".spawn-sh = ''${pkgs.alsa-utils}/bin/amixer sset Capture toggle'';
|
||||||
|
|
||||||
|
"XF86AudioRaiseVolume".spawn-sh = "wpctl set-volume -l 1.4 @DEFAULT_AUDIO_SINK@ 5%+";
|
||||||
|
"XF86AudioLowerVolume".spawn-sh = "wpctl set-volume -l 1.4 @DEFAULT_AUDIO_SINK@ 5%-";
|
||||||
|
|
||||||
|
"Mod+Ctrl+H".set-column-width = "-5%";
|
||||||
|
"Mod+Ctrl+L".set-column-width = "+5%";
|
||||||
|
"Mod+Ctrl+J".set-window-height = "-5%";
|
||||||
|
"Mod+Ctrl+K".set-window-height = "+5%";
|
||||||
|
|
||||||
|
"Mod+WheelScrollDown".focus-column-left = null;
|
||||||
|
"Mod+WheelScrollUp".focus-column-right = null;
|
||||||
|
"Mod+Ctrl+WheelScrollDown".focus-workspace-down = null;
|
||||||
|
"Mod+Ctrl+WheelScrollUp".focus-workspace-up = null;
|
||||||
|
|
||||||
|
"Mod+Ctrl+S".spawn-sh = ''${getExe pkgs.grim} -l 0 - | ${pkgs.wl-clipboard}/bin/wl-copy'';
|
||||||
|
|
||||||
|
"Mod+Shift+E".spawn-sh = ''${pkgs.wl-clipboard}/bin/wl-paste | ${getExe pkgs.swappy} -f -'';
|
||||||
|
|
||||||
|
"Mod+Shift+S".spawn-sh = getExe (pkgs.writeShellApplication {
|
||||||
|
name = "screenshot";
|
||||||
|
text = ''
|
||||||
|
${getExe pkgs.grim} -g "$(${getExe pkgs.slurp} -w 0)" - \
|
||||||
|
| ${pkgs.wl-clipboard}/bin/wl-copy
|
||||||
|
'';
|
||||||
|
});
|
||||||
|
|
||||||
|
"Mod+d".spawn-sh = self.mkWhichKeyExe pkgs [
|
||||||
|
{
|
||||||
|
key = "b";
|
||||||
|
desc = "Bluetooth";
|
||||||
|
cmd = "noctalia-shell ipc call bluetooth togglePanel";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "w";
|
||||||
|
desc = "Wifi";
|
||||||
|
cmd = "noctalia-shell ipc call wifi togglePanel";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "f";
|
||||||
|
desc = "Firefox";
|
||||||
|
cmd = "firefox";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
layout = {
|
||||||
|
gaps = 5;
|
||||||
|
|
||||||
|
focus-ring = {
|
||||||
|
width = 2;
|
||||||
|
#active-color = "#${self.themeNoHash.base09}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
workspaces = let
|
||||||
|
settings = {layout.gaps = 5;};
|
||||||
|
in {
|
||||||
|
"w0" = settings;
|
||||||
|
"w1" = settings;
|
||||||
|
"w2" = settings;
|
||||||
|
"w3" = settings;
|
||||||
|
"w4" = settings;
|
||||||
|
"w5" = settings;
|
||||||
|
"w6" = settings;
|
||||||
|
"w7" = settings;
|
||||||
|
"w8" = settings;
|
||||||
|
"w9" = settings;
|
||||||
|
};
|
||||||
|
|
||||||
|
xwayland-satellite.path =
|
||||||
|
getExe pkgs.xwayland-satellite;
|
||||||
|
|
||||||
|
spawn-at-startup = [
|
||||||
|
(builtins.toString (getExe pkgs.noctalia-shell))
|
||||||
|
#(builtins.toString (getExe self'.packages.start-noctalia-shell))
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}).wrapper;
|
||||||
|
};
|
||||||
|
}
|
||||||
30
modules/wrappedPrograms/wlr-which-key.nix
Normal file
30
modules/wrappedPrograms/wlr-which-key.nix
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
{inputs, lib, self, ...}: let
|
||||||
|
inherit (lib) getExe;
|
||||||
|
mkWhichKey = pkgs: menu:
|
||||||
|
(self.wrapperModules.which-key.apply {
|
||||||
|
inherit pkgs;
|
||||||
|
settings = {
|
||||||
|
inherit menu;
|
||||||
|
anchor = "bottom-right";
|
||||||
|
};
|
||||||
|
}).wrapper;
|
||||||
|
in {
|
||||||
|
flake.mkWhichKeyExe = pkgs: menu: getExe (mkWhichKey pkgs menu);
|
||||||
|
flake.wrapperModules.which-key = inputs.wrappers.lib.wrapModule (
|
||||||
|
{ config, lib, ... }: let
|
||||||
|
yamlFormat = config.pkgs.formats.yaml {};
|
||||||
|
in {
|
||||||
|
options = {
|
||||||
|
settings = lib.mkOption {
|
||||||
|
type = yamlFormat.type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = {
|
||||||
|
package = config.pkgs.wlr-which-key;
|
||||||
|
args = [
|
||||||
|
(toString (yamlFormat.generate "config.yaml" config.settings))
|
||||||
|
];
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user