added lockscreen. may look at other display managers later.

This commit is contained in:
Gabe Venberg 2024-04-10 18:35:10 -05:00
parent 29f13d5c42
commit 073444e68c
4 changed files with 74 additions and 43 deletions

View file

@ -1,15 +1,11 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
imports =
[ (modulesPath + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ];
@ -17,24 +13,22 @@
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/cf31610c-b936-48d3-979d-553424f1d6c7";
fileSystems."/" =
{ device = "/dev/disk/by-uuid/1127e866-28dc-4c07-92ec-07be4908880c";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/27F6-CF8B";
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/CBA2-8A1E";
fsType = "vfat";
};
fileSystems."/home/gabe/nix-config-host" = {
device = "nix-config-host";
fileSystems."/home/gabe/nix-config-host" =
{ device = "nix-config-host";
fsType = "virtiofs";
};
swapDevices = [
{device = "/dev/disk/by-uuid/679dd57a-6a34-47f1-a0c8-cdf1e280c3fa";}
];
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's

View file

@ -4,11 +4,14 @@
lib,
...
}: {
services.accounts-daemon.enable = true;
services.xserver = {
enable = true;
displayManager = {
defaultSession = "none+i3";
lightdm.enable = true;
lightdm = {
enable = true;
};
};
windowManager.i3.enable = true;
};
@ -198,19 +201,9 @@
};
startup = [
{
command = "~/.fehbg";
command = "feh --no-fehbg --bg-fill ~/.background-image";
notification = false;
}
];
bars = [
{
fonts = {
names = ["FiraCode Nerd Font"];
style = "Mono";
size = 10.0;
};
position = "bottom";
statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs ~/.config/i3status-rust/config-default.toml";
always = true;
}
];
};
@ -226,5 +219,6 @@
imports = [
../sound.nix
./i3status-rust.nix
./lockscreen.nix
];
}

View file

@ -10,6 +10,17 @@
lib,
...
}: {
xsession.windowManager.i3.config.bars = [
{
fonts = {
names = ["FiraCode Nerd Font"];
style = "Mono";
size = 10.0;
};
position = "bottom";
statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs ~/.config/i3status-rust/config-default.toml";
}
];
programs.i3status-rust = {
enable = true;
bars = {

View file

@ -0,0 +1,32 @@
{
config,
pkgs,
lib,
...
}: {
environment.systemPackages = with pkgs; [
lightlocker
];
home-manager.users.${config.host.user} = {
config,
osConfig,
lib,
...
}: {
xsession.windowManager.i3.config = {
keybindings = let
mod = config.xsession.windowManager.i3.config.modifier;
in {
"${mod}+x" = ''
exec --no-startup-id light-locker-command -l
'';
};
startup = [
{
command = "light-locker";
notification = false;
}
];
};
};
}