diff options
Diffstat (limited to 'profiles')
-rw-r--r-- | profiles/bluetooth/default.nix | 9 | ||||
-rw-r--r-- | profiles/default.nix | 4 | ||||
-rw-r--r-- | profiles/desktop/default.nix | 34 | ||||
-rw-r--r-- | profiles/gtk/default.nix | 13 | ||||
-rw-r--r-- | profiles/laptop/default.nix | 15 | ||||
-rw-r--r-- | profiles/multimedia/default.nix | 12 | ||||
-rw-r--r-- | profiles/trusted/default.nix | 22 | ||||
-rw-r--r-- | profiles/wm/default.nix | 18 |
8 files changed, 127 insertions, 0 deletions
diff --git a/profiles/bluetooth/default.nix b/profiles/bluetooth/default.nix new file mode 100644 index 0000000..ffd05b4 --- /dev/null +++ b/profiles/bluetooth/default.nix @@ -0,0 +1,9 @@ +{ config, lib, ... }: +let cfg = config.my.profiles.bluetooth; +in { + options.my.profiles.bluetooth = with lib; { + enable = mkEnableOption "bluetooth profile"; + }; + + config = lib.mkIf cfg.enable { my.hardware.bluetooth.enable = true; }; +} diff --git a/profiles/default.nix b/profiles/default.nix new file mode 100644 index 0000000..d683b58 --- /dev/null +++ b/profiles/default.nix @@ -0,0 +1,4 @@ +{ ... }: { + imports = + [ ./bluetooth ./laptop ./gtk ./trusted ./wm ./desktop ./multimedia ]; +} diff --git a/profiles/desktop/default.nix b/profiles/desktop/default.nix new file mode 100644 index 0000000..c0c4a9f --- /dev/null +++ b/profiles/desktop/default.nix @@ -0,0 +1,34 @@ +{ config, lib, ... }: +let cfg = config.my.profiles.desktop; +in { + options.my.profiles.desktop = with lib; { + enable = mkEnableOption "desktop profile"; + }; + config = lib.mkIf cfg.enable { + my = { + systems = { fonts.enable = true; }; + services = { + gnome.enable = true; + # we need avahi in order to use the printer/scanner + avahi.enable = true; + }; + home = { + emacs.enable = true; + direnv.enable = true; + drone-cli.enable = true; + firefox.enable = true; + pcmanfm.enable = true; + terminal.program = "alacritty"; + xdg.enable = true; + eog.enable = true; + evince.enable = true; + transmission-remote.enable = true; + }; + profiles = { + gtk.enable = true; + wm.windowManager = "sway"; + }; + programs = { sway.enable = true; }; + }; + }; +} diff --git a/profiles/gtk/default.nix b/profiles/gtk/default.nix new file mode 100644 index 0000000..c84832b --- /dev/null +++ b/profiles/gtk/default.nix @@ -0,0 +1,13 @@ +{ config, lib, ... }: +let cfg = config.my.profiles.gtk; +in { + options.my.profiles.gtk = with lib; { + enable = mkEnableOption "gtk profile"; + }; + config = lib.mkIf cfg.enable { + # Allow setting GTK configuration using home-manager + programs.dconf.enable = true; + # GTK theme configuration + my.home.gtk.enable = true; + }; +} diff --git a/profiles/laptop/default.nix b/profiles/laptop/default.nix new file mode 100644 index 0000000..f5288b6 --- /dev/null +++ b/profiles/laptop/default.nix @@ -0,0 +1,15 @@ +{ config, lib, ... }: +let cfg = config.my.profiles.laptop; +in { + options.my.profiles.laptop = with lib; { + enable = mkEnableOption "laptop profile"; + }; + + config = lib.mkIf cfg.enable { + # monitors and controls temperature + my.services.thermald.enable = true; + + # Enable TLP power management + my.services.tlp.enable = true; + }; +} diff --git a/profiles/multimedia/default.nix b/profiles/multimedia/default.nix new file mode 100644 index 0000000..4c1d3fe --- /dev/null +++ b/profiles/multimedia/default.nix @@ -0,0 +1,12 @@ +{ config, lib, ... }: +let cfg = config.my.profiles.multimedia; +in { + options.my.profiles.multimedia = with lib; { + enable = mkEnableOption "multimedia profile"; + }; + config = lib.mkIf cfg.enable { + my.home.vlc.enable = true; + my.home.mpv.enable = true; + my.home.sublime-music.enable = true; + }; +} diff --git a/profiles/trusted/default.nix b/profiles/trusted/default.nix new file mode 100644 index 0000000..927ba45 --- /dev/null +++ b/profiles/trusted/default.nix @@ -0,0 +1,22 @@ +{ config, lib, ... }: +let + cfg = config.my.profiles.trusted; + isEnabled = config.my.home.wm.windowManager == "sway"; +in { + options.my.profiles.trusted = with lib; { + enable = mkEnableOption "trusted profile"; + }; + config = lib.mkIf cfg.enable { + my.home.ssh.enable = true; + my.home.gpg = { + enable = true; + pinentry = "gnome3"; + defaultKey = "23348B57F01D4234B5CFBA0923208AC01EB6EEA1"; + }; + my.home.gcloud.enable = true; + my.home.mail.enable = true; + my.home.pass.enable = true; + my.home.seahorse.enable = isEnabled; + my.services.syncthing.enable = true; + }; +} diff --git a/profiles/wm/default.nix b/profiles/wm/default.nix new file mode 100644 index 0000000..7b1fe39 --- /dev/null +++ b/profiles/wm/default.nix @@ -0,0 +1,18 @@ +{ config, lib, ... }: +let cfg = config.my.profiles.wm; +in { + options.my.profiles.wm = with lib; { + windowManager = mkOption { + type = with types; nullOr (enum [ "sway" ]); + default = null; + example = "sway"; + description = "Which window manager to use"; + }; + }; + config = lib.mkMerge [ + (lib.mkIf (cfg.windowManager == "sway") { + # Enable sway + my.home.wm.windowManager = "sway"; + }) + ]; +} |