summaryrefslogtreecommitdiff
path: root/old/rootless-nixos
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-11-14 19:40:23 +0100
committerAlex Auvolat <alex@adnab.me>2023-11-14 19:40:23 +0100
commit53b48c88ab5125c729d59b984647deda3cc9ead6 (patch)
tree4563213f78b4769c5cd003bc8ad0aba35e285a43 /old/rootless-nixos
parent1a1fa75283706f5342a88be5db20bd3b6ce84e6b (diff)
downloaduser-config-53b48c88ab5125c729d59b984647deda3cc9ead6.tar.gz
user-config-53b48c88ab5125c729d59b984647deda3cc9ead6.zip
move rootless-nixos to old/
Diffstat (limited to 'old/rootless-nixos')
-rw-r--r--old/rootless-nixos/Makefile2
-rw-r--r--old/rootless-nixos/configuration.nix172
2 files changed, 174 insertions, 0 deletions
diff --git a/old/rootless-nixos/Makefile b/old/rootless-nixos/Makefile
new file mode 100644
index 0000000..eb96d6f
--- /dev/null
+++ b/old/rootless-nixos/Makefile
@@ -0,0 +1,2 @@
+all:
+ sudo nixos-rebuild switch -I nixos-config=configuration.nix
diff --git a/old/rootless-nixos/configuration.nix b/old/rootless-nixos/configuration.nix
new file mode 100644
index 0000000..8b8eec7
--- /dev/null
+++ b/old/rootless-nixos/configuration.nix
@@ -0,0 +1,172 @@
+# 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, lib, ... }:
+
+let
+ home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/refs/heads/release-22.11.tar.gz";
+in
+
+{
+ imports = [
+ (import "${home-manager}/nixos")
+ ];
+
+ boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
+ boot.initrd.kernelModules = [ ];
+ boot.kernelModules = [ "kvm-intel" ];
+ boot.extraModulePackages = [ ];
+
+ boot.loader.grub.enable = true;
+ boot.loader.grub.device = "nodev";
+ #boot.loader.grub.extraGrubInstallArgs = [ "--bootloader-id=NixOS" ];
+ boot.loader.efi.efiSysMountPoint = "/dev/efi";
+ boot.loader.efi.canTouchEfiVariables = true;
+
+ fileSystems."/" =
+ { device = "tmpfs";
+ fsType = "tmpfs";
+ };
+
+ fileSystems."/boot" =
+ { device = "/dev/disk/by-uuid/c4cac70a-3179-4063-9865-65cc1a6314c6";
+ fsType = "ext4";
+ };
+
+ fileSystems."/boot/efi" =
+ { device = "/dev/disk/by-uuid/ADB6-2084";
+ fsType = "vfat";
+ };
+
+ fileSystems."/nix" =
+ { device = "/dev/disk/by-uuid/81ddfb59-2f8d-4a49-8ed2-1ca2dbf08d0d";
+ fsType = "ext4";
+ };
+
+ fileSystems."/data" =
+ { device = "/dev/disk/by-uuid/c696ab13-8d36-4ed6-b965-eba15c3b28f4";
+
+ fsType = "ext4";
+ };
+
+ swapDevices = [ ];
+
+ networking.useDHCP = lib.mkDefault true;
+
+ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+ hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
+
+ networking.hostName = "nixos"; # Define your hostname.
+ # Pick only one of the below networking options.
+ # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
+ # networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
+
+ time.timeZone = "Europe/Paris";
+
+ i18n.defaultLocale = "en_US.UTF-8";
+ 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.sx.enable = true;
+ services.xserver.windowManager.icewm.enable = true;
+
+
+ # 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 = 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 = {
+ uid = 1000;
+ isNormalUser = true;
+ extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
+ hashedPassword = "$y$j9T$MYbKJrmirtHLq3yd9V9jr1$UDcCp29ovu3waapi6229..k2b1qnkeLMfWe0Jwx1b64";
+ };
+ users.users.root.hashedPassword = "$y$j9T$5rD5qq5OkV3ap8Z3ZQKqO/$QzyG/NnbqX29QTKVaGgRhiVYu3kzU.jaGzNIPSYKjQ8";
+ users.mutableUsers = false;
+
+ home-manager.users.lx = {
+ home.file = {
+ ".ssh/config".source = ../ssh/config;
+ ".config/tmux/tmux.conf".source = ../tmux/tmux.conf;
+ ".vim/swp/emptydir".text = "";
+ ".vim/backup/emptydir".text = "";
+ ".config/sx/sxrc" = {
+ text = ''
+ setxkbmap fr
+ ${pkgs.icewm}/bin/icewm-session
+ '';
+ executable = true;
+ };
+ ".config/icewm/preferences".text = ''
+ TerminalCommand="st"
+ '';
+ ".config/icewm/keys".text = ''
+ key "Super+Enter" st -f monospace-12pt
+ key "Super+Shift+r" icewm --restart
+ '';
+ ".config/icewm/menu".text = ''
+ prog "Terminal" xterm st -f inconsolata-12pt
+ includeprog icewm-menu-fdo --sep-before --no-sep-others --no-sub-cats
+ '';
+ ".config/icewm/toolbar".text = ''
+ prog "Terminal" xterm st -f inconsolata-12pt
+ prog "Dillo" dillo dillo
+ '';
+ };
+ programs.vim = {
+ enable = true;
+ extraConfig = (builtins.readFile ../vim/vimrc);
+ plugins = with pkgs.vimPlugins; [ vim-nix fzf-vim nerdtree vim-go ];
+ };
+ home.stateVersion = "22.11";
+ };
+
+ environment.systemPackages = with pkgs; [
+ # CLI
+ vim
+ wget
+ gnumake
+ htop
+ git
+ tmux
+
+ # GUI
+ st
+ dillo
+ links2
+ pcmanfm
+ qutebrowser
+ netsurf.browser
+ ];
+ programs.vim.defaultEditor = true;
+
+ # services.openssh.enable = true;
+
+ # networking.firewall.allowedTCPPorts = [ ... ];
+ # networking.firewall.allowedUDPPorts = [ ... ];
+
+ system.copySystemConfiguration = true;
+
+ system.stateVersion = "22.11";
+
+}
+