❄️ Nix configurations
0
fork

Configure Feed

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

add otter as nixos host

+213 -1
+6
flake.nix
··· 46 46 inherit nixos-modules; 47 47 inherit home-module; 48 48 }; 49 + 50 + otter_modules = { 51 + nixos-modules = ./nixos/otter; 52 + home-module = ./home/otter; 53 + }; 49 54 args = { 50 55 inherit inputs; 51 56 inherit nixpkgs; ··· 58 63 }; 59 64 in { 60 65 ferret = nixosSystem (ferret_modules // args); 66 + otter = nixosSystem (otter_modules // args); 61 67 }; 62 68 }; 63 69 }
+2
home/common/gpg.nix
··· 7 7 8 8 programs.gpg = { 9 9 enable = true; 10 + #inherit (config.programs.gnupg) package; 11 + homedir = "${config.xdg.dataHome}/.gnupg"; 10 12 }; 11 13 }
+1 -1
home/otter/default.nix
··· 5 5 ../common/kitty.nix 6 6 ../common/fish.nix 7 7 ../common/git.nix 8 - # ../common/gpg.nix 8 + ../common/gpg.nix 9 9 ../common/music.nix 10 10 11 11 ../common/dev
+16
nixos/common/gpg.nix
··· 1 + { 2 + pkgs, 3 + ... 4 + }: { 5 + 6 + programs.gnupg.agent = { 7 + enable = true; 8 + enableSSHSupport = true; 9 + settings = { 10 + default-cache-ttl = 1209600; 11 + default-cache-ttl-ssh = 1209600; 12 + max-cache-ttl = 1209600; 13 + max-cache-ttl-ssh = 1209600; 14 + }; 15 + }; 16 + }
+133
nixos/otter/configuration.nix
··· 1 + # Edit this configuration file to define what should be installed on 2 + # your system. Help is available in the configuration.nix(5) man page 3 + # and in the NixOS manual (accessible by running ‘nixos-help’). 4 + 5 + { config, pkgs, ... }: 6 + 7 + { 8 + imports = 9 + [ # Include the results of the hardware scan. 10 + ./hardware-configuration.nix 11 + ]; 12 + 13 + # Bootloader. 14 + boot.loader.systemd-boot.enable = true; 15 + boot.loader.efi.canTouchEfiVariables = true; 16 + 17 + boot.initrd.luks.devices."luks-cd4e7e78-243a-4091-90dd-9ee091fbb27d".device = "/dev/disk/by-uuid/cd4e7e78-243a-4091-90dd-9ee091fbb27d"; 18 + networking.hostName = "nixos"; # Define your hostname. 19 + # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. 20 + 21 + # Configure network proxy if necessary 22 + # networking.proxy.default = "http://user:password@proxy:port/"; 23 + # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; 24 + 25 + # Enable networking 26 + networking.networkmanager.enable = true; 27 + 28 + # Set your time zone. 29 + time.timeZone = "Europe/Paris"; 30 + 31 + # Select internationalisation properties. 32 + i18n.defaultLocale = "en_US.UTF-8"; 33 + 34 + i18n.extraLocaleSettings = { 35 + LC_ADDRESS = "fr_FR.UTF-8"; 36 + LC_IDENTIFICATION = "fr_FR.UTF-8"; 37 + LC_MEASUREMENT = "fr_FR.UTF-8"; 38 + LC_MONETARY = "fr_FR.UTF-8"; 39 + LC_NAME = "fr_FR.UTF-8"; 40 + LC_NUMERIC = "fr_FR.UTF-8"; 41 + LC_PAPER = "fr_FR.UTF-8"; 42 + LC_TELEPHONE = "fr_FR.UTF-8"; 43 + LC_TIME = "fr_FR.UTF-8"; 44 + }; 45 + 46 + # Enable the X11 windowing system. 47 + services.xserver.enable = true; 48 + 49 + # Enable the GNOME Desktop Environment. 50 + services.xserver.displayManager.gdm.enable = true; 51 + services.xserver.desktopManager.gnome.enable = true; 52 + 53 + # Configure keymap in X11 54 + services.xserver.xkb = { 55 + layout = "us"; 56 + variant = "altgr-intl"; 57 + }; 58 + 59 + # Enable CUPS to print documents. 60 + services.printing.enable = true; 61 + 62 + # Enable sound with pipewire. 63 + hardware.pulseaudio.enable = false; 64 + security.rtkit.enable = true; 65 + services.pipewire = { 66 + enable = true; 67 + alsa.enable = true; 68 + alsa.support32Bit = true; 69 + pulse.enable = true; 70 + # If you want to use JACK applications, uncomment this 71 + #jack.enable = true; 72 + 73 + # use the example session manager (no others are packaged yet so this is enabled by default, 74 + # no need to redefine it in your config for now) 75 + #media-session.enable = true; 76 + }; 77 + 78 + # Enable touchpad support (enabled default in most desktopManager). 79 + # services.xserver.libinput.enable = true; 80 + 81 + # Define a user account. Don't forget to set a password with ‘passwd’. 82 + users.users.alex = { 83 + isNormalUser = true; 84 + description = "Alex"; 85 + extraGroups = [ "networkmanager" "wheel" ]; 86 + packages = with pkgs; [ 87 + # thunderbird 88 + ]; 89 + }; 90 + 91 + # Install firefox. 92 + programs.firefox.enable = true; 93 + 94 + # Allow unfree packages 95 + nixpkgs.config.allowUnfree = true; 96 + 97 + # List packages installed in system profile. To search, run: 98 + # $ nix search wget 99 + environment.systemPackages = with pkgs; [ 100 + # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. 101 + # wget 102 + git 103 + curl 104 + ]; 105 + 106 + # Some programs need SUID wrappers, can be configured further or are 107 + # started in user sessions. 108 + # programs.mtr.enable = true; 109 + # programs.gnupg.agent = { 110 + # enable = true; 111 + # enableSSHSupport = true; 112 + # }; 113 + 114 + # List services that you want to enable: 115 + 116 + # Enable the OpenSSH daemon. 117 + # services.openssh.enable = true; 118 + 119 + # Open ports in the firewall. 120 + # networking.firewall.allowedTCPPorts = [ ... ]; 121 + # networking.firewall.allowedUDPPorts = [ ... ]; 122 + # Or disable the firewall altogether. 123 + # networking.firewall.enable = false; 124 + 125 + # This value determines the NixOS release from which the default 126 + # settings for stateful data, like file locations and database versions 127 + # on your system were taken. It‘s perfectly fine and recommended to leave 128 + # this value at the release version of the first install of this system. 129 + # Before changing this value read the documentation for this option 130 + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). 131 + system.stateVersion = "24.05"; # Did you read the comment? 132 + 133 + }
+12
nixos/otter/default.nix
··· 1 + { pkgs, ... }: 2 + 3 + { 4 + imports = [ 5 + ./configuration.nix 6 + ./hardware-configuration.nix 7 + 8 + ../common/gpg.nix 9 + ]; 10 + 11 + # security.polkit.enable = true; 12 + }
+43
nixos/otter/hardware-configuration.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 + { 7 + imports = 8 + [ 9 + (modulesPath + "/installer/scan/not-detected.nix") 10 + ]; 11 + 12 + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod" ]; 13 + boot.initrd.kernelModules = [ ]; 14 + boot.kernelModules = [ "kvm-amd" ]; 15 + boot.extraModulePackages = [ ]; 16 + 17 + fileSystems."/" = 18 + { device = "/dev/disk/by-uuid/d03072f3-9413-401e-b2dd-31589f3b4a05"; 19 + fsType = "ext4"; 20 + }; 21 + 22 + boot.initrd.luks.devices."luks-d2d68a53-c760-44db-bfd6-cc508e7f8406".device = "/dev/disk/by-uuid/d2d68a53-c760-44db-bfd6-cc508e7f8406"; 23 + 24 + fileSystems."/boot" = 25 + { device = "/dev/disk/by-uuid/CF41-F52D"; 26 + fsType = "vfat"; 27 + options = [ "fmask=0077" "dmask=0077" ]; 28 + }; 29 + 30 + swapDevices = 31 + [ { device = "/dev/disk/by-uuid/767cf96c-be48-473d-b7a7-15fa1cb7a3f2"; } 32 + ]; 33 + 34 + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking 35 + # (the default) this is the recommended approach. When using systemd-networkd it's 36 + # still possible to use this option, but it's recommended to use it in conjunction 37 + # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. 38 + networking.useDHCP = lib.mkDefault true; 39 + # networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true; 40 + 41 + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; 42 + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; 43 + }