From 7a1499d39ed90545cc0fea838ed73f94b253184d Mon Sep 17 00:00:00 2001 From: yaroslav Date: Tue, 10 Jun 2025 19:17:48 +0300 Subject: [PATCH 01/12] added Quark host --- flake.nix | 23 +++++++++++++++++++++- hosts/Quark/Quark-hardware.nix | 35 ++++++++++++++++++++++++++++++++++ hosts/generic/users.nix | 5 +++++ 3 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 hosts/Quark/Quark-hardware.nix 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"; From 80faa9d2b570d7c5ea07adbb0652f4a9ec892d8c Mon Sep 17 00:00:00 2001 From: yaroslav Date: Tue, 10 Jun 2025 19:04:13 +0000 Subject: [PATCH 02/12] configured Quark (hopefully final) --- flake.nix | 27 ++++++++++++++------------- hosts/Quark/Quark-hardware.nix | 16 ++++++++++------ 2 files changed, 24 insertions(+), 19 deletions(-) diff --git a/flake.nix b/flake.nix index ae26d9b..0a22adf 100644 --- a/flake.nix +++ b/flake.nix @@ -14,14 +14,14 @@ 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"; - }; +# 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, nixpkgs-stable, hm-stable, ...}@inputs: { + outputs = { self, nixpkgs, impermanence, home-manager, zapret, nixpkgs-stable, ...}@inputs: { nixosConfigurations = { Ratchet = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; @@ -90,14 +90,15 @@ 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 - ]; - }; - } + ./hosts/Quark/Quark_hardware.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 index c24c2c9..740a72d 100644 --- a/hosts/Quark/Quark-hardware.nix +++ b/hosts/Quark/Quark-hardware.nix @@ -12,21 +12,25 @@ 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" ]; + device = "/dev/sda4"; + fsType = "btrfs"; + options = [ "subvol=@" ]; + }; + fileSystems."/nix" = { + device = "/dev/sda4"; + fsType = "btrfs"; + options = [ "subvol=@nix" ]; }; # 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.useDHCP = lib.mkDefault true; + #boot.initrd.network.flushBeforeStage2 = false; # networking.interfaces.enp3s0.useDHCP = lib.mkDefault true; # networking.interfaces.enp5s0.useDHCP = lib.mkDefault true; From 4f5ca1ef811c3874e73fdffeec6f424429eb7c5b Mon Sep 17 00:00:00 2001 From: yaroslav Date: Tue, 10 Jun 2025 22:34:07 +0300 Subject: [PATCH 03/12] prettyfied flake.nix --- flake.lock | 59 +++++++++++++++++++++++++++++++++++------------------- flake.nix | 13 ++++++------ 2 files changed, 45 insertions(+), 27 deletions(-) diff --git a/flake.lock b/flake.lock index 30468e9..20f332b 100644 --- a/flake.lock +++ b/flake.lock @@ -20,7 +20,7 @@ "home-manager": { "inputs": { "nixpkgs": [ - "nixpkgs" + "nixpkgs-unstable" ] }, "locked": { @@ -54,22 +54,6 @@ } }, "nixpkgs": { - "locked": { - "lastModified": 1748693115, - "narHash": "sha256-StSrWhklmDuXT93yc3GrTlb0cKSS0agTAxMGjLKAsY8=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "910796cabe436259a29a72e8d3f5e180fc6dfacc", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { "locked": { "lastModified": 1741379970, "narHash": "sha256-Wh7esNh7G24qYleLvgOSY/7HlDUzWaL/n4qzlBePpiw=", @@ -85,7 +69,39 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs-stable": { + "locked": { + "lastModified": 1749494155, + "narHash": "sha256-FG4DEYBpROupu758beabUk9lhrblSf5hnv84v1TLqMc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "88331c17ba434359491e8d5889cce872464052c2", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-25.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-unstable": { + "locked": { + "lastModified": 1749285348, + "narHash": "sha256-frdhQvPbmDYaScPFiCnfdh3B/Vh81Uuoo0w5TkWmmjU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "3e3afe5174c561dee0df6f2c2b2236990146329f", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { "locked": { "lastModified": 1716044191, "narHash": "sha256-V/JRCf9iOKGMmmMCs/K1n+vOP01Y7ZPJntHXxDEvzWM=", @@ -105,7 +121,8 @@ "inputs": { "home-manager": "home-manager", "impermanence": "impermanence", - "nixpkgs": "nixpkgs", + "nixpkgs-stable": "nixpkgs-stable", + "nixpkgs-unstable": "nixpkgs-unstable", "yandex-music": "yandex-music", "zapret": "zapret" } @@ -128,7 +145,7 @@ "yandex-music": { "inputs": { "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs", "ymExe": "ymExe" }, "locked": { @@ -159,7 +176,7 @@ }, "zapret": { "inputs": { - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_2", "zapret-src": "zapret-src" }, "locked": { diff --git a/flake.nix b/flake.nix index 0a22adf..7c99296 100644 --- a/flake.nix +++ b/flake.nix @@ -6,13 +6,13 @@ ]; }; inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + nixpkgs-unstable.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"; + inputs.nixpkgs.follows = "nixpkgs-unstable"; }; # hm-stable = { # url = "github:nix-community/home-manager/release-25.05"; @@ -21,9 +21,9 @@ zapret.url = "github:n0vvvonder/zapret-flake.nix"; }; - outputs = { self, nixpkgs, impermanence, home-manager, zapret, nixpkgs-stable, ...}@inputs: { + outputs = { self, nixpkgs-unstable, impermanence, home-manager, zapret, nixpkgs-stable, ...}@inputs: { nixosConfigurations = { - Ratchet = nixpkgs.lib.nixosSystem { + Ratchet = nixpkgs-unstable.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { inherit inputs; }; modules = [ @@ -52,7 +52,7 @@ } ]; }; - Aphelion = nixpkgs.lib.nixosSystem { + Aphelion = nixpkgs-unstable.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { inherit inputs; }; modules = [ @@ -90,7 +90,7 @@ impermanence.nixosModules.impermanence ./hosts/generic/configuration_generic.nix ./hosts/generic/users.nix - ./hosts/Quark/Quark_hardware.nix + ./hosts/Quark/Quark-hardware.nix # hm-stable.nixosModules.home-manager { # home-manager.useUserPackages = true; # home-manager.users.yaroslav = { @@ -102,4 +102,5 @@ ]; }; }; +}; } From 84fcf2693228f2cf2591d57f7ffad3ba54dbd9db Mon Sep 17 00:00:00 2001 From: yaroslav Date: Tue, 10 Jun 2025 22:41:58 +0300 Subject: [PATCH 04/12] added iommu support for Quark --- flake.nix | 1 + hosts/Aphelion/hardware-Aphelion.nix | 1 + hosts/Quark/Quark-hardware.nix | 6 +++++- hosts/Ratchet/hardware-Ratchet.nix | 1 + hosts/generic/virtualization.nix | 2 +- 5 files changed, 9 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 7c99296..eb737db 100644 --- a/flake.nix +++ b/flake.nix @@ -91,6 +91,7 @@ ./hosts/generic/configuration_generic.nix ./hosts/generic/users.nix ./hosts/Quark/Quark-hardware.nix + ./hosts/generic/virtualization.nix # hm-stable.nixosModules.home-manager { # home-manager.useUserPackages = true; # home-manager.users.yaroslav = { diff --git a/hosts/Aphelion/hardware-Aphelion.nix b/hosts/Aphelion/hardware-Aphelion.nix index cb5cc97..6bff5ba 100644 --- a/hosts/Aphelion/hardware-Aphelion.nix +++ b/hosts/Aphelion/hardware-Aphelion.nix @@ -13,6 +13,7 @@ boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; boot.kernelPackages = pkgs.linuxPackages_zen; + boot.extraModprobeConfig = "options kvm_amd nested=1"; fileSystems."/" = { #device = "/dev/disk/by-uuid/3126fadd-b793-4110-bcb7-577b7978cba2"; diff --git a/hosts/Quark/Quark-hardware.nix b/hosts/Quark/Quark-hardware.nix index 740a72d..dfa0fc7 100644 --- a/hosts/Quark/Quark-hardware.nix +++ b/hosts/Quark/Quark-hardware.nix @@ -10,9 +10,13 @@ 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.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; swapDevices = [ ]; + boot.extraModprobeConfig = "options kvm_intel nested=1"; + boot.kernelParams = [ + "intel_iommu=on" + ]; fileSystems."/" = { device = "/dev/sda4"; diff --git a/hosts/Ratchet/hardware-Ratchet.nix b/hosts/Ratchet/hardware-Ratchet.nix index 19d27f7..7714583 100644 --- a/hosts/Ratchet/hardware-Ratchet.nix +++ b/hosts/Ratchet/hardware-Ratchet.nix @@ -12,6 +12,7 @@ boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; + boot.extraModprobeConfig = "options kvm_amd nested=1"; fileSystems."/" = { device = "none"; diff --git a/hosts/generic/virtualization.nix b/hosts/generic/virtualization.nix index 7655a15..1739d00 100644 --- a/hosts/generic/virtualization.nix +++ b/hosts/generic/virtualization.nix @@ -24,5 +24,5 @@ }; }; }; - boot.extraModprobeConfig = "options kvm_amd nested=1"; + } From 70a5e48af2293f1d82e42a3c4e1d466231782854 Mon Sep 17 00:00:00 2001 From: yaroslav Date: Tue, 10 Jun 2025 22:48:48 +0300 Subject: [PATCH 05/12] updated Quark vfio --- hosts/Quark/Quark-hardware.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/hosts/Quark/Quark-hardware.nix b/hosts/Quark/Quark-hardware.nix index dfa0fc7..f8863ad 100644 --- a/hosts/Quark/Quark-hardware.nix +++ b/hosts/Quark/Quark-hardware.nix @@ -9,8 +9,15 @@ ]; 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 = [ "kvm-intel" ]; + boot.initrd.kernelModules = [ + "vfio_pci" + "vfio" + "vfio_iommu_type1" + "vfio_virqfd" + ]; + boot.kernelModules = [ + "kvm-intel" + ]; boot.extraModulePackages = [ ]; swapDevices = [ ]; boot.extraModprobeConfig = "options kvm_intel nested=1"; From 89a7263d34e01b35a5ef1196a18efcc10853c556 Mon Sep 17 00:00:00 2001 From: yaroslav Date: Wed, 11 Jun 2025 00:37:25 +0300 Subject: [PATCH 06/12] made vfio work --- hosts/Quark/Quark-hardware.nix | 1 - hosts/generic/configuration_generic.nix | 1 + hosts/generic/virtualization.nix | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hosts/Quark/Quark-hardware.nix b/hosts/Quark/Quark-hardware.nix index f8863ad..bf60db3 100644 --- a/hosts/Quark/Quark-hardware.nix +++ b/hosts/Quark/Quark-hardware.nix @@ -13,7 +13,6 @@ "vfio_pci" "vfio" "vfio_iommu_type1" - "vfio_virqfd" ]; boot.kernelModules = [ "kvm-intel" diff --git a/hosts/generic/configuration_generic.nix b/hosts/generic/configuration_generic.nix index 9000f76..0a9dc18 100644 --- a/hosts/generic/configuration_generic.nix +++ b/hosts/generic/configuration_generic.nix @@ -24,6 +24,7 @@ }; services.openssh.enable = true; + services.openssh.settings.X11Forwarding = true; # networking networking.networkmanager.enable = true; diff --git a/hosts/generic/virtualization.nix b/hosts/generic/virtualization.nix index 1739d00..488b1c2 100644 --- a/hosts/generic/virtualization.nix +++ b/hosts/generic/virtualization.nix @@ -2,7 +2,7 @@ { environment = { - systemPackages = [ pkgs.qemu ]; + systemPackages = [ pkgs.qemu pkgs.virt-manager ]; }; systemd.tmpfiles.rules = [ "L+ /var/lib/qemu/firmware - - - - ${pkgs.qemu}/share/qemu/firmware" ]; boot.binfmt.emulatedSystems = [ From d587cfd246001bb08053a81aecb4ea6e7072295e Mon Sep 17 00:00:00 2001 From: yaroslav Date: Wed, 11 Jun 2025 00:49:33 +0300 Subject: [PATCH 07/12] added smb for Qwark --- flake.nix | 1 + hosts/Quark/smb.nix | 47 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 hosts/Quark/smb.nix diff --git a/flake.nix b/flake.nix index eb737db..481dbe0 100644 --- a/flake.nix +++ b/flake.nix @@ -91,6 +91,7 @@ ./hosts/generic/configuration_generic.nix ./hosts/generic/users.nix ./hosts/Quark/Quark-hardware.nix + ./hosts/Quark/smb.nix ./hosts/generic/virtualization.nix # hm-stable.nixosModules.home-manager { # home-manager.useUserPackages = true; diff --git a/hosts/Quark/smb.nix b/hosts/Quark/smb.nix new file mode 100644 index 0000000..5794948 --- /dev/null +++ b/hosts/Quark/smb.nix @@ -0,0 +1,47 @@ +{ ... }: +{ +services.samba = { + enable = true; + openFirewall = true; + settings = { + global = { + "workgroup" = "WORKGROUP"; + "server string" = "Qwark"; + "netbios name" = "qwark"; + "security" = "user"; + #"use sendfile" = "yes"; + #"max protocol" = "smb2"; + # note: localhost is the ipv6 localhost ::1 + "hosts allow" = "192.168.0. 127.0.0.1 localhost 192.168.122.2"; + "hosts deny" = "0.0.0.0/0"; + "guest account" = "nobody"; + "map to guest" = "bad user"; + }; + "private" = { + "path" = "/vol/dad"; + "browseable" = "yes"; + "read only" = "no"; + "guest ok" = "no"; + "create mask" = "0644"; + "directory mask" = "0755"; + "force user" = "yaroslav"; + "force group" = "users"; + }; + }; +}; + +services.samba-wsdd = { + enable = true; + openFirewall = true; +}; + +services.avahi = { + publish.enable = true; + publish.userServices = true; + # ^^ Needed to allow samba to automatically register mDNS records (without the need for an `extraServiceFile` + nssmdns4 = true; + # ^^ Not one hundred percent sure if this is needed- if it aint broke, don't fix it + enable = true; + openFirewall = true; +}; +} From 3ba37001634876acb0ecb9d4b8ccbaac36af74a9 Mon Sep 17 00:00:00 2001 From: yaroslav Date: Wed, 11 Jun 2025 01:18:04 +0300 Subject: [PATCH 08/12] added Quark's sound --- flake.nix | 1 + hosts/Quark/Quark-hardware.nix | 12 ++++++++++++ hosts/Quark/smb.nix | 22 +++++++++++++++++++++- hosts/Quark/sound.nix | 12 ++++++++++++ 4 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 hosts/Quark/sound.nix diff --git a/flake.nix b/flake.nix index 481dbe0..339ac05 100644 --- a/flake.nix +++ b/flake.nix @@ -92,6 +92,7 @@ ./hosts/generic/users.nix ./hosts/Quark/Quark-hardware.nix ./hosts/Quark/smb.nix + ./hosts/Quark/sound.nix ./hosts/generic/virtualization.nix # hm-stable.nixosModules.home-manager { # home-manager.useUserPackages = true; diff --git a/hosts/Quark/Quark-hardware.nix b/hosts/Quark/Quark-hardware.nix index bf60db3..2159b19 100644 --- a/hosts/Quark/Quark-hardware.nix +++ b/hosts/Quark/Quark-hardware.nix @@ -34,6 +34,18 @@ fsType = "btrfs"; options = [ "subvol=@nix" ]; }; + fileSystems."/vol/me" = { + device = "/dev/sda1"; + fsType = "ntfs"; + }; + fileSystems."/vol/dad" = { + device = "/dev/sda2"; + fsType = "ntfs"; + }; + fileSystems."/vol/mom" = { + device = "/dev/sda3"; + fsType = "ntfs"; + }; # 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 diff --git a/hosts/Quark/smb.nix b/hosts/Quark/smb.nix index 5794948..9620ce5 100644 --- a/hosts/Quark/smb.nix +++ b/hosts/Quark/smb.nix @@ -17,7 +17,7 @@ services.samba = { "guest account" = "nobody"; "map to guest" = "bad user"; }; - "private" = { + "dad" = { "path" = "/vol/dad"; "browseable" = "yes"; "read only" = "no"; @@ -27,6 +27,26 @@ services.samba = { "force user" = "yaroslav"; "force group" = "users"; }; + "mom" = { + "path" = "/vol/mom"; + "browseable" = "yes"; + "read only" = "no"; + "guest ok" = "no"; + "create mask" = "0644"; + "directory mask" = "0755"; + "force user" = "yaroslav"; + "force group" = "users"; + }; + "me" = { + "path" = "/vol/me"; + "browseable" = "yes"; + "read only" = "no"; + "guest ok" = "no"; + "create mask" = "0644"; + "directory mask" = "0755"; + "force user" = "yaroslav"; + "force group" = "users"; + }; }; }; diff --git a/hosts/Quark/sound.nix b/hosts/Quark/sound.nix new file mode 100644 index 0000000..6b6c83e --- /dev/null +++ b/hosts/Quark/sound.nix @@ -0,0 +1,12 @@ +{ ... }: +{ + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + # If you want to use JACK applications, uncomment this + jack.enable = true; + }; +} From d0286e99e0b536889b254de6a46ba5f5c5ba886f Mon Sep 17 00:00:00 2001 From: yaroslav Date: Wed, 11 Jun 2025 08:49:51 +0300 Subject: [PATCH 09/12] added cinnamon desktop --- desktop/cinnamon.nix | 5 +++++ flake.nix | 1 + hosts/Quark/sound.nix | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 desktop/cinnamon.nix diff --git a/desktop/cinnamon.nix b/desktop/cinnamon.nix new file mode 100644 index 0000000..96b2186 --- /dev/null +++ b/desktop/cinnamon.nix @@ -0,0 +1,5 @@ +{ ... }: +{ + services.desktopManager.cinnamon.enable; + +} diff --git a/flake.nix b/flake.nix index 339ac05..1509f31 100644 --- a/flake.nix +++ b/flake.nix @@ -94,6 +94,7 @@ ./hosts/Quark/smb.nix ./hosts/Quark/sound.nix ./hosts/generic/virtualization.nix + ./desktop/cinnamon.nix # hm-stable.nixosModules.home-manager { # home-manager.useUserPackages = true; # home-manager.users.yaroslav = { diff --git a/hosts/Quark/sound.nix b/hosts/Quark/sound.nix index 6b6c83e..cd5ad85 100644 --- a/hosts/Quark/sound.nix +++ b/hosts/Quark/sound.nix @@ -1,6 +1,6 @@ { ... }: { - security.rtkit.enable = true; +# security.rtkit.enable = true; services.pipewire = { enable = true; alsa.enable = true; From 13fd0a09c0c2fff061c541a807809f0e4aaf96b5 Mon Sep 17 00:00:00 2001 From: yaroslav Date: Wed, 11 Jun 2025 23:29:25 +0300 Subject: [PATCH 10/12] misc update --- flake.nix | 1 + home/yaroslav/Aphelion/mpd.nix | 5 +++++ hosts/Aphelion/sunshine.nix | 1 + 3 files changed, 7 insertions(+) diff --git a/flake.nix b/flake.nix index 339ac05..af4d6d7 100644 --- a/flake.nix +++ b/flake.nix @@ -69,6 +69,7 @@ ./hosts/Aphelion/nvidia.nix ./hosts/Aphelion/sunshine.nix ./hosts/Aphelion/nfs.nix + ./misc/disable_suspend.nix ./desktop/gnome.nix ./home/yaroslav/steam.nix home-manager.nixosModules.home-manager diff --git a/home/yaroslav/Aphelion/mpd.nix b/home/yaroslav/Aphelion/mpd.nix index 6517c77..d5f7bf6 100644 --- a/home/yaroslav/Aphelion/mpd.nix +++ b/home/yaroslav/Aphelion/mpd.nix @@ -9,6 +9,11 @@ type "pipewire" name "PipeWire Sound Server" } + audio_output { + type "pulse" + name "Qwark pulseuadio" + server "192.168.1.94" + } ''; }; } diff --git a/hosts/Aphelion/sunshine.nix b/hosts/Aphelion/sunshine.nix index edd8eaa..418498d 100644 --- a/hosts/Aphelion/sunshine.nix +++ b/hosts/Aphelion/sunshine.nix @@ -6,4 +6,5 @@ capSysAdmin = true; openFirewall = true; }; + programs.noisetorch.enable = true; } From 7060c03f10652ef377a4de192e42a9631af3a3e0 Mon Sep 17 00:00:00 2001 From: yaroslav Date: Thu, 12 Jun 2025 11:42:51 +0300 Subject: [PATCH 11/12] Various qwark updates --- desktop/cinnamon.nix | 3 +-- flake.lock | 22 ++++++++++++++++++++++ flake.nix | 28 ++++++++++++++-------------- hosts/Quark/Quark-hardware.nix | 4 +++- 4 files changed, 40 insertions(+), 17 deletions(-) diff --git a/desktop/cinnamon.nix b/desktop/cinnamon.nix index 96b2186..b7d1819 100644 --- a/desktop/cinnamon.nix +++ b/desktop/cinnamon.nix @@ -1,5 +1,4 @@ { ... }: { - services.desktopManager.cinnamon.enable; - + services.xserver.desktopManager.xfce.enable = true; } diff --git a/flake.lock b/flake.lock index 20f332b..a20f03a 100644 --- a/flake.lock +++ b/flake.lock @@ -17,6 +17,27 @@ "type": "indirect" } }, + "hm-stable": { + "inputs": { + "nixpkgs": [ + "nixpkgs-stable" + ] + }, + "locked": { + "lastModified": 1749154018, + "narHash": "sha256-gjN3j7joRvT3a8Zgcylnd4NFsnXeDBumqiu4HmY1RIg=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "7aae0ee71a17b19708b93b3ed448a1a0952bf111", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "release-25.05", + "repo": "home-manager", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -119,6 +140,7 @@ }, "root": { "inputs": { + "hm-stable": "hm-stable", "home-manager": "home-manager", "impermanence": "impermanence", "nixpkgs-stable": "nixpkgs-stable", diff --git a/flake.nix b/flake.nix index 1509f31..a55ad9d 100644 --- a/flake.nix +++ b/flake.nix @@ -14,14 +14,14 @@ url = "github:nix-community/home-manager/master"; inputs.nixpkgs.follows = "nixpkgs-unstable"; }; -# hm-stable = { -# url = "github:nix-community/home-manager/release-25.05"; -# inputs.nixpkgs-stable.follows = "nixpkgs"; -# }; + hm-stable = { + url = "github:nix-community/home-manager/release-25.05"; + inputs.nixpkgs.follows = "nixpkgs-stable"; + }; zapret.url = "github:n0vvvonder/zapret-flake.nix"; }; - outputs = { self, nixpkgs-unstable, impermanence, home-manager, zapret, nixpkgs-stable, ...}@inputs: { + outputs = { self, nixpkgs-unstable, impermanence, home-manager, zapret, nixpkgs-stable, hm-stable, ...}@inputs: { nixosConfigurations = { Ratchet = nixpkgs-unstable.lib.nixosSystem { system = "x86_64-linux"; @@ -83,7 +83,7 @@ } ]; }; - Quark = nixpkgs-stable.lib.nixosSystem { + Qwark = nixpkgs-stable.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { inherit inputs; }; modules = [ @@ -95,14 +95,14 @@ ./hosts/Quark/sound.nix ./hosts/generic/virtualization.nix ./desktop/cinnamon.nix - # hm-stable.nixosModules.home-manager { - # home-manager.useUserPackages = true; - # home-manager.users.yaroslav = { - # imports = [ - # ./home/yaroslav/home.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 index 2159b19..24a089b 100644 --- a/hosts/Quark/Quark-hardware.nix +++ b/hosts/Quark/Quark-hardware.nix @@ -55,7 +55,9 @@ #boot.initrd.network.flushBeforeStage2 = false; # networking.interfaces.enp3s0.useDHCP = lib.mkDefault true; # networking.interfaces.enp5s0.useDHCP = lib.mkDefault true; - + networking.firewall.allowedTCPPorts = [ 4713 ]; + networking.hostName = "Qwark"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + system.stateVersion = "25.05"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } From 337e7411c0c2498995104629eee7c89750b89092 Mon Sep 17 00:00:00 2001 From: yaroslav Date: Thu, 12 Jun 2025 12:01:29 +0300 Subject: [PATCH 12/12] fixed Qwark mounts --- hosts/Quark/Quark-hardware.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hosts/Quark/Quark-hardware.nix b/hosts/Quark/Quark-hardware.nix index 24a089b..6c163d7 100644 --- a/hosts/Quark/Quark-hardware.nix +++ b/hosts/Quark/Quark-hardware.nix @@ -36,15 +36,15 @@ }; fileSystems."/vol/me" = { device = "/dev/sda1"; - fsType = "ntfs"; + fsType = "ntfs3"; }; fileSystems."/vol/dad" = { device = "/dev/sda2"; - fsType = "ntfs"; + fsType = "ntfs3"; }; fileSystems."/vol/mom" = { device = "/dev/sda3"; - fsType = "ntfs"; + fsType = "ntfs3"; }; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking