summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/colors.nix2
-rw-r--r--lib/default.nix77
-rw-r--r--lib/files.nix9
-rw-r--r--lib/home.nix66
-rw-r--r--lib/monitors.nix34
5 files changed, 91 insertions, 97 deletions
diff --git a/lib/colors.nix b/lib/colors.nix
index a653f11..27f29bb 100644
--- a/lib/colors.nix
+++ b/lib/colors.nix
@@ -1,4 +1,4 @@
-{lib, ...}: let
+{lib}: let
colorToInt = hex: let
table = {
"0" = 0;
diff --git a/lib/default.nix b/lib/default.nix
index dcfb442..2842af4 100644
--- a/lib/default.nix
+++ b/lib/default.nix
@@ -1,75 +1,8 @@
-{lib, ...} @ inputs: let
- callLibs = file: import file inputs;
- files = callLibs ./files.nix;
+{lib}: let
+ callLibs = file: import file {inherit lib;};
+in {
colors = callLibs ./colors.nix;
+ files = callLibs ./files.nix;
+ home = callLibs ./home.nix;
monitors = callLibs ./monitors.nix;
-in {
- inherit (files) getFiles certs sshKeys gpgKeys;
- inherit (colors) colorToInt colorToHex darkenColor lightenColor mixColor;
- inherit monitors;
-
- # set of options we want to copy from a system
- # config to home manager
- homeConfig = config:
- {
- inherit
- (config)
- # System Information
- hostName
- timeZone
- stateVersion
- # System Modules
- battery
- bluetooth
- fingerprint
- network
- tpm
- nvidia
- minimal
- # Primary User
- user
- fullName
- email
- homePath
- dotfilesPath
- # Monitors
- monitors
- # Theme
- theme
- # Programs
- apps
- browsers
- desktops
- gaming
- development
- virt
- autoRun
- # Packages
- extraPackages
- ;
- # fix xdg
- xdg.portal = {
- inherit
- (config.xdg.portal)
- enable
- xdgOpenUsePortal
- extraPortals
- config
- ;
- };
- # bring over nix options
- nix = lib.mkForce {
- inherit
- (config.nix)
- buildMachines
- checkConfig
- distributedBuilds
- gc
- package
- registry
- settings
- ;
- };
- }
- // config.extraHome;
}
diff --git a/lib/files.nix b/lib/files.nix
index 960d1d0..c75508c 100644
--- a/lib/files.nix
+++ b/lib/files.nix
@@ -1,8 +1,8 @@
-{lib, ...}: let
+{lib}: let
# gets list of files from a directory
getFiles = folder:
lib.attrsets.mapAttrsToList (name: _: "${folder}/${name}") (builtins.readDir folder);
-
+in {
# gets custom set of root certs
certs = getFiles ../files/certs;
@@ -15,9 +15,4 @@
gpgKeys =
builtins.filter
(filePath: lib.strings.hasSuffix "asc" filePath) (getFiles ../files/keys);
-in {
- inherit getFiles;
- inherit certs;
- inherit sshKeys;
- inherit gpgKeys;
}
diff --git a/lib/home.nix b/lib/home.nix
new file mode 100644
index 0000000..4b4ec02
--- /dev/null
+++ b/lib/home.nix
@@ -0,0 +1,66 @@
+{lib}: {
+ # set of options we want to copy from a system
+ # config to home manager
+ mkConfig = config:
+ {
+ inherit
+ (config)
+ # System Information
+ hostName
+ timeZone
+ stateVersion
+ # System Modules
+ battery
+ bluetooth
+ fingerprint
+ network
+ tpm
+ nvidia
+ minimal
+ # Primary User
+ user
+ fullName
+ email
+ homePath
+ dotfilesPath
+ # Monitors
+ monitors
+ # Theme
+ theme
+ # Programs
+ apps
+ browsers
+ desktops
+ gaming
+ development
+ virt
+ autoRun
+ # Packages
+ extraPackages
+ ;
+ # fix xdg
+ xdg.portal = {
+ inherit
+ (config.xdg.portal)
+ enable
+ xdgOpenUsePortal
+ extraPortals
+ config
+ ;
+ };
+ # bring over nix options
+ nix = lib.mkForce {
+ inherit
+ (config.nix)
+ buildMachines
+ checkConfig
+ distributedBuilds
+ gc
+ package
+ registry
+ settings
+ ;
+ };
+ }
+ // config.extraHome;
+}
diff --git a/lib/monitors.nix b/lib/monitors.nix
index 603b491..4cb2977 100644
--- a/lib/monitors.nix
+++ b/lib/monitors.nix
@@ -1,21 +1,21 @@
-_: let
- asus = {
- desc = "ASUSTek COMPUTER INC ASUS VA24E LALMTF215939";
- position = {
- enabled = true;
- x = 2048;
- y = 240;
- };
+_: {
+ # 1080p small ASUS monitor
+ asus = {
+ desc = "ASUSTek COMPUTER INC ASUS VA24E LALMTF215939";
+ position = {
+ enabled = true;
+ x = 2048;
+ y = 240;
};
+ };
- acer = {
- desc = "Acer Technologies EB321HQU 0x00000698";
- position = {
- enabled = true;
- x = 3968;
- y = 0;
- };
+ # 1440p 32in acer
+ acer = {
+ desc = "Acer Technologies EB321HQU 0x00000698";
+ position = {
+ enabled = true;
+ x = 3968;
+ y = 0;
};
-in {
- inherit asus acer;
+ };
}