From d3e1c8712dec9cba43d41a670e58f30f33de8edc Mon Sep 17 00:00:00 2001 From: Aner Zakobar Date: Sun, 20 Apr 2025 02:52:50 +0300 Subject: [PATCH] Fuck --- .gitignore | 0 .gitmodules | 0 README.org | 21 ++-- azos-core | 2 +- flake.lock | 29 ++++- flake.nix | 2 + home-manager/home.nix | 0 modules/home-manager/default.nix | 3 +- modules/home-manager/encryption.nix | 0 modules/home-manager/git.nix | 0 modules/home-manager/gpg-as-ssh.pub | 0 modules/home-manager/mail.nix | 0 modules/home-manager/ssh-config | 0 modules/home-manager/sshcontrol | 0 modules/nixos/default.nix | 0 nixos/configuration-vm.nix | 0 nixos/configuration.backup.nix | 83 ++++++++++++++ nixos/configuration.nix | 170 +++++++++++++++++----------- nixos/hardware-configuration.nix | 48 ++++++-- overlays/default.nix | 0 pkgs/default.nix | 0 shells/debugTex/.gitignore | 0 shells/debugTex/default.nix | 0 shells/debugTex/test.org | 0 shells/debugTex/test.tex | 0 shells/debugTex/tex2pdf.sh | 0 shells/default.nix | 0 27 files changed, 265 insertions(+), 93 deletions(-) mode change 100644 => 100755 .gitignore mode change 100644 => 100755 .gitmodules mode change 100644 => 100755 README.org mode change 100644 => 100755 flake.lock mode change 100644 => 100755 flake.nix mode change 100644 => 100755 home-manager/home.nix mode change 100644 => 100755 modules/home-manager/default.nix mode change 100644 => 100755 modules/home-manager/encryption.nix mode change 100644 => 100755 modules/home-manager/git.nix mode change 100644 => 100755 modules/home-manager/gpg-as-ssh.pub mode change 100644 => 100755 modules/home-manager/mail.nix mode change 100644 => 100755 modules/home-manager/ssh-config mode change 100644 => 100755 modules/home-manager/sshcontrol mode change 100644 => 100755 modules/nixos/default.nix mode change 100644 => 100755 nixos/configuration-vm.nix create mode 100755 nixos/configuration.backup.nix mode change 100644 => 100755 nixos/hardware-configuration.nix mode change 100644 => 100755 overlays/default.nix mode change 100644 => 100755 pkgs/default.nix mode change 100644 => 100755 shells/debugTex/.gitignore mode change 100644 => 100755 shells/debugTex/default.nix mode change 100644 => 100755 shells/debugTex/test.org mode change 100644 => 100755 shells/debugTex/test.tex mode change 100644 => 100755 shells/debugTex/tex2pdf.sh mode change 100644 => 100755 shells/default.nix diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/.gitmodules b/.gitmodules old mode 100644 new mode 100755 diff --git a/README.org b/README.org old mode 100644 new mode 100755 index 6046363..d3b5f51 --- a/README.org +++ b/README.org @@ -81,17 +81,12 @@ nix develop .#shells.x86_64-linux.debugTexShell * Tasks -** Station ORG -*** Move mail config +** Things to work out -It seems there is some built in functionality here. - -*** Add mail service - -Will probably finish when system running - -*** Git config - -*** SSH config - -*** PUBLIC KEYS AND SUCH +*** Mail +*** Steam +*** Reaper +*** Hardware +*** WiFi and such +*** Notebook tempaltes +*** Yubikey & Encrypytion diff --git a/azos-core b/azos-core index cb1ac5c..65bcc28 160000 --- a/azos-core +++ b/azos-core @@ -1 +1 @@ -Subproject commit cb1ac5cf8d9ab89995c00fa231864bf545cb447a +Subproject commit 65bcc28de54a8edccf30c4b6ba891bb02198aeea diff --git a/flake.lock b/flake.lock old mode 100644 new mode 100755 index ccb9c15..efd1107 --- a/flake.lock +++ b/flake.lock @@ -6,17 +6,17 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1739453429, - "narHash": "sha256-rf/x3UoVqCX0mFTYVn5n/htz0q21HF7fbmYs8O/czaQ=", + "lastModified": 1744973481, + "narHash": "sha256-y/etAiG+mvkDvlf1iETNhLHOQo7joIqSroFlhssf8DE=", "ref": "refs/heads/master", - "rev": "b9c57afc227c57a48cd4fa50153d1e2ca57664e6", - "revCount": 4, + "rev": "cb1ac5cf8d9ab89995c00fa231864bf545cb447a", + "revCount": 10, "type": "git", - "url": "file:azos-core" + "url": "file:./azos-core" }, "original": { "type": "git", - "url": "file:azos-core" + "url": "file:./azos-core" } }, "flake-utils": { @@ -58,6 +58,22 @@ "type": "github" } }, + "nixos-hardware": { + "locked": { + "lastModified": 1744633460, + "narHash": "sha256-fbWE4Xpw6eH0Q6in+ymNuDwTkqmFmtxcQEmtRuKDTTk=", + "owner": "NixOS", + "repo": "nixos-hardware", + "rev": "9a049b4a421076d27fee3eec664a18b2066824cb", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "master", + "repo": "nixos-hardware", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1738702386, @@ -110,6 +126,7 @@ "inputs": { "azos-core": "azos-core", "home-manager": "home-manager", + "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_2", "nixpkgs-unstable": "nixpkgs-unstable" } diff --git a/flake.nix b/flake.nix old mode 100644 new mode 100755 index 808b710..e2ad73e --- a/flake.nix +++ b/flake.nix @@ -13,6 +13,8 @@ home-manager.url = "github:nix-community/home-manager/release-24.05"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; + nixos-hardware.url = "github:NixOS/nixos-hardware/master"; + # TODO: Add any other flake you might need # hardware.url = "github:nixos/nixos-hardware"; diff --git a/home-manager/home.nix b/home-manager/home.nix old mode 100644 new mode 100755 diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix old mode 100644 new mode 100755 index 20b7c5b..cb101a1 --- a/modules/home-manager/default.nix +++ b/modules/home-manager/default.nix @@ -1,3 +1,4 @@ { - imports = [./mail.nix ./encryption.nix]; + # imports = [./mail.nix ./encryption.nix]; + imports = [./mail.nix]; } diff --git a/modules/home-manager/encryption.nix b/modules/home-manager/encryption.nix old mode 100644 new mode 100755 diff --git a/modules/home-manager/git.nix b/modules/home-manager/git.nix old mode 100644 new mode 100755 diff --git a/modules/home-manager/gpg-as-ssh.pub b/modules/home-manager/gpg-as-ssh.pub old mode 100644 new mode 100755 diff --git a/modules/home-manager/mail.nix b/modules/home-manager/mail.nix old mode 100644 new mode 100755 diff --git a/modules/home-manager/ssh-config b/modules/home-manager/ssh-config old mode 100644 new mode 100755 diff --git a/modules/home-manager/sshcontrol b/modules/home-manager/sshcontrol old mode 100644 new mode 100755 diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix old mode 100644 new mode 100755 diff --git a/nixos/configuration-vm.nix b/nixos/configuration-vm.nix old mode 100644 new mode 100755 diff --git a/nixos/configuration.backup.nix b/nixos/configuration.backup.nix new file mode 100755 index 0000000..5d84f81 --- /dev/null +++ b/nixos/configuration.backup.nix @@ -0,0 +1,83 @@ +{ + inputs, + outputs, + lib, + config, + pkgs, + ... +}: { + imports = [ + ./hardware-configuration.nix + ]; + + nixpkgs = { + overlays = [ + # outputs.overlays.additions + outputs.overlays.modifications + outputs.overlays.unstable-packages + ]; + + # Configure your nixpkgs instance + config = { + # Disable if you don't want unfree packages + allowUnfree = true; + }; + }; + + # This will add each flake input as a registry + # To make nix3 commands consistent with your flake + nix.registry = (lib.mapAttrs (_: flake: {inherit flake;})) ((lib.filterAttrs (_: lib.isType "flake")) inputs); + + # This will additionally add your inputs to the system's legacy channels + # Making legacy nix commands consistent as well, awesome! + nix.nixPath = ["/etc/nix/path"]; + environment.etc = + lib.mapAttrs' + (name: value: { + name = "nix/path/${name}"; + value.source = value.flake; + }) + config.nix.registry; + + nix.settings = { + experimental-features = "nix-command flakes"; + auto-optimise-store = true; + }; + + # TODO: Set your hostname + networking.hostName = "your-hostname"; + + # TODO: This is just an example, be sure to use whatever bootloader you prefer + boot.loader.systemd-boot.enable = true; + + users.users = { + # FIXME: Replace with your username + your-username = { + # TODO: You can set an initial password for your user. + # If you do, you can skip setting a root password by passing '--no-root-passwd' to nixos-install. + # Be sure to change it (using passwd) after rebooting! + initialPassword = "correcthorsebatterystaple"; + isNormalUser = true; + openssh.authorizedKeys.keys = [ + # TODO: Add your SSH public key(s) here, if you plan on using SSH to connect + ]; + # TODO: Be sure to add any other groups you need (such as networkmanager, audio, docker, etc) + extraGroups = ["wheel"]; + }; + }; + + # This setups a SSH server. Very important if you're setting up a headless system. + # Feel free to remove if you don't need it. + services.openssh = { + enable = true; + settings = { + # Forbid root login through SSH. + PermitRootLogin = "no"; + # Use keys only. Remove if you want to SSH using password (not recommended) + PasswordAuthentication = false; + }; + }; + + # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion + system.stateVersion = "23.05"; +} diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 5d84f81..48edf33 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -1,83 +1,125 @@ -{ - inputs, - outputs, - lib, - config, - pkgs, - ... -}: { - imports = [ - ./hardware-configuration.nix - ]; +# 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’). - nixpkgs = { - overlays = [ - # outputs.overlays.additions - outputs.overlays.modifications - outputs.overlays.unstable-packages +{ inputs, outputs, lib, config, pkgs, ... }: + +{ + imports = + [ # Include the results of the hardware scan. + ./hardware-configuration.nix + inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t480 + inputs.home-manager.nixosModules.home-manager + outputs.nixosModules ]; - # Configure your nixpkgs instance - config = { - # Disable if you don't want unfree packages - allowUnfree = true; - }; + # Bootloader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + nixpkgs = { + overlays = [ + outputs.overlays.modifications + outputs.overlays.unstable-packages + inputs.azos-core.overlays.addpkgs + ]; + config = { + allowUnfree = true; + }; }; - # This will add each flake input as a registry - # To make nix3 commands consistent with your flake nix.registry = (lib.mapAttrs (_: flake: {inherit flake;})) ((lib.filterAttrs (_: lib.isType "flake")) inputs); - # This will additionally add your inputs to the system's legacy channels - # Making legacy nix commands consistent as well, awesome! nix.nixPath = ["/etc/nix/path"]; - environment.etc = - lib.mapAttrs' - (name: value: { - name = "nix/path/${name}"; - value.source = value.flake; - }) - config.nix.registry; + + networking.hostName = "lauretta"; # Define your hostname. + # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. + + # Enable networking + networking.networkmanager.enable = true; + + # Set your time zone. + time.timeZone = "Asia/Jerusalem"; + + # Select internationalisation properties. + i18n.defaultLocale = "en_IL"; + + i18n.extraLocaleSettings = { + LC_ADDRESS = "he_IL.UTF-8"; + LC_IDENTIFICATION = "he_IL.UTF-8"; + LC_MEASUREMENT = "he_IL.UTF-8"; + LC_MONETARY = "he_IL.UTF-8"; + LC_NAME = "he_IL.UTF-8"; + LC_NUMERIC = "he_IL.UTF-8"; + LC_PAPER = "he_IL.UTF-8"; + LC_TELEPHONE = "he_IL.UTF-8"; + LC_TIME = "he_IL.UTF-8"; + }; + + # Configure keymap in X11 + services.xserver.xkb = { + layout = "us,il"; + variant = ""; + }; + + # Configure console keymap + console.keyMap = "il"; + + # Define a user account. Don't forget to set a password with ‘passwd’. + users.users.aner = { + isNormalUser = true; + description = "Aner Zakobar"; + extraGroups = [ "networkmanager" "wheel" ]; + packages = with pkgs; []; + }; nix.settings = { experimental-features = "nix-command flakes"; auto-optimise-store = true; }; - # TODO: Set your hostname - networking.hostName = "your-hostname"; - - # TODO: This is just an example, be sure to use whatever bootloader you prefer - boot.loader.systemd-boot.enable = true; - - users.users = { - # FIXME: Replace with your username - your-username = { - # TODO: You can set an initial password for your user. - # If you do, you can skip setting a root password by passing '--no-root-passwd' to nixos-install. - # Be sure to change it (using passwd) after rebooting! - initialPassword = "correcthorsebatterystaple"; - isNormalUser = true; - openssh.authorizedKeys.keys = [ - # TODO: Add your SSH public key(s) here, if you plan on using SSH to connect - ]; - # TODO: Be sure to add any other groups you need (such as networkmanager, audio, docker, etc) - extraGroups = ["wheel"]; + home-manager = { + extraSpecialArgs = {inherit inputs outputs; }; + users = { + aner = import ../home-manager/home.nix; }; }; - # This setups a SSH server. Very important if you're setting up a headless system. - # Feel free to remove if you don't need it. - services.openssh = { - enable = true; - settings = { - # Forbid root login through SSH. - PermitRootLogin = "no"; - # Use keys only. Remove if you want to SSH using password (not recommended) - PasswordAuthentication = false; - }; - }; + # List packages installed in system profile. To search, run: + # $ nix search wget + environment.systemPackages = with pkgs; [ + vim + git + tmux + ]; + + fonts.enableDefaultPackages = 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; + + # 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 = "24.11"; # Did you read the comment? - # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion - system.stateVersion = "23.05"; } diff --git a/nixos/hardware-configuration.nix b/nixos/hardware-configuration.nix old mode 100644 new mode 100755 index dd00939..0b408f6 --- a/nixos/hardware-configuration.nix +++ b/nixos/hardware-configuration.nix @@ -1,10 +1,42 @@ -# This is just an example, you should generate yours with nixos-generate-config and put it in here. -{ - fileSystems."/" = { - device = "/dev/sda1"; - fsType = "ext4"; - }; +# 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, ... }: - # Set your system kind (needed for flakes) - nixpkgs.hostPlatform = "x86_64-linux"; +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "usbhid" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/d28f6c1d-f7ec-44a1-a59b-a598c7f136f7"; + fsType = "btrfs"; + options = [ "subvol=@" ]; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/BF2B-E467"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/cea8ee1e-925c-4f5f-9ec8-7e39103d40da"; } + ]; + + # 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..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/overlays/default.nix b/overlays/default.nix old mode 100644 new mode 100755 diff --git a/pkgs/default.nix b/pkgs/default.nix old mode 100644 new mode 100755 diff --git a/shells/debugTex/.gitignore b/shells/debugTex/.gitignore old mode 100644 new mode 100755 diff --git a/shells/debugTex/default.nix b/shells/debugTex/default.nix old mode 100644 new mode 100755 diff --git a/shells/debugTex/test.org b/shells/debugTex/test.org old mode 100644 new mode 100755 diff --git a/shells/debugTex/test.tex b/shells/debugTex/test.tex old mode 100644 new mode 100755 diff --git a/shells/debugTex/tex2pdf.sh b/shells/debugTex/tex2pdf.sh old mode 100644 new mode 100755 diff --git a/shells/default.nix b/shells/default.nix old mode 100644 new mode 100755