diff --git a/flake.lock b/flake.lock index 6886548..87bf043 100644 --- a/flake.lock +++ b/flake.lock @@ -1,12 +1,80 @@ { "nodes": { + "base16": { + "inputs": { + "fromYaml": "fromYaml" + }, + "locked": { + "lastModified": 1755819240, + "narHash": "sha256-qcMhnL7aGAuFuutH4rq9fvAhCpJWVHLcHVZLtPctPlo=", + "owner": "SenchoPens", + "repo": "base16.nix", + "rev": "75ed5e5e3fce37df22e49125181fa37899c3ccd6", + "type": "github" + }, + "original": { + "owner": "SenchoPens", + "repo": "base16.nix", + "type": "github" + } + }, + "base16-fish": { + "flake": false, + "locked": { + "lastModified": 1754405784, + "narHash": "sha256-l9xHIy+85FN+bEo6yquq2IjD1rSg9fjfjpyGP1W8YXo=", + "owner": "tomyun", + "repo": "base16-fish", + "rev": "23ae20a0093dca0d7b39d76ba2401af0ccf9c561", + "type": "github" + }, + "original": { + "owner": "tomyun", + "repo": "base16-fish", + "rev": "23ae20a0093dca0d7b39d76ba2401af0ccf9c561", + "type": "github" + } + }, + "base16-helix": { + "flake": false, + "locked": { + "lastModified": 1752979451, + "narHash": "sha256-0CQM+FkYy0fOO/sMGhOoNL80ftsAzYCg9VhIrodqusM=", + "owner": "tinted-theming", + "repo": "base16-helix", + "rev": "27cf1e66e50abc622fb76a3019012dc07c678fac", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-helix", + "type": "github" + } + }, + "base16-vim": { + "flake": false, + "locked": { + "lastModified": 1732806396, + "narHash": "sha256-e0bpPySdJf0F68Ndanwm+KWHgQiZ0s7liLhvJSWDNsA=", + "owner": "tinted-theming", + "repo": "base16-vim", + "rev": "577fe8125d74ff456cf942c733a85d769afe58b7", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-vim", + "rev": "577fe8125d74ff456cf942c733a85d769afe58b7", + "type": "github" + } + }, "crane": { "locked": { - "lastModified": 1731098351, - "narHash": "sha256-HQkYvKvaLQqNa10KEFGgWHfMAbWBfFp+4cAgkut+NNE=", + "lastModified": 1754269165, + "narHash": "sha256-0tcS8FHd4QjbCVoxN9jI+PjHgA4vc/IjkUSp+N3zy0U=", "owner": "ipetkov", "repo": "crane", - "rev": "ef80ead953c1b28316cc3f8613904edc2eb90c28", + "rev": "444e81206df3f7d92780680e45858e31d2f07a08", "type": "github" }, "original": { @@ -22,11 +90,11 @@ ] }, "locked": { - "lastModified": 1758287904, - "narHash": "sha256-IGmaEf3Do8o5Cwp1kXBN1wQmZwQN3NLfq5t4nHtVtcU=", + "lastModified": 1762276996, + "narHash": "sha256-TtcPgPmp2f0FAnc+DMEw4ardEgv1SGNR3/WFGH0N19M=", "owner": "nix-community", "repo": "disko", - "rev": "67ff9807dd148e704baadbd4fd783b54282ca627", + "rev": "af087d076d3860760b3323f6b583f4d828c1ac17", "type": "github" }, "original": { @@ -35,14 +103,30 @@ "type": "github" } }, + "firefox-gnome-theme": { + "flake": false, + "locked": { + "lastModified": 1758112371, + "narHash": "sha256-lizRM2pj6PHrR25yimjyFn04OS4wcdbc38DCdBVa2rk=", + "owner": "rafaelmardojai", + "repo": "firefox-gnome-theme", + "rev": "0909cfe4a2af8d358ad13b20246a350e14c2473d", + "type": "github" + }, + "original": { + "owner": "rafaelmardojai", + "repo": "firefox-gnome-theme", + "type": "github" + } + }, "flake-compat": { "flake": false, "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "lastModified": 1747046372, + "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", "owner": "edolstra", "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", "type": "github" }, "original": { @@ -59,11 +143,11 @@ ] }, "locked": { - "lastModified": 1730504689, - "narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=", + "lastModified": 1754091436, + "narHash": "sha256-XKqDMN1/Qj1DKivQvscI4vmHfDfvYR2pfuFOJiCeewM=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "506278e768c2a08bec68eb62932193e341f55c90", + "rev": "67df8c627c2c39c41dbec76a1f201929929ab0bd", "type": "github" }, "original": { @@ -72,6 +156,43 @@ "type": "github" } }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": [ + "stylix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1756770412, + "narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "4524271976b625a4a605beefd893f270620fd751", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "fromYaml": { + "flake": false, + "locked": { + "lastModified": 1731966426, + "narHash": "sha256-lq95WydhbUTWig/JpqiB7oViTcHFP8Lv41IGtayokA8=", + "owner": "SenchoPens", + "repo": "fromYaml", + "rev": "106af9e2f715e2d828df706c386a685698f3223b", + "type": "github" + }, + "original": { + "owner": "SenchoPens", + "repo": "fromYaml", + "type": "github" + } + }, "gitignore": { "inputs": { "nixpkgs": [ @@ -94,6 +215,23 @@ "type": "github" } }, + "gnome-shell": { + "flake": false, + "locked": { + "lastModified": 1748186689, + "narHash": "sha256-UaD7Y9f8iuLBMGHXeJlRu6U1Ggw5B9JnkFs3enZlap0=", + "owner": "GNOME", + "repo": "gnome-shell", + "rev": "8c88f917db0f1f0d80fa55206c863d3746fa18d0", + "type": "github" + }, + "original": { + "owner": "GNOME", + "ref": "48.2", + "repo": "gnome-shell", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -101,11 +239,11 @@ ] }, "locked": { - "lastModified": 1760130406, - "narHash": "sha256-GKMwBaFRw/C1p1VtjDz4DyhyzjKUWyi1K50bh8lgA2E=", + "lastModified": 1762787259, + "narHash": "sha256-t2U/GLLXHa2+kJkwnFNRVc2fEJ/lUfyZXBE5iKzJdcs=", "owner": "nix-community", "repo": "home-manager", - "rev": "d305eece827a3fe317a2d70138f53feccaf890a1", + "rev": "37a3d97f2873e0f68711117c34d04b7c7ead8f4e", "type": "github" }, "original": { @@ -126,27 +264,27 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1737639419, - "narHash": "sha256-AEEDktApTEZ5PZXNDkry2YV2k6t0dTgLPEmAZbnigXU=", + "lastModified": 1762205063, + "narHash": "sha256-If6vQ+KvtKs3ARBO9G3l+4wFSCYtRBrwX1z+I+B61wQ=", "owner": "nix-community", "repo": "lanzaboote", - "rev": "a65905a09e2c43ff63be8c0e86a93712361f871e", + "rev": "88b8a563ff5704f4e8d8e5118fb911fa2110ca05", "type": "github" }, "original": { "owner": "nix-community", - "ref": "v0.4.2", + "ref": "v0.4.3", "repo": "lanzaboote", "type": "github" } }, "nixos-hardware": { "locked": { - "lastModified": 1760106635, - "narHash": "sha256-2GoxVaKWTHBxRoeUYSjv0AfSOx4qw5CWSFz2b+VolKU=", + "lastModified": 1762463231, + "narHash": "sha256-hv1mG5j5PTbnWbtHHomzTus77pIxsc4x8VrMjc7+/YE=", "owner": "nixos", "repo": "nixos-hardware", - "rev": "9ed85f8afebf2b7478f25db0a98d0e782c0ed903", + "rev": "52113c4f5cfd1e823001310e56d9c8d0699a6226", "type": "github" }, "original": { @@ -157,11 +295,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1760038930, - "narHash": "sha256-Oncbh0UmHjSlxO7ErQDM3KM0A5/Znfofj2BSzlHLeVw=", + "lastModified": 1762596750, + "narHash": "sha256-rXXuz51Bq7DHBlfIjN7jO8Bu3du5TV+3DSADBX7/9YQ=", "owner": "nixos", "repo": "nixpkgs", - "rev": "0b4defa2584313f3b781240b29d61f6f9f7e0df3", + "rev": "b6a8526db03f735b89dd5ff348f53f752e7ddc8e", "type": "github" }, "original": { @@ -171,19 +309,28 @@ "type": "github" } }, - "nixpkgs-stable": { + "nur": { + "inputs": { + "flake-parts": [ + "stylix", + "flake-parts" + ], + "nixpkgs": [ + "stylix", + "nixpkgs" + ] + }, "locked": { - "lastModified": 1730741070, - "narHash": "sha256-edm8WG19kWozJ/GqyYx2VjW99EdhjKwbY3ZwdlPAAlo=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "d063c1dd113c91ab27959ba540c0d9753409edf3", + "lastModified": 1758998580, + "narHash": "sha256-VLx0z396gDCGSiowLMFz5XRO/XuNV+4EnDYjdJhHvUk=", + "owner": "nix-community", + "repo": "NUR", + "rev": "ba8d9c98f5f4630bcb0e815ab456afd90c930728", "type": "github" }, "original": { - "owner": "NixOS", - "ref": "nixos-24.05", - "repo": "nixpkgs", + "owner": "nix-community", + "repo": "NUR", "type": "github" } }, @@ -197,15 +344,14 @@ "nixpkgs": [ "lanzaboote", "nixpkgs" - ], - "nixpkgs-stable": "nixpkgs-stable" + ] }, "locked": { - "lastModified": 1731363552, - "narHash": "sha256-vFta1uHnD29VUY4HJOO/D6p6rxyObnf+InnSMT4jlMU=", + "lastModified": 1750779888, + "narHash": "sha256-wibppH3g/E2lxU43ZQHC5yA/7kIKLGxVEnsnVK1BtRg=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "cd1af27aa85026ac759d5d3fccf650abe7e1bbf0", + "rev": "16ec914f6fb6f599ce988427d9d94efddf25fe6d", "type": "github" }, "original": { @@ -221,7 +367,8 @@ "lanzaboote": "lanzaboote", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", - "sops-nix": "sops-nix" + "sops-nix": "sops-nix", + "stylix": "stylix" } }, "rust-overlay": { @@ -232,11 +379,11 @@ ] }, "locked": { - "lastModified": 1731897198, - "narHash": "sha256-Ou7vLETSKwmE/HRQz4cImXXJBr/k9gp4J4z/PF8LzTE=", + "lastModified": 1761791894, + "narHash": "sha256-myRIDh+PxaREz+z9LzbqBJF+SnTFJwkthKDX9zMyddY=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "0be641045af6d8666c11c2c40e45ffc9667839b5", + "rev": "59c45eb69d9222a4362673141e00ff77842cd219", "type": "github" }, "original": { @@ -252,11 +399,11 @@ ] }, "locked": { - "lastModified": 1759635238, - "narHash": "sha256-UvzKi02LMFP74csFfwLPAZ0mrE7k6EiYaKecplyX9Qk=", + "lastModified": 1762659808, + "narHash": "sha256-2Kv2mANf+FRisqhpfeZ8j9firBxb23ZvEXwdcunbpGI=", "owner": "Mic92", "repo": "sops-nix", - "rev": "6e5a38e08a2c31ae687504196a230ae00ea95133", + "rev": "524312bc62e3f34bd9231a2f66622663d3355133", "type": "github" }, "original": { @@ -264,6 +411,136 @@ "repo": "sops-nix", "type": "github" } + }, + "stylix": { + "inputs": { + "base16": "base16", + "base16-fish": "base16-fish", + "base16-helix": "base16-helix", + "base16-vim": "base16-vim", + "firefox-gnome-theme": "firefox-gnome-theme", + "flake-parts": "flake-parts_2", + "gnome-shell": "gnome-shell", + "nixpkgs": [ + "nixpkgs" + ], + "nur": "nur", + "systems": "systems", + "tinted-foot": "tinted-foot", + "tinted-kitty": "tinted-kitty", + "tinted-schemes": "tinted-schemes", + "tinted-tmux": "tinted-tmux", + "tinted-zed": "tinted-zed" + }, + "locked": { + "lastModified": 1762264356, + "narHash": "sha256-QVfC53Ri+8n3e7Ujx9kq6all3+TLBRRPRnc6No5qY5w=", + "owner": "nix-community", + "repo": "stylix", + "rev": "647bb8dd96a206a1b79c4fd714affc88b409e10b", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "stylix", + "type": "github" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "tinted-foot": { + "flake": false, + "locked": { + "lastModified": 1726913040, + "narHash": "sha256-+eDZPkw7efMNUf3/Pv0EmsidqdwNJ1TaOum6k7lngDQ=", + "owner": "tinted-theming", + "repo": "tinted-foot", + "rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-foot", + "rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4", + "type": "github" + } + }, + "tinted-kitty": { + "flake": false, + "locked": { + "lastModified": 1735730497, + "narHash": "sha256-4KtB+FiUzIeK/4aHCKce3V9HwRvYaxX+F1edUrfgzb8=", + "owner": "tinted-theming", + "repo": "tinted-kitty", + "rev": "de6f888497f2c6b2279361bfc790f164bfd0f3fa", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-kitty", + "type": "github" + } + }, + "tinted-schemes": { + "flake": false, + "locked": { + "lastModified": 1757716333, + "narHash": "sha256-d4km8W7w2zCUEmPAPUoLk1NlYrGODuVa3P7St+UrqkM=", + "owner": "tinted-theming", + "repo": "schemes", + "rev": "317a5e10c35825a6c905d912e480dfe8e71c7559", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "schemes", + "type": "github" + } + }, + "tinted-tmux": { + "flake": false, + "locked": { + "lastModified": 1757811970, + "narHash": "sha256-n5ZJgmzGZXOD9pZdAl1OnBu3PIqD+X3vEBUGbTi4JiI=", + "owner": "tinted-theming", + "repo": "tinted-tmux", + "rev": "d217ba31c846006e9e0ae70775b0ee0f00aa6b1e", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-tmux", + "type": "github" + } + }, + "tinted-zed": { + "flake": false, + "locked": { + "lastModified": 1757811247, + "narHash": "sha256-4EFOUyLj85NRL3OacHoLGEo0wjiRJzfsXtR4CZWAn6w=", + "owner": "tinted-theming", + "repo": "base16-zed", + "rev": "824fe0aacf82b3c26690d14e8d2cedd56e18404e", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-zed", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 57fbeb6..c0586ac 100644 --- a/flake.nix +++ b/flake.nix @@ -5,7 +5,7 @@ nixos-hardware.url = "github:nixos/nixos-hardware"; home-manager.url = "github:nix-community/home-manager"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; - lanzaboote.url = "github:nix-community/lanzaboote/v0.4.2"; + lanzaboote.url = "github:nix-community/lanzaboote/v0.4.3"; lanzaboote.inputs.nixpkgs.follows = "nixpkgs"; sops-nix.url = "github:Mic92/sops-nix"; sops-nix.inputs.nixpkgs.follows = "nixpkgs"; diff --git a/hosts/titanium/README.md b/hosts/titanium/README.md new file mode 100644 index 0000000..51e0057 --- /dev/null +++ b/hosts/titanium/README.md @@ -0,0 +1,20 @@ +# titanium + +This is my primary workstation / gaming pc. +It will generally be the most out of sync with the repo, as there will be a lot +of software I experiment with, which I simply forget to commit here. Everything +of importance will find it's way to this repo. + +## Non-Deterministic Post-Install Steps + +Rearrange Monitors in Gnome Display Settings + +Use a fido2 key (YubiKey) to decrypt luks +```bash +sudo -E -s systemd-cryptenroll --fido2-device=auto /dev/disk/by-partlabel/disk-main-luks +``` + +## Installing Remotely +```bash +nix run github:nix-community/nixos-anywhere -- --flake .#titanium +``` diff --git a/hosts/titanium/configuration.nix b/hosts/titanium/configuration.nix index ea4519f..acc06b8 100644 --- a/hosts/titanium/configuration.nix +++ b/hosts/titanium/configuration.nix @@ -16,5 +16,5 @@ services.openssh.enable = true; services.tailscale.enable = true; networking.firewall.trustedInterfaces = [ "tailscale0" ]; - system.stateVersion = "25.05"; + system.stateVersion = "25.11"; } diff --git a/hosts/titanium/default.nix b/hosts/titanium/default.nix index 23d9076..8cece0c 100644 --- a/hosts/titanium/default.nix +++ b/hosts/titanium/default.nix @@ -1,17 +1,41 @@ -{ inputs, ... }: +{ inputs, pkgs, ... }: +let + nixpkgs = inputs.nixpkgs; +in { nixpkgs.config.allowUnfree = true; + nixpkgs.overlays = (import (../../overlays) {inherit nixpkgs;}); imports = [ ../../modules/nixos/base.nix ../../modules/nixos/audio.nix - ../../modules/nixos/desktop.nix + ../../modules/nixos/desktop ../../modules/nixos/gaming.nix inputs.nixos-hardware.nixosModules.asus-rog-strix-x570e - #./hardware.nix + ./hardware.nix ./configuration.nix ./nvidia.nix + inputs.lanzaboote.nixosModules.lanzaboote ./secure-boot.nix inputs.disko.nixosModules.disko ./disko.nix + ./game-emulation.nix + #./meetings.nix ]; + + zw.gaming.enable = true; + + stylix = { + #enable = true; + # catppuccin-mocha + base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml"; + # image = ./path.png; polarity = "dark"; # /etc/stylix/palette.html + # TODO: Add Atkinson Hyperlegible Next, Mono, and also a good Serif font. + # https://search.nixos.org/packages?channel=unstable&show=atkinson-hyperlegible-next&query=atkinson + # fonts = { + # serif = {}; + # sansSerif = {}; + # monospace = {}; + # emoji = {}; + # }; + }; } diff --git a/hosts/titanium/game-emulation.nix b/hosts/titanium/game-emulation.nix index 28b6c99..b970492 100644 --- a/hosts/titanium/game-emulation.nix +++ b/hosts/titanium/game-emulation.nix @@ -17,7 +17,7 @@ let mgba # GameBoy / Color / Advance melonds # Nintendo DS citra # Nintendo 3DS - + # Sony swanstation #duckstation # PlayStation @@ -35,11 +35,13 @@ in { environment.systemPackages = [ retroarchWithCores + #pkgs.retroarch-full #pkgs.emulationstation-de pkgs.gnome-bluetooth ]; hardware.xone.enable = true; # Xbox Controller Driver + hardware.xpadneo.enable = true; # Xbox Controller Driver hardware.enableAllFirmware = true; hardware.bluetooth = { enable = true; diff --git a/hosts/titanium/hardware.nix b/hosts/titanium/hardware.nix index a2a8362..4204ed2 100644 --- a/hosts/titanium/hardware.nix +++ b/hosts/titanium/hardware.nix @@ -8,41 +8,43 @@ [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.systemd.enable = true; + #boot.initrd.luks.devices.FOO.crypttabExtraOpts = ["fido2-device=auto"]; + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sr_mod" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/0b3de117-c34f-4cc6-81db-5b84ea46cd51"; + { #device = "/dev/disk/by-uuid/bac9b4de-d201-4008-9e97-3954417aab65"; fsType = "btrfs"; options = [ "subvol=root" ]; }; - boot.initrd.luks.devices."crypted".device = "/dev/disk/by-uuid/0ccc4028-c27e-4259-ade9-a2b2081722cb"; + #boot.initrd.luks.devices."crypted".device = "/dev/disk/by-uuid/16b8ccb6-0102-4348-bb1b-d8d68bfb4d23"; + + fileSystems."/nix" = + { #device = "/dev/disk/by-uuid/bac9b4de-d201-4008-9e97-3954417aab65"; + fsType = "btrfs"; + options = [ "subvol=nix" ]; + }; fileSystems."/.swapvol" = - { device = "/dev/disk/by-uuid/0b3de117-c34f-4cc6-81db-5b84ea46cd51"; + { #device = "/dev/disk/by-uuid/bac9b4de-d201-4008-9e97-3954417aab65"; fsType = "btrfs"; options = [ "subvol=swap" ]; }; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/219D-4579"; - fsType = "vfat"; - options = [ "fmask=0077" "dmask=0077" ]; - }; - fileSystems."/home" = - { device = "/dev/disk/by-uuid/0b3de117-c34f-4cc6-81db-5b84ea46cd51"; + { #device = "/dev/disk/by-uuid/bac9b4de-d201-4008-9e97-3954417aab65"; fsType = "btrfs"; options = [ "subvol=home" ]; }; - fileSystems."/nix" = - { device = "/dev/disk/by-uuid/0b3de117-c34f-4cc6-81db-5b84ea46cd51"; - fsType = "btrfs"; - options = [ "subvol=nix" ]; + fileSystems."/boot" = + { #device = "/dev/disk/by-uuid/E076-75D6"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; }; swapDevices = [ ]; @@ -54,7 +56,7 @@ networking.useDHCP = lib.mkDefault true; # networking.interfaces.enp4s0.useDHCP = lib.mkDefault true; # networking.interfaces.enp5s0.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; + # networking.interfaces.tailscale0.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; diff --git a/hosts/titanium/secure-boot.nix b/hosts/titanium/secure-boot.nix index 82f4d98..be6cc79 100644 --- a/hosts/titanium/secure-boot.nix +++ b/hosts/titanium/secure-boot.nix @@ -1,5 +1,4 @@ -{ pkgs, lib, inputs, ... }: { - imports = with inputs; [ lanzaboote.nixosModules.lanzaboote ]; +{ pkgs, lib, ... }: { environment.systemPackages = [ pkgs.sbctl ]; boot.loader.systemd-boot.enable = lib.mkForce false; boot.lanzaboote.enable = true; diff --git a/lib/default.nix b/lib/default.nix index 3926ed9..65ee05a 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -1,19 +1,32 @@ { nixpkgs, home-manager, inputs, ... }: +let + allOverlays = import (../overlays) { inherit nixpkgs; }; +in { # It's not really that I care about whether a system is a desktop system or # a server system, but moreso that I care about whether a system is headless or not. # I also care about things like if it's darwin, or wsl. + # TODO: Expand this to actually make use of extraSpecialArgs and pass special + # args to the relevant places. mkSystem = { hostname, system ? "x86_64-linux", users ? [], - extraModules ? [] + extraModules ? [], + extraSpecialArgs ? {} }: let - hostModule = import ../hosts/${hostname} { inherit inputs; }; + pkgs_with_overlays = import nixpkgs { + inherit system; + overlays = allOverlays; + }; + hostModule = import ../hosts/${hostname} { + inherit inputs; + pkgs = pkgs_with_overlays; + }; userModules = map (name: import ../users/${name} { - pkgs = nixpkgs.legacyPackages.${system}; + pkgs = pkgs_with_overlays; lib = nixpkgs.lib; } ) users; @@ -26,13 +39,18 @@ name = name; value = import ../users/${name}/home.nix { username = name; - pkgs = nixpkgs.legacyPackages.${system}; + pkgs = pkgs_with_overlays; lib = nixpkgs.lib; }; }) homeUserNames); in nixpkgs.lib.nixosSystem { inherit system; + # pkgs = import inputs.nixpkgs { + # inherit system; + # overlays = allOverlays; + # config = { allowUnfree = true; nvidia.acceptLicense = true; }; + # }; modules = [ hostModule ] ++ userModules ++ extraModules @@ -43,5 +61,8 @@ home-manager.users = homeUsers; } ] else []); + specialArgs = { + inherit inputs hostname; + } // extraSpecialArgs; }; } diff --git a/modules/nixos/desktop/calibre.nix b/modules/nixos/desktop/calibre.nix index e4c1c6c..bcc4cea 100644 --- a/modules/nixos/desktop/calibre.nix +++ b/modules/nixos/desktop/calibre.nix @@ -3,22 +3,15 @@ imports = []; options = { - zw-calibre = { + zw.calibre = { enable = lib.mkEnableOption "Enable Calibre"; }; }; - + config = { - config.allowUnfreePredigate = pkg: builtins.elem (lib.getName pkg) [ - "calibre" - "unrar" - ]; - + # NOTE: Without unrar support we can't open ".cbr" files. environment.systemPackages = with pkgs; [ - (calibre.override { - unrarSupport = true; - }) - unrar + calibre ]; services.udisks2.enable = true; diff --git a/modules/nixos/desktop/default.nix b/modules/nixos/desktop/default.nix index 7251a84..56e89f7 100644 --- a/modules/nixos/desktop/default.nix +++ b/modules/nixos/desktop/default.nix @@ -1,11 +1,17 @@ { pkgs, ... }: { + imports = [ + ./calibre.nix + ]; + + zw.calibre.enable = true; + environment.systemPackages = with pkgs; [ yubikey-personalization xdg-desktop-portal-gtk xdg-desktop-portal-hyprland xwayland - rofi-wayland + rofi waybar hyprpaper kitty # hyprland default term diff --git a/modules/nixos/gaming.nix b/modules/nixos/gaming.nix index 68b2946..69dcd1b 100644 --- a/modules/nixos/gaming.nix +++ b/modules/nixos/gaming.nix @@ -1,17 +1,24 @@ { config, lib, pkgs, ... }: { - environment.systemPackages = with pkgs; [ - mangohud - protonup-qt - lutris - bottles - heroic - ]; - programs.steam = { - enable = true; - remotePlay.openFirewall = true; - localNetworkGameTransfers.openFirewall = true; - protontricks.enable = true; - gamescopeSession.enable = true; + #imports = []; + options = { + zw.gaming.enable = lib.mkEnableOption "Enable Gaming"; + }; + + config = lib.mkIf config.zw.gaming.enable { + environment.systemPackages = with pkgs; [ + mangohud + protonup-qt + # lutris # TODO: Having an issue after flake update + bottles + heroic + ]; + programs.steam = { + enable = true; + remotePlay.openFirewall = true; + localNetworkGameTransfers.openFirewall = true; + protontricks.enable = true; + gamescopeSession.enable = true; + }; }; } diff --git a/users/jml/home.nix b/users/jml/home.nix index e6170c6..a26b392 100644 --- a/users/jml/home.nix +++ b/users/jml/home.nix @@ -49,7 +49,7 @@ # Matrix Chat Apps element-desktop.enable = true; - nheko.settings = true; + #nheko.settings = true; # Additions from Windows obsidian.enable = true; @@ -144,15 +144,48 @@ }; }; + # TODO: figure out how to get config.programs..enable style + # internal references inside this file. + # There's some quirks with how this is used in lib/default.nix + programs.jujutsu = { + enable = true; + #enableFishIntegration = true; + settings = { + user = { + name = "Jay Looney"; + email = "jay.m.looney@gmail.com"; + }; + }; + }; + programs.git = { enable = true; - userName = "Jay Looney"; - userEmail = "jay.m.looney@gmail.com"; - aliases = { - ol = "log --oneline"; - }; - ignores = [ "*~" "*.swp" ]; - extraConfig = { + settings = { + user = { + name = "Jay Looney"; + email = "jay.m.looney@gmail.com"; + }; + + # Aliases Inspired by the following: + # https://joel-hanson.github.io/posts/05-useful-git-aliases-for-a-productive-workflow/ + # https://gist.github.com/mwhite/6887990 + aliases = { + la = "!git config -l | grep alias | cut -c 7-"; + s = "status -s"; + co = "checkout"; + cob = "checkout -b"; + del = "branch -D"; + ol = "log --oneline"; + + br = "branch --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(contents:subject) %(color:green)(%(committerdate:relative)) [%(authorname)]' --sort=-committerdate"; + save = "!git add -A && git commit -m 'chore: commit save point'"; + undo = "reset HEAD~1 --mixed"; + done = "!git push origin HEAD"; + lg = "!git log --pretty=format:\"%C(magenta)%h%Creset -%C(red)%d%Creset %s %C(dim green)(%cr) [%an]\" --abbrev-commit -30"; + a = "add"; + ap = "add -p"; + }; + push.default = "simple"; credential.helper = "cache --timeout=7200"; init.defaultBranch = "main"; @@ -160,7 +193,123 @@ log.date = "iso"; merge.conflictStyle = "diff3"; }; + # Cribbed from: https://github.com/gitattributes/gitattributes + attributes = [ + # Auto detect files and perform LF normalization + "* text=auto" + # Documents + "*.bibtex text diff=bibtex" + "*.doc diff=astextplain" + "*.DOC diff=astextplain" + "*.docx diff=astextplain" + "*.DOCX diff=astextplain" + "*.dot diff=astextplain" + "*.DOT diff=astextplain" + "*.pdf diff=astextplain" + "*.PDF diff=astextplain" + "*.rtf diff=astextplain" + "*.RTF diff=astextplain" + "*.md text diff=markdown" + "*.mdx text diff=markdown" + "*.tex text diff=tex" + "*.adoc text" + "*.textile text" + "*.mustache text" + "*.csv text eol=crlf" + "*.tab text" + "*.tsv text" + "*.txt text" + "*.sql text" + "*.epub diff=astextplain" + + # Graphics + "*.png binary" + "*.jpg binary" + "*.jpeg binary" + "*.gif binary" + "*.tif binary" + "*.tiff binary" + "*.ico binary" + # SVG treated as text by default. + "*.svg text" + # If you want to treat it as binary, + # use the following line instead. + # *.svg binary + "*.eps binary" + + # Scripts + "*.bash text eol=lf" + "*.fish text eol=lf" + "*.ksh text eol=lf" + "*.sh text eol=lf" + "*.zsh text eol=lf" + # These are explicitly windows files and should use crlf + "*.bat text eol=crlf" + "*.cmd text eol=crlf" + "*.ps1 text eol=crlf" + + # Serialisation + "*.json text" + "*.toml text" + "*.xml text" + "*.yaml text" + "*.yml text" + + # Archives + "*.7z binary" + "*.bz binary" + "*.bz2 binary" + "*.bzip2 binary" + "*.gz binary" + "*.lz binary" + "*.lzma binary" + "*.rar binary" + "*.tar binary" + "*.taz binary" + "*.tbz binary" + "*.tbz2 binary" + "*.tgz binary" + "*.tlz binary" + "*.txz binary" + "*.xz binary" + "*.Z binary" + "*.zip binary" + "*.zst binary" + + # Text files where line endings should be preserved + "*.patch -text" + + # Exclude files from exporting + ".gitattributes export-ignore" + ".gitignore export-ignore" + ".gitkeep export-ignore" + ]; + # TODO: Merge Gitignores from here: https://github.com/github/gitignore/tree/main/Global + ignores = [ + "*~" + "*.swp" + ]; }; + programs.emacs = { + enable = true; + # package = (pkgs.emacs30.pkgs.withPackages (epkgs: [ + # epkgs.treesit-grammars.with-grammars (grammars: [ + # grammars.tree-sitter-bash + # ]) + # epkgs.pretty-sha-path + # ])); + extraConfig = '' + (setq standard-indent 2) + ''; + }; + + programs.vscode = { + enable = true; + mutableExtensionsDir = true; # mutually exclusive to programs.vscode.profiles + profiles.default.userSettings = { + "[nix]"."editor.tabSize" = 2; + }; + }; # services.podman.enable = true; }