Compare commits
No commits in common. "5c3b9236533e3183159c8eee79e804a10793503e" and "c4e5b0141f4f8798002d086724c97fbcaec77fb9" have entirely different histories.
5c3b923653
...
c4e5b0141f
|
@ -59,7 +59,6 @@
|
|||
system = "x86_64-linux";
|
||||
}
|
||||
];
|
||||
|
||||
homeConfigurations =
|
||||
builders.compileHomes
|
||||
[
|
||||
|
@ -79,7 +78,5 @@
|
|||
system = "aarch64-darwin";
|
||||
}
|
||||
];
|
||||
|
||||
overlays.default = import ./pkgs;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ lib, self, ... }:
|
||||
{ lib, ... }:
|
||||
|
||||
let
|
||||
getModules = path:
|
||||
|
@ -16,7 +16,6 @@ in
|
|||
imports = getModules ./.;
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nixpkgs.overlays = [ self.overlays.default ];
|
||||
|
||||
snowhawk.user.enable = lib.mkDefault true;
|
||||
snowhawk.tmux.enable = lib.mkDefault true;
|
||||
|
|
|
@ -6,8 +6,6 @@ in
|
|||
{
|
||||
options.snowhawk.xivlauncher = {
|
||||
enable = lib.mkEnableOption "xivlauncher home-manager module";
|
||||
|
||||
textools.enable = lib.mkEnableOption "TexTools wine application";
|
||||
};
|
||||
|
||||
config =
|
||||
|
|
|
@ -100,6 +100,9 @@
|
|||
# backupFileExtension = "backup";
|
||||
};
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# programs.hyprland.enable = true;
|
||||
# environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running `nixos-help`).
|
||||
|
||||
{ pkgs, inputs, lib, config, self, ... }:
|
||||
{ pkgs, inputs, lib, config, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
|
@ -98,7 +98,7 @@
|
|||
security.polkit.enable = true;
|
||||
|
||||
home-manager = {
|
||||
extraSpecialArgs = { inherit inputs self; };
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
users = { "ravenshade" = import ./home.nix; };
|
||||
# backupFileExtension = "backup";
|
||||
};
|
||||
|
|
|
@ -102,6 +102,9 @@
|
|||
# backupFileExtension = "backup";
|
||||
};
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# programs.hyprland.enable = true;
|
||||
# environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ nixpkgs, self, ... }@inputs:
|
||||
{ nixpkgs, ... }@inputs:
|
||||
|
||||
let
|
||||
lib = nixpkgs.lib.extend (import ../lib);
|
||||
|
@ -15,7 +15,7 @@ rec {
|
|||
hostname
|
||||
(nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = { inherit inputs lib self; };
|
||||
specialArgs = { inherit inputs lib; };
|
||||
modules = [
|
||||
../hosts/${hostname}/hardware-configuration.nix
|
||||
../hosts/${hostname}/configuration.nix
|
||||
|
@ -39,9 +39,9 @@ rec {
|
|||
nameValuePair
|
||||
"${user}${hostStr}"
|
||||
(homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.${system}.extend self.overlays.default;
|
||||
pkgs = nixpkgs.legacyPackages."${system}";
|
||||
extraSpecialArgs = {
|
||||
inherit inputs self;
|
||||
inherit inputs;
|
||||
lib = lib.extend inputs.home-manager.lib;
|
||||
};
|
||||
|
||||
|
|
|
@ -14,5 +14,4 @@ in
|
|||
snowhawk.audio.enable = lib.mkDefault true;
|
||||
snowhawk.env.enable = lib.mkDefault true;
|
||||
snowhawk.sops.enable = lib.mkDefault true;
|
||||
snowhawk.nixpkgs.enable = lib.mkDefault true;
|
||||
}
|
||||
|
|
|
@ -13,5 +13,7 @@ in
|
|||
experimental-features = [ "nix-command" "flakes" ];
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
{ lib, config, self, ... }:
|
||||
|
||||
let
|
||||
cfg = config.snowhawk.nixpkgs;
|
||||
in
|
||||
{
|
||||
options.snowhawk.nixpkgs = {
|
||||
enable = lib.mkEnableOption "nixpkgs settings";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
nixpkgs.overlays = [ self.overlays.default ];
|
||||
};
|
||||
}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
final: prev:
|
||||
{
|
||||
wrapWine = prev.lib.callPackage ./wrapWine.nix { };
|
||||
}
|
|
@ -1,89 +0,0 @@
|
|||
# Yoink https://github.com/h4ckbs/lan-party-netboot/blob/master/wrapWine.nix
|
||||
|
||||
{ pkgs }:
|
||||
let
|
||||
inherit (builtins) length concatStringsSep;
|
||||
inherit (pkgs) lib cabextract writeShellScriptBin;
|
||||
inherit (lib) makeBinPath;
|
||||
in
|
||||
{ is64bits ? false
|
||||
, wine ? if is64bits then pkgs.wineWowPackages.stable else pkgs.wine
|
||||
, wineFlags ? ""
|
||||
, executable
|
||||
, chdir ? null
|
||||
, name
|
||||
, tricks ? [ ]
|
||||
, setupScript ? ""
|
||||
, firstrunScript ? ""
|
||||
, home ? ""
|
||||
}:
|
||||
let
|
||||
wineBin = "${wine}/bin/wine${if is64bits then "64" else ""}";
|
||||
requiredPackages = [
|
||||
wine
|
||||
cabextract
|
||||
];
|
||||
WINENIX_PROFILES = "$HOME/WINENIX_PROFILES";
|
||||
PATH = makeBinPath requiredPackages;
|
||||
NAME = name;
|
||||
HOME =
|
||||
if home == ""
|
||||
then "${WINENIX_PROFILES}/${name}"
|
||||
else home;
|
||||
WINEARCH =
|
||||
if is64bits
|
||||
then "win64"
|
||||
else "win32";
|
||||
setupHook = ''
|
||||
${wine}/bin/wineboot
|
||||
'';
|
||||
tricksHook =
|
||||
if (length tricks) > 0 then
|
||||
let
|
||||
tricksStr = concatStringsSep " " tricks;
|
||||
tricksCmd = ''
|
||||
pushd $(mktemp -d)
|
||||
wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
|
||||
chmod +x winetricks
|
||||
./winetricks ${tricksStr}
|
||||
popd
|
||||
'';
|
||||
in
|
||||
tricksCmd
|
||||
else "";
|
||||
script = writeShellScriptBin name ''
|
||||
export APP_NAME="${NAME}"
|
||||
export WINEARCH=${WINEARCH}
|
||||
export WINE_NIX="$HOME/.wine-nix" # define antes de definir $HOME senão ele vai gravar na nova $HOME a .wine-nix
|
||||
export WINE_NIX_PROFILES="${WINENIX_PROFILES}"
|
||||
export PATH=$PATH:${PATH}
|
||||
export HOME="${HOME}"
|
||||
mkdir -p "$HOME"
|
||||
export WINEPREFIX="$WINE_NIX/${name}"
|
||||
export EXECUTABLE="${executable}"
|
||||
mkdir -p "$WINE_NIX" "$WINE_NIX_PROFILES"
|
||||
${setupScript}
|
||||
if [ ! -d "$WINEPREFIX" ] # if the prefix does not exist
|
||||
then
|
||||
${setupHook}
|
||||
# ${wineBin} cmd /c dir > /dev/null 2> /dev/null # initialize prefix
|
||||
wineserver -w
|
||||
${tricksHook}
|
||||
rm "$WINEPREFIX/drive_c/users/$USER" -rf
|
||||
ln -s "$HOME" "$WINEPREFIX/drive_c/users/$USER"
|
||||
${firstrunScript}
|
||||
fi
|
||||
${if chdir != null
|
||||
then ''cd "${chdir}"''
|
||||
else ""}
|
||||
if [ ! "$REPL" == "" ]; # if $REPL is setup then start a shell in the context
|
||||
then
|
||||
bash
|
||||
exit 0
|
||||
fi
|
||||
|
||||
${wineBin} ${wineFlags} "$EXECUTABLE" "$@"
|
||||
wineserver -w
|
||||
'';
|
||||
in
|
||||
script
|
Loading…
Reference in New Issue