Seperate out linux home-manager
This commit is contained in:
parent
818294bddd
commit
092a0d0010
|
@ -116,7 +116,7 @@
|
||||||
nixosConfig = config;
|
nixosConfig = config;
|
||||||
};
|
};
|
||||||
sharedModules = [
|
sharedModules = [
|
||||||
./home-manager/default.nix
|
./home-manager/linux/default.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
let
|
let
|
||||||
devel = config.nathan.programs.devel;
|
devel = config.nathan.programs.devel;
|
||||||
unstable = inputs.nixpkgs-unstable.legacyPackages."${pkgs.system}";
|
unstable = inputs.nixpkgs-unstable.legacyPackages."${pkgs.system}";
|
||||||
inherit (import ../../modules/lib.nix { inherit lib; inherit pkgs; }) nLib;
|
inherit (import ../../../modules/lib.nix { inherit lib; inherit pkgs; }) nLib;
|
||||||
in
|
in
|
||||||
|
|
||||||
with lib; with nLib; {
|
with lib; with nLib; {
|
|
@ -1,112 +0,0 @@
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
|
||||||
let
|
|
||||||
inherit (import ../modules/lib.nix { inherit lib; inherit pkgs; }) nLib;
|
|
||||||
in
|
|
||||||
with lib; with nLib; {
|
|
||||||
imports = [
|
|
||||||
./programs/sway.nix
|
|
||||||
./programs/core.nix
|
|
||||||
./programs/communications.nix
|
|
||||||
./programs/devel.nix
|
|
||||||
./programs/emacs.nix
|
|
||||||
./programs/image-editing.nix
|
|
||||||
./programs/media.nix
|
|
||||||
./programs/wine.nix
|
|
||||||
./services/syncthing.nix
|
|
||||||
./services/email.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
options = {
|
|
||||||
nathan = {
|
|
||||||
# Services
|
|
||||||
services = {
|
|
||||||
# Synthing, enabled by default on linux desktop
|
|
||||||
syncthing = mkDefaultOption "Syncthing" (config.nathan.config.isDesktop && pkgs.stdenv.isLinux);
|
|
||||||
# Email syncing
|
|
||||||
# Disabled by default since this requires manual setup on the machine
|
|
||||||
# TODO: Get this working on darwin
|
|
||||||
email = {
|
|
||||||
enable = mkEnableOption "Email";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
# Programs
|
|
||||||
programs = {
|
|
||||||
util = {
|
|
||||||
# Core utilites
|
|
||||||
core = mkEnableOptionT "core";
|
|
||||||
# Ssh configuration, enabled by default
|
|
||||||
ssh = mkEnableOptionT "ssh";
|
|
||||||
# Fish configuration, enabled by default
|
|
||||||
fish = mkEnableOptionT "fish";
|
|
||||||
# Git configuration, enabled by default
|
|
||||||
git = {
|
|
||||||
enable = mkEnableOptionT "git";
|
|
||||||
gpgSign = mkDefaultOption "git signatures" config.nathan.config.isDesktop;
|
|
||||||
};
|
|
||||||
# Bat configuration, enabled by default
|
|
||||||
bat = mkEnableOptionT "bat";
|
|
||||||
# JSON Utilities, enabled by default
|
|
||||||
json = mkEnableOptionT "json";
|
|
||||||
# Productivity application
|
|
||||||
productivity = mkDefaultOption "Productivity applications" config.nathan.config.isDesktop;
|
|
||||||
# Wine support, disabled by default
|
|
||||||
wine = mkEnableOption "wine";
|
|
||||||
};
|
|
||||||
# Swaywm and supoorting application configuration
|
|
||||||
swaywm = {
|
|
||||||
enable = mkDefaultOption "swaywm" config.nathan.config.isDesktop;
|
|
||||||
};
|
|
||||||
# Communications applications
|
|
||||||
communications = {
|
|
||||||
# Enable by default if we are on a linux desktop
|
|
||||||
enable = mkDefaultOption "Communication applications" (config.nathan.config.isDesktop && pkgs.stdenv.isLinux);
|
|
||||||
};
|
|
||||||
# Development applications, enabled by default on desktop
|
|
||||||
devel = {
|
|
||||||
core = mkDefaultOption "Core Development Utilites" config.nathan.config.isDesktop;
|
|
||||||
rust = mkDefaultOption "Rust Development Utilites" config.nathan.config.isDesktop;
|
|
||||||
jvm = mkDefaultOption "JVM Development Utilites" config.nathan.config.isDesktop;
|
|
||||||
python = mkDefaultOption "Python Development Utilites" config.nathan.config.isDesktop;
|
|
||||||
js = mkDefaultOption "JavaScript/TypeScript Development Utilites" config.nathan.config.isDesktop;
|
|
||||||
raku = mkDefaultOption "Raku Development Utilites" config.nathan.config.isDesktop;
|
|
||||||
};
|
|
||||||
# Emacs, enabled by default on desktop
|
|
||||||
emacs = {
|
|
||||||
enable = mkDefaultOption "Emacs" config.nathan.config.isDesktop;
|
|
||||||
service = mkDefaultOption "Emacs Service" config.nathan.config.isDesktop;
|
|
||||||
package = mkOption {
|
|
||||||
description = "Emacs package to use";
|
|
||||||
default = inputs.emacs.packages."${pkgs.system}".emacsPgtkNativeComp;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
# Image editing software, on by default on desktop
|
|
||||||
image-editing = mkDefaultOption "Image Editing Software" config.nathan.config.isDesktop;
|
|
||||||
# Media appilcations, on by default on linux desktop
|
|
||||||
media = {
|
|
||||||
enable = mkDefaultOption "Media Applications" (config.nathan.config.isDesktop && pkgs.stdenv.isLinux);
|
|
||||||
mopidyExtraConfig = mkOption {
|
|
||||||
description = "Extra config files for mopidy";
|
|
||||||
default = [ ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
# Firefox, enabled by default on linux desktop
|
|
||||||
firefox = mkDefaultOption "Firefox" (config.nathan.config.isDesktop && pkgs.stdenv.isLinux);
|
|
||||||
};
|
|
||||||
# General configuration options
|
|
||||||
config = {
|
|
||||||
# Is this system a desktop?
|
|
||||||
# false by default
|
|
||||||
isDesktop = mkEnableOption "Desktop specific settings";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = {
|
|
||||||
home.stateVersion = "22.05";
|
|
||||||
programs.home-manager.enable = true;
|
|
||||||
programs.firefox = {
|
|
||||||
enable = config.nathan.programs.firefox;
|
|
||||||
package = pkgs.firefox-beta-bin;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -0,0 +1,73 @@
|
||||||
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
let
|
||||||
|
inherit (import ../../modules/lib.nix { inherit lib; inherit pkgs; }) nLib;
|
||||||
|
in
|
||||||
|
with lib; with nLib; {
|
||||||
|
imports = [
|
||||||
|
../options.nix
|
||||||
|
./programs/sway.nix
|
||||||
|
../common/programs/core.nix
|
||||||
|
./programs/communications.nix
|
||||||
|
../common/programs/devel.nix
|
||||||
|
./programs/emacs.nix
|
||||||
|
./programs/image-editing.nix
|
||||||
|
./programs/media.nix
|
||||||
|
./programs/wine.nix
|
||||||
|
./services/syncthing.nix
|
||||||
|
./services/email.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
options = {
|
||||||
|
nathan = {
|
||||||
|
# Services, these are platform specific so they go here
|
||||||
|
services = {
|
||||||
|
# Synthing, enabled by default on linux desktop
|
||||||
|
syncthing = mkDefaultOption "Syncthing" (config.nathan.config.isDesktop && pkgs.stdenv.isLinux);
|
||||||
|
# Email syncing
|
||||||
|
# Disabled by default since this requires manual setup on the machine
|
||||||
|
# TODO: Get this working on darwin
|
||||||
|
email = {
|
||||||
|
enable = mkEnableOption "Email";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
# Linux specific programs
|
||||||
|
programs = {
|
||||||
|
util = {
|
||||||
|
# Wine support, disabled by default
|
||||||
|
wine = mkEnableOption "wine";
|
||||||
|
};
|
||||||
|
# Swaywm and supoorting application configuration
|
||||||
|
swaywm = {
|
||||||
|
enable = mkDefaultOption "swaywm" config.nathan.config.isDesktop;
|
||||||
|
};
|
||||||
|
# Communications applications
|
||||||
|
communications = {
|
||||||
|
# Enable by default if we are on a linux desktop
|
||||||
|
enable = mkDefaultOption "Communication applications" (config.nathan.config.isDesktop && pkgs.stdenv.isLinux);
|
||||||
|
};
|
||||||
|
# Image editing software, on by default on desktop
|
||||||
|
image-editing = mkDefaultOption "Image Editing Software" config.nathan.config.isDesktop;
|
||||||
|
# Media appilcations, on by default on linux desktop
|
||||||
|
media = {
|
||||||
|
enable = mkDefaultOption "Media Applications" (config.nathan.config.isDesktop && pkgs.stdenv.isLinux);
|
||||||
|
mopidyExtraConfig = mkOption {
|
||||||
|
description = "Extra config files for mopidy";
|
||||||
|
default = [ ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
# Firefox, enabled by default on linux desktop
|
||||||
|
firefox = mkDefaultOption "Firefox" (config.nathan.config.isDesktop && pkgs.stdenv.isLinux);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
home.stateVersion = "22.05";
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
programs.firefox = {
|
||||||
|
enable = config.nathan.programs.firefox;
|
||||||
|
package = pkgs.firefox-beta-bin;
|
||||||
|
};
|
||||||
|
nathan.programs.emacs.package = lib.mkDefault inputs.emacs.packages."${pkgs.system}".emacsPgtkNativeComp;
|
||||||
|
};
|
||||||
|
}
|
|
@ -15,7 +15,7 @@
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
discordWayland = pkgs.callPackage ../../packages/discord/default.nix rec {
|
discordWayland = pkgs.callPackage ../../../packages/discord/default.nix rec {
|
||||||
pname = "discord-electron";
|
pname = "discord-electron";
|
||||||
binaryName = "Discord";
|
binaryName = "Discord";
|
||||||
desktopName = "Discord (Wayland)";
|
desktopName = "Discord (Wayland)";
|
|
@ -35,7 +35,7 @@
|
||||||
# Setup doom emacs
|
# Setup doom emacs
|
||||||
programs.doom-emacs = {
|
programs.doom-emacs = {
|
||||||
enable = true;
|
enable = true;
|
||||||
doomPrivateDir = ../../doom.d;
|
doomPrivateDir = ../../../doom.d;
|
||||||
emacsPackage = config.nathan.programs.emacs.package;
|
emacsPackage = config.nathan.programs.emacs.package;
|
||||||
emacsPackagesOverlay = self: super: {
|
emacsPackagesOverlay = self: super: {
|
||||||
org-protocol-capture-html = self.trivialBuild {
|
org-protocol-capture-html = self.trivialBuild {
|
|
@ -46,7 +46,7 @@ with lib; {
|
||||||
port = 1143;
|
port = 1143;
|
||||||
tls = {
|
tls = {
|
||||||
useStartTls = true;
|
useStartTls = true;
|
||||||
certificatesFile = ../../certificates/protonmail-${nixosConfig.networking.hostName}.pem;
|
certificatesFile = ../../../certificates/protonmail-${nixosConfig.networking.hostName}.pem;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
smtp = {
|
smtp = {
|
||||||
|
@ -54,7 +54,7 @@ with lib; {
|
||||||
port = 1025;
|
port = 1025;
|
||||||
tls = {
|
tls = {
|
||||||
useStartTls = true;
|
useStartTls = true;
|
||||||
certificatesFile = ../../certificates/protonmail-${nixosConfig.networking.hostName}.pem;
|
certificatesFile = ../../../certificates/protonmail-${nixosConfig.networking.hostName}.pem;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
mbsync = {
|
mbsync = {
|
||||||
|
@ -82,7 +82,7 @@ with lib; {
|
||||||
postExec =
|
postExec =
|
||||||
if config.nathan.programs.emacs.service
|
if config.nathan.programs.emacs.service
|
||||||
then
|
then
|
||||||
"${../../scripts/update-mu4e.sh}"
|
"${../../../scripts/update-mu4e.sh}"
|
||||||
else
|
else
|
||||||
"${pkgs.mu}/bin/mu index";
|
"${pkgs.mu}/bin/mu index";
|
||||||
};
|
};
|
|
@ -0,0 +1,55 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
inherit (import ../modules/lib.nix { inherit lib; inherit pkgs; }) nLib;
|
||||||
|
in
|
||||||
|
with lib; with nLib;
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
nathan = {
|
||||||
|
programs = {
|
||||||
|
util = {
|
||||||
|
# Core utilites
|
||||||
|
core = mkEnableOptionT "core";
|
||||||
|
# Ssh configuration, enabled by default
|
||||||
|
ssh = mkEnableOptionT "ssh";
|
||||||
|
# Fish configuration, enabled by default
|
||||||
|
fish = mkEnableOptionT "fish";
|
||||||
|
# Git configuration, enabled by default
|
||||||
|
git = {
|
||||||
|
enable = mkEnableOptionT "git";
|
||||||
|
gpgSign = mkDefaultOption "git signatures" config.nathan.config.isDesktop;
|
||||||
|
};
|
||||||
|
# Bat configuration, enabled by default
|
||||||
|
bat = mkEnableOptionT "bat";
|
||||||
|
# JSON Utilities, enabled by default
|
||||||
|
json = mkEnableOptionT "json";
|
||||||
|
# Productivity application
|
||||||
|
productivity = mkDefaultOption "Productivity applications" config.nathan.config.isDesktop;
|
||||||
|
};
|
||||||
|
# Development applications, enabled by default on desktop
|
||||||
|
devel = {
|
||||||
|
core = mkDefaultOption "Core Development Utilites" config.nathan.config.isDesktop;
|
||||||
|
rust = mkDefaultOption "Rust Development Utilites" config.nathan.config.isDesktop;
|
||||||
|
jvm = mkDefaultOption "JVM Development Utilites" config.nathan.config.isDesktop;
|
||||||
|
python = mkDefaultOption "Python Development Utilites" config.nathan.config.isDesktop;
|
||||||
|
js = mkDefaultOption "JavaScript/TypeScript Development Utilites" config.nathan.config.isDesktop;
|
||||||
|
raku = mkDefaultOption "Raku Development Utilites" config.nathan.config.isDesktop;
|
||||||
|
};
|
||||||
|
# Emacs, enabled by default on desktop
|
||||||
|
emacs = {
|
||||||
|
enable = mkDefaultOption "Emacs" config.nathan.config.isDesktop;
|
||||||
|
service = mkDefaultOption "Emacs Service" config.nathan.config.isDesktop;
|
||||||
|
package = mkOption {
|
||||||
|
description = "Emacs package to use";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
# General configuration options
|
||||||
|
config = {
|
||||||
|
# Is this system a desktop?
|
||||||
|
# false by default
|
||||||
|
isDesktop = mkEnableOption "Desktop specific settings";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue