···5454 - 👹️ : FreeBSD with NixBSD
5555</details>
56565757-<br>
5858-5959-> [!NOTE]
6060-> hvedrung host is the same desktop as loki, just another SSD used or is used inside a VM.
6161-6262-> [!NOTE]
6363-> The i5 is the worst CPU i've got, so much problem with stability and other things, some patch applied can be link for it stability.
64576558## 📦 - Structure
6659
-217
hosts/loki/old-configuration.nix
···11-# Edit this configuration file to define what should be installed on
22-# your system. Help is available in the configuration.nix(5) man page
33-# and in the NixOS manual (accessible by running ‘nixos-help’).
44-55-{ config, pkgs, ... }:
66-{
77- imports =
88- [ # Include the results of the hardware scan.
99- ./hardware-configuration.nix
1010- ];
1111-1212- # Bootloader.
1313- boot.loader.systemd-boot.enable = true;
1414- boot.loader.efi.canTouchEfiVariables = true;
1515-1616- networking.hostName = "loki"; # Define your hostname.
1717- # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
1818-1919- # Configure network proxy if necessary
2020- # networking.proxy.default = "http://user:password@proxy:port/";
2121- # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
2222-2323- # Enable networking
2424- networking.networkmanager.enable = true;
2525-2626- # Set your time zone.
2727- time.timeZone = "Europe/Paris";
2828-2929- # Select internationalisation properties.
3030- i18n.defaultLocale = "en_US.UTF-8";
3131-3232- i18n.extraLocaleSettings = {
3333- LC_ADDRESS = "fr_FR.UTF-8";
3434- LC_IDENTIFICATION = "fr_FR.UTF-8";
3535- LC_MEASUREMENT = "fr_FR.UTF-8";
3636- LC_MONETARY = "fr_FR.UTF-8";
3737- LC_NAME = "fr_FR.UTF-8";
3838- LC_NUMERIC = "fr_FR.UTF-8";
3939- LC_PAPER = "fr_FR.UTF-8";
4040- LC_TELEPHONE = "fr_FR.UTF-8";
4141- LC_TIME = "fr_FR.UTF-8";
4242- };
4343-4444- # Enable the X11 windowing system.
4545- services.xserver.enable = true;
4646-4747- # Enable the GNOME Desktop Environment.
4848- # services.xserver.displayManager.gdm.enable = true;
4949- # services.xserver.desktopManager.gnome.enable = true;
5050-5151- # Enable KDE Plasma Desktop Environment
5252- # services.displayManager.sddm.enable = true;
5353- # services.desktopManager.plasma6.enable = true;
5454- # services.displayManager.defaultSession = "plasma";
5555-5656- # Enable Budgie Desktop Environment
5757- services.xserver.desktopManager.budgie.enable = true;
5858- services.xserver.displayManager.lightdm.enable = true;
5959-6060- # Configure keymap in X11
6161- services.xserver.xkb = {
6262- layout = "us";
6363- variant = "";
6464- };
6565-6666- # Enable CUPS to print documents.
6767- services.printing.enable = true;
6868-6969- # Enable sound with pipewire.
7070- hardware.pulseaudio.enable = false;
7171- security.rtkit.enable = true;
7272- services.pipewire = {
7373- enable = true;
7474- alsa.enable = true;
7575- alsa.support32Bit = true;
7676- pulse.enable = true;
7777- # If you want to use JACK applications, uncomment this
7878- #jack.enable = true;
7979-8080- # use the example session manager (no others are packaged yet so this is enabled by default,
8181- # no need to redefine it in your config for now)
8282- #media-session.enable = true;
8383- };
8484-8585- # Enable touchpad support (enabled default in most desktopManager).
8686- # services.xserver.libinput.enable = true;
8787-8888- # Define a user account. Don't forget to set a password with ‘passwd’.
8989- users.users.cosmeak = {
9090- isNormalUser = true;
9191- description = "cosmeak";
9292- extraGroups = [ "networkmanager" "wheel" ];
9393- packages = with pkgs; [
9494- # thunderbird
9595- # vscode
9696- ];
9797- };
9898-9999- # Enable automatic login for the user.
100100- services.displayManager.autoLogin.enable = true;
101101- services.displayManager.autoLogin.user = "cosmeak";
102102-103103- # Workaround for GNOME autologin: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229
104104- systemd.services."getty@tty1".enable = false;
105105- systemd.services."autovt@tty1".enable = false;
106106-107107- # Install firefox.
108108- programs.firefox.enable = true;
109109-110110- # Allow unfree packages
111111- # Need to be true for nvidia drivers
112112- nixpkgs.config.allowUnfree = true;
113113- nixpkgs.config.allowBroken = true;
114114-115115- # List packages installed in system profile. To search, run:
116116- # $ nix search wget
117117- # environment.systemPackages = with pkgs; [
118118- # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
119119- # wget
120120- # ];
121121-122122- # Some programs need SUID wrappers, can be configured further or are
123123- # started in user sessions.
124124- # programs.mtr.enable = true;
125125- # programs.gnupg.agent = {
126126- # enable = true;
127127- # enableSSHSupport = true;
128128- # };
129129-130130- # List services that you want to enable:
131131-132132- # Enable the OpenSSH daemon.
133133- # services.openssh.enable = true;
134134-135135- # Open ports in the firewall.
136136- # networking.firewall.allowedTCPPorts = [ ... ];
137137- # networking.firewall.allowedUDPPorts = [ ... ];
138138- # Or disable the firewall altogether.
139139- # networking.firewall.enable = false;
140140-141141- # This value determines the NixOS release from which the default
142142- # settings for stateful data, like file locations and database versions
143143- # on your system were taken. It‘s perfectly fine and recommended to leave
144144- # this value at the release version of the first install of this system.
145145- # Before changing this value read the documentation for this option
146146- # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
147147- system.stateVersion = "24.05"; # Did you read the comment?
148148-149149- # -- This section refer to the NixOS/NVIDIA documentation
150150- # Enable OpenGL
151151- hardware.opengl = {
152152- enable = true;
153153- driSupport = true;
154154- driSupport32Bit = true;
155155- };
156156-157157- # Manage NVIDIA configuration
158158- services.xserver.videoDrivers = [ "nvidia" ];
159159- hardware.nvidia = {
160160- package = config.boot.kernelPackages.nvidiaPackages.production;
161161- modesetting.enable = true;
162162- powerManagement.enable = false;
163163- powerManagement.finegrained = false;
164164- open = false;
165165- nvidiaSettings = true;
166166- };
167167- # --
168168-169169- # -- Manage gaming
170170- programs.steam = {
171171- enable = true;
172172- gamescopeSession.enable = true;
173173- };
174174-175175- programs.gamemode.enable = true;
176176-177177- environment.systemPackages = [
178178- pkgs.git
179179- pkgs.vscode
180180- pkgs.mangohud
181181- pkgs.protonup
182182- pkgs.discord
183183- pkgs.modrinth-app
184184- pkgs.kitty
185185- pkgs.spotify
186186- pkgs.brave
187187- pkgs.lutris
188188- ];
189189-190190- environment.sessionVariables = {
191191- STEAM_EXTRA_COMPAT_TOOS_PATHS = "/home/cosmeak/.steam/root/compatibilitytools.d";
192192- };
193193- # --
194194-195195- # -- Manage Garbage collection
196196- # Limit the number of generations to keep
197197- boot.loader.systemd-boot.configurationLimit = 5;
198198- boot.loader.grub.configurationLimit = 5;
199199-200200- # Perform garbage collection weekly to maintain low disk usage
201201- nix.gc = {
202202- automatic = true;
203203- dates = "weekly";
204204- options = "--delete-older-than 1w";
205205- };
206206-207207- # Optimize storage
208208- # You can also manually optimize the store via:
209209- # nix-store --optimise
210210- # Refer to the following link for more details:
211211- # https://nixos.org/manual/nix/stable/command-ref/conf-file.html#conf-auto-optimise-store
212212- nix.settings.auto-optimise-store = true;
213213- # --
214214-215215- # Enable flakes
216216- nix.settings.experimental-features = [ "nix-command" "flakes" ];
217217-}
+8-1
hosts/njord/configuration.nix
···2727 };
2828 system.defaults = {
2929 # Dock
3030+ # -- Relaunch dock when it not reload itself correctly
3131+ # $ killall Dock
3032 dock = {
3131- autohide = true;
3333+ autohide = true;
3234 orientation = "bottom"; # Set dock to bottom
3335 mru-spaces = false; # Auto arrange space based on the most recent use
3436 launchanim = false; # Remove animation when opening an app
···4850 "/Applications/Zed.app"
4951 "/Applications/Beekeeper Studio.app"
5052 ];
5353+ # Disable hot corners
5454+ wvous-bl-corner = 1;
5555+ wvous-br-corner = 1;
5656+ wvous-tl-corner = 1;
5757+ wvous-tr-corner = 1;
5158 };
52595360 # Finder
-208
hosts/njord/old-flake.nix
···11-{
22- description = "Nix config for MacOS";
33-44- inputs = {
55- # nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
66- nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-24.05-darwin";
77-88- darwin = {
99- url = "github:LnL7/nix-darwin";
1010- inputs.nixpkgs.follows= "nixpkgs";
1111- };
1212- };
1313-1414- outputs = inputs @ { self, nixpkgs, darwin, home-manager, ... }:
1515- let
1616- system = "aarch64-darwin";
1717- hostname = "njord";
1818-1919- specialArgs = inputs // { inherit hostname; };
2020-2121- configuration = { pkgs, ... }: { nixpkgs.config = {
2222- allowUnfree = true;
2323- allowInsecure = false;
2424- allowBroken = true;
2525- allowUnsupportedSystem = true;
2626- };
2727- # List packages installed in system profile. To search by name, run:
2828- # $ nix-env -qaP | grep wget
2929- environment.systemPackages =
3030- [
3131- # Dev
3232- pkgs.neovim
3333- pkgs.kitty
3434- pkgs.vscode
3535-3636- pkgs.php
3737- pkgs.phpPackages.composer
3838- pkgs.nodejs
3939-4040- # CLI
4141- pkgs.starship
4242- pkgs.zoxide
4343- pkgs.tree
4444- pkgs.btop
4545- pkgs.lazygit
4646- pkgs.ngrok
4747- pkgs.fastfetch
4848-4949- # Apps
5050- pkgs.spicetify-cli
5151-5252- # Utilities
5353- pkgs.alt-tab-macos
5454- pkgs.raycast
5555- ]; # Auto upgrade nix package and the daemon service. services.nix-daemon.enable = true; # nix.package = pkgs.nix;
5656- # Create /etc/zshrc that loads the darwin environment.
5757- programs.zsh = {
5858- enable = true;
5959- enableBashCompletion = true;
6060- enableCompletion = true;
6161- enableSyntaxHighlighting = true;
6262- loginShellInit = ''
6363- eval "$(zoxide init zsh)"
6464- eval "$(/opt/homebrew/bin/brew shellenv)"
6565- alias switch="darwin-rebuild switch --flake ~/.config/nix-darwin"
6666- '';
6767- };
6868-6969- # Set Git commit hash for darwin-version.
7070- system.configurationRevision = self.rev or self.dirtyRev or null;
7171-7272- # Used for backwards compatibility, please read the changelog before changing.
7373- # $ darwin-rebuild changelog
7474- system.stateVersion = 4;
7575-7676- # The platform the configuration will be used on.
7777- nixpkgs.hostPlatform = "aarch64-darwin";
7878-7979- # Enable sudo via TouchID
8080- security.pam.enableSudoTouchIdAuth = true;
8181-8282- # Config Macos with preference
8383- # Disable startup sound
8484- system.nvram.variables = {
8585- "StartupMute" = "%01";
8686- };
8787- system.defaults = {
8888- # Dock
8989- dock = {
9090- autohide = true;
9191- orientation = "bottom"; # Set dock to bottom
9292- mru-spaces = false; # Auto arrange space based on the most recent use
9393- launchanim = false; # Remove animation when opening an app
9494- mineffect = "scale"; # Change animation from minimize/maximize app
9595- magnification = false;
9696- minimize-to-application = true; # Minimize app in app icon
9797- show-recents = false; # Don't show recent open apps
9898- tilesize = 32; # Set dock size
9999- # Set dock apps
100100- persistent-apps = [
101101- "/Applications/Thunderbird.app"
102102- "/Applications/Brave Browser.app"
103103- "/Applications/Discord.app"
104104- "/Applications/Spotify.app"
105105- "/Applications/Obsidian.app"
106106- "/Applications/Nix Apps/kitty.app"
107107- "/Applications/Zed.app"
108108- "/Applications/Beekeeper Studio.app"
109109- ];
110110- };
111111-112112- # Finder
113113- finder = {
114114- AppleShowAllExtensions = true; # Show file extension
115115- AppleShowAllFiles = true; # Show hidden files
116116- FXPreferredViewStyle = "clmv"; # Set default view to column
117117- CreateDesktop = false; # Disable show icon on desktop
118118- FXDefaultSearchScope = "SCcf"; # Set default search scope to current folder
119119- };
120120-121121- # Screenshot
122122- screencapture.location = "~/Pictures/screenshots";
123123-124124- NSGlobalDomain = {
125125- # Switch between dark and light mode automatically
126126- AppleInterfaceStyleSwitchesAutomatically = true;
127127- # Disable saving new documents to icloud
128128- NSDocumentSaveNewDocumentsToCloud = false;
129129- };
130130-131131- };
132132-133133- # Homebrew - Using only for gui app because macos app do not existe un nixpkgs repository
134134- homebrew.enable = true;
135135- homebrew.onActivation = {
136136- autoUpdate = true;
137137- cleanup = "zap"; # uninstall all elements not listed below
138138- };
139139- homebrew.taps = [
140140- "homebrew/cask-versions"
141141- "homebrew/cask-fonts"
142142- "FelixKratz/formulae"
143143- ];
144144-145145- homebrew.brews = [
146146- "cocoapods"
147147- "yarn"
148148- ];
149149-150150- homebrew.casks = [
151151- # Dev
152152- "zed"
153153- "beekeeper-studio"
154154- "insomnia"
155155- "orbstack"
156156- "figma"
157157- "dbngin"
158158- "github"
159159- "mongodb-compass"
160160- "cyberduck"
161161-162162- # Apps
163163- "spotify"
164164- "discord"
165165- "thunderbird"
166166- "obs"
167167- "obsidian"
168168- "modrinth"
169169- "zen-browser"
170170- "brave-browser"
171171- "balenaetcher"
172172-173173- # Utilities
174174- "amethyst"
175175- # "sketchybar"
176176- "stats"
177177- "logi-options-plus"
178178-179179- # Fonts
180180- "sf-symbols"
181181- "font-hack-nerd-font"
182182- ];
183183-184184- # Apps from App Store@
185185- homebrew.masApps = {
186186- # Xcode = 497799835;
187187- Slack = 803453959;
188188- };
189189- };
190190- in
191191- {
192192- darwinConfigurations."${hostname}" = darwin.lib.darwinSystem {
193193- inherit system specialArgs;
194194- modules = [ configuration ];
195195- };
196196-197197- # Nix code formatter
198198- formatter.${system} = nixpkgs.legacyPackages.${system}.alejandra;
199199-200200- # Expose the package set, including overlays, for convenience.
201201- darwinPackages = self.darwinConfigurations."${hostname}".pkgs;
202202- };
203203-}
204204-205205-# Rebuild system with
206206-# darwin-rebuild switch --flake .
207207-# Relaunch dock
208208-# killall Dock