my NixOS and nix-darwin config
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

added a bunch of stuff to khaos

+195 -19
+1
.envrc
··· 1 + use flake
+57
flake.nix
··· 1 + { 2 + description = "Nyx OS"; 3 + 4 + inputs = { 5 + 6 + # Nixpkgs 7 + nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; 8 + 9 + home-manager = { 10 + url = "github:nix-community/home-manager"; 11 + inputs.nixpkgs.follows = "nixpkgs"; 12 + }; 13 + 14 + darwin = { 15 + url = "github:LnL7/nix-darwin"; 16 + inputs.nixpkgs.follows = "nixpkgs"; 17 + }; 18 + 19 + }; 20 + 21 + # Flake outputs 22 + outputs = { self, darwin, nixpkgs, home-manager, ... }@inputs: 23 + let inherit (self) outputs; 24 + 25 + in { 26 + 27 + # NixOS configuration entrypoint 28 + # Available through 'nixos-rebuild --flake .#your-hostname' 29 + nixosConfigurations = { 30 + Khaos = nixpkgs.lib.nixosSystem { 31 + specialArgs = { inherit inputs outputs; }; 32 + modules = [ ./hosts/Khaos ]; 33 + }; 34 + 35 + }; 36 + 37 + darwinConfigurations = { 38 + Daedalus = darwin.lib.darwinSystem { 39 + system = "aarch64-darwin"; # or x86_64-darwin 40 + modules = [ 41 + ./hosts/Daedalus 42 + home-manager.darwinModules.home-manager 43 + { 44 + home-manager = { 45 + useGlobalPkgs = true; 46 + useUserPackages = true; 47 + users.suri = import ./users/suri; 48 + backupFileExtension = "backup"; 49 + 50 + }; 51 + } 52 + ]; 53 + }; 54 + }; 55 + 56 + }; 57 + }
hosts/Daedalus/default.nix

This is a binary file and will not be displayed.

+100 -19
hosts/Khaos/configuration.nix
··· 2 2 # your system. Help is available in the configuration.nix(5) man page 3 3 # and in the NixOS manual (accessible by running ‘nixos-help’). 4 4 5 - { config, pkgs, ... }: 5 + { inputs, outputs, pkgs, ... }: 6 6 7 7 { 8 - imports = 9 - [ # Include the results of the hardware scan. 10 - ./hardware-configuration.nix 11 - ]; 8 + imports = [ # Include the results of the hardware scan. 9 + ./hardware-configuration.nix 10 + ]; 12 11 13 12 # Bootloader. 14 13 boot.loader.systemd-boot.enable = true; ··· 48 47 variant = ""; 49 48 }; 50 49 51 - # Define a user account. Don't forget to set a password with ‘passwd’. 52 - users.users.suri = { 53 - isNormalUser = true; 54 - description = "suri"; 55 - extraGroups = [ "networkmanager" "wheel" ]; 56 - packages = with pkgs; []; 57 - }; 58 - 59 50 # Allow unfree packages 60 51 nixpkgs.config.allowUnfree = true; 61 52 62 53 # List packages installed in system profile. To search, run: 63 54 # $ nix search wget 64 55 environment.systemPackages = with pkgs; [ 65 - helix 66 - git 67 - # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. 68 - # wget 56 + helix 57 + git 58 + btop 59 + unzip 60 + gparted 61 + fzf 62 + wget 63 + gcc 64 + git 65 + vim 66 + libnotify 67 + gnupg 68 + xfce.thunar 69 + vulkan-tools 70 + lm_sensors 71 + #stuff for the thing 72 + libsForQt5.qt5.qtquickcontrols2 73 + libsForQt5.qt5.qtgraphicaleffects 74 + #swww 75 + inputs.swww.packages.${pkgs.system}.swww 76 + 77 + wl-clipboard 78 + screen 79 + networkmanagerapplet 80 + pamixer 81 + playerctl 82 + pavucontrol 83 + lshw 84 + gnumake42 85 + clang-tools 86 + openssl 87 + 69 88 ]; 70 89 90 + variables = { 91 + # for compiling openssl for nixos, should refactor into a diff file later 92 + PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig"; 93 + }; 94 + 71 95 # Some programs need SUID wrappers, can be configured further or are 72 96 # started in user sessions. 73 97 # programs.mtr.enable = true; ··· 81 105 # Enable the OpenSSH daemon. 82 106 services.openssh = { 83 107 enable = true; 84 - ports = [22]; 108 + ports = [ 22 ]; 85 109 settings = { 86 110 PasswordAuthentication = true; 87 111 # allows all users 88 112 AllowedUsers = null; 89 113 UseDns = true; 90 114 PermitRootLogin = "prohibit-password"; 91 - 115 + 92 116 }; 93 117 }; 94 118 119 + virtualisation.docker.enable = true; 120 + virtualisation.docker.rootless = { 121 + enable = true; 122 + setSocketVariable = true; 123 + }; 124 + 125 + home-manager = { 126 + extraSpecialArgs = { inherit inputs outputs; }; 127 + backupFileExtension = "backup"; 128 + users = { 129 + # Import your home-manager configuration 130 + suri = import ../../users/suri/home.nix; 131 + }; 132 + }; 133 + 134 + # Define a user account. Don't forget to set a password with ‘passwd’. 135 + users.users.suri = { 136 + isNormalUser = true; 137 + description = "suri"; 138 + extraGroups = [ "networkmanager" "wheel" ]; 139 + packages = with pkgs; [ ]; 140 + }; 95 141 # Open ports in the firewall. 96 142 networking.firewall.allowedTCPPorts = [ 22 ]; 143 + 144 + hardware.graphics.enable = true; 145 + services.xserver.videoDrivers = [ "nvidia" ]; 146 + hardware.nvidia.open = true; # see the note above 147 + 148 + programs = { 149 + nano.enable = true; 150 + zsh.enable = true; 151 + hyprland = { 152 + enable = true; 153 + xwayland.enable = true; 154 + package = 155 + inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland; 156 + }; 157 + 158 + # allows normal binaries to run 159 + nix-ld = { 160 + enable = true; 161 + libraries = with pkgs; 162 + [ 163 + 164 + ]; 165 + }; 166 + 167 + }; 168 + 169 + nix.settings.experimental-features = "nix-command flakes"; 170 + 171 + users.defaultUserShell = pkgs.zsh; 172 + 173 + security.polkit.enable = true; 174 + 175 + programs.dconf.enable = true; 176 + services.gnome.gnome-keyring.enable = true; 177 + 97 178 # networking.firewall.allowedUDPPorts = [ ... ]; 98 179 # Or disable the firewall altogether. 99 180 # networking.firewall.enable = false;
+1
hosts/Khaos/default.nix
··· 1 + { ... }: { imports = [ ./configuration.nix ]; }
+10
system/boot.nix
··· 1 + { 2 + # TODO: get a grub theme 3 + boot.loader.systemd-boot.enable = false; 4 + boot.loader.grub.enable = true; 5 + boot.loader.grub.device = "nodev"; 6 + boot.loader.grub.useOSProber = true; 7 + boot.loader.grub.efiSupport = true; 8 + boot.loader.efi.canTouchEfiVariables = true; 9 + boot.loader.efi.efiSysMountPoint = "/boot"; 10 + }
+26
system/sound.nix
··· 1 + { pkgs, ... }: { 2 + 3 + # Remove sound.enable or set it to false if you had it set previously, as sound.enable is only meant for ALSA-based configurations 4 + # rtkit is optional but recommended 5 + security.rtkit.enable = true; 6 + services.pipewire = { 7 + enable = true; 8 + alsa.enable = true; 9 + alsa.support32Bit = true; 10 + pulse.enable = true; 11 + # If you want to use JACK applications, uncomment this 12 + jack.enable = true; 13 + }; 14 + 15 + environment.systemPackages = with pkgs; [ pulseaudio ]; 16 + 17 + services.blueman.enable = true; 18 + services.pipewire.wireplumber.extraConfig = { 19 + "monitor.bluez.properties" = { 20 + "bluez5.enable-sbc-xq" = true; 21 + "bluez5.enable-msbc" = true; 22 + "bluez5.enable-hw-volume" = true; 23 + "bluez5.roles" = [ "hsp_hs" "hsp_ag" "hfp_hf" "hfp_ag" ]; 24 + }; 25 + }; 26 + }
users/suri/home.nix

This is a binary file and will not be displayed.