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: rename gems back to asgard

It's like the good old days :)

cosmeak e7413d7b 1b6c478d

+45 -26
-2
flake.nix
··· 1 1 { 2 - name = "Asgard"; 3 - 4 2 description = '' 5 3 This configuration is the second version of all my systems, reworked from scratch with simplicity in mind. 6 4
+23 -2
justfile
··· 1 1 hostname := "$HOSTNAME" 2 2 3 + # default action: list actions 3 4 default: 4 5 @just --list 5 6 6 - rebuild hostname=hostname: 7 + # Rebuild the system 8 + switch hostname=hostname: 7 9 #!/usr/bin/env sh 8 10 if [[ "$OSTYPE" == "darwin"* ]]; then \ 9 11 darwin-rebuild switch --flake .#{{ hostname }}; \ ··· 11 13 sudo nixos-rebuild switch --flake .#{{ hostname }}; \ 12 14 fi; 13 15 16 + # Build a new configuration 17 + boot hostname=hostname: 18 + #!/usr/bin/env sh 19 + if [[ "$OSTYPE" == "darwin"* ]]; then \ 20 + @echo "This is not possible to do it on MacOS." 21 + else \ 22 + sudo nixos-rebuild switch --flake .#{{ hostname }}; \ 23 + fi; 24 + 25 + # Format code 26 + format: 27 + nix fmt 28 + 29 + # Update dependencies 30 + update: 31 + nix flake update 32 + 33 + # Cleanup all unused packages and generations 14 34 clean: 15 35 nix-store --optimize 16 36 nix-collect-garbage -d 17 37 sudo nix-collect-garbage -d 18 38 19 - nix-size: 39 + # Print size of the nix store 40 + size: 20 41 du -sh /nix/store
+1 -1
machines/darwin/njord/default.nix
··· 42 42 }; 43 43 44 44 # Common system configurations 45 - gems.system.garbageCollector.enable = true; 45 + asgard.system.garbageCollector.enable = true; 46 46 47 47 # The platform the configuration will be used on. 48 48 nixpkgs.hostPlatform = "aarch64-darwin";
+2 -2
machines/nixos/andhrimnir/default.nix
··· 38 38 services.printing.enable = false; 39 39 40 40 # Common system configurations 41 - gems.system.garbageCollector.enable= true; 42 - gems.system.autoUpdate.enable = false; 41 + asgard.system.garbageCollector.enable= true; 42 + asgard.system.autoUpdate.enable = false; 43 43 44 44 # This value determines the NixOS release from which the default 45 45 # settings for stateful data, like file locations and database versions
+2 -2
machines/nixos/elli/default.nix
··· 35 35 services.printing.enable = false; 36 36 37 37 # Common system configurations 38 - gems.system.garbageCollector.enable= true; 39 - gems.system.autoUpdate.enable = false; 38 + asgard.system.garbageCollector.enable= true; 39 + asgard.system.autoUpdate.enable = false; 40 40 41 41 # This value determines the NixOS release from which the default 42 42 # settings for stateful data, like file locations and database versions
+2 -2
machines/nixos/hoenir/default.nix
··· 49 49 nix.settings.experimental-features = "nix-command flakes"; 50 50 51 51 # Perform garbage collection weekly to maintain low disk usage 52 - gems.system.garbageCollector.enable = true; 53 - gems.system.autoUpdate.enable = false; 52 + asgard.system.garbageCollector.enable = true; 53 + asgard.system.autoUpdate.enable = false; 54 54 55 55 # Optimize storage 56 56 nix.settings.auto-optimise-store = true;
+5 -5
machines/nixos/loki/default.nix
··· 33 33 services.xserver.xkb.layout = "us"; 34 34 35 35 # Audio 36 - gems.hardware.audio.enable = true; 36 + asgard.hardware.audio.enable = true; 37 37 38 38 # Nvidia GPU and OpenGL 39 - gems.hardware.nvidia.enable = true; 39 + asgard.hardware.nvidia.enable = true; 40 40 41 41 # Networking 42 42 networking.networkmanager.enable = true; ··· 69 69 ]; 70 70 71 71 # Steam 72 - gems.programs.steam.enable = true; 72 + asgard.programs.steam.enable = true; 73 73 74 74 # Disable CUPS since this desktop will not print something. 75 75 services.printing.enable = false; 76 76 77 77 # Common system configurations 78 - gems.system.garbageCollector.enable = true; 79 - gems.system.autoUpdate.enable = false; 78 + asgard.system.garbageCollector.enable = true; 79 + asgard.system.autoUpdate.enable = false; 80 80 81 81 # Enable unfree packages 82 82 nixpkgs.config.allowUnfree = true;
+2 -2
modules/nixos/hardware/audio.nix
··· 1 1 { config, pkgs, lib, ... }: 2 2 let 3 - cfg = config.gems.hardware.audio; 3 + cfg = config.asgard.hardware.audio; 4 4 in 5 5 { 6 - options.gems.hardware.audio = { 6 + options.asgard.hardware.audio = { 7 7 enable = lib.mkEnableOption "Enable opinated audio configuration."; 8 8 }; 9 9
+2 -2
modules/nixos/hardware/nvidia.nix
··· 1 1 { config, pkgs, lib, ... }: 2 2 let 3 - cfg = config.gems.hardware.nvidia; 3 + cfg = config.asgard.hardware.nvidia; 4 4 in 5 5 { 6 - options.gems.hardware.nvidia = { 6 + options.asgard.hardware.nvidia = { 7 7 enable = lib.mkEnableOption "Enable an opiniated configuration for NVIDIA gpus."; 8 8 withOpenGL = lib.mkOption { 9 9 type = lib.types.bool;
+2 -2
modules/nixos/programs/steam.nix
··· 1 1 { config, pkgs, lib, ... }: 2 2 let 3 - cfg = config.gems.programs.steam; 3 + cfg = config.asgard.programs.steam; 4 4 in 5 5 { 6 - options.gems.programs.steam = { 6 + options.asgard.programs.steam = { 7 7 enable = lib.mkEnableOption '' 8 8 Enable an opiniated configuration for Steam. 9 9 This is a basic steam configuration at the moment, this will be change in the future for optimization and console like experience.
+2 -2
modules/nixos/system/auto-update.nix
··· 1 1 { config, pkgs, lib, ... }: 2 2 let 3 - cfg = config.gems.system.autoUpdate; 3 + cfg = config.asgard.system.autoUpdate; 4 4 in 5 5 { 6 - options.gems.system.autoUpdate = { 6 + options.asgard.system.autoUpdate = { 7 7 enable = lib.mkEnableOption "Enable system auto update."; 8 8 }; 9 9
+2 -2
modules/nixos/system/garbage-collector.nix
··· 1 1 { config, pkgs, lib, ... }: 2 2 let 3 - cfg = config.gems.system.garbageCollector; 3 + cfg = config.asgard.system.garbageCollector; 4 4 in 5 5 { 6 - options.gems.system.garbageCollector = { 6 + options.asgard.system.garbageCollector = { 7 7 enable = lib.mkEnableOption "garbage collection."; 8 8 }; 9 9