Compare commits
17 commits
d8c069b83b
...
7844d4f376
Author | SHA1 | Date | |
---|---|---|---|
7844d4f376 | |||
b4f2f69598 | |||
ef4d27f82c | |||
6fdc07c9eb | |||
f1d33ca40f | |||
4c8cd6c858 | |||
544c431454 | |||
50f0e4e3b5 | |||
1724c37cb5 | |||
bef194d211 | |||
2df02b5ebb | |||
ac75980139 | |||
b3624aacf4 | |||
27a3ec825e | |||
0247eba923 | |||
53afc745e7 | |||
7a2bbca728 |
13 changed files with 60 additions and 27 deletions
|
@ -15,8 +15,8 @@ in
|
|||
{
|
||||
imports = getModules ./.;
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nixpkgs.overlays = [ self.overlays.default ];
|
||||
# nixpkgs.config.allowUnfree = true;
|
||||
# nixpkgs.overlays = [ self.overlays.default ];
|
||||
|
||||
snowhawk.user.enable = lib.mkDefault true;
|
||||
snowhawk.tmux.enable = lib.mkDefault true;
|
||||
|
|
17
home/modules/direnv.nix
Normal file
17
home/modules/direnv.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ lib, config, ... }:
|
||||
|
||||
let
|
||||
cfg = config.snowhawk.direnv;
|
||||
in
|
||||
{
|
||||
options.snowhawk.direnv = {
|
||||
enable = lib.mkEnableOption "direnv home-manager module";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -3,6 +3,7 @@
|
|||
let
|
||||
cfg = config.snowhawk.git;
|
||||
macos = config.snowhawk.macos.enable;
|
||||
direnv = config.snowhawk.direnv.enable;
|
||||
|
||||
sshifyPushUrl =
|
||||
let
|
||||
|
@ -35,6 +36,8 @@ in
|
|||
ignores = [
|
||||
"Session.vim"
|
||||
(lib.mkIf macos ".DS_Store")
|
||||
(lib.mkIf direnv ".direnv/")
|
||||
(lib.mkIf direnv ".envrc")
|
||||
];
|
||||
|
||||
aliases = {
|
||||
|
|
|
@ -36,6 +36,7 @@ in
|
|||
extraConfig = ''
|
||||
set-option -g renumber-windows on
|
||||
set-option -g focus-events on
|
||||
set-option -g terminal-features 'alacritty:RGB'
|
||||
|
||||
bind '"' split-window -v -c "#{pane_current_path}"
|
||||
bind % split-window -h -c "#{pane_current_path}"
|
||||
|
|
|
@ -19,6 +19,12 @@ in
|
|||
(writeShellScriptBin "iinact" ''
|
||||
${pkgs.brave}/bin/brave --new-window "http://proxy.iinact.com/overlay/skyline/?OVERLAY_WS=ws://127.0.0.1:10501/ws"
|
||||
'')
|
||||
|
||||
# (lib.mkIf cfg.textools.enable pkgs.wrapWine {
|
||||
# # https://gist.github.com/helpful-fox-senko-san/6238143f5c7352ab44e62c5a0f7f7642
|
||||
# name = "textools";
|
||||
# tricks = [ "dotnet48" "dxvk" ];
|
||||
# })
|
||||
] ++ map (name: (writeShellScriptBin name launchffxiv)) [ "ff14" "xivlauncher" ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -128,7 +128,7 @@
|
|||
serviceConfig = {
|
||||
Type = "simple";
|
||||
RemainAfterExit = "true";
|
||||
ExecStart = "${pkgs.ethtool}/sbin/ethtool -s enp7s0 wol g";
|
||||
ExecStart = "${lib.getExe pkgs.ethtool} -s enp7s0 wol g";
|
||||
};
|
||||
wantedBy = [ "default.target" ];
|
||||
};
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
# Enable this if you have graphical corruption issues or application crashes after waking
|
||||
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
|
||||
# of just the bare essentials.
|
||||
powerManagement.enable = false;
|
||||
powerManagement.enable = true;
|
||||
|
||||
# Fine-grained power management. Turns off GPU when not in use.
|
||||
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
|
||||
|
|
|
@ -13,10 +13,10 @@ in
|
|||
package = neovim-package;
|
||||
};
|
||||
snowhawk = {
|
||||
direnv.enable = true;
|
||||
alacritty.enable = true;
|
||||
theme.enable = true;
|
||||
projects.enable = true;
|
||||
lazygit.enable = true;
|
||||
dunst.enable = true;
|
||||
sops.enable = true;
|
||||
defaultPrograms.enable = true;
|
||||
|
|
|
@ -1,12 +1,21 @@
|
|||
{ nixpkgs, self, ... }@inputs:
|
||||
|
||||
let
|
||||
lib = nixpkgs.lib.extend (import ../lib);
|
||||
makePkgs = system: (import nixpkgs {
|
||||
inherit system;
|
||||
|
||||
config.allowUnfree = true;
|
||||
overlays = [ self.overlays.default ];
|
||||
});
|
||||
|
||||
lib = nixpkgs.lib;
|
||||
# libExt = import ./. lib;
|
||||
|
||||
inherit (inputs.home-manager.lib) homeManagerConfiguration;
|
||||
inherit (nixpkgs.lib) nixosSystem;
|
||||
inherit (lib) nixosSystem;
|
||||
inherit (lib.strings) optionalString;
|
||||
inherit (lib.attrsets) nameValuePair;
|
||||
# inherit (libExt) right;
|
||||
in
|
||||
rec {
|
||||
toPartialNixosConfig =
|
||||
|
@ -14,8 +23,9 @@ rec {
|
|||
nameValuePair
|
||||
hostname
|
||||
(nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = { inherit inputs lib self; };
|
||||
pkgs = makePkgs system;
|
||||
specialArgs = { inherit inputs self; };
|
||||
|
||||
modules = [
|
||||
../hosts/${hostname}/hardware-configuration.nix
|
||||
../hosts/${hostname}/configuration.nix
|
||||
|
@ -24,10 +34,8 @@ rec {
|
|||
});
|
||||
compileSystems =
|
||||
systems:
|
||||
lib.right
|
||||
builtins.listToAttrs
|
||||
(map toPartialNixosConfig)
|
||||
systems;
|
||||
(builtins.listToAttrs
|
||||
(map toPartialNixosConfig systems));
|
||||
|
||||
toPartialHomeManagerConfig =
|
||||
{ user, system, hostname ? "", configHostname ? "" }:
|
||||
|
@ -39,11 +47,8 @@ rec {
|
|||
nameValuePair
|
||||
"${user}${hostStr}"
|
||||
(homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
extraSpecialArgs = {
|
||||
inherit inputs self;
|
||||
lib = lib.extend (_: _: inputs.home-manager.lib);
|
||||
};
|
||||
pkgs = makePkgs system;
|
||||
extraSpecialArgs = { inherit inputs self; };
|
||||
|
||||
modules = [
|
||||
../hosts/${configHost}/home.nix
|
||||
|
@ -51,8 +56,6 @@ rec {
|
|||
});
|
||||
compileHomes =
|
||||
systems:
|
||||
lib.right
|
||||
builtins.listToAttrs
|
||||
(map toPartialHomeManagerConfig)
|
||||
systems;
|
||||
(builtins.listToAttrs
|
||||
(map toPartialHomeManagerConfig systems));
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
final: prev:
|
||||
with prev;
|
||||
lib:
|
||||
rec {
|
||||
# Ternary operator
|
||||
# Exaample:
|
||||
|
@ -10,7 +9,7 @@ rec {
|
|||
# Right-associate and chain following single-operand functions
|
||||
# Example:
|
||||
# right f g h 1 => f(g(h(1)))
|
||||
right = f: g: tern (isFunction g)
|
||||
right = f: g: tern (lib.isFunction g)
|
||||
(right (x: f (g (x))))
|
||||
(f (g));
|
||||
}
|
||||
|
|
2
lib/overlay.nix
Normal file
2
lib/overlay.nix
Normal file
|
@ -0,0 +1,2 @@
|
|||
final: prev:
|
||||
(import ./. prev)
|
|
@ -14,5 +14,5 @@ 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;
|
||||
snowhawk.nixpkgs.enable = lib.mkDefault false;
|
||||
}
|
||||
|
|
|
@ -3,7 +3,9 @@ let
|
|||
callDefaultPackage = path: prev.callPackage path { };
|
||||
in
|
||||
{
|
||||
# lib = prev.lib.extend import ../lib/overlay.nix;
|
||||
|
||||
wrapWine = callDefaultPackage ./wrapWine;
|
||||
writeXrandrScriptBin = callDefaultPackage ./writeXrandrScriptBin;
|
||||
borderlessBrowser = callDefaultPackage ./writeXrandrScriptBin;
|
||||
borderlessBrowser = callDefaultPackage ./borderlessBrowser;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue