summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-01-17 12:33:50 +0100
committerAlex Auvolat <alex@adnab.me>2023-01-17 12:33:50 +0100
commiteaf6d5b07bcdd9a3eb9bfdac93566b7432e46c37 (patch)
tree2c80bd3a4a1eda0771ec9b9caf882df95aea78a1
parent0fe1e2445f805a9558cb19540966e72a02fc5326 (diff)
downloaduser-config-eaf6d5b07bcdd9a3eb9bfdac93566b7432e46c37.tar.gz
user-config-eaf6d5b07bcdd9a3eb9bfdac93566b7432e46c37.zip
Lindy on NixOS
-rw-r--r--lindy/nixos/Makefile5
-rw-r--r--lindy/nixos/configuration.nix185
-rw-r--r--lindy/nixos/gnome.nix31
-rw-r--r--lindy/nixos/hardware-configuration.nix61
-rw-r--r--lindy/nixos/kde.nix6
-rw-r--r--lindy/old/alacritty/alacritty.yml (renamed from lindy/alacritty/alacritty.yml)0
-rw-r--r--lindy/old/dot_bashrc (renamed from lindy/dot_bashrc)0
-rw-r--r--lindy/old/dot_i3/config (renamed from lindy/dot_i3/config)0
-rwxr-xr-xlindy/old/dot_i3/i3lock-dpms (renamed from lindy/dot_i3/i3lock-dpms)0
-rw-r--r--lindy/old/dot_i3/i3status.conf (renamed from lindy/dot_i3/i3status.conf)0
-rw-r--r--lindy/old/dot_tmux.conf (renamed from lindy/dot_tmux.conf)0
-rw-r--r--lindy/old/dot_vimrc (renamed from lindy/dot_vimrc)0
-rw-r--r--lindy/old/sway/config (renamed from lindy/sway/config)0
-rw-r--r--lindy/old/systemd/alps-inria.service (renamed from lindy/systemd/alps-inria.service)0
-rw-r--r--lindy/old/systemd/dino-background.service (renamed from lindy/systemd/dino-background.service)0
-rw-r--r--lindy/old/systemd/rclone-mount@.service (renamed from lindy/systemd/rclone-mount@.service)0
-rw-r--r--lindy/old/systemd/scream-client.service (renamed from lindy/systemd/scream-client.service)0
-rw-r--r--lindy/old/systemd/secure-tunnel@.service (renamed from lindy/systemd/secure-tunnel@.service)0
-rwxr-xr-xlindy/old/vm/vmconf.sh (renamed from lindy/vm/vmconf.sh)0
-rwxr-xr-xlindy/old/vm/vmunconf.sh (renamed from lindy/vm/vmunconf.sh)0
-rw-r--r--lindy/old/vm/win10_vm_conf_20211123.xml (renamed from lindy/vm/win10_vm_conf_20211123.xml)0
-rw-r--r--lindy/old/wayfire.ini (renamed from lindy/wayfire.ini)0
-rw-r--r--lindy/old/wf-shell.ini (renamed from lindy/wf-shell.ini)0
-rw-r--r--lindy/old/xkb/symbols/custom-fr (renamed from lindy/xkb/symbols/custom-fr)0
24 files changed, 288 insertions, 0 deletions
diff --git a/lindy/nixos/Makefile b/lindy/nixos/Makefile
new file mode 100644
index 0000000..2ae1ef5
--- /dev/null
+++ b/lindy/nixos/Makefile
@@ -0,0 +1,5 @@
+all:
+ sudo nixos-rebuild switch -I nixos-config=configuration.nix
+
+up:
+ sudo nixos-rebuild switch --upgrade -I nixos-config=configuration.nix
diff --git a/lindy/nixos/configuration.nix b/lindy/nixos/configuration.nix
new file mode 100644
index 0000000..78f8efb
--- /dev/null
+++ b/lindy/nixos/configuration.nix
@@ -0,0 +1,185 @@
+# 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
+ ./kde.nix
+ #./gnome.nix
+ ];
+
+ # Use Grub
+ boot.loader.grub.enable = true;
+ boot.loader.grub.device = "nodev";
+ boot.loader.grub.extraGrubInstallArgs = [ "--bootloader-id=NixOS" ];
+ boot.loader.efi.efiSysMountPoint = "/boot/efi";
+ boot.loader.efi.canTouchEfiVariables = true;
+ boot.plymouth.enable = true;
+
+ networking.hostName = "lindy";
+ 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;
+ services.xserver.videoDrivers = [ "nvidia" ];
+ hardware.opengl.enable = true;
+
+ # Configure keymap in X11
+ services.xserver.layout = "fr";
+ services.xserver.xkbOptions = "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";
+ home = "/home/lx.nix";
+ extraGroups =
+ [ "networkmanager" "wheel" "yggdrasil" ]; # Enable ‘sudo’ for the user.
+ };
+
+ nixpkgs.config.allowUnfree = true;
+ nix.gc.automatic = true;
+ nix.gc.options = "--delete-older-than 30d";
+ nix.settings.experimental-features = [ "nix-command" "flakes" ];
+
+ environment.systemPackages = with pkgs; [
+ home-manager
+
+ profont
+ symbola
+
+ vim
+ vimPlugins.vim-nix
+ vimPlugins.fzf-vim
+ vimPlugins.nerdtree
+ tmux
+ git
+ git-lfs
+ pass
+ openssl
+ htop
+ powertop
+ iotop
+ jnettop
+ socat
+ nethogs
+ speedtest-cli
+ ncdu
+ dfc
+ wget
+ gcc
+ gnumake
+ rclone
+ restic
+ borgbackup
+ nomad
+ consul
+ nixfmt
+
+ alacritty
+ firefox
+ qutebrowser
+ (tor-browser-bundle-bin.override { useHardenedMalloc = false; })
+ lagrange
+ thunderbird
+ keepassxc
+ vlc
+ mpv
+ spotify
+ jellyfin-media-player
+ nheko
+ ];
+
+ programs.vim.defaultEditor = true;
+
+ programs.steam = {
+ enable = true;
+ remotePlay.openFirewall =
+ true; # Open ports in the firewall for Steam Remote Play
+ dedicatedServer.openFirewall =
+ true; # Open ports in the firewall for Source Dedicated Server
+ };
+
+ # 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;
+
+ services.yggdrasil = {
+ enable = true;
+ persistentKeys = true;
+ settings = { Peers = [ "tls://37.187.118.206:53103" ]; };
+ };
+
+ # 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/lindy/nixos/gnome.nix b/lindy/nixos/gnome.nix
new file mode 100644
index 0000000..9d02459
--- /dev/null
+++ b/lindy/nixos/gnome.nix
@@ -0,0 +1,31 @@
+{ config, pkgs, ... }: {
+ 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
+ ];
+
+ environment.systemPackages = with pkgs; [
+ qgnomeplatform
+
+ gnome.gnome-tweaks
+ gnomeExtensions.appindicator
+ gnomeExtensions.dash-to-panel
+ gnome.gnome-terminal
+ ];
+}
diff --git a/lindy/nixos/hardware-configuration.nix b/lindy/nixos/hardware-configuration.nix
new file mode 100644
index 0000000..a834491
--- /dev/null
+++ b/lindy/nixos/hardware-configuration.nix
@@ -0,0 +1,61 @@
+# 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" "ahci" "nvme" "usb_storage" "usbhid" ];
+ boot.initrd.kernelModules = [ "dm-snapshot" ];
+ boot.kernelModules = [ "kvm-intel" "wl" ];
+ boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ];
+
+ boot.initrd.luks.devices = {
+ cryptssd = {
+ device = "/dev/disk/by-uuid/1b074a78-9116-420e-b872-7bf49ca10ce1";
+ allowDiscards = true;
+ };
+ };
+
+ fileSystems."/" =
+ { device = "/dev/disk/by-uuid/2e64e6fc-ab7c-4620-b56b-faee641bd2a6";
+ fsType = "ext4";
+ };
+
+ fileSystems."/home" =
+ { device = "/dev/disk/by-uuid/1ef4b6f4-975d-4e04-9d88-0640e83ed0b4";
+ fsType = "ext4";
+ };
+
+ fileSystems."/boot" =
+ { device = "/dev/disk/by-uuid/0728e7e5-8e21-44bd-9287-eb066d489a0e";
+ fsType = "ext4";
+ };
+
+ fileSystems."/boot/efi" =
+ { device = "/dev/disk/by-uuid/02D0-F1C6";
+ fsType = "vfat";
+ };
+
+ swapDevices =
+ [ { device = "/dev/disk/by-uuid/5950785a-9793-4d04-b791-8f4dbc497ec3"; }
+ ];
+
+ # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
+ # (the default) this is the recommended approach. When using systemd-networkd it's
+ # still possible to use this option, but it's recommended to use it in conjunction
+ # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
+ networking.useDHCP = lib.mkDefault true;
+ # networking.interfaces.br-1ab2b811ce21.useDHCP = lib.mkDefault true;
+ # networking.interfaces.docker0.useDHCP = lib.mkDefault true;
+ # networking.interfaces.enp3s0.useDHCP = lib.mkDefault true;
+ # networking.interfaces.virbr0.useDHCP = lib.mkDefault true;
+ # networking.interfaces.wlp6s0.useDHCP = lib.mkDefault true;
+
+ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+ powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
+ hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
+}
diff --git a/lindy/nixos/kde.nix b/lindy/nixos/kde.nix
new file mode 100644
index 0000000..653a8eb
--- /dev/null
+++ b/lindy/nixos/kde.nix
@@ -0,0 +1,6 @@
+{ config, pkgs, ... }: {
+ services.xserver.displayManager.sddm.enable = true;
+ services.xserver.desktopManager.plasma5.enable = true;
+
+ environment.systemPackages = with pkgs.libsForQt5; [ kgpg ark ];
+}
diff --git a/lindy/alacritty/alacritty.yml b/lindy/old/alacritty/alacritty.yml
index 0c5785c..0c5785c 100644
--- a/lindy/alacritty/alacritty.yml
+++ b/lindy/old/alacritty/alacritty.yml
diff --git a/lindy/dot_bashrc b/lindy/old/dot_bashrc
index 5ba4663..5ba4663 100644
--- a/lindy/dot_bashrc
+++ b/lindy/old/dot_bashrc
diff --git a/lindy/dot_i3/config b/lindy/old/dot_i3/config
index 85a33ab..85a33ab 100644
--- a/lindy/dot_i3/config
+++ b/lindy/old/dot_i3/config
diff --git a/lindy/dot_i3/i3lock-dpms b/lindy/old/dot_i3/i3lock-dpms
index fa97182..fa97182 100755
--- a/lindy/dot_i3/i3lock-dpms
+++ b/lindy/old/dot_i3/i3lock-dpms
diff --git a/lindy/dot_i3/i3status.conf b/lindy/old/dot_i3/i3status.conf
index cc11aa8..cc11aa8 100644
--- a/lindy/dot_i3/i3status.conf
+++ b/lindy/old/dot_i3/i3status.conf
diff --git a/lindy/dot_tmux.conf b/lindy/old/dot_tmux.conf
index dc80775..dc80775 100644
--- a/lindy/dot_tmux.conf
+++ b/lindy/old/dot_tmux.conf
diff --git a/lindy/dot_vimrc b/lindy/old/dot_vimrc
index 13ecca5..13ecca5 100644
--- a/lindy/dot_vimrc
+++ b/lindy/old/dot_vimrc
diff --git a/lindy/sway/config b/lindy/old/sway/config
index 1f0f1f1..1f0f1f1 100644
--- a/lindy/sway/config
+++ b/lindy/old/sway/config
diff --git a/lindy/systemd/alps-inria.service b/lindy/old/systemd/alps-inria.service
index c338b4f..c338b4f 100644
--- a/lindy/systemd/alps-inria.service
+++ b/lindy/old/systemd/alps-inria.service
diff --git a/lindy/systemd/dino-background.service b/lindy/old/systemd/dino-background.service
index 2ccd4c3..2ccd4c3 100644
--- a/lindy/systemd/dino-background.service
+++ b/lindy/old/systemd/dino-background.service
diff --git a/lindy/systemd/rclone-mount@.service b/lindy/old/systemd/rclone-mount@.service
index 2f5a454..2f5a454 100644
--- a/lindy/systemd/rclone-mount@.service
+++ b/lindy/old/systemd/rclone-mount@.service
diff --git a/lindy/systemd/scream-client.service b/lindy/old/systemd/scream-client.service
index 164cf6b..164cf6b 100644
--- a/lindy/systemd/scream-client.service
+++ b/lindy/old/systemd/scream-client.service
diff --git a/lindy/systemd/secure-tunnel@.service b/lindy/old/systemd/secure-tunnel@.service
index 5054dd2..5054dd2 100644
--- a/lindy/systemd/secure-tunnel@.service
+++ b/lindy/old/systemd/secure-tunnel@.service
diff --git a/lindy/vm/vmconf.sh b/lindy/old/vm/vmconf.sh
index c5dfd7f..c5dfd7f 100755
--- a/lindy/vm/vmconf.sh
+++ b/lindy/old/vm/vmconf.sh
diff --git a/lindy/vm/vmunconf.sh b/lindy/old/vm/vmunconf.sh
index 768ebc1..768ebc1 100755
--- a/lindy/vm/vmunconf.sh
+++ b/lindy/old/vm/vmunconf.sh
diff --git a/lindy/vm/win10_vm_conf_20211123.xml b/lindy/old/vm/win10_vm_conf_20211123.xml
index 25a7b4e..25a7b4e 100644
--- a/lindy/vm/win10_vm_conf_20211123.xml
+++ b/lindy/old/vm/win10_vm_conf_20211123.xml
diff --git a/lindy/wayfire.ini b/lindy/old/wayfire.ini
index 4f5188a..4f5188a 100644
--- a/lindy/wayfire.ini
+++ b/lindy/old/wayfire.ini
diff --git a/lindy/wf-shell.ini b/lindy/old/wf-shell.ini
index d8919ea..d8919ea 100644
--- a/lindy/wf-shell.ini
+++ b/lindy/old/wf-shell.ini
diff --git a/lindy/xkb/symbols/custom-fr b/lindy/old/xkb/symbols/custom-fr
index 795c7ff..795c7ff 100644
--- a/lindy/xkb/symbols/custom-fr
+++ b/lindy/old/xkb/symbols/custom-fr