summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-12-30 15:27:24 +0100
committerAlex Auvolat <alex@adnab.me>2022-12-30 15:27:24 +0100
commit09ee5143b4d13ed0ca70d4904a9c2c5a058fcf9e (patch)
tree342f3380c364de521f462a20d28510bcf1ee5468
parentdf542cba83cc2ced2cc548de52b2f04a42bb47bb (diff)
downloaduser-config-09ee5143b4d13ed0ca70d4904a9c2c5a058fcf9e.tar.gz
user-config-09ee5143b4d13ed0ca70d4904a9c2c5a058fcf9e.zip
kusanagi on nixos config
-rw-r--r--kusanagi/nixos/Makefile2
-rw-r--r--kusanagi/nixos/configuration.nix168
-rw-r--r--kusanagi/nixos/hardware-configuration.nix42
3 files changed, 212 insertions, 0 deletions
diff --git a/kusanagi/nixos/Makefile b/kusanagi/nixos/Makefile
new file mode 100644
index 0000000..eb96d6f
--- /dev/null
+++ b/kusanagi/nixos/Makefile
@@ -0,0 +1,2 @@
+all:
+ sudo nixos-rebuild switch -I nixos-config=configuration.nix
diff --git a/kusanagi/nixos/configuration.nix b/kusanagi/nixos/configuration.nix
new file mode 100644
index 0000000..6aac891
--- /dev/null
+++ b/kusanagi/nixos/configuration.nix
@@ -0,0 +1,168 @@
+# Edit this configuration file to define what should be installed on
+# your system. Help is available in the configuration.nix(5) man page
+# and in the NixOS manual (accessible by running ‘nixos-help’).
+
+{ config, pkgs, ... }:
+
+{
+ imports =
+ [ # Include the results of the hardware scan.
+ ./hardware-configuration.nix
+ ];
+
+ boot.loader.systemd-boot.enable = true;
+ boot.loader.efi.canTouchEfiVariables = true;
+ boot.plymouth.enable = true;
+
+ networking.hostName = "kusanagi";
+ networking.networkmanager.enable = true;
+
+ # networking.useDHCP = lib.mkDefault true;
+ # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
+ # networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true;
+
+ time.timeZone = "Europe/Paris";
+
+ i18n.defaultLocale = "en_US.UTF-8";
+ i18n.extraLocaleSettings = {
+ LC_ADDRESS = "fr_FR.utf8";
+ LC_IDENTIFICATION = "fr_FR.utf8";
+ LC_MEASUREMENT = "fr_FR.utf8";
+ LC_MONETARY = "fr_FR.utf8";
+ LC_NAME = "fr_FR.utf8";
+ LC_NUMERIC = "fr_FR.utf8";
+ LC_PAPER = "fr_FR.utf8";
+ LC_TELEPHONE = "fr_FR.utf8";
+ LC_TIME = "fr_FR.utf8";
+ };
+
+ console = {
+ font = "sun12x22";
+ #keyMap = "fr";
+ useXkbConfig = true; # use xkbOptions in tty.
+ };
+
+ # Enable the X11 windowing system.
+ services.xserver.enable = true;
+
+ # Enable the GNOME Desktop Environment.
+ services.xserver.displayManager.gdm.enable = true;
+ services.xserver.desktopManager.gnome.enable = true;
+ environment.gnome.excludePackages = [
+ pkgs.gnome.cheese
+ pkgs.gnome-photos
+ pkgs.gnome.gnome-music
+ #pkgs.gnome.gnome-terminal
+ pkgs.gnome.gedit
+ pkgs.epiphany
+ pkgs.gnome.geary
+ #pkgs.evince
+ #pkgs.gnome.gnome-characters
+ pkgs.gnome.totem
+ pkgs.gnome.tali
+ pkgs.gnome.iagno
+ pkgs.gnome.hitori
+ pkgs.gnome.atomix
+ pkgs.gnome-tour
+ pkgs.gnome-console
+ ];
+
+ # Configure keymap in X11
+ services.xserver.layout = "fr";
+ #services.xserver.xkbOptions = [
+ # "eurosign:e"
+ # "caps:escape"
+ #];
+
+ # Enable CUPS to print documents.
+ # services.printing.enable = true;
+
+ # Enable sound.
+ sound.enable = true;
+ hardware.pulseaudio.enable = false;
+ services.pipewire = {
+ enable = true;
+ alsa.enable = true;
+ alsa.support32Bit = true;
+ pulse.enable = true;
+ };
+
+ # Enable touchpad support (enabled default in most desktopManager).
+ services.xserver.libinput.enable = true;
+
+ # Define a user account. Don't forget to set a password with ‘passwd’.
+ users.users.lx = {
+ isNormalUser = true;
+ description = "Alex";
+ extraGroups = [ "networkmanager" "wheel" ]; # Enable ‘sudo’ for the user.
+ };
+
+ nixpkgs.config.allowUnfree = true;
+
+ environment.systemPackages = with pkgs; [
+ home-manager
+
+ profont
+ qgnomeplatform
+
+ gnome.gnome-tweaks
+ gnomeExtensions.appindicator
+ gnomeExtensions.dash-to-panel
+
+ vim
+ vimPlugins.vim-nix
+ tmux
+ git
+ git-lfs
+ htop
+ wget
+ gcc
+ gnumake
+
+ gnome.gnome-terminal
+ alacritty
+ firefox
+ qutebrowser
+ tor-browser-bundle-bin
+ thunderbird
+ keepassxc
+ vlc
+ mpv
+ jellyfin-media-player
+ ];
+ programs.vim.defaultEditor = true;
+
+ # Some programs need SUID wrappers, can be configured further or are
+ # started in user sessions.
+ # programs.mtr.enable = true;
+ # programs.gnupg.agent = {
+ # enable = true;
+ # enableSSHSupport = true;
+ # };
+
+ # List services that you want to enable:
+
+ # Enable the OpenSSH daemon.
+ # services.openssh.enable = true;
+
+ # Open ports in the firewall.
+ # networking.firewall.allowedTCPPorts = [ ... ];
+ # networking.firewall.allowedUDPPorts = [ ... ];
+ # Or disable the firewall altogether.
+ # networking.firewall.enable = false;
+
+ # Copy the NixOS configuration file and link it from the resulting system
+ # (/run/current-system/configuration.nix). This is useful in case you
+ # accidentally delete configuration.nix.
+ # system.copySystemConfiguration = true;
+
+ # This value determines the NixOS release from which the default
+ # settings for stateful data, like file locations and database versions
+ # on your system were taken. It‘s perfectly fine and recommended to leave
+ # this value at the release version of the first install of this system.
+ # Before changing this value read the documentation for this option
+ # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
+ system.stateVersion = "22.11"; # Did you read the comment?
+
+}
+
diff --git a/kusanagi/nixos/hardware-configuration.nix b/kusanagi/nixos/hardware-configuration.nix
new file mode 100644
index 0000000..e4827aa
--- /dev/null
+++ b/kusanagi/nixos/hardware-configuration.nix
@@ -0,0 +1,42 @@
+# Do not modify this file! It was generated by ‘nixos-generate-config’
+# and may be overwritten by future invocations. Please make changes
+# to /etc/nixos/configuration.nix instead.
+{ config, lib, pkgs, modulesPath, ... }:
+
+{
+ imports =
+ [ (modulesPath + "/installer/scan/not-detected.nix")
+ ];
+
+ boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" ];
+ boot.initrd.kernelModules = [ "dm-snapshot" ];
+ boot.kernelModules = [ "kvm-intel" ];
+ boot.extraModulePackages = [ ];
+
+ boot.initrd.luks.devices.crypted.device = "/dev/disk/by-uuid/e3271725-effb-4b00-a5d4-8a7a64f55420";
+
+ fileSystems."/" =
+ { device = "/dev/disk/by-uuid/2f606c6b-8009-4158-b367-2e0cf1a57ade";
+ fsType = "ext4";
+ };
+
+ fileSystems."/boot" =
+ { device = "/dev/disk/by-uuid/0143-7D54";
+ fsType = "vfat";
+ };
+
+ fileSystems."/home" =
+ { device = "/dev/disk/by-uuid/f955ce34-f25e-4abf-8732-bcf17465f78c";
+ fsType = "ext4";
+ };
+
+ swapDevices = [
+ {
+ device = "/dev/disk/by-uuid/c78cfb77-75ee-4aae-9b24-b91f8eebb7c2";
+ }
+ ];
+
+ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+ powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
+ hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
+}