This commit is contained in:
dusk 2022-07-30 03:04:32 +03:00
parent bc3d6c9b5f
commit 7e3af14204
Signed by: dusk
GPG Key ID: 1D8F8FAF2294D6EA
8 changed files with 46 additions and 25 deletions

View File

@ -135,11 +135,11 @@
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay"
}, },
"locked": { "locked": {
"lastModified": 1657470464, "lastModified": 1659072681,
"narHash": "sha256-eMA+/7XzUJpCuDJZRPc/0OMWA6CNisDLSZh3bFYCybo=", "narHash": "sha256-vvdQHhnJIxrIh8phbJRM/h8GgZBXj7Lc9yK05t52yCg=",
"owner": "helix-editor", "owner": "helix-editor",
"repo": "helix", "repo": "helix",
"rev": "0cb0c306183be94b9d42c3fae22b805850f87584", "rev": "a8b123fe177d8cd7f5a610a0a50c16c9f64069bd",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -4,11 +4,9 @@
pkgs, pkgs,
inputs, inputs,
... ...
}: }: let
let
byLabel = label: "/dev/disk/by-label/${label}"; byLabel = label: "/dev/disk/by-label/${label}";
in in {
{
imports = with inputs; imports = with inputs;
with nixos-hardware.nixosModules; [ with nixos-hardware.nixosModules; [
nixpkgs.nixosModules.notDetected nixpkgs.nixosModules.notDetected
@ -124,20 +122,19 @@ in
libva libva
vulkan-loader vulkan-loader
]; ];
extraPackages32 = with pkgs.pkgsi686Linux; extraPackages32 = with pkgs.pkgsi686Linux; [
[ libvdpau-va-gl
libvdpau-va-gl vaapiVdpau
vaapiVdpau libva
libva vulkan-loader
vulkan-loader ];
];
}; };
pulseaudio = { pulseaudio = {
enable = false; enable = false;
support32Bit = true; support32Bit = true;
}; };
}; };
programs.light.enable = true; programs.light.enable = true;
fonts = { fonts = {
@ -150,7 +147,14 @@ in
systemPackages = [pkgs.ntfs3g]; systemPackages = [pkgs.ntfs3g];
pathsToLink = ["/share/zsh"]; pathsToLink = ["/share/zsh"];
persistence."${config.system.persistDir}" = { persistence."${config.system.persistDir}" = {
directories = ["/etc/nixos"]; directories = lib.flatten [
"/etc/nixos"
(
lib.optional
config.virtualisation.docker.enable
["/var/lib/docker" "/var/lib/containers"]
)
];
files = ["/etc/machine-id"]; files = ["/etc/machine-id"];
}; };
}; };
@ -170,6 +174,7 @@ in
virtualisation = { virtualisation = {
waydroid.enable = false; waydroid.enable = false;
podman.enable = false; podman.enable = false;
docker.enable = true;
libvirtd.enable = false; libvirtd.enable = false;
}; };

View File

@ -10,6 +10,7 @@
home.sessionVariables = {inherit (config.environment.sessionVariables) NIX_PATH;}; home.sessionVariables = {inherit (config.environment.sessionVariables) NIX_PATH;};
xdg.configFile."nix/registry.json".text = config.environment.etc."nix/registry.json".text; xdg.configFile."nix/registry.json".text = config.environment.etc."nix/registry.json".text;
xdg.configFile."nix/nix.conf".source = config.environment.etc."nix/nix.conf".source; xdg.configFile."nix/nix.conf".source = config.environment.etc."nix/nix.conf".source;
xdg.configFile."nix/netrc".source = config.environment.etc."nix/netrc".source;
} }
]; ];
home-manager.extraSpecialArgs = {inherit inputs;}; home-manager.extraSpecialArgs = {inherit inputs;};

View File

