mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 17:17:22 +01:00
refactor: eliminate old module setup [part 1]
This commit is contained in:
parent
da4cf4eca0
commit
de9b5cf40c
58 changed files with 2375 additions and 2899 deletions
|
|
@ -1,9 +1,12 @@
|
|||
{ lib, ... }:
|
||||
{ self, lib, ... }:
|
||||
let
|
||||
importNames = lib.swarselsystems.readNix "profiles/nixos/common";
|
||||
profilesPath = "${self}/profiles";
|
||||
in
|
||||
{
|
||||
imports = lib.swarselsystems.mkImports importNames "profiles/nixos/common";
|
||||
imports = lib.swarselsystems.mkImports importNames "profiles/nixos/common" ++ [
|
||||
"${profilesPath}/home/common/sharedsetup.nix"
|
||||
];
|
||||
|
||||
nixpkgs.config.permittedInsecurePackages = [
|
||||
"jitsi-meet-1.0.8043"
|
||||
|
|
|
|||
|
|
@ -1,34 +1,47 @@
|
|||
{ pkgs, config, lib, ... }:
|
||||
{
|
||||
|
||||
hardware = {
|
||||
# opengl.driSupport32Bit = true is replaced with graphics.enable32Bit and hence redundant
|
||||
graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
|
||||
|
||||
trackpoint = lib.mkIf config.swarselsystems.trackpoint.isAvailable {
|
||||
enable = true;
|
||||
inherit (config.swarselsystems.trackpoint) device;
|
||||
};
|
||||
|
||||
keyboard.qmk.enable = true;
|
||||
|
||||
enableAllFirmware = true;
|
||||
|
||||
bluetooth = lib.mkIf config.swarselsystems.hasBluetooth {
|
||||
enable = true;
|
||||
package = pkgs.stable.bluez;
|
||||
powerOnBoot = true;
|
||||
settings = {
|
||||
General = {
|
||||
Enable = "Source,Sink,Media,Socket";
|
||||
};
|
||||
options.swarselsystems = {
|
||||
hasBluetooth = lib.mkEnableOption "bluetooth availability";
|
||||
hasFingerprint = lib.mkEnableOption "fingerprint sensor availability";
|
||||
trackpoint = {
|
||||
isAvailable = lib.mkEnableOption "trackpoint availability";
|
||||
trackpoint.device = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
config = {
|
||||
hardware = {
|
||||
# opengl.driSupport32Bit = true is replaced with graphics.enable32Bit and hence redundant
|
||||
graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
|
||||
services.fprintd.enable = lib.mkIf config.swarselsystems.hasFingerprint true;
|
||||
|
||||
trackpoint = lib.mkIf config.swarselsystems.trackpoint.isAvailable {
|
||||
enable = true;
|
||||
inherit (config.swarselsystems.trackpoint) device;
|
||||
};
|
||||
|
||||
keyboard.qmk.enable = true;
|
||||
|
||||
enableAllFirmware = true;
|
||||
|
||||
bluetooth = lib.mkIf config.swarselsystems.hasBluetooth {
|
||||
enable = true;
|
||||
package = pkgs.stable.bluez;
|
||||
powerOnBoot = true;
|
||||
settings = {
|
||||
General = {
|
||||
Enable = "Source,Sink,Media,Socket";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.fprintd.enable = lib.mkIf config.swarselsystems.hasFingerprint true;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
26
profiles/nixos/common/sharedsetup.nix
Normal file
26
profiles/nixos/common/sharedsetup.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
options.swarselsystems = {
|
||||
withHomeManager = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
};
|
||||
isSwap = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
};
|
||||
swapSize = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "8G";
|
||||
};
|
||||
rootDisk = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
};
|
||||
isCrypted = lib.mkEnableOption "uses full disk encryption";
|
||||
initialSetup = lib.mkEnableOption "initial setup (no sops keys available)";
|
||||
|
||||
isImpermanence = lib.mkEnableOption "use impermanence on this system";
|
||||
isSecureBoot = lib.mkEnableOption "use secure boot on this system";
|
||||
};
|
||||
}
|
||||
|
|
@ -8,12 +8,7 @@
|
|||
config.swarselsystems.stylix;
|
||||
home-manager.users."${config.swarselsystems.mainUser}" = {
|
||||
stylix = {
|
||||
targets = {
|
||||
emacs.enable = false;
|
||||
waybar.enable = false;
|
||||
sway.useWallpaper = false;
|
||||
firefox.profileNames = [ "default" ];
|
||||
};
|
||||
targets = config.swarselsystems.stylixHomeTargets;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue