diff --git a/infra/libkookie/configuration/workstation/i3/uwu.nix b/infra/libkookie/configuration/workstation/i3/uwu.nix new file mode 100644 index 00000000000..2d0c2839536 --- /dev/null +++ b/infra/libkookie/configuration/workstation/i3/uwu.nix @@ -0,0 +1,25 @@ +{ config, lib, pkgs, home-manager, ... }: + +{ + # Load the home-manager i3 module + imports = [ ]; + + # Then configure it + libkookie.ui.i3 = { + picom = true; + + # TODO: include these files via git LFS + wallpaper = /home/pictures/wallpaper/guidestone.jpg; + + # TODO: hook into the "fonts" module? + fonts = [ "Iosevka Kookie:10" ]; + + networkmanager = false; + + term = pkgs.kitty; + i3Status.segments = ["wireless _first_" "disk /" "ethernet _first_" "load" "tztime local"]; + }; + + # ??? Why is this required + home.packages = [ pkgs.iosevka ]; +} diff --git a/infra/libkookie/configuration/workstation/kitty/uwu.nix b/infra/libkookie/configuration/workstation/kitty/uwu.nix new file mode 100644 index 00000000000..25204a6f398 --- /dev/null +++ b/infra/libkookie/configuration/workstation/kitty/uwu.nix @@ -0,0 +1,21 @@ +/** + * The main configuration for kitty used on _all_ systems. + * + * The module is designed to use the default values I would like to + * use on my systems, however this will not stay this way, seeing as + * I plan on replacing it with the home-manager module in the future + * which will be tailored less to my use-case :) + */ + +{ config, home-manager, ... }: + +{ + # Load the home-manager kitty module + imports = [ ]; + + # Customise kitty installation + libkookie.ui.kitty = { + enable = true; + fontSize = 11; + }; +} diff --git a/infra/libkookie/configuration/workstation/net/uwu.nix b/infra/libkookie/configuration/workstation/net/uwu.nix new file mode 100644 index 00000000000..d7a8875eedc --- /dev/null +++ b/infra/libkookie/configuration/workstation/net/uwu.nix @@ -0,0 +1,17 @@ +{ config, pkgs, ... }: + +{ + environment.systemPackages = with pkgs; + [ + mullvad-vpn + ]; + + libkookie.workstation.net = { + enable = true; + networkmanager = true; + + ## From Mass Effect: Andromeda + hostname = "uwu"; + id = "a82ecf29"; + }; +} diff --git a/infra/libkookie/roots/uwu.nix b/infra/libkookie/roots/uwu.nix index a292ba04a22..0eab77ff8d3 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 args); in { - nixpkgs.config.allowUnfree = true; - - imports = [ - - - # ../legacy/nix - # ../legacy/base - # ../legacy/docker - # ../legacy/workstation - # ../legacy/workstation/hardware/trackpoint + + ################################################################### + # libkookie configuration + # + # + # + + imports = with klib; [ + # Load base modules required to bootstrap libkookie + + + + ################################################################# + # Modules that require NixOS integration + # + + + + + + + + # TODO: build a beter loader + + + + + ################################################################# + # home-manager modules that exist entirely in userspace + # + (loadModule "default") + + # Set of base tools and system settings + (loadModule "uwu") + (loadModule "default") + (loadModule "uwu") + (loadModule "default") + (loadModule "default") + (loadModule "default") + (loadModule "default") + (loadModule "default") + + (loadModule "default") + + # Various other graphical tools + (loadModule "default") + (loadModule "default") + (loadModule "default") + (loadModule "default") + (loadModule "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 ) ]; - 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."; }