Non stop entertainment! The wackiest NixOS configuration to-date. thevoid.cafe/projects/puzzlevision
nixos flake flake-parts dotfiles home-manager nix

✨🚧 Implement basic easy-hosts configuration and flake structure

📝 Add credits and structure

Jo 9dc26a0d 4a6199ea

+250
+21
README.md
··· 33 33 - improved secrets management 34 34 - keeping external assets closer to their related nix file, e.g. wallpapers in 35 35 the desktop modules folder 36 + 37 + ## 🏗️ Structure 38 + The structure this flake aims to build on is relatively simple to grasp. 39 + 40 + ``` 41 + flake.nix --> The flake. 42 + /systems --> NixOS configurations for various types of systems, using easy-hosts. 43 + /modules --> Modules that are mapped to their corresponding easy-hosts class (and home modules). 44 + /nixos --> (example) Modules specific to the nixos class configured in easy-hosts. 45 + /homes --> Directory for home-manager configurations, not specific to the system type. 46 + /lib --> A place for custom lib attributes exposed on the flake namespace (lib.puzzlevision.mkOpt). 47 + (more...) --> Additional directories have been considered (e.g. shells), but as of right now, they serve no use to me. 48 + ``` 49 + 50 + ## 🎨 Credits 51 + Parts of this flake were inspired by the likes of: 52 + 53 + - [isabelroses](https://github.com/isabelroses) 54 + - [uncenter](https://github.com/uncenter) 55 + 56 + Many thanks to their hard work!
+85
flake.lock
··· 1 + { 2 + "nodes": { 3 + "easy-hosts": { 4 + "locked": { 5 + "lastModified": 1736680851, 6 + "narHash": "sha256-KUkO4H0W+1u5piwAzIzCuVhamQ0L3io8vR61NrODtHs=", 7 + "owner": "isabelroses", 8 + "repo": "easy-hosts", 9 + "rev": "450d2ae463bb8fb55194f33073ebdd83b8b7ddaa", 10 + "type": "github" 11 + }, 12 + "original": { 13 + "owner": "isabelroses", 14 + "repo": "easy-hosts", 15 + "type": "github" 16 + } 17 + }, 18 + "flake-parts": { 19 + "inputs": { 20 + "nixpkgs-lib": [ 21 + "nixpkgs" 22 + ] 23 + }, 24 + "locked": { 25 + "lastModified": 1736143030, 26 + "narHash": "sha256-+hu54pAoLDEZT9pjHlqL9DNzWz0NbUn8NEAHP7PQPzU=", 27 + "owner": "hercules-ci", 28 + "repo": "flake-parts", 29 + "rev": "b905f6fc23a9051a6e1b741e1438dbfc0634c6de", 30 + "type": "github" 31 + }, 32 + "original": { 33 + "owner": "hercules-ci", 34 + "repo": "flake-parts", 35 + "type": "github" 36 + } 37 + }, 38 + "home-manager": { 39 + "inputs": { 40 + "nixpkgs": [ 41 + "nixpkgs" 42 + ] 43 + }, 44 + "locked": { 45 + "lastModified": 1736785676, 46 + "narHash": "sha256-TY0jUwR3EW0fnS0X5wXMAVy6h4Z7Y6a3m+Yq++C9AyE=", 47 + "owner": "nix-community", 48 + "repo": "home-manager", 49 + "rev": "fc52a210b60f2f52c74eac41a8647c1573d2071d", 50 + "type": "github" 51 + }, 52 + "original": { 53 + "owner": "nix-community", 54 + "repo": "home-manager", 55 + "type": "github" 56 + } 57 + }, 58 + "nixpkgs": { 59 + "locked": { 60 + "lastModified": 1736701207, 61 + "narHash": "sha256-jG/+MvjVY7SlTakzZ2fJ5dC3V1PrKKrUEOEE30jrOKA=", 62 + "owner": "NixOS", 63 + "repo": "nixpkgs", 64 + "rev": "ed4a395ea001367c1f13d34b1e01aa10290f67d6", 65 + "type": "github" 66 + }, 67 + "original": { 68 + "owner": "NixOS", 69 + "ref": "nixos-unstable", 70 + "repo": "nixpkgs", 71 + "type": "github" 72 + } 73 + }, 74 + "root": { 75 + "inputs": { 76 + "easy-hosts": "easy-hosts", 77 + "flake-parts": "flake-parts", 78 + "home-manager": "home-manager", 79 + "nixpkgs": "nixpkgs" 80 + } 81 + } 82 + }, 83 + "root": "root", 84 + "version": 7 85 + }
+31
flake.nix
··· 1 + { 2 + description = "Jo's dotfiles"; 3 + 4 + inputs = { 5 + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; 6 + 7 + # Flake parts, a library that provides utilites for creating flakes 8 + flake-parts = { 9 + url = "github:hercules-ci/flake-parts"; 10 + inputs.nixpkgs-lib.follows = "nixpkgs"; 11 + }; 12 + 13 + # Provides an easy interface for loading systems from a directory 14 + easy-hosts.url = "github:isabelroses/easy-hosts"; 15 + 16 + # 17 + home-manager = { 18 + url = "github:nix-community/home-manager"; 19 + inputs.nixpkgs.follows = "nixpkgs"; 20 + }; 21 + }; 22 + 23 + outputs = inputs@{ flake-parts, ... }: 24 + flake-parts.lib.mkFlake { inherit inputs; } { 25 + imports = [ 26 + ./systems 27 + ]; 28 + 29 + systems = [ "x86_64-linux" ]; 30 + }; 31 + }
+1
homes/default.nix
··· 1 + {}
+1
homes/jo/default.nix
··· 1 + {}
+1
modules/home/default.nix
··· 1 + {}
+1
modules/nixos/default.nix
··· 1 + {}
+30
systems/default.nix
··· 1 + { 2 + lib, 3 + self, 4 + inputs, 5 + ... 6 + }: 7 + { 8 + imports = [ inputs.easy-hosts.flakeModule ]; 9 + 10 + easyHosts = { 11 + autoConstruct = true; 12 + path = ../systems; 13 + 14 + shared.modules = [ 15 + ../homes 16 + ]; 17 + 18 + perClass = 19 + class: 20 + { 21 + modules = [ 22 + "${self}/modules/${class}" 23 + 24 + (lib.optionals (class == "nixos") [ 25 + inputs.home-manager.nixosModules.home-manager 26 + ]) 27 + ]; 28 + }; 29 + }; 30 + }
+27
systems/x86_64-nixos/puzzlevision/default.nix
··· 1 + { 2 + pkgs, 3 + ... 4 + }: 5 + { 6 + imports = [ 7 + ./hardware.nix 8 + ]; 9 + 10 + # Enable Plasma6 11 + services.xserver.enable = true; 12 + services.displayManager.sddm.wayland.enable = true; 13 + services.desktopManager.plasma6.enable = true; 14 + 15 + # Todo: pass a set of users to enable from within easy-hosts and automatically map the corresponding home-manager configurations 16 + # Register "jo" as a user 17 + users.users.jo.isNormalUser = true; 18 + users.users.jo.extraGroups = [ "dialout" "docker" ]; 19 + users.users.jo.initialPassword = "balls"; 20 + users.users.jo.createHome = true; 21 + 22 + environment.systemPackages = with pkgs; [ 23 + ghostty 24 + ]; 25 + 26 + system.stateVersion = "25.05"; 27 + }
+52
systems/x86_64-nixos/puzzlevision/hardware.nix
··· 1 + # Do not modify this file! It was generated by ‘nixos-generate-config’ 2 + # and may be overwritten by future invocations. Please make changes 3 + # to /etc/nixos/configuration.nix instead. 4 + { config, lib, pkgs, modulesPath, ... }: 5 + 6 + { 7 + imports = 8 + [ (modulesPath + "/installer/scan/not-detected.nix") 9 + ]; 10 + 11 + boot.initrd.availableKernelModules = [ "xhci_pci" "vmd" "nvme" "usbhid" "rtsx_pci_sdmmc" ]; 12 + boot.initrd.kernelModules = [ ]; 13 + boot.kernelModules = [ "kvm-intel" ]; 14 + boot.extraModulePackages = [ ]; 15 + 16 + fileSystems."/" = 17 + { device = "/dev/disk/by-uuid/864b1287-89fd-4cc0-98a5-40a3caf804c6"; 18 + fsType = "btrfs"; 19 + options = [ "subvol=@" ]; 20 + }; 21 + 22 + boot.initrd.luks.devices."luks-5fd4fc76-d5c5-46c3-b952-1a7a7ff3a1fc".device = "/dev/disk/by-uuid/5fd4fc76-d5c5-46c3-b952-1a7a7ff3a1fc"; 23 + 24 + fileSystems."/boot" = 25 + { device = "/dev/disk/by-uuid/2429-4141"; 26 + fsType = "vfat"; 27 + options = [ "fmask=0022" "dmask=0022" ]; 28 + }; 29 + 30 + swapDevices = [ ]; 31 + 32 + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking 33 + # (the default) this is the recommended approach. When using systemd-networkd it's 34 + # still possible to use this option, but it's recommended to use it in conjunction 35 + # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. 36 + networking.useDHCP = lib.mkDefault true; 37 + # networking.interfaces.br-01571e4eda2f.useDHCP = lib.mkDefault true; 38 + # networking.interfaces.br-20785fae249b.useDHCP = lib.mkDefault true; 39 + # networking.interfaces.br-64a49a5722c1.useDHCP = lib.mkDefault true; 40 + # networking.interfaces.br-71e5fc5962fc.useDHCP = lib.mkDefault true; 41 + # networking.interfaces.br-7df9905783da.useDHCP = lib.mkDefault true; 42 + # networking.interfaces.br-9b746f4e7e2f.useDHCP = lib.mkDefault true; 43 + # networking.interfaces.br-e2f470a56dfe.useDHCP = lib.mkDefault true; 44 + # networking.interfaces.docker0.useDHCP = lib.mkDefault true; 45 + # networking.interfaces.enp0s13f0u4u4.useDHCP = lib.mkDefault true; 46 + # networking.interfaces.veth4e96b46.useDHCP = lib.mkDefault true; 47 + # networking.interfaces.veth96a5ccd.useDHCP = lib.mkDefault true; 48 + # networking.interfaces.wlo1.useDHCP = lib.mkDefault true; 49 + 50 + nixpkgs.hostPlatform = lib.mkForce "x86_64-linux"; 51 + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; 52 + }