❄️ Nix configurations
0
fork

Configure Feed

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

remove disko, nixosanywhere doesn't work currently

+57 -20
-1
flake.nix
··· 19 19 nixosConfigurations.polecat = nixpkgs.lib.nixosSystem { 20 20 system = "x86_64-linux"; 21 21 modules = [ 22 - disko.nixosModules.disko 23 22 ./hosts/polecat/configuration.nix 24 23 ./hosts/polecat/hardware-configuration.nix 25 24 ];
+18 -18
hosts/polecat/configuration.nix
··· 6 6 }: 7 7 { 8 8 imports = [ 9 - (modulesPath + "/installer/scan/not-detected.nix") 10 - ./disko.nix 9 + ./hardware-configuration.nix 11 10 ]; 12 11 13 12 # Bootloader ··· 18 17 19 18 networking = { 20 19 hostName = "polecat"; 20 + networkmanager.enable = true; 21 21 domain = "otter.place"; 22 22 useDHCP = false; 23 23 interfaces.enp1s0.useDHCP = false; ··· 31 31 nameservers = [ "192.168.1.1" "1.1.1.1" ]; 32 32 }; 33 33 34 - networking.networkmanager.enable = true; 35 - networking.interfaces.enp1s0 = { 36 - useDHCP = false; 37 - ipv4.addresses = [ 38 - { 39 - address = "192.168.1.50"; 40 - prefixLength = 24; 41 - } 42 - ]; 43 - }; 34 + time.timeZone = "Europe/Paris"; 35 + i18n.defaultLocale = "en_US.UTF-8"; 44 36 45 - 46 37 environment.systemPackages = map lib.lowPrio [ 47 38 pkgs.curl 48 39 pkgs.gitMinimal 49 40 ]; 50 41 51 - users.users.root.openssh.authorizedKeys.keys = [ 52 - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIB2KyeFk+PFSBQ2c9fZSP/3kngks5qzfJJb6PRgTmhb alex@otter.foo" 53 - ]; 42 + nixpkgs.config.allowUnfree = true; 54 43 55 - system.stateVersion = "24.05"; 56 - } 44 + users.users.alex = { 45 + isNormalUser = true; 46 + description = "alex"; 47 + extraGroups = [ "networkmanager" "wheel" ]; 48 + packages = with pkgs; []; 49 + 50 + openssh.authorizedKeys.keys = [ 51 + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIB2KyeFk+PFSBQ2c9fZSP/3kngks5qzfJJb6PRgTmhb alex@otter.foo" 52 + ]; 53 + }; 54 + 55 + system.stateVersion = "24.11"; 56 + }
+39 -1
hosts/polecat/hardware-configuration.nix
··· 1 - throw "Have you forgotten to run nixos-anywhere with `--generate-hardware-config nixos-generate-config ./hardware-configuration.nix`?" 1 + { config, lib, pkgs, modulesPath, ... }: 2 + 3 + { 4 + imports = 5 + [ 6 + (modulesPath + "/installer/scan/not-detected.nix") 7 + ]; 8 + 9 + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; 10 + boot.initrd.kernelModules = [ "dm-snapshot" ]; 11 + boot.kernelModules = [ "kvm-intel" ]; 12 + boot.extraModulePackages = [ ]; 13 + 14 + fileSystems."/" = 15 + { device = "/dev/disk/by-uuid/b944b36f-3f5f-41d0-b7a7-88ea49a869dd"; 16 + fsType = "ext4"; 17 + }; 18 + 19 + fileSystems."/boot" = 20 + { device = "/dev/disk/by-uuid/EC59-F51C"; 21 + fsType = "vfat"; 22 + options = [ "fmask=0077" "dmask=0077" ]; 23 + }; 24 + 25 + swapDevices = 26 + [ 27 + { device = "/dev/disk/by-uuid/2628cae1-0fdc-4ff4-a4ef-99ade79dbb4b"; } 28 + ]; 29 + 30 + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking 31 + # (the default) this is the recommended approach. When using systemd-networkd it's 32 + # still possible to use this option, but it's recommended to use it in conjunction 33 + # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. 34 + networking.useDHCP = lib.mkDefault true; 35 + # networking.interfaces.enp1s0.useDHCP = lib.mkDefault true; 36 + 37 + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; 38 + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; 39 + }