Merge remote-tracking branch 'origin/nixos' into nixos

dev-docs
Moritz Böhme 2023-03-18 06:21:30 +01:00
commit f158ecde96
Signed by: moritz
GPG Key ID: 970C6E89EB0547A9
5 changed files with 77 additions and 83 deletions

126
flake.nix
View File

@ -14,90 +14,62 @@
flake-utils.url = "github:numtide/flake-utils"; flake-utils.url = "github:numtide/flake-utils";
utils = { utils.url = "github:gytis-ivaskevicius/flake-utils-plus";
url = "github:gytis-ivaskevicius/flake-utils-plus"; utils.inputs.flake-utils.follows = "flake-utils";
inputs.flake-utils.follows = "flake-utils";
};
agenix = { agenix.url = "github:ryantm/agenix";
url = "github:ryantm/agenix"; agenix.inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = { home-manager.url = "github:nix-community/home-manager";
url = "github:nix-community/home-manager"; home-manager.inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs.follows = "nixpkgs"; home-manager.inputs.utils.follows = "flake-utils";
inputs.utils.follows = "flake-utils";
};
# Zsh specific # Zsh specific
forgit-git = { forgit-git.url = "github:wfxr/forgit";
url = "github:wfxr/forgit"; forgit-git.flake = false;
flake = false;
};
# Laptop Touchpad # Laptop Touchpad
asus-touchpad-numpad-driver = { asus-touchpad-numpad-driver.url = "github:MoritzBoehme/asus-touchpad-numpad-driver/german-layout";
url = "github:MoritzBoehme/asus-touchpad-numpad-driver/german-layout"; asus-touchpad-numpad-driver.flake = false;
flake = false;
};
arkenfox-userjs = { arkenfox-userjs.url = "github:arkenfox/user.js";
url = "github:arkenfox/user.js"; arkenfox-userjs.flake = false;
flake = false;
};
howdy = { howdy.url = "sourcehut:~moritzboehme/howdy";
url = "sourcehut:~moritzboehme/howdy"; howdy.inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs.follows = "nixpkgs";
};
emacs.url = "git+ssh://git@gitea.moritzboeh.me/moritz/emacs.git?ref=main"; emacs.url = "git+ssh://git@gitea.moritzboeh.me/moritz/emacs.git?ref=main";
neovim.url = "github:neovim/neovim?dir=contrib"; neovim.url = "github:neovim/neovim?dir=contrib";
nil = { nil.url = "github:oxalica/nil";
url = "github:oxalica/nil"; nil.inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs.follows = "nixpkgs"; nil.inputs.flake-utils.follows = "flake-utils";
inputs.flake-utils.follows = "flake-utils";
};
# Hyprland # Hyprland
hyprland.url = "github:hyprwm/Hyprland"; hyprland.url = "github:hyprwm/Hyprland";
hyprpaper.url = "github:hyprwm/hyprpaper"; hyprpaper.url = "github:hyprwm/hyprpaper";
hypr-contrib.url = "github:hyprwm/contrib"; hypr-contrib.url = "github:hyprwm/contrib";
nvim-treesitter-textsubjects = { nvim-treesitter-textsubjects.url = "github:RRethy/nvim-treesitter-textsubjects";
url = "github:RRethy/nvim-treesitter-textsubjects"; nvim-treesitter-textsubjects.flake = false;
flake = false;
};
smartcolumn-nvim = { smartcolumn-nvim.url = "github:m4xshen/smartcolumn.nvim";
url = "github:m4xshen/smartcolumn.nvim"; smartcolumn-nvim.flake = false;
flake = false;
};
copilot-lua = { copilot-lua.url = "github:zbirenbaum/copilot.lua";
url = "github:zbirenbaum/copilot.lua"; copilot-lua.flake = false;
flake = false;
};
lspsaga-nvim = { lspsaga-nvim.url = "github:glepnir/lspsaga.nvim";
url = "github:glepnir/lspsaga.nvim"; lspsaga-nvim.flake = false;
flake = false;
};
advanced-git-search-nvim = { advanced-git-search-nvim.url = "github:aaronhallaert/advanced-git-search.nvim";
url = "github:aaronhallaert/advanced-git-search.nvim"; advanced-git-search-nvim.flake = false;
flake = false;
};
attic = { attic.url = "github:zhaofengli/attic";
url = "github:zhaofengli/attic"; attic.inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs.follows = "nixpkgs"; attic.inputs.nixpkgs-stable.follows = "stable";
inputs.nixpkgs-stable.follows = "stable"; attic.inputs.flake-utils.follows = "flake-utils";
inputs.flake-utils.follows = "flake-utils";
};
}; };
outputs = outputs =
@ -145,23 +117,23 @@
./modules/profiles/gaming.nix ./modules/profiles/gaming.nix
./modules/profiles/desktop.nix ./modules/profiles/desktop.nix
]; ];
hostDefaults = {
modules = [ hostDefaults.modules = [
./modules/default.nix ./modules/default.nix
self.nixosModules.base self.nixosModules.base
inputs.home-manager.nixosModule inputs.home-manager.nixosModule
{ {
home-manager = { home-manager = {
useGlobalPkgs = true; useGlobalPkgs = true;
useUserPackages = true; useUserPackages = true;
extraSpecialArgs = { inherit inputs self; }; extraSpecialArgs = { inherit inputs self; };
}; };
} }
inputs.hyprland.nixosModules.default inputs.hyprland.nixosModules.default
inputs.agenix.nixosModules.age inputs.agenix.nixosModules.age
inputs.howdy.nixosModules.default inputs.howdy.nixosModules.default
]; ];
};
hosts.nixos-laptop.modules = [ hosts.nixos-laptop.modules = [
./hosts/nixos-laptop ./hosts/nixos-laptop

View File

@ -11,7 +11,6 @@
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.initrd.systemd.enable = true;
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
@ -22,7 +21,6 @@
}; };
boot.initrd.luks.devices."enc".device = "/dev/disk/by-uuid/30025a9f-44cf-4074-8ae2-d4925efd67dd"; boot.initrd.luks.devices."enc".device = "/dev/disk/by-uuid/30025a9f-44cf-4074-8ae2-d4925efd67dd";
boot.initrd.luks.devices."enc".crypttabExtraOpts = [ "fido2-device=auto" ];
fileSystems."/home" = { fileSystems."/home" = {
device = "/dev/disk/by-uuid/668a49b3-d169-461f-861d-0c3e6a1642d1"; device = "/dev/disk/by-uuid/668a49b3-d169-461f-861d-0c3e6a1642d1";

View File

@ -14,6 +14,7 @@
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = { fileSystems."/" = {
device = "/dev/disk/by-uuid/4a91d3eb-1633-42d9-8304-c10e49a61154"; device = "/dev/disk/by-uuid/4a91d3eb-1633-42d9-8304-c10e49a61154";
fsType = "btrfs"; fsType = "btrfs";

View File

@ -9,9 +9,20 @@ let
cfg = config.my.yubikey; cfg = config.my.yubikey;
in in
{ {
options.my.yubikey = mkEnableOption "yubikey"; options.my.yubikey = {
enable = mkEnableOption "yubikey";
luksSupport = {
enable = mkEnableOption "fido2 luks support";
devices = mkOption {
type = types.listOf types.str;
default = [ ];
description = "List of luks devices to enable fido2 support for.";
};
};
};
config = {
config = mkIf cfg.enable {
services.udev.packages = [ pkgs.yubikey-personalization ]; services.udev.packages = [ pkgs.yubikey-personalization ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
# cli # cli
@ -22,5 +33,12 @@ in
yubikey-manager-qt yubikey-manager-qt
yubikey-personalization-gui yubikey-personalization-gui
]; ];
boot = mkIf cfg.luksSupport.enable {
initrd.systemd.enable = true;
initrd.luks.devices = genAttrs cfg.luksSupport.devices (_: {
crypttabExtraOpts = [ "fido2-device=auto" ];
});
};
}; };
} }

View File

@ -5,8 +5,13 @@
}: }:
with lib; { with lib; {
my = { my = {
# config yubikey = {
yubikey.enable = true; enable = true;
luksSupport = {
enable = true;
devices = [ "enc" ];
};
};
wallpapers.enable = true; wallpapers.enable = true;
theming = { theming = {
enable = true; enable = true;