added lockscreen. may look at other display managers later.
This commit is contained in:
		
							parent
							
								
									29f13d5c42
								
							
						
					
					
						commit
						073444e68c
					
				
					 4 changed files with 74 additions and 43 deletions
				
			
		| 
						 | 
				
			
			@ -1,40 +1,34 @@
 | 
			
		|||
# 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"];
 | 
			
		||||
  boot.initrd.kernelModules = [];
 | 
			
		||||
  boot.kernelModules = ["kvm-intel"];
 | 
			
		||||
  boot.extraModulePackages = [];
 | 
			
		||||
  boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ];
 | 
			
		||||
  boot.initrd.kernelModules = [ ];
 | 
			
		||||
  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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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;
 | 
			
		||||
  };
 | 
			
		||||
| 
						 | 
				
			
			@ -117,10 +120,10 @@
 | 
			
		|||
          '';
 | 
			
		||||
          # change brightness
 | 
			
		||||
          "${mod}+control+plus" = ''
 | 
			
		||||
            exec --no-startup-id "brightnessctl s +1%; dunstify -h string:x-dunst-stack-tag:brightness --timeout=500 Brightness\ $(brightnessctl -m| cut --delimiter=, -f 4)"
 | 
			
		||||
            exec --no-startup-id "brightnessctl s +1%; dunstify -h string:x-dunst-stack-tag:brightness --timeout=500 Brightness\ $(brightnessctl -m | cut --delimiter=, -f 4)"
 | 
			
		||||
          '';
 | 
			
		||||
          "${mod}+control+minus" = ''
 | 
			
		||||
            exec --no-startup-id "brightnessctl s 1%-; dunstify -h string:x-dunst-stack-tag:brightness --timeout=500 Brightness\ $(brightnessctl -m| cut --delimiter=, -f 4)"
 | 
			
		||||
            exec --no-startup-id "brightnessctl s 1%-; dunstify -h string:x-dunst-stack-tag:brightness --timeout=500 Brightness\ $(brightnessctl -m | cut --delimiter=, -f 4)"
 | 
			
		||||
          '';
 | 
			
		||||
 | 
			
		||||
          #screenshot everything with mod+s, current window with mod+shift+s, selection with mod+ctrl+s
 | 
			
		||||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
  ];
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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 = {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										32
									
								
								modules/both/i3/lockscreen.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								modules/both/i3/lockscreen.nix
									
										
									
									
									
										Normal 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;
 | 
			
		||||
        }
 | 
			
		||||
      ];
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue