Nix Flakes configuration for MacOS, NixOS and WSL
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: add nyx host

cosmeak 372836c8 2c9d7358

+290 -12
+12 -5
README.md
··· 27 27 28 28 ## 💻 - Hosts 29 29 30 - | Hostname | CPU | GPU | RAM | OS | Usage | Status | 31 - | -------- | ------------- | -------------- | ---- | --------------------- | ----------- | :------: | 32 - | njord | Apple M2 Chip | Apple M2 Chip | 32Go | MacOS | Development | 🟢️ | 33 - | loki | i5 13600kf | Nvidia 4070ti | 32Go | NixOS | Gaming | 🟢️ | 34 - | hvedrung | i5 13600kf | Nvidia 4070ti | 32Go | FreeBSD (with nixbsd) | Tests | 🔴️ | 30 + | Hostname | CPU | GPU | RAM | OS | Usage | Status | 31 + | :------: | :---------------: | :------------: | :--: | :-------------------: | :-----: | :------: | 32 + | njord | Apple M2 Chip | Apple M2 Chip | 32Go | MacOS | ⌨️ | 🟢️ | 33 + | loki | Intel i5 13600kf | Nvidia 4070ti | 32Go | NixOS | 🎮️ | 🟢️ | 34 + | hvedrung | Intel i5 13600kf | Nvidia 4070ti | 32Go | FreeBSD (with nixbsd) | 🧨️ | 🔴️ | 35 + | beowulf | | | | NixOS | ☁️ | 🔴️ | 36 + | nyx | AMD Ryzen 3 3300X | Nvidia 1060 | 16GO | NixOS | 🎮️ / ⌨️ | 🟢️ | 37 + 38 + 🎮️ : Gaming 39 + ☁️ : Server 40 + ⌨️ : Development 41 + 🧨️ : Testing purpose 35 42 36 43 > [!NOTE] 37 44 > hvedrung host is the same desktop as loki, just another SSD used or is used inside a VM.
+99 -7
flake.lock
··· 7 7 ] 8 8 }, 9 9 "locked": { 10 - "lastModified": 1727999297, 11 - "narHash": "sha256-LTJuQPCsSItZ/8TieFeP30iY+uaLoD0mT0tAj1gLeyQ=", 10 + "lastModified": 1728901530, 11 + "narHash": "sha256-I9Qd0LnAsEGHtKE9+uVR0iDFmsijWSy7GT0g3jihG4Q=", 12 12 "owner": "LnL7", 13 13 "repo": "nix-darwin", 14 - "rev": "8c8388ade72e58efdeae71b4cbb79e872c23a56b", 14 + "rev": "a60ac02f9466f85f092e576fd8364dfc4406b5a6", 15 15 "type": "github" 16 16 }, 17 17 "original": { ··· 20 20 "type": "github" 21 21 } 22 22 }, 23 + "flake-parts": { 24 + "inputs": { 25 + "nixpkgs-lib": "nixpkgs-lib" 26 + }, 27 + "locked": { 28 + "lastModified": 1727826117, 29 + "narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=", 30 + "owner": "hercules-ci", 31 + "repo": "flake-parts", 32 + "rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1", 33 + "type": "github" 34 + }, 35 + "original": { 36 + "owner": "hercules-ci", 37 + "repo": "flake-parts", 38 + "type": "github" 39 + } 40 + }, 41 + "nix-gaming": { 42 + "inputs": { 43 + "flake-parts": "flake-parts", 44 + "nixpkgs": "nixpkgs", 45 + "umu": "umu" 46 + }, 47 + "locked": { 48 + "lastModified": 1728919237, 49 + "narHash": "sha256-pjYeBH3eGhjIYyaHJbSOsPZZkbfJ07dO55NAxv7FUNY=", 50 + "owner": "fufexan", 51 + "repo": "nix-gaming", 52 + "rev": "2c8d8bb698899ac978f0ccc7b88cf2229593dacc", 53 + "type": "github" 54 + }, 55 + "original": { 56 + "owner": "fufexan", 57 + "repo": "nix-gaming", 58 + "type": "github" 59 + } 60 + }, 23 61 "nixpkgs": { 24 62 "locked": { 25 - "lastModified": 1728018373, 26 - "narHash": "sha256-NOiTvBbRLIOe5F6RbHaAh6++BNjsb149fGZd1T4+KBg=", 63 + "lastModified": 1728538411, 64 + "narHash": "sha256-f0SBJz1eZ2yOuKUr5CA9BHULGXVSn6miBuUWdTyhUhU=", 65 + "owner": "NixOS", 66 + "repo": "nixpkgs", 67 + "rev": "b69de56fac8c2b6f8fd27f2eca01dcda8e0a4221", 68 + "type": "github" 69 + }, 70 + "original": { 71 + "owner": "NixOS", 72 + "ref": "nixpkgs-unstable", 73 + "repo": "nixpkgs", 74 + "type": "github" 75 + } 76 + }, 77 + "nixpkgs-lib": { 78 + "locked": { 79 + "lastModified": 1727825735, 80 + "narHash": "sha256-0xHYkMkeLVQAMa7gvkddbPqpxph+hDzdu1XdGPJR+Os=", 81 + "type": "tarball", 82 + "url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz" 83 + }, 84 + "original": { 85 + "type": "tarball", 86 + "url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz" 87 + } 88 + }, 89 + "nixpkgs_2": { 90 + "locked": { 91 + "lastModified": 1728492678, 92 + "narHash": "sha256-9UTxR8eukdg+XZeHgxW5hQA9fIKHsKCdOIUycTryeVw=", 27 93 "owner": "nixos", 28 94 "repo": "nixpkgs", 29 - "rev": "bc947f541ae55e999ffdb4013441347d83b00feb", 95 + "rev": "5633bcff0c6162b9e4b5f1264264611e950c8ec7", 30 96 "type": "github" 31 97 }, 32 98 "original": { ··· 39 105 "root": { 40 106 "inputs": { 41 107 "darwin": "darwin", 42 - "nixpkgs": "nixpkgs" 108 + "nix-gaming": "nix-gaming", 109 + "nixpkgs": "nixpkgs_2" 110 + } 111 + }, 112 + "umu": { 113 + "inputs": { 114 + "nixpkgs": [ 115 + "nix-gaming", 116 + "nixpkgs" 117 + ] 118 + }, 119 + "locked": { 120 + "dir": "packaging/nix", 121 + "lastModified": 1728772489, 122 + "narHash": "sha256-6sHjXNhPrRXIV1au5jlSXHeqn/QHb9wyRt7V0F5p4PA=", 123 + "ref": "refs/heads/main", 124 + "rev": "475e2b37e34a663b11f8c92b79dd45637a3e848c", 125 + "revCount": 770, 126 + "submodules": true, 127 + "type": "git", 128 + "url": "https://github.com/Open-Wine-Components/umu-launcher/?dir=packaging/nix" 129 + }, 130 + "original": { 131 + "dir": "packaging/nix", 132 + "submodules": true, 133 + "type": "git", 134 + "url": "https://github.com/Open-Wine-Components/umu-launcher/?dir=packaging/nix" 43 135 } 44 136 } 45 137 },
+7
flake.nix
··· 9 9 url = "github:LnL7/nix-darwin"; 10 10 inputs.nixpkgs.follows= "nixpkgs"; 11 11 }; 12 + 13 + nix-gaming.url = "github:fufexan/nix-gaming"; 12 14 }; 13 15 14 16 outputs = inputs@{ self, nixpkgs, darwin, ... }: ··· 31 33 loki = nixpkgs.lib.nixosSystem { 32 34 specialArgs = { inherit inputs outputs; }; 33 35 modules = [ ./hosts/loki/configuration.nix ]; 36 + }; 37 + 38 + nyx = nixpkgs.lib.nixosSystem { 39 + specialArgs = { inherit inputs outputs; }; 40 + modules = [ ./hosts/nyx/configuration.nix ]; 34 41 }; 35 42 }; 36 43
+2
hosts/loki/configuration.nix
··· 86 86 mangohud 87 87 protonup 88 88 kitty 89 + obsidian 90 + vesktop 89 91 ]; 90 92 91 93 # Fonts
+130
hosts/nyx/configuration.nix
··· 1 + # Edit this configuration file to define what should be installed on 2 + # your system. Help is available in the configuration.nix(5) man page 3 + # and in the NixOS manual (accessible by running ‘nixos-help’). 4 + 5 + { inputs, outputs, pkgs, ... }: 6 + 7 + { 8 + imports = 9 + [ # Include the results of the hardware scan. 10 + ./hardware-configuration.nix 11 + ./../../modules/nixos/sound.nix 12 + ./../../modules/nixos/graphics/nvidia.nix 13 + ./../../modules/nixos/desktops/budgie.nix 14 + ./../../modules/nixos/steam.nix 15 + ./../../modules/nixos/gc.nix 16 + ]; 17 + 18 + # Bootloader. 19 + boot.loader.systemd-boot.enable = true; 20 + boot.loader.efi.canTouchEfiVariables = true; 21 + 22 + networking.hostName = "nyx"; # Define your hostname. 23 + # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. 24 + 25 + # Configure network proxy if necessary 26 + # networking.proxy.default = "http://user:password@proxy:port/"; 27 + # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; 28 + 29 + # Enable networking 30 + networking.networkmanager.enable = true; 31 + 32 + # Set your time zone. 33 + time.timeZone = "Europe/Paris"; 34 + 35 + # Select internationalisation properties. 36 + i18n.defaultLocale = "en_US.UTF-8"; 37 + 38 + i18n.extraLocaleSettings = { 39 + LC_ADDRESS = "fr_FR.UTF-8"; 40 + LC_IDENTIFICATION = "fr_FR.UTF-8"; 41 + LC_MEASUREMENT = "fr_FR.UTF-8"; 42 + LC_MONETARY = "fr_FR.UTF-8"; 43 + LC_NAME = "fr_FR.UTF-8"; 44 + LC_NUMERIC = "fr_FR.UTF-8"; 45 + LC_PAPER = "fr_FR.UTF-8"; 46 + LC_TELEPHONE = "fr_FR.UTF-8"; 47 + LC_TIME = "fr_FR.UTF-8"; 48 + }; 49 + 50 + # Configure keymap in X11 51 + services.xserver.xkb = { 52 + layout = "fr"; 53 + variant = ""; 54 + }; 55 + 56 + # Configure console keymap 57 + console.keyMap = "fr"; 58 + 59 + # Enable CUPS to print documents. 60 + services.printing.enable = true; 61 + 62 + # Enable touchpad support (enabled default in most desktopManager). 63 + # services.xserver.libinput.enable = true; 64 + 65 + # Define a user account. Don't forget to set a password with ‘passwd’. 66 + users.users.benjamin = { 67 + isNormalUser = true; 68 + description = "benjamin"; 69 + extraGroups = [ "networkmanager" "wheel" ]; 70 + packages = with pkgs; [ 71 + vscode 72 + discord 73 + thunderbird 74 + spotify 75 + brave 76 + lutris 77 + btop 78 + inputs.nix-gaming.packages.${pkgs.system}.rocket-league 79 + vesktop 80 + ]; 81 + }; 82 + 83 + # Enable automatic login for the user. 84 + services.displayManager.autoLogin.enable = true; 85 + services.displayManager.autoLogin.user = "benjamin"; 86 + 87 + # Install firefox. 88 + programs.firefox.enable = true; 89 + 90 + # Allow unfree packages 91 + nixpkgs.config.allowUnfree = true; 92 + 93 + # List packages installed in system profile. To search, run: 94 + # $ nix search wget 95 + environment.systemPackages = with pkgs; [ 96 + git 97 + mangohud 98 + protonup 99 + wine 100 + ]; 101 + 102 + # Some programs need SUID wrappers, can be configured further or are 103 + # started in user sessions. 104 + # programs.mtr.enable = true; 105 + # programs.gnupg.agent = { 106 + # enable = true; 107 + # enableSSHSupport = true; 108 + # }; 109 + 110 + # List services that you want to enable: 111 + 112 + # Enable the OpenSSH daemon. 113 + # services.openssh.enable = true; 114 + 115 + # Open ports in the firewall. 116 + # networking.firewall.allowedTCPPorts = [ ... ]; 117 + # networking.firewall.allowedUDPPorts = [ ... ]; 118 + # Or disable the firewall altogether. 119 + # networking.firewall.enable = false; 120 + 121 + # This value determines the NixOS release from which the default 122 + # settings for stateful data, like file locations and database versions 123 + # on your system were taken. It‘s perfectly fine and recommended to leave 124 + # this value at the release version of the first install of this system. 125 + # Before changing this value read the documentation for this option 126 + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). 127 + system.stateVersion = "24.05"; # Did you read the comment? 128 + 129 + nix.settings.experimental-features = [ "nix-command" "flakes" ]; 130 + }
+40
hosts/nyx/hardware-configuration.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 = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; 12 + boot.initrd.kernelModules = [ ]; 13 + boot.kernelModules = [ "kvm-amd" ]; 14 + boot.extraModulePackages = [ ]; 15 + 16 + fileSystems."/" = 17 + { device = "/dev/disk/by-uuid/34ba8a09-a0fe-43cd-a1ce-f5f2eed89c19"; 18 + fsType = "ext4"; 19 + }; 20 + 21 + fileSystems."/boot" = 22 + { device = "/dev/disk/by-uuid/953A-60B2"; 23 + fsType = "vfat"; 24 + options = [ "fmask=0077" "dmask=0077" ]; 25 + }; 26 + 27 + swapDevices = 28 + [ { device = "/dev/disk/by-uuid/fc67717a-2406-4359-a6ea-0d1e9996f8fc"; } 29 + ]; 30 + 31 + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking 32 + # (the default) this is the recommended approach. When using systemd-networkd it's 33 + # still possible to use this option, but it's recommended to use it in conjunction 34 + # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. 35 + networking.useDHCP = lib.mkDefault true; 36 + # networking.interfaces.eno1.useDHCP = lib.mkDefault true; 37 + 38 + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; 39 + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; 40 + }