diff options
Diffstat (limited to 'infra/libkookie/roots/uwu.nix')
-rw-r--r-- | infra/libkookie/roots/uwu.nix | 119 |
1 files changed, 86 insertions, 33 deletions
diff --git a/infra/libkookie/roots/uwu.nix b/infra/libkookie/roots/uwu.nix index a292ba04a228..0eab77ff8d3b 100644 --- a/infra/libkookie/roots/uwu.nix +++ b/infra/libkookie/roots/uwu.nix @@ -9,52 +9,110 @@ * LIBKOOKIE is licensed under the GPL-3.0 (or later) -- see LICENSE */ -{ lib, config, pkgs, ... }: +{ lib, config, pkgs, ... } @ args: - -let - forActiveUsers = (attrs: - lib.listToAttrs (map (u: lib.nameValuePair "${u}" ({ ... }: attrs)) - [ "spacekookie" ])); +let klib = (import <modules/harness/lib.nix> args); in { - nixpkgs.config.allowUnfree = true; - - imports = [ - <home-manager/nixos> - <modules> - # ../legacy/nix - # ../legacy/base - # ../legacy/docker - # ../legacy/workstation - # ../legacy/workstation/hardware/trackpoint + + ################################################################### + # libkookie configuration + # + # + # + + imports = with klib; [ + # Load base modules required to bootstrap libkookie + <home-manager/nixos> <modules> <configuration/nix> + + + ################################################################# + # Modules that require NixOS integration + # + <configuration/workstation/fonts> + <configuration/workstation/printing> + <configuration/workstation/xkblayout> + + <configuration/workstation/yubikey> + <configuration/workstation/gpg> + + # TODO: build a beter loader + <configuration/workstation/net/uwu.nix> + <configuration/workstation/time/local.nix> + + + ################################################################# + # home-manager modules that exist entirely in userspace + # + (loadModule <configuration/base> "default") + + # Set of base tools and system settings + (loadModule <configuration/workstation/i3> "uwu") + (loadModule <configuration/workstation/audio> "default") + (loadModule <configuration/workstation/kitty> "uwu") + (loadModule <configuration/workstation/office> "default") + (loadModule <configuration/workstation/mail> "default") + (loadModule <configuration/workstation/firefox> "default") + (loadModule <configuration/workstation/redshift> "default") + (loadModule <configuration/workstation/syncthing> "default") + + (loadModule <configuration/workstation/devel> "default") + + # Various other graphical tools + (loadModule <configuration/workstation/pass> "default") + (loadModule <configuration/workstation/chat> "default") + (loadModule <configuration/workstation/music> "default") + (loadModule <configuration/workstation/games> "default") + (loadModule <configuration/workstation/creative> "default") ]; - libkookie = { - activeUsers = [ "spacekookie" ]; - userPath = ../configuration/users; - }; + # Configure i3 with the amdgpu driver + libkookie.ui.i3 = { enable = true; videoDrivers = [ "intel" ]; }; + + # Configure audio + libkookie.audio = { enable = true; discovery = true; }; - libkookie.emacs = { + # Enable fish shell handling on the system + libkookie.base.fish.enable = true; + + # Configure mail handling + libkookie.workstation.mail = { enable = true; + configPath = ../ext/mail; + mailArchive = "/home/office/mail"; + access = { user = "spacekookie"; group = "spacekookie"; }; }; - # libkookie.ui.i3.enable = true; + # Enable desired users + libkookie.activeUsers = [ (klib.load <configuration/users/spacekookie>) ]; - home-manager.users = forActiveUsers { - imports = []; - }; + # + # + # + # + ################################################################### + + ################################################################### + # nixos base system options + # + # + # boot.kernelModules = [ "kvm-intel" ]; boot.initrd.availableKernelModules = - [ "xhci_pci" "ehci_pci" "ahci" "sd_mod" "sdhci_pci" ]; + [ "xhci_pci" "ehci_pci" "ahci" "sd_mod" "sdhci_pci" "i915" ]; hardware.enableRedistributableFirmware = true; boot.loader.grub = { copyKernels = true; - device = "/dev/sda"; + device = "/dev/disk/by-id/wwn-0x5002538f7080fa2a"; zfsSupport = true; enableCryptodisk = true; + splashImage = ../configuration/grub-splash.png; + gfxmodeBios = "1366x768"; + extraConfig = '' + GRUB_TIMEOUT=10 + ''; }; boot.extraModprobeConfig = "options kvm_item nested=1"; @@ -87,12 +145,8 @@ in nix.maxJobs = lib.mkDefault 4; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; - - programs.java.enable = true; # owo - networking.hostName = "uwu"; - networking.hostId = "a82ecf29"; networking.wireguard.interfaces."intranet" = { ips = [ "10.13.12.3" ]; privateKeyFile = "/var/lib/wg/private"; @@ -105,6 +159,5 @@ in }; system.stateVersion = "19.03"; - users.users.spacekookie.hashedPassword = "$6$rounds=1000000$22ypycQ2AlCCv8iC$RrzyAbCX3D518nCgfR3MTqZhfK.GAclme7EQlKTlqH4oV1YvGd/aHdTfe59iMpf/J18tqEO2aSXsevTVQz2yW."; - + users.users.spacekookie.hashedPassword = "$6$rounds=1000000$22ypycQ2AlCCv8iC$RrzyAbCX3D518nCgfR3MTqZhfK.GAclme7EQlKTlqH4oV1YvGd/aHdTfe59iMpf/J18tqEO2aSXsevTVQz2yW."; } |