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: trasnform host to reusable modules

cosmeak ff99d138 feefd96e

+163 -163
+22 -22
modules/hosts/andhrimnir/configuration.nix
··· 1 1 { inputs, ... }: 2 2 { 3 - hosts.andhrimnir = { 4 - system = "x86_64-linux"; 5 - modules = [ 6 - ({ pkgs, ... }: { 7 - imports = 8 - with inputs.self.nixosModules; 9 - with inputs.self.factory; 10 - [ 11 - grub 12 - nvidia-gpu 13 - kde-desktop 14 - neoxa 15 - (autoLogin "neoxa") 16 - ]; 3 + flake.nixosModules.andhrimnir = { pkgs, ... }: { 4 + imports = 5 + with inputs.self.nixosModules; 6 + with inputs.self.factory; 7 + [ 8 + grub 9 + nvidia-gpu 10 + kde-desktop 11 + neoxa 12 + (autoLogin "neoxa") 13 + ]; 17 14 18 - networking.networkmanager.enable = true; 15 + networking.networkmanager.enable = true; 19 16 20 - programs.steam.enable = true; 21 - programs.firefox.enable = true; 22 - environment.systemPackages = with pkgs; [ 23 - git 24 - just 25 - ]; 26 - }) 17 + programs.steam.enable = true; 18 + programs.firefox.enable = true; 19 + environment.systemPackages = with pkgs; [ 20 + git 21 + just 27 22 ]; 23 + }; 24 + 25 + hosts.andhrimnir = { 26 + system = "x86_64-linux"; 27 + modules = [ inputs.self.nixosModules.andhrimnir ]; 28 28 }; 29 29 }
+35 -35
modules/hosts/loki/configuration.nix
··· 2 2 { 3 3 allowedUnfreePackages = [ "steam" "steam-unwrapped" ]; 4 4 5 - hosts.loki = { 6 - system = "x86_64-linux"; 7 - modules = [ 8 - ({ pkgs, ... }: { 9 - imports = 10 - with inputs.self.nixosModules; 11 - with inputs.self.factory; 12 - [ 13 - systemd-boot 14 - audio 15 - nvidia-gpu 16 - gnome-desktop 17 - cosmeak 18 - (autoLogin "cosmeak") 19 - ]; 5 + flake.nixosModules.loki = { pkgs, ... }: { 6 + imports = 7 + with inputs.self.nixosModules; 8 + with inputs.self.factory; 9 + [ 10 + systemd-boot 11 + audio 12 + nvidia-gpu 13 + gnome-desktop 14 + cosmeak 15 + (autoLogin "cosmeak") 16 + ]; 20 17 21 - environment.systemPackages = with pkgs; [ 22 - git 23 - just 24 - nixd 25 - ]; 18 + environment.systemPackages = with pkgs; [ 19 + git 20 + just 21 + nixd 22 + ]; 26 23 27 - networking.networkmanager.enable = true; 28 - services.printing.enable = false; 24 + networking.networkmanager.enable = true; 25 + services.printing.enable = false; 29 26 30 - # Steam 31 - programs.steam = { 32 - enable = true; 33 - gamescopeSession.enable = true; 34 - }; 27 + # Steam 28 + programs.steam = { 29 + enable = true; 30 + gamescopeSession.enable = true; 31 + }; 32 + 33 + networking.firewall = { 34 + enable = true; 35 + # Open ports for minecraft LAN 36 + allowedUDPPorts = [ 25565 ]; 37 + allowedTCPPorts = [ 25565 ]; 38 + }; 39 + }; 35 40 36 - networking.firewall = { 37 - enable = true; 38 - # Open ports for minecraft LAN 39 - allowedUDPPorts = [ 25565 ]; 40 - allowedTCPPorts = [ 25565 ]; 41 - }; 42 - }) 43 - ]; 41 + hosts.loki = { 42 + system = "x86_64-linux"; 43 + modules = [ inputs.self.nixosModules.loki ]; 44 44 }; 45 45 }
+95 -95
modules/hosts/njord/configuration.nix
··· 1 1 { inputs, ... }: 2 2 { 3 - hosts.njord = { 4 - system = "aarch64-darwin"; 5 - modules = [ 6 - ({ ... }: { 7 - imports = with inputs.self.darwinModules; [ 8 - cosmeak 9 - ]; 3 + flake.darwinModules.njord = { ... }: { 4 + imports = with inputs.self.darwinModules; [ 5 + cosmeak 6 + ]; 10 7 11 - # Enable sudo via TouchID 12 - security.pam.services.sudo_local.touchIdAuth = true; 8 + # Enable sudo via TouchID 9 + security.pam.services.sudo_local.touchIdAuth = true; 13 10 14 - # Timezone 15 - time.timeZone = "Europe/Paris"; 11 + # Timezone 12 + time.timeZone = "Europe/Paris"; 16 13 17 - # Linux builder 18 - nix = { 19 - linux-builder.enable = true; 14 + # Linux builder 15 + nix = { 16 + linux-builder.enable = true; 20 17 21 - # This line is a prerequisite 22 - settings.trusted-users = [ "@admin" ]; 23 - }; 18 + # This line is a prerequisite 19 + settings.trusted-users = [ "@admin" ]; 20 + }; 24 21 25 - # Disable startup sound 26 - system.nvram.variables = { 27 - "StartupMute" = "%01"; 28 - }; 22 + # Disable startup sound 23 + system.nvram.variables = { 24 + "StartupMute" = "%01"; 25 + }; 29 26 30 - # Deactivate state manager 31 - system.defaults.WindowManager.GloballyEnabled = false; 27 + # Deactivate state manager 28 + system.defaults.WindowManager.GloballyEnabled = false; 32 29 33 - system.primaryUser = "cosmeak"; 30 + system.primaryUser = "cosmeak"; 34 31 35 - system.defaults.NSGlobalDomain = { 36 - # Switch between dark and light mode automatically 37 - AppleInterfaceStyleSwitchesAutomatically = true; 38 - # Disable saving new documents to icloud 39 - NSDocumentSaveNewDocumentsToCloud = false; 40 - # Time before the key is repeated 41 - # InitialKeyRepeat = 7; 42 - # Time between repeat key 43 - # KeyRepeat = 6; 44 - # Window open animation 45 - NSAutomaticWindowAnimationsEnabled = false; 46 - # Icon size in finder 47 - NSTableViewDefaultSizeMode = 2; 48 - # Drag from anywhere a window to move it 49 - NSWindowShouldDragOnGesture = true; 50 - # Deativate sound bip when volume is changed 51 - "com.apple.sound.beep.feedback" = 0; 52 - # Natural scrolling direction 53 - "com.apple.swipescrolldirection" = true; 54 - }; 32 + system.defaults.NSGlobalDomain = { 33 + # Switch between dark and light mode automatically 34 + AppleInterfaceStyleSwitchesAutomatically = true; 35 + # Disable saving new documents to icloud 36 + NSDocumentSaveNewDocumentsToCloud = false; 37 + # Time before the key is repeated 38 + # InitialKeyRepeat = 7; 39 + # Time between repeat key 40 + # KeyRepeat = 6; 41 + # Window open animation 42 + NSAutomaticWindowAnimationsEnabled = false; 43 + # Icon size in finder 44 + NSTableViewDefaultSizeMode = 2; 45 + # Drag from anywhere a window to move it 46 + NSWindowShouldDragOnGesture = true; 47 + # Deativate sound bip when volume is changed 48 + "com.apple.sound.beep.feedback" = 0; 49 + # Natural scrolling direction 50 + "com.apple.swipescrolldirection" = true; 51 + }; 55 52 56 - system.defaults.screencapture.location = "~/Pictures/screenshots"; 57 - system.defaults.finder = { 58 - AppleShowAllExtensions = true; # Show file extension 59 - AppleShowAllFiles = true; # Show hidden files 60 - FXPreferredViewStyle = "clmv"; # Set default view to column 61 - CreateDesktop = false; # Disable show icon on desktop 62 - FXDefaultSearchScope = "SCcf"; # Set default search scope to current folder 63 - }; 53 + system.defaults.screencapture.location = "~/Pictures/screenshots"; 54 + system.defaults.finder = { 55 + AppleShowAllExtensions = true; # Show file extension 56 + AppleShowAllFiles = true; # Show hidden files 57 + FXPreferredViewStyle = "clmv"; # Set default view to column 58 + CreateDesktop = false; # Disable show icon on desktop 59 + FXDefaultSearchScope = "SCcf"; # Set default search scope to current folder 60 + }; 64 61 65 - system.defaults.dock = { 66 - autohide = true; 67 - orientation = "bottom"; # Set dock to bottom 68 - mru-spaces = false; # Auto arrange space based on the most recent use 69 - launchanim = false; # Remove animation when opening an app 70 - mineffect = "scale"; # Change animation from minimize/maximize app 71 - magnification = false; 72 - minimize-to-application = true; # Minimize app in app icon 73 - show-recents = false; # Don't show recent open apps 74 - tilesize = 32; # Set dock size 62 + system.defaults.dock = { 63 + autohide = true; 64 + orientation = "bottom"; # Set dock to bottom 65 + mru-spaces = false; # Auto arrange space based on the most recent use 66 + launchanim = false; # Remove animation when opening an app 67 + mineffect = "scale"; # Change animation from minimize/maximize app 68 + magnification = false; 69 + minimize-to-application = true; # Minimize app in app icon 70 + show-recents = false; # Don't show recent open apps 71 + tilesize = 32; # Set dock size 75 72 76 - # Set dock apps 77 - persistent-apps = [ ]; 73 + # Set dock apps 74 + persistent-apps = [ ]; 78 75 79 - # Disable hot corners 80 - wvous-bl-corner = 1; 81 - wvous-br-corner = 1; 82 - wvous-tl-corner = 1; 83 - wvous-tr-corner = 1; 84 - }; 76 + # Disable hot corners 77 + wvous-bl-corner = 1; 78 + wvous-br-corner = 1; 79 + wvous-tl-corner = 1; 80 + wvous-tr-corner = 1; 81 + }; 85 82 86 - homebrew.enable = true; 87 - homebrew.onActivation = { 88 - autoUpdate = true; 89 - cleanup = "zap"; # uninstall all elements not listed 90 - }; 83 + homebrew.enable = true; 84 + homebrew.onActivation = { 85 + autoUpdate = true; 86 + cleanup = "zap"; # uninstall all elements not listed 87 + }; 91 88 92 - # Repository authorized for homebrew 93 - homebrew.taps = [ 94 - # "mczachurski/wallpapper" 95 - ]; 89 + # Repository authorized for homebrew 90 + homebrew.taps = [ 91 + # "mczachurski/wallpapper" 92 + ]; 96 93 97 - # Apps from App Store - Just used for XCode because not avalaible somewhere else 98 - homebrew.masApps = { 99 - Xcode = 497799835; 100 - }; 94 + # Apps from App Store - Just used for XCode because not avalaible somewhere else 95 + homebrew.masApps = { 96 + Xcode = 497799835; 97 + }; 101 98 102 - homebrew.brews = [ 103 - # "wallpapper" # to package 104 - ]; 99 + homebrew.brews = [ 100 + # "wallpapper" # to package 101 + ]; 105 102 106 - homebrew.casks = [ 107 - "amethyst" # Window manager 108 - "discord" # Discord client - used instead of the nix one for krisp 109 - "figma" # Collaborative design application 110 - "gpg-suite-no-mail" # Signing tool for commits 111 - "logi-options+" # 112 - "zed" # Code editor 113 - ]; 114 - }) 103 + homebrew.casks = [ 104 + "amethyst" # Window manager 105 + "discord" # Discord client - used instead of the nix one for krisp 106 + "figma" # Collaborative design application 107 + "gpg-suite-no-mail" # Signing tool for commits 108 + "logi-options+" # 109 + "zed" # Code editor 115 110 ]; 111 + }; 112 + 113 + hosts.njord = { 114 + system = "aarch64-darwin"; 115 + modules = [ inputs.self.darwinModules.njord ]; 116 116 stateVersion = 5; 117 117 }; 118 118 }
+11 -11
modules/hosts/sunna/configuration.nix
··· 1 1 { inputs, ... }: 2 2 { 3 + flake.nixosModules.sunna = { ... }: { 4 + imports = with inputs.self.nixosModules; [ 5 + systemd-boot 6 + nvidia-gpu 7 + kde-desktop 8 + ]; 9 + 10 + networking.networkmanager.enable = true; 11 + }; 12 + 3 13 hosts.sunna = { 4 14 system = "x86_64-linux"; 5 - modules = [ 6 - ({ ... }: { 7 - imports = with inputs.self.nixosModules; [ 8 - systemd-boot 9 - nvidia-gpu 10 - kde-desktop 11 - ]; 12 - 13 - networking.networkmanager.enable = true; 14 - }) 15 - ]; 15 + modules = [ inputs.self.nixosModules.sunna ]; 16 16 }; 17 17 }