mirror of
https://github.com/buckley310/nixos-config.git
synced 2024-11-09 18:47:02 +00:00
add default.nix
This commit is contained in:
parent
9bbc41343b
commit
30ada231ab
1 changed files with 40 additions and 0 deletions
40
default.nix
Normal file
40
default.nix
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.sconfig;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.sconfig = {
|
||||||
|
|
||||||
|
profile = mkOption { type = types.str; };
|
||||||
|
|
||||||
|
scroll-boost = mkEnableOption "Patch libinput scroll speed";
|
||||||
|
|
||||||
|
status-on-console = mkEnableOption "Display Neofetch on system console";
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkMerge [
|
||||||
|
|
||||||
|
(import ./modules/cli.nix { inherit config pkgs lib; })
|
||||||
|
(import ./modules/baseline.nix { inherit config pkgs lib; })
|
||||||
|
|
||||||
|
(mkIf (cfg.profile == "server") (mkMerge [
|
||||||
|
{ services.openssh.enable = true; }
|
||||||
|
(import ./modules/auto-update.nix { })
|
||||||
|
]))
|
||||||
|
|
||||||
|
(mkIf (cfg.profile == "desktop-sway") (import ./modules/sway { inherit pkgs; }))
|
||||||
|
(mkIf (cfg.profile == "desktop-gnome") (import ./modules/gnome { inherit pkgs; }))
|
||||||
|
|
||||||
|
(mkIf ("desktop-" == builtins.substring 0 8 cfg.profile) (mkMerge [
|
||||||
|
(import ./modules/security-tools.nix { inherit pkgs; })
|
||||||
|
(import ./modules/graphical.nix { inherit pkgs; })
|
||||||
|
]))
|
||||||
|
|
||||||
|
(mkIf cfg.scroll-boost (import ./modules/scroll-boost { }))
|
||||||
|
(mkIf cfg.status-on-console (import ./modules/status-on-console { inherit pkgs; }))
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in a new issue