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: move config to snowfall-lib

+524 -313
+117 -26
flake.lock
··· 7 7 ] 8 8 }, 9 9 "locked": { 10 - "lastModified": 1729757100, 11 - "narHash": "sha256-x+8uGaX66V5+fUBHY23Q/OQyibQ38nISzxgj7A7Jqds=", 10 + "lastModified": 1731153869, 11 + "narHash": "sha256-3Ftf9oqOypcEyyrWJ0baVkRpvQqroK/SVBFLvU3nPuc=", 12 12 "owner": "LnL7", 13 13 "repo": "nix-darwin", 14 - "rev": "04193f188e4144d7047f83ad1de81d6034d175cd", 14 + "rev": "5c74ab862c8070cbf6400128a1b56abb213656da", 15 15 "type": "github" 16 16 }, 17 17 "original": { ··· 36 36 "type": "github" 37 37 } 38 38 }, 39 + "flake-compat_2": { 40 + "flake": false, 41 + "locked": { 42 + "lastModified": 1650374568, 43 + "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", 44 + "owner": "edolstra", 45 + "repo": "flake-compat", 46 + "rev": "b4a34015c698c7793d592d66adbab377907a2be8", 47 + "type": "github" 48 + }, 49 + "original": { 50 + "owner": "edolstra", 51 + "repo": "flake-compat", 52 + "type": "github" 53 + } 54 + }, 39 55 "flake-utils": { 40 56 "inputs": { 41 57 "systems": "systems" ··· 54 70 "type": "github" 55 71 } 56 72 }, 73 + "flake-utils-plus": { 74 + "inputs": { 75 + "flake-utils": "flake-utils_2" 76 + }, 77 + "locked": { 78 + "lastModified": 1715533576, 79 + "narHash": "sha256-fT4ppWeCJ0uR300EH3i7kmgRZnAVxrH+XtK09jQWihk=", 80 + "owner": "gytis-ivaskevicius", 81 + "repo": "flake-utils-plus", 82 + "rev": "3542fe9126dc492e53ddd252bb0260fe035f2c0f", 83 + "type": "github" 84 + }, 85 + "original": { 86 + "owner": "gytis-ivaskevicius", 87 + "repo": "flake-utils-plus", 88 + "rev": "3542fe9126dc492e53ddd252bb0260fe035f2c0f", 89 + "type": "github" 90 + } 91 + }, 92 + "flake-utils_2": { 93 + "inputs": { 94 + "systems": "systems_2" 95 + }, 96 + "locked": { 97 + "lastModified": 1694529238, 98 + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", 99 + "owner": "numtide", 100 + "repo": "flake-utils", 101 + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", 102 + "type": "github" 103 + }, 104 + "original": { 105 + "owner": "numtide", 106 + "repo": "flake-utils", 107 + "type": "github" 108 + } 109 + }, 57 110 "home-manager": { 58 111 "inputs": { 59 112 "nixpkgs": [ ··· 84 137 ] 85 138 }, 86 139 "locked": { 87 - "lastModified": 1729717678, 88 - "narHash": "sha256-XEfYT1D+4KT9c0mMwsmZdWS2JgKsboAZbnuJvrjBQKg=", 140 + "lastModified": 1730453870, 141 + "narHash": "sha256-d+kIgz4BvTXb7emjSFV3zjNydGmLUmuluQjdBb51R9o=", 89 142 "owner": "nix-community", 90 143 "repo": "NixOS-WSL", 91 - "rev": "5a965cb108fb1f30b29a26dbc29b473f49e80b41", 144 + "rev": "adb6bc4b661a43328752b4575be4968a4990c033", 92 145 "type": "github" 93 146 }, 94 147 "original": { ··· 99 152 }, 100 153 "nixpkgs": { 101 154 "locked": { 102 - "lastModified": 1729449015, 103 - "narHash": "sha256-Gf04dXB0n4q0A9G5nTGH3zuMGr6jtJppqdeljxua1fo=", 155 + "lastModified": 1730963269, 156 + "narHash": "sha256-rz30HrFYCHiWEBCKHMffHbMdWJ35hEkcRVU0h7ms3x0=", 104 157 "owner": "nixos", 105 158 "repo": "nixpkgs", 106 - "rev": "89172919243df199fe237ba0f776c3e3e3d72367", 159 + "rev": "83fb6c028368e465cd19bb127b86f971a5e41ebc", 107 160 "type": "github" 108 161 }, 109 162 "original": { ··· 113 166 "type": "github" 114 167 } 115 168 }, 116 - "nixpkgs-unstable": { 169 + "root": { 170 + "inputs": { 171 + "darwin": "darwin", 172 + "home-manager": "home-manager", 173 + "nixos-wsl": "nixos-wsl", 174 + "nixpkgs": "nixpkgs", 175 + "snowfall-lib": "snowfall-lib", 176 + "unstable": "unstable" 177 + } 178 + }, 179 + "snowfall-lib": { 180 + "inputs": { 181 + "flake-compat": "flake-compat_2", 182 + "flake-utils-plus": "flake-utils-plus", 183 + "nixpkgs": [ 184 + "nixpkgs" 185 + ] 186 + }, 117 187 "locked": { 118 - "lastModified": 1729722069, 119 - "narHash": "sha256-gY9Wc8ZhBsPdQqWnTV+XuNaj2dbQW0uslAaJHamczSE=", 120 - "owner": "nixos", 121 - "repo": "nixpkgs", 122 - "rev": "6301495959cf1737c6ebcd153833e4c4596f56e2", 188 + "lastModified": 1730136121, 189 + "narHash": "sha256-tfVayj13Zw+zzOKrmJhnvBod7Hdb9ixBR6/4GUlyMA0=", 190 + "owner": "snowfallorg", 191 + "repo": "lib", 192 + "rev": "dd348182c1a010993e68004eada86cf0341fe2c4", 123 193 "type": "github" 124 194 }, 125 195 "original": { 126 - "owner": "nixos", 127 - "ref": "nixpkgs-unstable", 128 - "repo": "nixpkgs", 196 + "owner": "snowfallorg", 197 + "repo": "lib", 129 198 "type": "github" 130 199 } 131 200 }, 132 - "root": { 133 - "inputs": { 134 - "darwin": "darwin", 135 - "home-manager": "home-manager", 136 - "nixos-wsl": "nixos-wsl", 137 - "nixpkgs": "nixpkgs", 138 - "nixpkgs-unstable": "nixpkgs-unstable" 201 + "systems": { 202 + "locked": { 203 + "lastModified": 1681028828, 204 + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", 205 + "owner": "nix-systems", 206 + "repo": "default", 207 + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", 208 + "type": "github" 209 + }, 210 + "original": { 211 + "owner": "nix-systems", 212 + "repo": "default", 213 + "type": "github" 139 214 } 140 215 }, 141 - "systems": { 216 + "systems_2": { 142 217 "locked": { 143 218 "lastModified": 1681028828, 144 219 "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", ··· 150 225 "original": { 151 226 "owner": "nix-systems", 152 227 "repo": "default", 228 + "type": "github" 229 + } 230 + }, 231 + "unstable": { 232 + "locked": { 233 + "lastModified": 1730958623, 234 + "narHash": "sha256-JwQZIGSYnRNOgDDoIgqKITrPVil+RMWHsZH1eE1VGN0=", 235 + "owner": "nixos", 236 + "repo": "nixpkgs", 237 + "rev": "85f7e662eda4fa3a995556527c87b2524b691933", 238 + "type": "github" 239 + }, 240 + "original": { 241 + "owner": "nixos", 242 + "ref": "nixpkgs-unstable", 243 + "repo": "nixpkgs", 153 244 "type": "github" 154 245 } 155 246 }
+24 -56
flake.nix
··· 1 1 { 2 - description = "Domain of the Aesir"; 3 - 4 2 inputs = { 5 3 nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; 6 - nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable"; 4 + unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable"; 7 5 8 6 darwin = { 9 7 url = "github:LnL7/nix-darwin"; ··· 19 17 url = "github:nix-community/home-manager/release-24.05"; 20 18 inputs.nixpkgs.follows = "nixpkgs"; 21 19 }; 22 - }; 23 20 24 - outputs = inputs@{ self, nixpkgs, nixpkgs-unstable, darwin, nixos-wsl, home-manager, microvm, ... }: 25 - let 26 - inherit (self) outputs; 27 - # Currently supported systems 28 - systems = [ 29 - "x86_64-linux" 30 - "aarch64-darwin" 31 - ]; 32 - 33 - # Function to generate an attribute for all systems 34 - forAllSystems = nixpkgs.lib.genAttrs systems; 35 - in 36 - { 37 - # Enable formatter 38 - formatter = forAllSystems (system: nixpkgs.legagyPackages.${system}.alejandra); 39 - 40 - # Applied overlays 41 - overlays = import ./overlays { inherit inputs; }; 21 + # The name "snowfall-lib" is required due to how Snowfall Lib processes your 22 + # flake's inputs. 23 + snowfall-lib = { 24 + url = "github:snowfallorg/lib"; 25 + inputs.nixpkgs.follows = "nixpkgs"; 26 + }; 27 + }; 28 + outputs = inputs : inputs.snowfall-lib.mkFlake { 29 + inherit inputs; 30 + src = ./.; 31 + snowfall.namespace = "asgard"; 32 + snowfall.meta.name = "asgard"; 33 + snowfall.meta.description = "Domain of the Aesir"; 42 34 43 - nixosConfigurations = { 44 - loki = nixpkgs.lib.nixosSystem { 45 - specialArgs = { inherit inputs outputs; }; 46 - modules = [ 47 - ./hosts/loki/configuration.nix 48 - home-manager.nixosModules.home-manager 49 - { 50 - home-manager.useGlobalPkgs = true; 51 - home-manager.useUserPackages = true; 52 - home-manager.users = { 53 - cosmeak = import ./homes/cosmeak-loki/home.nix; 54 - }; 55 - } 56 - ]; 57 - }; 35 + channels-config.allowUnfree = true; 58 36 59 - vali = nixpkgs.lib.nixosSystem { 60 - specialArgs = { inherit inputs outputs; }; 61 - system = "x86_64-linux"; 62 - modules = [ 63 - nixos-wsl.nixosModules.wsl 64 - ./hosts/vali/configuration.nix 65 - ]; 66 - }; 37 + systems.modules.nixos = with inputs; [ 38 + home-manager.nixosModules.home-manager 39 + ]; 67 40 68 - nyx = nixpkgs.lib.nixosSystem { 69 - specialArgs = { inherit inputs outputs; }; 70 - modules = [ ./hosts/nyx/configuration.nix ]; 71 - }; 72 - }; 41 + systems.modules.darwin = with inputs; [ 42 + home-manager.darwinModules.home-manager 43 + ]; 73 44 74 - darwinConfigurations = { 75 - njord = darwin.lib.darwinSystem { 76 - specialArgs = { inherit inputs outputs; }; 77 - modules = [ ./hosts/njord/configuration.nix ]; 78 - }; 79 - }; 45 + systems.hosts.vali.modules = with inputs; [ 46 + nixos-wsl.nixosModules.wsl 47 + ]; 80 48 }; 81 49 }
+15
homes/aarch64-darwin/cosmeak@njord/default.nix
··· 1 + { inputs, outputs, pkgs, ... }: 2 + { 3 + # imports = [ /. "./../cosmeak@shared/home.nix" ]; 4 + 5 + # home.username = "cosmeak"; 6 + # home.homeDirectory = "/Users/cosmeak"; 7 + 8 + # home.packages = with pkgs; [ 9 + # # TODO: move users package from configuration.nix 10 + # ]; 11 + 12 + # You do not need to change this if you're reading this in the future. 13 + # Don't ever change this after the first build. Don't ask questions. 14 + # home.stateVersion = "24.05"; 15 + }
-13
homes/cosmeak-loki/home.nix
··· 1 - { inputs, outputs, pkgs, ... }: 2 - { 3 - home.username = "cosmeak"; 4 - home.homeDirectory = "/home/cosmeak"; 5 - 6 - home.packages = with pkgs; [ 7 - hello 8 - ]; 9 - 10 - # You do not need to change this if you're reading this in the future. 11 - # Don't ever change this after the first build. Don't ask questions. 12 - home.stateVersion = "24.05"; 13 - }
homes/cosmeak@njord/.gitkeep

This is a binary file and will not be displayed.

homes/cosmeak@shared/.gitkeep

This is a binary file and will not be displayed.

+24
homes/x86_64-linux/benjamin@nyx/default.nix
··· 1 + { 2 + # Snowfall Lib provides a customized `lib` instance with access to your flake's library 3 + # as well as the libraries available from your flake's inputs. 4 + lib, 5 + # An instance of `pkgs` with your overlays and packages applied is also available. 6 + pkgs, 7 + # You also have access to your flake's inputs. 8 + inputs, 9 + 10 + # Additional metadata is provided by Snowfall Lib. 11 + namespace, # The namespace used for your flake, defaulting to "internal" if not set. 12 + home, # The home architecture for this host (eg. `x86_64-linux`). 13 + target, # The Snowfall Lib target for this home (eg. `x86_64-home`). 14 + format, # A normalized name for the home target (eg. `home`). 15 + virtual, # A boolean to determine whether this home is a virtual target using nixos-generators. 16 + host, # The host name for this home. 17 + 18 + # All other arguments come from the home home. 19 + config, 20 + ... 21 + }: 22 + { 23 + # Your configuration. 24 + }
+32
homes/x86_64-linux/cosmeak@loki/default.nix
··· 1 + { lib, pkgs, inputs, namespace, config, ... }: 2 + with lib; 3 + with lib.${namespace}; 4 + { 5 + home.packages = with pkgs; [ 6 + brave 7 + btop 8 + # discord 9 + deno 10 + github-desktop 11 + just 12 + lazygit 13 + lutris 14 + modrinth-app 15 + nodejs_20 16 + obs-studio 17 + php83 18 + php83Packages.composer 19 + spotify 20 + termius 21 + thunderbird 22 + unzip 23 + vesktop 24 + vscode 25 + zed-editor 26 + zip 27 + ]; 28 + 29 + # You do not need to change this if you're reading this in the future. 30 + # Don't ever change this after the first build. Don't ask questions. 31 + home.stateVersion = "24.05"; 32 + }
-108
hosts/loki/configuration.nix
··· 1 - { config, lib, pkgs, ... }: 2 - { 3 - imports = [ 4 - ./hardware-configuration.nix 5 - ./../../modules/nixos/sound.nix 6 - ./../../modules/nixos/graphics/nvidia.nix 7 - ./../../modules/nixos/desktops/budgie.nix 8 - ./../../modules/nixos/steam.nix 9 - ./../../modules/nixos/gc.nix 10 - ]; 11 - 12 - # Bootloader. 13 - boot.loader.systemd-boot.enable = true; 14 - boot.loader.efi.canTouchEfiVariables = true; 15 - 16 - networking.hostName = "loki"; 17 - # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. 18 - 19 - # Configure network proxy if necessary 20 - # networking.proxy.default = "http://user:password@proxy:port/"; 21 - # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; 22 - 23 - # Enable networking 24 - networking.networkmanager.enable = true; 25 - 26 - # Set your time zone. 27 - time.timeZone = "Europe/Paris"; 28 - 29 - # Select internationalisation properties. 30 - i18n.defaultLocale = "en_US.UTF-8"; 31 - 32 - i18n.extraLocaleSettings = { 33 - LC_ADDRESS = "fr_FR.UTF-8"; 34 - LC_IDENTIFICATION = "fr_FR.UTF-8"; 35 - LC_MEASUREMENT = "fr_FR.UTF-8"; 36 - LC_MONETARY = "fr_FR.UTF-8"; 37 - LC_NAME = "fr_FR.UTF-8"; 38 - LC_NUMERIC = "fr_FR.UTF-8"; 39 - LC_PAPER = "fr_FR.UTF-8"; 40 - LC_TELEPHONE = "fr_FR.UTF-8"; 41 - LC_TIME = "fr_FR.UTF-8"; 42 - }; 43 - 44 - # Configure keymap in X11 45 - services.xserver.xkb = { 46 - layout = "us"; 47 - variant = ""; 48 - }; 49 - 50 - # Enable automatic login for the user. 51 - services.displayManager.autoLogin.enable = true; 52 - services.displayManager.autoLogin.user = "cosmeak"; 53 - 54 - # Enable CUPS to print documents. 55 - services.printing.enable = true; 56 - 57 - # Define a user account. Don't forget to set a password with ‘passwd’. 58 - users.users.cosmeak = { 59 - isNormalUser = true; 60 - description = "cosmeak"; 61 - extraGroups = [ "networkmanager" "wheel" ]; 62 - packages = with pkgs; [ 63 - discord 64 - thunderbird 65 - spotify 66 - brave 67 - lutris 68 - unstable.zed-editor 69 - php83 70 - php83Packages.composer 71 - nodejs_20 72 - lazygit 73 - unstable.modrinth-app 74 - btop 75 - vesktop 76 - zip 77 - unzip 78 - termius 79 - just 80 - ]; 81 - }; 82 - 83 - # Setup nixpkgs rights 84 - nixpkgs.config.allowUnfree = true; 85 - nixpkgs.config.allowBroken = true; 86 - nixpkgs.overlays = [ outputs.overlays.unstable-packages ]; 87 - 88 - # Install packages 89 - environment.systemPackages = with pkgs; [ 90 - git 91 - mangohud 92 - protonup 93 - kitty 94 - obsidian 95 - ]; 96 - 97 - # Fonts 98 - fonts.packages = with pkgs; [ 99 - (nerdfonts.override { fonts = [ "Hack" ]; }) 100 - ]; 101 - 102 - # Enable flakes 103 - nix.settings.experimental-features = [ "nix-command" "flakes" ]; 104 - 105 - # NixOS version 106 - # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion 107 - system.stateVersion = "24.05"; 108 - }
hosts/loki/hardware-configuration.nix systems/x86_64-linux/loki/hardware.nix
hosts/njord/configuration.nix systems/aarch64-darwin/njord/configuration.nix
+23 -24
hosts/nyx/configuration.nix systems/x86_64-linux/nyx/default.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’). 1 + { lib, pkgs, inputs, namespace, system, target, format, virtual, systems, config, ... }: 2 + with lib; 3 + with lib.${namespace}; 4 + { 5 + imports = [ ./hardware.nix ]; 4 6 5 - { inputs, outputs, pkgs, ... }: 7 + asgard = { 8 + system = { 9 + bootloader.enable = true; 10 + }; 6 11 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 - ]; 12 + hardware = { 13 + gpu.nvidia.enable = true; 14 + audio.enable = true; 15 + }; 16 + 17 + desktop.budgie.enable = true; 17 18 18 - # Bootloader. 19 - boot.loader.systemd-boot.enable = true; 20 - boot.loader.efi.canTouchEfiVariables = true; 19 + apps = { 20 + steam.enable = true; 21 + }; 22 + }; 21 23 22 24 networking.hostName = "nyx"; # Define your hostname. 23 25 # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. ··· 80 82 unzip 81 83 zip 82 84 lazygit 83 - unstable.unityhub 85 + # unstable.unityhub 84 86 blender 85 87 ]; 86 88 }; ··· 90 92 services.displayManager.autoLogin.user = "benjamin"; 91 93 92 94 # Install firefox. 93 - programs.firefox.enable = true; 94 - 95 - # Allow unfree packages 96 - nixpkgs.config.allowUnfree = true; 97 - nixpkgs.overlays = [ outputs.overlays.unstable-packages ]; 95 + programs.firefox.enable = false; 98 96 99 97 # List packages installed in system profile. To search, run: 100 98 # $ nix search wget ··· 124 122 # Or disable the firewall altogether. 125 123 # networking.firewall.enable = false; 126 124 125 + nix.settings.experimental-features = [ "nix-command" "flakes" ]; 126 + 127 127 # This value determines the NixOS release from which the default 128 128 # settings for stateful data, like file locations and database versions 129 129 # on your system were taken. It‘s perfectly fine and recommended to leave ··· 132 132 # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). 133 133 system.stateVersion = "24.05"; # Did you read the comment? 134 134 135 - nix.settings.experimental-features = [ "nix-command" "flakes" ]; 136 135 }
hosts/nyx/hardware-configuration.nix systems/x86_64-linux/nyx/hardware.nix
hosts/vali/configuration.nix systems/x86_64-linux/vali/configuration.nix
lib/.gitkeep

This is a binary file and will not be displayed.

+16
lib/module/default.nix
··· 1 + {lib, ...}: 2 + with lib; 3 + rec { 4 + mkOpt = type: default: description: 5 + mkOption {inherit type default description;}; 6 + 7 + mkOpt' = type: default: mkOpt type default null; 8 + 9 + mkBoolOpt = mkOpt types.bool; 10 + 11 + mkBoolOpt' = mkOpt' types.bool; 12 + 13 + enabled = {enable = true;}; 14 + 15 + disabled = {enable = false;}; 16 + }
modules/darwin/.gitkeep

This is a binary file and will not be displayed.

+24
modules/nixos/apps/steam/default.nix
··· 1 + { options, config, lib, pkgs, namespace, ... } : 2 + with lib; 3 + with lib.${namespace}; 4 + let 5 + cfg = config.${namespace}.apps.steam; 6 + in 7 + { 8 + options.${namespace}.apps.steam = with types; { 9 + enable = mkBoolOpt false "Whether or not to enable support for Steam."; 10 + }; 11 + 12 + config = mkIf cfg.enable { 13 + programs.steam = { 14 + enable = true; 15 + gamescopeSession.enable = true; 16 + }; 17 + 18 + programs.gamemode.enable = true; 19 + 20 + environment.sessionVariables = { 21 + STEAM_EXTRA_COMPAT_TOOS_PATHS = "/home/cosmeak/.steam/root/compatibilitytools.d"; 22 + }; 23 + }; 24 + }
+17
modules/nixos/desktop/budgie/default.nix
··· 1 + { options, config, lib, pkgs, namespace, ... }: 2 + with lib; 3 + with lib.${namespace}; 4 + let 5 + cfg = config.${namespace}.desktop.budgie; 6 + in 7 + { 8 + options.${namespace}.desktop.budgie = with types; { 9 + enable = mkBoolOpt false "Wheter or not to enable Budgie Desktop Environment."; 10 + }; 11 + 12 + config = mkIf cfg.enable { 13 + services.xserver.enable = true; 14 + services.xserver.desktopManager.budgie.enable = true; 15 + services.xserver.displayManager.lightdm.enable = true; 16 + }; 17 + }
+15
modules/nixos/desktop/hyprland/default.nix
··· 1 + { options, config, lib, pkgs, namespace, ... }: 2 + with lib; 3 + with lib.${namespace}; 4 + let 5 + cfg = config.${namespace}.desktop.hyprland; 6 + in 7 + { 8 + options.${namespace}.desktop.hyprland = with types; { 9 + enable = mkBoolOpt false "Whether or not to enable Hyprland WM."; 10 + }; 11 + 12 + config = mkIf cfg.enable { 13 + # TODO: Enable a basic hyprland configuration with plugins and basic app for a desktop experience 14 + }; 15 + }
-8
modules/nixos/desktops/budgie.nix
··· 1 - { 2 - # Enable the X11 windowing system. 3 - services.xserver.enable = true; 4 - 5 - # Enable Budgie Desktop Environment 6 - services.xserver.desktopManager.budgie.enable = true; 7 - services.xserver.displayManager.lightdm.enable = true; 8 - }
-19
modules/nixos/gc.nix
··· 1 - { 2 - # Limit the number of generations to keep 3 - boot.loader.systemd-boot.configurationLimit = 5; 4 - boot.loader.grub.configurationLimit = 5; 5 - 6 - # Perform garbage collection weekly to maintain low disk usage 7 - nix.gc = { 8 - automatic = true; 9 - dates = "weekly"; 10 - options = "--delete-older-than 1w"; 11 - }; 12 - 13 - # Optimize storage 14 - # You can also manually optimize the store via: 15 - # nix-store --optimise 16 - # Refer to the following link for more details: 17 - # https://nixos.org/manual/nix/stable/command-ref/conf-file.html#conf-auto-optimise-store 18 - nix.settings.auto-optimise-store = true; 19 - }
-19
modules/nixos/graphics/nvidia.nix
··· 1 - { config, ...} : 2 - { 3 - # Enable OpenGL 4 - hardware.opengl = { 5 - enable = true; 6 - driSupport = true; 7 - driSupport32Bit = true; 8 - }; 9 - 10 - services.xserver.videoDrivers = [ "nvidia" ]; 11 - hardware.nvidia = { 12 - package = config.boot.kernelPackages.nvidiaPackages.production; # 550 Driver 13 - modesetting.enable = true; 14 - powerManagement.enable = false; 15 - powerManagement.finegrained = false; 16 - open = false; 17 - nvidiaSettings = true; 18 - }; 19 - }
+24
modules/nixos/hardware/audio/default.nix
··· 1 + { options, config, lib, pkgs, namespace, ... }: 2 + with lib; 3 + with lib.${namespace}; 4 + let 5 + cfg = config.${namespace}.hardware.audio; 6 + in 7 + { 8 + options.${namespace}.hardware.audio = with types; { 9 + enable = mkBoolOpt false "Whether or not to enable audio support."; 10 + }; 11 + 12 + config = mkIf cfg.enable { 13 + # Enable sound with pipewire. 14 + hardware.pulseaudio.enable = false; 15 + security.rtkit.enable = true; 16 + services.pipewire = { 17 + enable = true; 18 + alsa.enable = true; 19 + alsa.support32Bit = true; 20 + pulse.enable = true; 21 + jack.enable = true; 22 + }; 23 + }; 24 + }
+30
modules/nixos/hardware/gpu/nvidia/default.nix
··· 1 + { options, config, lib, pkgs, namespace, ... }: 2 + with lib; 3 + with lib.${namespace}; 4 + let 5 + cfg = config.${namespace}.hardware.gpu.nvidia; 6 + in 7 + { 8 + options.${namespace}.hardware.gpu.nvidia = with types; { 9 + enable = mkBoolOpt false "Whether or not to enable support for NVIDIA GPU."; 10 + }; 11 + 12 + config = mkIf cfg.enable { 13 + # Enable OpenGL 14 + hardware.opengl = { 15 + enable = true; 16 + driSupport = true; 17 + driSupport32Bit = true; 18 + }; 19 + 20 + services.xserver.videoDrivers = [ "nvidia" ]; 21 + hardware.nvidia = { 22 + package = config.boot.kernelPackages.nvidiaPackages.production; # 550 Driver 23 + modesetting.enable = true; 24 + powerManagement.enable = false; 25 + powerManagement.finegrained = false; 26 + open = false; 27 + nvidiaSettings = true; 28 + }; 29 + }; 30 + }
-17
modules/nixos/sound.nix
··· 1 - { 2 - # Enable sound with pipewire. 3 - hardware.pulseaudio.enable = false; 4 - security.rtkit.enable = true; 5 - services.pipewire = { 6 - enable = true; 7 - alsa.enable = true; 8 - alsa.support32Bit = true; 9 - pulse.enable = true; 10 - # If you want to use JACK applications, uncomment this 11 - #jack.enable = true; 12 - 13 - # use the example session manager (no others are packaged yet so this is enabled by default, 14 - # no need to redefine it in your config for now) 15 - #media-session.enable = true; 16 - }; 17 - }
-12
modules/nixos/steam.nix
··· 1 - { 2 - programs.steam = { 3 - enable = true; 4 - gamescopeSession.enable = true; 5 - }; 6 - 7 - programs.gamemode.enable = true; 8 - 9 - environment.sessionVariables = { 10 - STEAM_EXTRA_COMPAT_TOOS_PATHS = "/home/cosmeak/.steam/root/compatibilitytools.d"; 11 - }; 12 - }
+20
modules/nixos/system/bootloader/default.nix
··· 1 + { options, config, lib, pkgs, namespace, ... }: 2 + with lib; 3 + with lib.${namespace}; 4 + let 5 + cfg = config.${namespace}.system.bootloader; 6 + in 7 + { 8 + options.${namespace}.system.bootloader = with types; { 9 + enable = mkBoolOpt false "Whether or not to enable booting."; 10 + }; 11 + 12 + config = mkIf cfg.enable { 13 + boot.loader.systemd-boot.enable = true; 14 + boot.loader.efi.canTouchEfiVariables = true; 15 + boot.loader.systemd-boot.configurationLimit = 5; 16 + 17 + # https://github.com/NixOS/nixpkgs/blob/c32c39d6f3b1fe6514598fa40ad2cf9ce22c3fb7/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix#L66 18 + boot.loader.systemd-boot.editor = false; 19 + }; 20 + }
+28
modules/nixos/system/fonts/default.nix
··· 1 + { options, config, lib, pkgs, namespace, ... }: 2 + with lib; 3 + with lib.${namespace}; 4 + let 5 + cfg = config.${namespace}.system.fonts; 6 + in 7 + { 8 + options.${namespace}.system.fonts = with types; { 9 + enable = mkBoolOpt false "Whether or not to manage fonts."; 10 + fonts = mkOpt (listOf package) [ ] "Custom font packages to install."; 11 + }; 12 + 13 + config = mkIf cfg.enable { 14 + environment.variables = { 15 + # Enable icons in tooling since we have nerdfonts. 16 + LOG_ICONS = "true"; 17 + }; 18 + 19 + environment.systemPackages = with pkgs; [ font-manager ]; 20 + 21 + fonts.packages = 22 + with pkgs; 23 + [ 24 + (nerdfonts.override { fonts = [ "Hack" ]; }) 25 + ] 26 + ++ cfg.fonts; 27 + }; 28 + }
modules/shared/.gitkeep

This is a binary file and will not be displayed.

-11
overlays/default.nix
··· 1 - { inputs, ... }: 2 - { 3 - # The unstable nixpkgs set (declared in the flake inputs) will 4 - # be accessible through `pkgs.unstable` 5 - unstable-packages = final: prev: { 6 - unstable = import inputs.nixpkgs-unstable { 7 - inherit (final) system; 8 - config.allowUnfree = true; 9 - }; 10 - }; 11 - }
+5
overlays/deno/default.nix
··· 1 + { channels, ... }: 2 + 3 + final: prev: { 4 + inherit (channels.unstable) deno; 5 + }
+5
overlays/modrinth-app/default.nix
··· 1 + { channels, ... }: 2 + 3 + final: prev: { 4 + inherit (channels.unstable) modrinth-app; 5 + }
+5
overlays/zed-editor/default.nix
··· 1 + { channels, ... }: 2 + 3 + final: prev: { 4 + inherit (channels.unstable) zed-editor; 5 + }
+100
systems/x86_64-linux/loki/default.nix
··· 1 + { lib, pkgs, inputs, namespace, system, target, format, virtual, systems, config, ... }: 2 + with lib; 3 + with lib.${namespace}; 4 + { 5 + imports = [ ./hardware.nix ]; 6 + 7 + asgard = { 8 + system = { 9 + bootloader.enable = true; 10 + fonts.enable = true; 11 + }; 12 + 13 + hardware = { 14 + gpu.nvidia.enable = true; 15 + audio.enable = true; 16 + }; 17 + 18 + desktop.budgie.enable = true; 19 + 20 + apps = { 21 + steam.enable = true; 22 + }; 23 + }; 24 + 25 + networking.hostName = "loki"; 26 + # Enable networking 27 + networking.networkmanager.enable = true; 28 + 29 + # Set your time zone. 30 + time.timeZone = "Europe/Paris"; 31 + 32 + # Select internationalisation properties. 33 + i18n.defaultLocale = "en_US.UTF-8"; 34 + 35 + i18n.extraLocaleSettings = { 36 + LC_ADDRESS = "fr_FR.UTF-8"; 37 + LC_IDENTIFICATION = "fr_FR.UTF-8"; 38 + LC_MEASUREMENT = "fr_FR.UTF-8"; 39 + LC_MONETARY = "fr_FR.UTF-8"; 40 + LC_NAME = "fr_FR.UTF-8"; 41 + LC_NUMERIC = "fr_FR.UTF-8"; 42 + LC_PAPER = "fr_FR.UTF-8"; 43 + LC_TELEPHONE = "fr_FR.UTF-8"; 44 + LC_TIME = "fr_FR.UTF-8"; 45 + }; 46 + 47 + # Configure keymap in X11 48 + services.xserver.xkb = { 49 + layout = "us"; 50 + variant = ""; 51 + }; 52 + 53 + # Enable automatic login for the user. 54 + services.displayManager.autoLogin.enable = true; 55 + services.displayManager.autoLogin.user = "cosmeak"; 56 + 57 + # Install packages 58 + environment.systemPackages = with pkgs; [ 59 + git 60 + mangohud 61 + protonup 62 + kitty 63 + obsidian 64 + ]; 65 + 66 + # Define a user account. Don't forget to set a password with ‘passwd’. 67 + users.users.cosmeak = { 68 + isNormalUser = true; 69 + description = "cosmeak"; 70 + extraGroups = [ "networkmanager" "wheel" ]; 71 + }; 72 + 73 + # Enable or not CUPS to print documents. 74 + services.printing.enable = false; 75 + 76 + # Perform garbage collection weekly to maintain low disk usage 77 + nix.gc = { 78 + automatic = true; 79 + dates = "weekly"; 80 + options = "--delete-older-than 1w"; 81 + }; 82 + 83 + # Optimize storage 84 + # You can also manually optimize the store via: 85 + # nix-store --optimise 86 + # Refer to the following link for more details: 87 + # https://nixos.org/manual/nix/stable/command-ref/conf-file.html#conf-auto-optimise-store 88 + nix.settings.auto-optimise-store = true; 89 + 90 + # Enable flakes 91 + nix.settings.experimental-features = [ "nix-command" "flakes" ]; 92 + 93 + # This value determines the NixOS release from which the default 94 + # settings for stateful data, like file locations and database versions 95 + # on your system were taken. It‘s perfectly fine and recommended to leave 96 + # this value at the release version of the first install of this system. 97 + # Before changing this value read the documentation for this option 98 + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). 99 + system.stateVersion = "24.05"; # Did you read the comment? 100 + }