diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/colors.nix | 2 | ||||
| -rw-r--r-- | lib/default.nix | 77 | ||||
| -rw-r--r-- | lib/files.nix | 9 | ||||
| -rw-r--r-- | lib/home.nix | 66 | ||||
| -rw-r--r-- | lib/monitors.nix | 21 |
5 files changed, 96 insertions, 79 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 21031c8..2842af4 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -1,73 +1,8 @@ -{lib, ...} @ inputs: let - callLibs = file: import file inputs; - files = callLibs ./files.nix; - colors = callLibs ./colors.nix; +{lib}: let + callLibs = file: import file {inherit lib;}; in { - inherit (files) getFiles certs sshKeys gpgKeys; - inherit (colors) colorToInt colorToHex darkenColor lightenColor mixColor; - - # 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; + colors = callLibs ./colors.nix; + files = callLibs ./files.nix; + home = callLibs ./home.nix; + monitors = callLibs ./monitors.nix; } 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 new file mode 100644 index 0000000..4cb2977 --- /dev/null +++ b/lib/monitors.nix @@ -0,0 +1,21 @@ +_: { + # 1080p small ASUS monitor + asus = { + desc = "ASUSTek COMPUTER INC ASUS VA24E LALMTF215939"; + position = { + enabled = true; + x = 2048; + y = 240; + }; + }; + + # 1440p 32in acer + acer = { + desc = "Acer Technologies EB321HQU 0x00000698"; + position = { + enabled = true; + x = 3968; + y = 0; + }; + }; +} |