diff --git a/flake.nix b/flake.nix index 157962e..cc8aed0 100644 --- a/flake.nix +++ b/flake.nix @@ -7,16 +7,21 @@ }; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-25.05"; impermanence.url = "github:nix-community/impermanence"; yandex-music.url = "github:cucumber-sp/yandex-music-linux"; home-manager = { url = "github:nix-community/home-manager/master"; inputs.nixpkgs.follows = "nixpkgs"; }; + hm-stable = { + url = "github:nix-community/home-manager/release-25.05"; + inputs.nixpkgs-stable.follows = "nixpkgs"; + }; zapret.url = "github:n0vvvonder/zapret-flake.nix"; }; - outputs = { self, nixpkgs, impermanence, home-manager, zapret, ...}@inputs: { + outputs = { self, nixpkgs, impermanence, home-manager, zapret, nixpkgs-stable, hm-stable, ...}@inputs: { nixosConfigurations = { Ratchet = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; @@ -77,6 +82,22 @@ } ]; }; + Quark = nixpkgs-stable.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { inherit inputs; }; + modules = [ + impermanence.nixosModules.impermanence + ./hosts/generic/configuration_generic.nix + ./hosts/generic/users.nix + hm-stable.nixosModules.home-manager { + home-manager.useUserPackages = true; + home-manager.users.yaroslav = { + imports = [ + ./home/yaroslav/home.nix + ]; + }; + } + ]; }; }; } diff --git a/hosts/Quark/Quark-hardware.nix b/hosts/Quark/Quark-hardware.nix new file mode 100644 index 0000000..c24c2c9 --- /dev/null +++ b/hosts/Quark/Quark-hardware.nix @@ -0,0 +1,35 @@ +# 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.supportedFilesystems = [ "nfs" "nfsv4" "overlay" ]; + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" "sr_mod" "nfs" "nfsv4" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + boot.initrd.network.enable = true; + swapDevices = [ ]; + + fileSystems."/" = { + device = "192.168.1.222:/share/nixos-1"; + fsType = "nfs4"; + options = [ "defaults" ]; + }; + + # 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; + boot.initrd.network.flushBeforeStage2 = false; + # networking.interfaces.enp3s0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp5s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hosts/generic/users.nix b/hosts/generic/users.nix index 1819e28..7fc1340 100644 --- a/hosts/generic/users.nix +++ b/hosts/generic/users.nix @@ -9,6 +9,11 @@ tree ]; initialHashedPassword = "$6$.r5fJE91KtrOA2T.$JVjtzlFWx.RsTsNmO5WOsi1MhK6TUTKo8K5F2GgG.bAXYuYjGu4sK3SMzhk4oJ9FBoAcnyHmk7sLMsgLbUeoE1"; + openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEqOGDr8w8p2rYpePF7rDS4RRtIEOBggx85ybERyjngI yaroslav@Ratchet" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHqNEL4CNjvbgCdlaXNo/u+rHu7uPYpL2onEJ12H1bjZ u0_a326@localhost" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINgYswQa7LdwBpNkiw73du4nocbbET9FXKzWtjivBwHv yaroslav@Aphelion" + ]; }; users.users.root = { initialHashedPassword = "$y$j9T$eS.via4Hx/iPNJKAFbVah/$aHFf172uH6UYrSXPMrnbaFkAQ2o8AnJcYd4JgX1/of5";