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’
 | 
					# Do not modify this file!  It was generated by ‘nixos-generate-config’
 | 
				
			||||||
# and may be overwritten by future invocations.  Please make changes
 | 
					# and may be overwritten by future invocations.  Please make changes
 | 
				
			||||||
# to /etc/nixos/configuration.nix instead.
 | 
					# to /etc/nixos/configuration.nix instead.
 | 
				
			||||||
 | 
					{ config, lib, pkgs, modulesPath, ... }:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  config,
 | 
					  imports =
 | 
				
			||||||
  lib,
 | 
					    [ (modulesPath + "/profiles/qemu-guest.nix")
 | 
				
			||||||
  pkgs,
 | 
					    ];
 | 
				
			||||||
  modulesPath,
 | 
					 | 
				
			||||||
  ...
 | 
					 | 
				
			||||||
}: {
 | 
					 | 
				
			||||||
  imports = [
 | 
					 | 
				
			||||||
    (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" ];
 | 
				
			||||||
  boot.initrd.kernelModules = [];
 | 
					  boot.initrd.kernelModules = [ ];
 | 
				
			||||||
  boot.kernelModules = ["kvm-intel"];
 | 
					  boot.kernelModules = [ "kvm-intel" ];
 | 
				
			||||||
  boot.extraModulePackages = [];
 | 
					  boot.extraModulePackages = [ ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  fileSystems."/" = {
 | 
					  fileSystems."/" =
 | 
				
			||||||
    device = "/dev/disk/by-uuid/cf31610c-b936-48d3-979d-553424f1d6c7";
 | 
					    { device = "/dev/disk/by-uuid/1127e866-28dc-4c07-92ec-07be4908880c";
 | 
				
			||||||
    fsType = "ext4";
 | 
					      fsType = "ext4";
 | 
				
			||||||
  };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  fileSystems."/boot" = {
 | 
					  fileSystems."/boot" =
 | 
				
			||||||
    device = "/dev/disk/by-uuid/27F6-CF8B";
 | 
					    { device = "/dev/disk/by-uuid/CBA2-8A1E";
 | 
				
			||||||
    fsType = "vfat";
 | 
					      fsType = "vfat";
 | 
				
			||||||
  };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  fileSystems."/home/gabe/nix-config-host" = {
 | 
					  fileSystems."/home/gabe/nix-config-host" =
 | 
				
			||||||
    device = "nix-config-host";
 | 
					    { device = "nix-config-host";
 | 
				
			||||||
    fsType = "virtiofs";
 | 
					      fsType = "virtiofs";
 | 
				
			||||||
  };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  swapDevices = [
 | 
					  swapDevices = [ ];
 | 
				
			||||||
    {device = "/dev/disk/by-uuid/679dd57a-6a34-47f1-a0c8-cdf1e280c3fa";}
 | 
					 | 
				
			||||||
  ];
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
 | 
					  # 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
 | 
					  # (the default) this is the recommended approach. When using systemd-networkd it's
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,11 +4,14 @@
 | 
				
			||||||
  lib,
 | 
					  lib,
 | 
				
			||||||
  ...
 | 
					  ...
 | 
				
			||||||
}: {
 | 
					}: {
 | 
				
			||||||
 | 
					  services.accounts-daemon.enable = true;
 | 
				
			||||||
  services.xserver = {
 | 
					  services.xserver = {
 | 
				
			||||||
    enable = true;
 | 
					    enable = true;
 | 
				
			||||||
    displayManager = {
 | 
					    displayManager = {
 | 
				
			||||||
      defaultSession = "none+i3";
 | 
					      defaultSession = "none+i3";
 | 
				
			||||||
      lightdm.enable = true;
 | 
					      lightdm = {
 | 
				
			||||||
 | 
					        enable = true;
 | 
				
			||||||
 | 
					      };
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
    windowManager.i3.enable = true;
 | 
					    windowManager.i3.enable = true;
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
| 
						 | 
					@ -117,10 +120,10 @@
 | 
				
			||||||
          '';
 | 
					          '';
 | 
				
			||||||
          # change brightness
 | 
					          # change brightness
 | 
				
			||||||
          "${mod}+control+plus" = ''
 | 
					          "${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" = ''
 | 
					          "${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
 | 
					          #screenshot everything with mod+s, current window with mod+shift+s, selection with mod+ctrl+s
 | 
				
			||||||
| 
						 | 
					@ -198,19 +201,9 @@
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
        startup = [
 | 
					        startup = [
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            command = "~/.fehbg";
 | 
					            command = "feh --no-fehbg --bg-fill ~/.background-image";
 | 
				
			||||||
            notification = false;
 | 
					            notification = false;
 | 
				
			||||||
          }
 | 
					            always = true;
 | 
				
			||||||
        ];
 | 
					 | 
				
			||||||
        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";
 | 
					 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
| 
						 | 
					@ -226,5 +219,6 @@
 | 
				
			||||||
  imports = [
 | 
					  imports = [
 | 
				
			||||||
    ../sound.nix
 | 
					    ../sound.nix
 | 
				
			||||||
    ./i3status-rust.nix
 | 
					    ./i3status-rust.nix
 | 
				
			||||||
 | 
					    ./lockscreen.nix
 | 
				
			||||||
  ];
 | 
					  ];
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,6 +10,17 @@
 | 
				
			||||||
    lib,
 | 
					    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 = {
 | 
					    programs.i3status-rust = {
 | 
				
			||||||
      enable = true;
 | 
					      enable = true;
 | 
				
			||||||
      bars = {
 | 
					      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