@ -2,6 +2,7 @@
pkgs, pkgs,
lib, lib,
inputs, inputs,
config,
... ...
}: { }: {
nix = { nix = {
@ -19,6 +20,7 @@
fallback = true fallback = true
extra-experimental-features = nix-command flakes extra-experimental-features = nix-command flakes
builders-use-substitutes = true builders-use-substitutes = true
netrc-file = /etc/nix/netrc
''; '';
nixPath = ["nixpkgs=${inputs.nixpkgs}" "home-manager=${inputs.home}"]; nixPath = ["nixpkgs=${inputs.nixpkgs}" "home-manager=${inputs.home}"];
}; };
@ -28,4 +30,7 @@
trusted-users = ["root" "@wheel"]; trusted-users = ["root" "@wheel"];
auto-optimise-store = true; auto-optimise-store = true;
}; };
environment.etc."nix/netrc".text = ''
machine private-ardanalabs.cachix.org password ${config.environment.sessionVariables.CACHIX_AUTH_TOKEN}
'';
} }

View File

@ -1,3 +1,8 @@
{inputs}: final: prev: { {inputs}: final: prev: {
helix = inputs.helix.packages.${prev.system}.default; helix = inputs.helix.packages.${prev.system}.default.override {
includeGrammarIf = grammar:
prev.lib.any
(name: grammar.name == name)
["toml" "rust" "nix" "protobuf" "yaml" "json" "markdown"];
};
} }

View File

@ -1,9 +1,9 @@
final: prev: { final: prev: {
steam = prev.steam.override { steam = prev.steam.override {
extraLibraries = pkgs: with pkgs; [mimalloc pipewire vulkan-loader wayland wayland-protocols]; extraLibraries = pkgs: with pkgs; [mimalloc pipewire vulkan-loader wayland wayland-protocols];
extraProfile = '' # extraProfile = ''
unset VK_ICD_FILENAMES # unset VK_ICD_FILENAMES
export VK_ICD_FILENAMES="/run/opengl-driver/share/vulkan/icd.d:/run/opengl-driver-32/share/vulkan/icd.d" # export VK_ICD_FILENAMES="/run/opengl-driver/share/vulkan/icd.d:/run/opengl-driver-32/share/vulkan/icd.d"
''; # '';
}; };
} }

Binary file not shown.

View File

@ -21,17 +21,23 @@ in {
isNormalUser = true; isNormalUser = true;
createHome = true; createHome = true;
home = "/home/patriot"; home = "/home/patriot";
extraGroups = [ extraGroups = l.flatten [
"wheel" "wheel"
"adbusers" "adbusers"
"dialout" "dialout"
"video" "video"
(l.optional nixosConfig.virtualisation.docker.enable "docker")
]; ];
shell = pkgs.zsh; shell = pkgs.zsh;
hashedPassword = "$6$spzqhAyJfhHy$iHgLBlhjGn1l8PnbjJdWTn1GPvcjMqYNKUzdCe/7IrX6sHNgETSr/Nfpdmq9FCXLhrAfwHOd/q/8SvfeIeNX4/"; hashedPassword = "$6$spzqhAyJfhHy$iHgLBlhjGn1l8PnbjJdWTn1GPvcjMqYNKUzdCe/7IrX6sHNgETSr/Nfpdmq9FCXLhrAfwHOd/q/8SvfeIeNX4/";
}; };
environment = { environment = {
persistence.${config.system.persistDir}.directories = ["/home/patriot/.local/share/Steam"]; persistence.${config.system.persistDir}.directories = l.flatten [
(lib.optional nixosConfig.programs.steam.enable "/home/patriot/.local/share/Steam")
"/home/patriot/.cargo"
"/home/patriot/proj"
"/home/patriot/games"
];
systemPackages = [pkgs.qt5.qtwayland]; systemPackages = [pkgs.qt5.qtwayland];
shells = with pkgs; [bashInteractive zsh]; shells = with pkgs; [bashInteractive zsh];
}; };
@ -100,7 +106,6 @@ in {
directories = directories =
l.flatten [ l.flatten [
"Downloads" "Downloads"
"proj"
# "smos" # "smos"
".wine" ".wine"
# ssh / gpg / keys # ssh / gpg / keys
@ -109,7 +114,6 @@ in {
"keys" "keys"
# caches / history stuff # caches / history stuff
".directory_history" ".directory_history"
".cargo"
".cache" ".cache"
] ]
++ mkPaths ".local/share" [ ++ mkPaths ".local/share" [
@ -179,6 +183,7 @@ in {
discord-open-asar discord-open-asar
gamescope gamescope
protontricks protontricks
genymotion
]; ];
shellAliases = shellAliases =
nixosConfig.environment.shellAliases nixosConfig.environment.shellAliases