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: remove old folders

-530
-4
homes/cosmeak/common/default.nix
··· 1 - { inputs, pkgs, ...}: 2 - { 3 - 4 - }
-21
homes/cosmeak/hydrogen/default.nix
··· 1 - { inputs, pkgs, ...}: 2 - { 3 - imports = [ ../common ]; 4 - 5 - users.users."cosmeak" = { 6 - isNormalUser = true; 7 - description = "cosmeak"; 8 - extraGroups = [ "networkmanager" "wheel" ]; 9 - 10 - # User wide packages 11 - packages = with pkgs; [ 12 - discord 13 - obs-studio 14 - prismlauncher 15 - obsidian 16 - spotify 17 - zed-editor 18 - _1password-gui 19 - ]; 20 - }; 21 - }
-53
hosts/darwin/helium/default.nix
··· 1 - { self, inputs, pkgs, hostname, ... }: 2 - { 3 - imports = [ 4 - ./homebrew 5 - ./system 6 - ]; 7 - 8 - # pin nix group to already existant id 9 - ids.gids.nixbld = 30000; 10 - 11 - # Enable sudo via TouchID 12 - security.pam.services.sudo_local.touchIdAuth = true; 13 - 14 - # Networking 15 - networking.computerName = hostname; 16 - networking.hostName = hostname; 17 - 18 - # Timezone 19 - time.timeZone = "Europe/Paris"; 20 - 21 - # System wide packages 22 - environment.systemPackages = with pkgs; [ 23 - lazygit 24 - kitty 25 - just 26 - firefox 27 - spotify 28 - discord 29 - # _1password-gui 30 - zed-editor 31 - vscodium # used for jupyter notebook because not available in zed at this time 32 - stats # System monitoring displayed in macos top bar - will be replaced by custom script with sketchybar 33 - ]; 34 - 35 - # Common system configurations 36 - gems.system.garbageCollector.enable = true; 37 - 38 - # The platform the configuration will be used on. 39 - nixpkgs.hostPlatform = "aarch64-darwin"; 40 - 41 - # Allow packages 42 - nixpkgs.config.allowUnfree = true; 43 - 44 - # Use nix as a daemon 45 - nix.enable = true; 46 - 47 - # Enable flakes and other experimental features 48 - nix.settings.experimental-features = [ "nix-command" "flakes" "pipe-operators" ]; 49 - 50 - # Used for backwards compatibility, please read the changelog before changing. 51 - # $ darwin-rebuild changelog 52 - system.stateVersion = 5; 53 - }
-7
hosts/darwin/helium/homebrew/brews.nix
··· 1 - { 2 - homebrew.brews = [ 3 - "cocoapods" 4 - "aws-amplify" 5 - "wallpapper" 6 - ]; 7 - }
-14
hosts/darwin/helium/homebrew/casks.nix
··· 1 - { 2 - homebrew.casks = [ 3 - "beekeeper-studio" # find a better alternative 4 - "insomnia" 5 - "orbstack" # replace with simple docker desktop 6 - "figma" 7 - "obsidian" 8 - "zen-browser" 9 - "amethyst" # Window manager 10 - "sf-symbols" 11 - "font-hack-nerd-font" # move this to nix installation 12 - "1password" 13 - ]; 14 - }
-22
hosts/darwin/helium/homebrew/default.nix
··· 1 - { 2 - # Homebrew - Using for gui app because majority macos apps does not exists in nixpkgs repository 3 - imports = [ 4 - ./brews.nix 5 - ./casks.nix 6 - ./masapps.nix 7 - ]; 8 - 9 - homebrew.enable = true; 10 - homebrew.onActivation = { 11 - autoUpdate = true; 12 - cleanup = "zap"; # uninstall all elements not listed 13 - }; 14 - 15 - # Repository authorized for homebrew 16 - homebrew.taps = [ 17 - "homebrew/cask-versions" 18 - "homebrew/cask-fonts" 19 - "FelixKratz/formulae" 20 - "mczachurski/wallpapper" 21 - ]; 22 - }
-6
hosts/darwin/helium/homebrew/masapps.nix
··· 1 - { 2 - # Apps from App Store 3 - homebrew.masApps = { 4 - Xcode = 497799835; 5 - }; 6 - }
-19
hosts/darwin/helium/system/default.nix
··· 1 - { 2 - imports = [ 3 - ./dock.nix 4 - ./finder.nix 5 - ./nsglobaldomain.nix 6 - ]; 7 - 8 - # Disable startup sound 9 - system.nvram.variables = { 10 - "StartupMute" = "%01"; 11 - }; 12 - 13 - system.defaults = { 14 - # Deactivate state manager 15 - WindowManager.GloballyEnabled = false; 16 - # Text show in the login window 17 - loginwindow.LoginwindowText = "Maybe you cannot touch me"; 18 - }; 19 - }
-22
hosts/darwin/helium/system/dock.nix
··· 1 - { 2 - system.defaults.dock = { 3 - autohide = true; 4 - orientation = "bottom"; # Set dock to bottom 5 - mru-spaces = false; # Auto arrange space based on the most recent use 6 - launchanim = false; # Remove animation when opening an app 7 - mineffect = "scale"; # Change animation from minimize/maximize app 8 - magnification = false; 9 - minimize-to-application = true; # Minimize app in app icon 10 - show-recents = false; # Don't show recent open apps 11 - tilesize = 32; # Set dock size 12 - 13 - # Set dock apps (remove all apps from dock) 14 - persistent-apps = []; 15 - 16 - # Disable hot corners 17 - wvous-bl-corner = 1; 18 - wvous-br-corner = 1; 19 - wvous-tl-corner = 1; 20 - wvous-tr-corner = 1; 21 - }; 22 - }
-10
hosts/darwin/helium/system/finder.nix
··· 1 - { 2 - system.defaults.screencapture.location = "~/Pictures/screenshots"; 3 - system.defaults.finder = { 4 - AppleShowAllExtensions = true; # Show file extension 5 - AppleShowAllFiles = true; # Show hidden files 6 - FXPreferredViewStyle = "clmv"; # Set default view to column 7 - CreateDesktop = false; # Disable show icon on desktop 8 - FXDefaultSearchScope = "SCcf"; # Set default search scope to current folder 9 - }; 10 - }
-22
hosts/darwin/helium/system/nsglobaldomain.nix
··· 1 - { 2 - system.defaults.NSGlobalDomain = { 3 - # Switch between dark and light mode automatically 4 - AppleInterfaceStyleSwitchesAutomatically = true; 5 - # Disable saving new documents to icloud 6 - NSDocumentSaveNewDocumentsToCloud = false; 7 - # Time before the key is repeated 8 - # InitialKeyRepeat = 7; 9 - # Time between repeat key 10 - # KeyRepeat = 6; 11 - # Window open animation 12 - NSAutomaticWindowAnimationsEnabled = false; 13 - # Icon size in finder 14 - NSTableViewDefaultSizeMode = 2; 15 - # Drag from anywhere a window to move it 16 - NSWindowShouldDragOnGesture = true; 17 - # Deativate sound bip when volume is changed 18 - "com.apple.sound.beep.feedback" = 0; 19 - # Natural scrolling direction 20 - "com.apple.swipescrolldirection" = true; 21 - }; 22 - }
-34
hosts/nixos/beryllium/default.nix
··· 1 - { self, inputs, pkgs, hostname, ... }: 2 - { 3 - # WSL configuration 4 - wsl.enable = true; 5 - wsl.docker-desktop.enable = true; 6 - 7 - # Networking 8 - networking.hostName = hostname; 9 - 10 - # Global packages 11 - environment.systemPackages = with pkgs; [ 12 - git 13 - wget 14 - ]; 15 - 16 - # Required to use it as vscode remote 17 - programs.nix-ld = { 18 - enable = true; 19 - }; 20 - 21 - # Emulate system for building others 22 - boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; 23 - 24 - # Enable flakes and other experimental features 25 - nix.settings.experimental-features = [ "nix-command" "flakes" "pipe-operators" ]; 26 - 27 - # This value determines the NixOS release from which the default 28 - # settings for stateful data, like file locations and database versions 29 - # on your system were taken. It‘s perfectly fine and recommended to leave 30 - # this value at the release version of the first install of this system. 31 - # Before changing this value read the documentation for this option 32 - # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). 33 - system.stateVersion = "24.11"; # Did you read the comment? 34 - }
-48
hosts/nixos/boron/default.nix
··· 1 - { self, inputs, pkgs, hostname, ... }: 2 - { 3 - # imports = [ ./hardware.nix ]; 4 - 5 - # EFI Bootloader 6 - boot.loader.systemd-boot.enable = true; 7 - boot.loader.efi.canTouchEfiVariables = true; 8 - boot.loader.systemd-boot.configurationLimit = 10; 9 - 10 - # Locales 11 - i18n.defaultLocale = "en_US.UTF-8"; 12 - i18n.extraLocaleSettings = { 13 - LC_ADDRESS = "fr_FR.UTF-8"; 14 - LC_IDENTIFICATION = "fr_FR.UTF-8"; 15 - LC_MEASUREMENT = "fr_FR.UTF-8"; 16 - LC_MONETARY = "fr_FR.UTF-8"; 17 - LC_NAME = "fr_FR.UTF-8"; 18 - LC_NUMERIC = "fr_FR.UTF-8"; 19 - LC_PAPER = "fr_FR.UTF-8"; 20 - LC_TELEPHONE = "fr_FR.UTF-8"; 21 - LC_TIME = "fr_FR.UTF-8"; 22 - }; 23 - 24 - # Timezone 25 - time.timeZone = "Europe/Paris"; 26 - 27 - # Keyboard 28 - services.xserver.xkb.layout = "us"; 29 - 30 - # Networking 31 - networking.networkmanager.enable = true; 32 - networking.hostName = hostname; 33 - 34 - # Disable CUPS since this desktop will not print something. 35 - services.printing.enable = false; 36 - 37 - # Common system configurations 38 - gems.system.garbageCollector.enable= true; 39 - gems.system.autoUpdate.enable = false; 40 - 41 - # This value determines the NixOS release from which the default 42 - # settings for stateful data, like file locations and database versions 43 - # on your system were taken. It‘s perfectly fine and recommended to leave 44 - # this value at the release version of the first install of this system. 45 - # Before changing this value read the documentation for this option 46 - # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). 47 - system.stateVersion = "24.11"; # Did you read the comment? 48 - }
-48
hosts/nixos/carbon/default.nix
··· 1 - { self, inputs, pkgs, hostname, ... }: 2 - { 3 - # imports = [ ./hardware.nix ]; 4 - 5 - # EFI Bootloader 6 - boot.loader.systemd-boot.enable = true; 7 - boot.loader.efi.canTouchEfiVariables = true; 8 - boot.loader.systemd-boot.configurationLimit = 10; 9 - 10 - # Locales 11 - i18n.defaultLocale = "en_US.UTF-8"; 12 - i18n.extraLocaleSettings = { 13 - LC_ADDRESS = "fr_FR.UTF-8"; 14 - LC_IDENTIFICATION = "fr_FR.UTF-8"; 15 - LC_MEASUREMENT = "fr_FR.UTF-8"; 16 - LC_MONETARY = "fr_FR.UTF-8"; 17 - LC_NAME = "fr_FR.UTF-8"; 18 - LC_NUMERIC = "fr_FR.UTF-8"; 19 - LC_PAPER = "fr_FR.UTF-8"; 20 - LC_TELEPHONE = "fr_FR.UTF-8"; 21 - LC_TIME = "fr_FR.UTF-8"; 22 - }; 23 - 24 - # Timezone 25 - time.timeZone = "Europe/Paris"; 26 - 27 - # Keyboard 28 - services.xserver.xkb.layout = "us"; 29 - 30 - # Networking 31 - networking.networkmanager.enable = true; 32 - networking.hostName = hostname; 33 - 34 - # Disable CUPS since this desktop will not print something. 35 - services.printing.enable = false; 36 - 37 - # Common system configurations 38 - gems.system.garbageCollector.enable= true; 39 - gems.system.autoUpdate.enable = false; 40 - 41 - # This value determines the NixOS release from which the default 42 - # settings for stateful data, like file locations and database versions 43 - # on your system were taken. It‘s perfectly fine and recommended to leave 44 - # this value at the release version of the first install of this system. 45 - # Before changing this value read the documentation for this option 46 - # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). 47 - system.stateVersion = "24.11"; # Did you read the comment? 48 - }
-94
hosts/nixos/hydrogen/default.nix
··· 1 - { self, inputs, pkgs, hostname, ... }: 2 - { 3 - imports = [ 4 - ./hardware.nix 5 - 6 - # Import users 7 - ../../../homes/cosmeak/hydrogen 8 - ]; 9 - 10 - # EFI Bootloader 11 - boot.loader.systemd-boot.enable = true; 12 - boot.loader.efi.canTouchEfiVariables = true; 13 - boot.loader.systemd-boot.configurationLimit = 10; 14 - 15 - # Locales 16 - i18n.defaultLocale = "en_US.UTF-8"; 17 - i18n.extraLocaleSettings = { 18 - LC_ADDRESS = "fr_FR.UTF-8"; 19 - LC_IDENTIFICATION = "fr_FR.UTF-8"; 20 - LC_MEASUREMENT = "fr_FR.UTF-8"; 21 - LC_MONETARY = "fr_FR.UTF-8"; 22 - LC_NAME = "fr_FR.UTF-8"; 23 - LC_NUMERIC = "fr_FR.UTF-8"; 24 - LC_PAPER = "fr_FR.UTF-8"; 25 - LC_TELEPHONE = "fr_FR.UTF-8"; 26 - LC_TIME = "fr_FR.UTF-8"; 27 - }; 28 - 29 - # Timezone 30 - time.timeZone = "Europe/Paris"; 31 - 32 - # Keyboard 33 - services.xserver.xkb.layout = "us"; 34 - 35 - # Audio 36 - gems.hardware.audio.enable = true; 37 - 38 - # Nvidia GPU and OpenGL 39 - gems.hardware.nvidia.enable = true; 40 - 41 - # Networking 42 - networking.networkmanager.enable = true; 43 - networking.hostName = hostname; 44 - 45 - # Desktop Environment 46 - services.xserver.enable = true; 47 - services.xserver.desktopManager.budgie.enable = true; 48 - services.xserver.displayManager.lightdm.enable = true; 49 - services.displayManager.defaultSession = "budgie-desktop"; 50 - environment.budgie.excludePackages = with pkgs; [ 51 - mate.mate-terminal # don't need since we have kitty installed 52 - ]; 53 - 54 - # Global packages 55 - environment.systemPackages = with pkgs; [ 56 - firefox 57 - kitty 58 - bat 59 - eza 60 - fzf 61 - zoxide 62 - tree 63 - git 64 - starship 65 - pavucontrol 66 - unzip 67 - zip 68 - btop 69 - ]; 70 - 71 - # Steam 72 - gems.programs.steam.enable = true; 73 - 74 - # Disable CUPS since this desktop will not print something. 75 - services.printing.enable = false; 76 - 77 - # Common system configurations 78 - gems.system.garbageCollector.enable = true; 79 - gems.system.autoUpdate.enable = false; 80 - 81 - # Enable unfree packages 82 - nixpkgs.config.allowUnfree = true; 83 - 84 - # Enable flakes and other experimental features 85 - nix.settings.experimental-features = [ "nix-command" "flakes" "pipe-operators" ]; 86 - 87 - # This value determines the NixOS release from which the default 88 - # settings for stateful data, like file locations and database versions 89 - # on your system were taken. It‘s perfectly fine and recommended to leave 90 - # this value at the release version of the first install of this system. 91 - # Before changing this value read the documentation for this option 92 - # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). 93 - system.stateVersion = "24.11"; # Did you read the comment? 94 - }
-38
hosts/nixos/hydrogen/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 - imports = 7 - [ (modulesPath + "/installer/scan/not-detected.nix") 8 - ]; 9 - 10 - boot.initrd.availableKernelModules = [ "vmd" "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ]; 11 - boot.initrd.kernelModules = [ ]; 12 - boot.kernelModules = [ "kvm-intel" ]; 13 - boot.extraModulePackages = [ ]; 14 - 15 - fileSystems."/" = 16 - { device = "/dev/disk/by-uuid/1cbaa92a-7c91-496f-b1b4-32a1249ba9af"; 17 - fsType = "ext4"; 18 - }; 19 - 20 - fileSystems."/boot" = 21 - { device = "/dev/disk/by-uuid/7EAC-2F74"; 22 - fsType = "vfat"; 23 - options = [ "fmask=0077" "dmask=0077" ]; 24 - }; 25 - 26 - swapDevices = [ ]; 27 - 28 - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking 29 - # (the default) this is the recommended approach. When using systemd-networkd it's 30 - # still possible to use this option, but it's recommended to use it in conjunction 31 - # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. 32 - networking.useDHCP = lib.mkDefault true; 33 - # networking.interfaces.enp5s0.useDHCP = lib.mkDefault true; 34 - # networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true; 35 - 36 - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; 37 - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; 38 - }
-68
hosts/nixos/lithium/default.nix
··· 1 - { self, inputs, pkgs, hostname, ... }: 2 - { 3 - # Force update to the last linux kernel avalaible 4 - boot.kernelPackages = pkgs.linuxPackages_latest; 5 - 6 - # Special hardware config for raspberry 7 - hardware = { 8 - raspberry-pi."4".apply-overlays-dtmerge.enable = true; 9 - raspberry-pi."4".fkms-3d.enable = true; # Enable hardware acceleration 10 - deviceTree = { 11 - enable = true; 12 - filter = "*rpi-4-*.dtb"; 13 - }; 14 - }; 15 - 16 - # Networking configuration 17 - # networking.networkmanager.enable = true; 18 - networking.hostName = hostname; 19 - networking.interfaces."wlan0".useDHCP = true; 20 - networking.wireless = { 21 - enable = true; 22 - interfaces = [ "wlan0" ]; 23 - }; 24 - 25 - users.users."rpi" = { 26 - isNormalUser = true; 27 - extraGroups = [ "wheel" ]; 28 - hashedPassword = "$y$j9T$rg0syrPPtjaLILPTTplI3/$5uykqP9tXjAsvOocbfosUeN6j6dMrHRUtwudKd4QaA5"; # password generated with `mkpasswd` command 29 - 30 - # User wide packages 31 - packages = []; 32 - }; 33 - 34 - # System wide packages 35 - environment.systemPackages = with pkgs; [ 36 - libraspberrypi 37 - raspberrypi-eeprom 38 - ]; 39 - 40 - # Garbage collector 41 - nix.gc = { 42 - automatic = true; 43 - dates = "weekly"; 44 - options = "--delete-older-than 7d"; 45 - }; 46 - 47 - nix.settings = { 48 - auto-optimise-store = true; # Related to garbage collector 49 - experimental-features = "nix-command flakes"; # Enable flakes 50 - }; 51 - 52 - # "${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix" creates a 53 - # disk with this label on first boot. Therefore, we need to keep it. It is the 54 - # only information from the installer image that we need to keep persistent 55 - fileSystems."/" = { 56 - device = "/dev/disk/by-label/NIXOS_SD"; 57 - fsType = "ext4"; 58 - }; 59 - 60 - # This value determines the NixOS release from which the default 61 - # settings for stateful data, like file locations and database versions 62 - # on your system were taken. It‘s perfectly fine and recommended to leave 63 - # this value at the release version of the first install of this system. 64 - # Before changing this value read the documentation for this option 65 - # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). 66 - # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion 67 - system.stateVersion = "24.11"; # Did you read the comment? 68 - }