flake: format everything using alejandra
This commit is contained in:
parent
811c92adb6
commit
98dbc82d27
117 changed files with 843 additions and 1024 deletions
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
./dns.nix
|
./dns.nix
|
||||||
./proxy.nix
|
./proxy.nix
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
# please configure `networking.knownNetworkServices` in ../hosts/your-machine.nix
|
# please configure `networking.knownNetworkServices` in ../hosts/your-machine.nix
|
||||||
networking.dns = [
|
networking.dns = [
|
||||||
"223.5.5.5"
|
"223.5.5.5"
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
./flake.nix
|
./flake.nix
|
||||||
./nix.nix
|
./nix.nix
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
# Enable Flakes
|
# Enable Flakes
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
nix = {
|
nix = {
|
||||||
### Auto hard linking
|
### Auto hard linking
|
||||||
settings.auto-optimise-store = true;
|
settings.auto-optimise-store = true;
|
||||||
|
|
|
@ -1,13 +1,11 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
|
|
||||||
{
|
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
trusted-users = [ "@admin" ];
|
trusted-users = ["@admin"];
|
||||||
substituters = [
|
substituters = [
|
||||||
"https://mirrors.ustc.edu.cn/nix-channels/store" # USTC - 中国科学技术大学 Mirror
|
"https://mirrors.ustc.edu.cn/nix-channels/store" # USTC - 中国科学技术大学 Mirror
|
||||||
"https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store" # TUNA - 清华大学 Mirror
|
"https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store" # TUNA - 清华大学 Mirror
|
||||||
"https://mirrors.bfsu.edu.cn/nix-channels/store" # BFSU - 北京外国语大学 Mirror
|
"https://mirrors.bfsu.edu.cn/nix-channels/store" # BFSU - 北京外国语大学 Mirror
|
||||||
"https://mirror.sjtu.edu.cn/nix-channels/store" # SJTU - 上海交通大学 Mirror
|
"https://mirror.sjtu.edu.cn/nix-channels/store" # SJTU - 上海交通大学 Mirror
|
||||||
|
|
||||||
"https://nix-community.cachix.org"
|
"https://nix-community.cachix.org"
|
||||||
"https://cache.garnix.io"
|
"https://cache.garnix.io"
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
|
|
||||||
{
|
|
||||||
# List packages installed in system profile. To search by name, run:
|
# List packages installed in system profile. To search by name, run:
|
||||||
# $ nix-env -qaP | grep wget
|
# $ nix-env -qaP | grep wget
|
||||||
#environment.systemPackages = with pkgs; [
|
#environment.systemPackages = with pkgs; [
|
||||||
|
@ -9,7 +7,7 @@
|
||||||
#];
|
#];
|
||||||
|
|
||||||
# Create /etc/zshrc that loads the nix-darwin environment.
|
# Create /etc/zshrc that loads the nix-darwin environment.
|
||||||
programs.zsh.enable = true; # default shell on catalina
|
programs.zsh.enable = true; # default shell on catalina
|
||||||
programs.fish.enable = true;
|
programs.fish.enable = true;
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
|
@ -17,18 +15,18 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
enableScriptingAddition = true;
|
enableScriptingAddition = true;
|
||||||
config = {
|
config = {
|
||||||
layout = "bsp";
|
layout = "bsp";
|
||||||
mouse_modifier = "fn";
|
mouse_modifier = "fn";
|
||||||
|
|
||||||
# very broken on slow cpu
|
# very broken on slow cpu
|
||||||
#focus_follows_mouse = "autoraise";
|
#focus_follows_mouse = "autoraise";
|
||||||
#mouse_follows_focus = "on";
|
#mouse_follows_focus = "on";
|
||||||
|
|
||||||
top_padding = 10;
|
top_padding = 10;
|
||||||
bottom_padding = 10;
|
bottom_padding = 10;
|
||||||
left_padding = 10;
|
left_padding = 10;
|
||||||
right_padding = 10;
|
right_padding = 10;
|
||||||
window_gap = 4;
|
window_gap = 4;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
skhd = {
|
skhd = {
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
./core.nix
|
./core.nix
|
||||||
./fonts.nix
|
./fonts.nix
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
|
|
||||||
{
|
|
||||||
fonts.fonts = with pkgs; [
|
fonts.fonts = with pkgs; [
|
||||||
(nerdfonts.override { fonts = [ "FiraCode" "JetBrainsMono" ]; })
|
(nerdfonts.override {fonts = ["FiraCode" "JetBrainsMono"];})
|
||||||
];
|
];
|
||||||
}
|
}
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
homebrew = {
|
homebrew = {
|
||||||
enable = true;
|
enable = true;
|
||||||
brews = [
|
brews = [
|
||||||
|
@ -13,7 +11,7 @@
|
||||||
#"vscodium"
|
#"vscodium"
|
||||||
|
|
||||||
"alt-tab"
|
"alt-tab"
|
||||||
"altserver"
|
"altserver"
|
||||||
"balenaetcher"
|
"balenaetcher"
|
||||||
#"clashx"
|
#"clashx"
|
||||||
"opencore-patcher"
|
"opencore-patcher"
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
{ lib, ... }:
|
{lib, ...}: {
|
||||||
|
|
||||||
{
|
|
||||||
# Allow unfree applications
|
# Allow unfree applications
|
||||||
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
|
nixpkgs.config.allowUnfreePredicate = pkg:
|
||||||
"spotify"
|
builtins.elem (lib.getName pkg) [
|
||||||
"keka"
|
"spotify"
|
||||||
];
|
"keka"
|
||||||
|
];
|
||||||
}
|
}
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
./networking
|
./networking
|
||||||
./nix
|
./nix
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
homebrew.casks = [
|
homebrew.casks = [
|
||||||
"steam"
|
"steam"
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
./system.nix
|
./system.nix
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
system.defaults = {
|
system.defaults = {
|
||||||
# Apple... Do I really have to change literally
|
# Apple... Do I really have to change literally
|
||||||
# every setting in macOS to make it actually usable.
|
# every setting in macOS to make it actually usable.
|
||||||
|
@ -23,9 +21,9 @@
|
||||||
AppleShowAllExtensions = true;
|
AppleShowAllExtensions = true;
|
||||||
AppleShowAllFiles = true;
|
AppleShowAllFiles = true;
|
||||||
CreateDesktop = false;
|
CreateDesktop = false;
|
||||||
FXDefaultSearchScope = "SCcf"; # "SCcf" = Current folder
|
FXDefaultSearchScope = "SCcf"; # "SCcf" = Current folder
|
||||||
FXEnableExtensionChangeWarning = false;
|
FXEnableExtensionChangeWarning = false;
|
||||||
FXPreferredViewStyle = "Nlsv"; # "icnv" = Icon view, "Nlsv" = List view, "clmv" = Column View, "Flwv" = Gallery View
|
FXPreferredViewStyle = "Nlsv"; # "icnv" = Icon view, "Nlsv" = List view, "clmv" = Column View, "Flwv" = Gallery View
|
||||||
QuitMenuItem = true;
|
QuitMenuItem = true;
|
||||||
ShowPathbar = true;
|
ShowPathbar = true;
|
||||||
ShowStatusBar = false;
|
ShowStatusBar = false;
|
||||||
|
@ -43,7 +41,7 @@
|
||||||
IsAnalog = false;
|
IsAnalog = false;
|
||||||
Show24Hour = false;
|
Show24Hour = false;
|
||||||
ShowAMPM = true;
|
ShowAMPM = true;
|
||||||
ShowDate = 0; # 0 = show, 1, 2 = don't show
|
ShowDate = 0; # 0 = show, 1, 2 = don't show
|
||||||
ShowDayOfMonth = true;
|
ShowDayOfMonth = true;
|
||||||
ShowDayOfWeek = true;
|
ShowDayOfWeek = true;
|
||||||
ShowSeconds = false;
|
ShowSeconds = false;
|
||||||
|
@ -55,25 +53,25 @@
|
||||||
"com.apple.mouse.tapBehavior" = 1;
|
"com.apple.mouse.tapBehavior" = 1;
|
||||||
"com.apple.sound.beep.feedback" = 0;
|
"com.apple.sound.beep.feedback" = 0;
|
||||||
"com.apple.springing.enabled" = true;
|
"com.apple.springing.enabled" = true;
|
||||||
"com.apple.swipescrolldirection" = true; # Natrual scrolling
|
"com.apple.swipescrolldirection" = true; # Natrual scrolling
|
||||||
"com.apple.trackpad.enableSecondaryClick" = true;
|
"com.apple.trackpad.enableSecondaryClick" = true;
|
||||||
"com.apple.trackpad.trackpadCornerClickBehavior" = null; # ??? "null or value 1 (singular enum)"
|
"com.apple.trackpad.trackpadCornerClickBehavior" = null; # ??? "null or value 1 (singular enum)"
|
||||||
#"com.apple.trackpad.scaling" = -1;
|
#"com.apple.trackpad.scaling" = -1;
|
||||||
_HIHideMenuBar = false;
|
_HIHideMenuBar = false;
|
||||||
AppleEnableMouseSwipeNavigateWithScrolls = true; # Magic Mouse
|
AppleEnableMouseSwipeNavigateWithScrolls = true; # Magic Mouse
|
||||||
AppleEnableSwipeNavigateWithScrolls = true; # Trackpad
|
AppleEnableSwipeNavigateWithScrolls = true; # Trackpad
|
||||||
AppleFontSmoothing = 1; # https://github.com/kevinSuttle/macOS-Defaults/issues/17#issuecomment-266633501
|
AppleFontSmoothing = 1; # https://github.com/kevinSuttle/macOS-Defaults/issues/17#issuecomment-266633501
|
||||||
AppleICUForce24HourTime = false;
|
AppleICUForce24HourTime = false;
|
||||||
AppleInterfaceStyle = "Dark"; # "null or value "Dark" (singular enum)"
|
AppleInterfaceStyle = "Dark"; # "null or value "Dark" (singular enum)"
|
||||||
AppleInterfaceStyleSwitchesAutomatically = false;
|
AppleInterfaceStyleSwitchesAutomatically = false;
|
||||||
AppleKeyboardUIMode = 3; # ??? "null or value 3 (singular enum)"
|
AppleKeyboardUIMode = 3; # ??? "null or value 3 (singular enum)"
|
||||||
AppleMeasurementUnits = "Centimeters"; # "null or one of "Centimeters", "Inches""
|
AppleMeasurementUnits = "Centimeters"; # "null or one of "Centimeters", "Inches""
|
||||||
ApplePressAndHoldEnabled = false; # https://stackoverflow.com/questions/33152551/how-can-i-disable-applepressandholdenabled-for-a-specific-application-repeat#33497193
|
ApplePressAndHoldEnabled = false; # https://stackoverflow.com/questions/33152551/how-can-i-disable-applepressandholdenabled-for-a-specific-application-repeat#33497193
|
||||||
AppleScrollerPagingBehavior = false;
|
AppleScrollerPagingBehavior = false;
|
||||||
#AppleShowAllExtensions = true; # Dupelicate?
|
#AppleShowAllExtensions = true; # Dupelicate?
|
||||||
#AppleShowAllFiles = true;
|
#AppleShowAllFiles = true;
|
||||||
AppleShowScrollBars = "Always";
|
AppleShowScrollBars = "Always";
|
||||||
AppleTemperatureUnit = "Celsius"; # "null or one of "Celsius", "Fahrenheit""
|
AppleTemperatureUnit = "Celsius"; # "null or one of "Celsius", "Fahrenheit""
|
||||||
#AppleWindowTabbingMode # ?
|
#AppleWindowTabbingMode # ?
|
||||||
InitialKeyRepeat = 32;
|
InitialKeyRepeat = 32;
|
||||||
KeyRepeat = 2;
|
KeyRepeat = 2;
|
||||||
|
@ -81,7 +79,7 @@
|
||||||
NSAutomaticDashSubstitutionEnabled = false;
|
NSAutomaticDashSubstitutionEnabled = false;
|
||||||
NSAutomaticPeriodSubstitutionEnabled = false;
|
NSAutomaticPeriodSubstitutionEnabled = false;
|
||||||
NSAutomaticQuoteSubstitutionEnabled = false;
|
NSAutomaticQuoteSubstitutionEnabled = false;
|
||||||
NSAutomaticSpellingCorrectionEnabled = false;
|
NSAutomaticSpellingCorrectionEnabled = false;
|
||||||
#NSAutomaticWindowAnimationsEnabled
|
#NSAutomaticWindowAnimationsEnabled
|
||||||
NSDisableAutomaticTermination = true;
|
NSDisableAutomaticTermination = true;
|
||||||
NSDocumentSaveNewDocumentsToCloud = false;
|
NSDocumentSaveNewDocumentsToCloud = false;
|
||||||
|
|
248
flake.lock
248
flake.lock
|
@ -5,7 +5,9 @@
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
],
|
||||||
"nvfetcher": "nvfetcher"
|
"nvfetcher": [
|
||||||
|
"nvfetcher"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1698697308,
|
"lastModified": 1698697308,
|
||||||
|
@ -24,16 +26,15 @@
|
||||||
"crane": {
|
"crane": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"lanzaboote",
|
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1698166613,
|
"lastModified": 1699030822,
|
||||||
"narHash": "sha256-y4rdN4flxRiROqNi1waMYIZj/Fs7L2OrszFk/1ry9vU=",
|
"narHash": "sha256-a25bCHvTPJfAvK3qLoi5uI2pvwnOYhMQLRpJYNEt55o=",
|
||||||
"owner": "ipetkov",
|
"owner": "ipetkov",
|
||||||
"repo": "crane",
|
"repo": "crane",
|
||||||
"rev": "b7db46f0f1751f7b1d1911f6be7daf568ad5bc65",
|
"rev": "2c89c36bffac32d8267e719f73b0d06e313ede30",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -63,22 +64,6 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-compat": {
|
"flake-compat": {
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1673956053,
|
|
||||||
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
|
|
||||||
"owner": "edolstra",
|
|
||||||
"repo": "flake-compat",
|
|
||||||
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "edolstra",
|
|
||||||
"repo": "flake-compat",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-compat_2": {
|
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1696426674,
|
"lastModified": 1696426674,
|
||||||
|
@ -97,16 +82,15 @@
|
||||||
"flake-parts": {
|
"flake-parts": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-lib": [
|
"nixpkgs-lib": [
|
||||||
"lanzaboote",
|
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1698579227,
|
"lastModified": 1698882062,
|
||||||
"narHash": "sha256-KVWjFZky+gRuWennKsbo6cWyo7c/z/VgCte5pR9pEKg=",
|
"narHash": "sha256-HkhafUayIqxXyHH1X8d9RDl1M2CkFgZLjKD3MzabiEo=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "flake-parts",
|
"repo": "flake-parts",
|
||||||
"rev": "f76e870d64779109e41370848074ac4eaa1606ec",
|
"rev": "8c9fa2545007b49a5db5f650ae91f227672c3877",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -117,25 +101,9 @@
|
||||||
},
|
},
|
||||||
"flake-utils": {
|
"flake-utils": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems"
|
"systems": [
|
||||||
},
|
"systems"
|
||||||
"locked": {
|
]
|
||||||
"lastModified": 1692799911,
|
|
||||||
"narHash": "sha256-3eihraek4qL744EvQXsK1Ha6C3CR7nnT8X2qWap4RNk=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"rev": "f9e7cf818399d17d347f847525c5a5a8032e4e44",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-utils_2": {
|
|
||||||
"inputs": {
|
|
||||||
"systems": "systems_3"
|
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1694529238,
|
"lastModified": 1694529238,
|
||||||
|
@ -154,17 +122,15 @@
|
||||||
"gitignore": {
|
"gitignore": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"lanzaboote",
|
|
||||||
"pre-commit-hooks-nix",
|
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1660459072,
|
"lastModified": 1694102001,
|
||||||
"narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=",
|
"narHash": "sha256-vky6VPK1n1od6vXbqzOXnekrQpTL4hbPAwUhT5J9c9E=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "gitignore.nix",
|
"repo": "gitignore.nix",
|
||||||
"rev": "a20de23b925fd8264fd7fad6454652e142fd7f73",
|
"rev": "9e21c80adf67ebcb077d75bd5e7d724d21eeafd6",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -215,13 +181,21 @@
|
||||||
},
|
},
|
||||||
"hyprland": {
|
"hyprland": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"hyprland-protocols": "hyprland-protocols",
|
"hyprland-protocols": [
|
||||||
|
"hyprland-protocols"
|
||||||
|
],
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
],
|
||||||
"systems": "systems_2",
|
"systems": [
|
||||||
"wlroots": "wlroots",
|
"systems"
|
||||||
"xdph": "xdph"
|
],
|
||||||
|
"wlroots": [
|
||||||
|
"wlroots"
|
||||||
|
],
|
||||||
|
"xdph": [
|
||||||
|
"xdph"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1698694605,
|
"lastModified": 1698694605,
|
||||||
|
@ -237,14 +211,32 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"hyprland-plugins": {
|
||||||
|
"inputs": {
|
||||||
|
"hyprland": [
|
||||||
|
"hyprland"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1699059248,
|
||||||
|
"narHash": "sha256-RjME4USbwF1lhC5spkHkLdM65kW39oG0zOyG5cjz4dc=",
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprland-plugins",
|
||||||
|
"rev": "874deb29807259d19da134af33bd44357a642493",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprland-plugins",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"hyprland-protocols": {
|
"hyprland-protocols": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"hyprland",
|
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
],
|
||||||
"systems": [
|
"systems": [
|
||||||
"hyprland",
|
|
||||||
"systems"
|
"systems"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -279,15 +271,27 @@
|
||||||
},
|
},
|
||||||
"lanzaboote": {
|
"lanzaboote": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"crane": "crane",
|
"crane": [
|
||||||
"flake-compat": "flake-compat_2",
|
"crane"
|
||||||
"flake-parts": "flake-parts",
|
],
|
||||||
"flake-utils": "flake-utils_2",
|
"flake-compat": [
|
||||||
|
"flake-compat"
|
||||||
|
],
|
||||||
|
"flake-parts": [
|
||||||
|
"flake-parts"
|
||||||
|
],
|
||||||
|
"flake-utils": [
|
||||||
|
"flake-utils"
|
||||||
|
],
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
],
|
||||||
"pre-commit-hooks-nix": "pre-commit-hooks-nix",
|
"pre-commit-hooks-nix": [
|
||||||
"rust-overlay": "rust-overlay"
|
"pre-commit-hooks-nix"
|
||||||
|
],
|
||||||
|
"rust-overlay": [
|
||||||
|
"rust-overlay"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1698669922,
|
"lastModified": 1698669922,
|
||||||
|
@ -358,11 +362,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs-stable": {
|
"nixpkgs-stable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1685801374,
|
"lastModified": 1698942558,
|
||||||
"narHash": "sha256-otaSUoFEMM+LjBI1XL/xGB5ao6IwnZOXc47qhIgJe8U=",
|
"narHash": "sha256-/UmnB+mEd6Eg3mJBrAgqRcyZX//RSjHphcCO7Ig9Bpk=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "c37ca420157f4abc31e26f436c1145f8951ff373",
|
"rev": "621f51253edffa1d6f08d5fce4f08614c852d17e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -372,28 +376,15 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-stable_2": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1698544399,
|
|
||||||
"narHash": "sha256-vhRmPyEyoPkrXF2iykBsWHA05MIaOSmMRLMF7Hul6+s=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "d87c5d8c41c9b3b39592563242f3a448b5cc4bc9",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "release-23.05",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nvfetcher": {
|
"nvfetcher": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": [
|
||||||
"flake-utils": "flake-utils",
|
"flake-compat"
|
||||||
|
],
|
||||||
|
"flake-utils": [
|
||||||
|
"flake-utils"
|
||||||
|
],
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"berberman",
|
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -414,26 +405,27 @@
|
||||||
"pre-commit-hooks-nix": {
|
"pre-commit-hooks-nix": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": [
|
"flake-compat": [
|
||||||
"lanzaboote",
|
|
||||||
"flake-compat"
|
"flake-compat"
|
||||||
],
|
],
|
||||||
"flake-utils": [
|
"flake-utils": [
|
||||||
"lanzaboote",
|
|
||||||
"flake-utils"
|
"flake-utils"
|
||||||
],
|
],
|
||||||
"gitignore": "gitignore",
|
"gitignore": [
|
||||||
|
"gitignore"
|
||||||
|
],
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"lanzaboote",
|
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
],
|
||||||
"nixpkgs-stable": "nixpkgs-stable"
|
"nixpkgs-stable": [
|
||||||
|
"nixpkgs-stable"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1698227354,
|
"lastModified": 1698852633,
|
||||||
"narHash": "sha256-Fi5H9jbaQLmLw9qBi/mkR33CoFjNbobo5xWdX4tKz1Q=",
|
"narHash": "sha256-Hsc/cCHud8ZXLvmm8pxrXpuaPEeNaaUttaCvtdX/Wug=",
|
||||||
"owner": "cachix",
|
"owner": "cachix",
|
||||||
"repo": "pre-commit-hooks.nix",
|
"repo": "pre-commit-hooks.nix",
|
||||||
"rev": "bd38df3d508dfcdff52cd243d297f218ed2257bf",
|
"rev": "dec10399e5b56aa95fcd530e0338be72ad6462a0",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -445,36 +437,48 @@
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"berberman": "berberman",
|
"berberman": "berberman",
|
||||||
|
"crane": "crane",
|
||||||
"disko": "disko",
|
"disko": "disko",
|
||||||
|
"flake-compat": "flake-compat",
|
||||||
|
"flake-parts": "flake-parts",
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"gitignore": "gitignore",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"hosts": "hosts",
|
"hosts": "hosts",
|
||||||
"hyprland": "hyprland",
|
"hyprland": "hyprland",
|
||||||
|
"hyprland-plugins": "hyprland-plugins",
|
||||||
|
"hyprland-protocols": "hyprland-protocols",
|
||||||
"impermanence": "impermanence",
|
"impermanence": "impermanence",
|
||||||
"lanzaboote": "lanzaboote",
|
"lanzaboote": "lanzaboote",
|
||||||
"metacubexd": "metacubexd",
|
"metacubexd": "metacubexd",
|
||||||
"nix-darwin": "nix-darwin",
|
"nix-darwin": "nix-darwin",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
|
"nixpkgs-stable": "nixpkgs-stable",
|
||||||
|
"nvfetcher": "nvfetcher",
|
||||||
|
"pre-commit-hooks-nix": "pre-commit-hooks-nix",
|
||||||
|
"rust-overlay": "rust-overlay",
|
||||||
"sops-nix": "sops-nix",
|
"sops-nix": "sops-nix",
|
||||||
"tokyonight": "tokyonight"
|
"systems": "systems",
|
||||||
|
"tokyonight": "tokyonight",
|
||||||
|
"wlroots": "wlroots",
|
||||||
|
"xdph": "xdph"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rust-overlay": {
|
"rust-overlay": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": [
|
"flake-utils": [
|
||||||
"lanzaboote",
|
|
||||||
"flake-utils"
|
"flake-utils"
|
||||||
],
|
],
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"lanzaboote",
|
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1698631970,
|
"lastModified": 1698977568,
|
||||||
"narHash": "sha256-uO+iqGslP1TdH0q3pMkpo6XHtzoEa6bjjF3dEQJSDcc=",
|
"narHash": "sha256-bnbCqPDFdOUcSANJv9Br3q/b1LyK9vyB1I7os5T4jXI=",
|
||||||
"owner": "oxalica",
|
"owner": "oxalica",
|
||||||
"repo": "rust-overlay",
|
"repo": "rust-overlay",
|
||||||
"rev": "44210df7a70dcf0a81a5919f9422b6ae589ee673",
|
"rev": "321affd863e3e4e669990a1db5fdabef98387b95",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -488,7 +492,9 @@
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
],
|
||||||
"nixpkgs-stable": "nixpkgs-stable_2"
|
"nixpkgs-stable": [
|
||||||
|
"nixpkgs-stable"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1698548647,
|
"lastModified": 1698548647,
|
||||||
|
@ -505,21 +511,6 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"systems": {
|
"systems": {
|
||||||
"locked": {
|
|
||||||
"lastModified": 1681028828,
|
|
||||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"systems_2": {
|
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1689347949,
|
"lastModified": 1689347949,
|
||||||
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
|
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
|
||||||
|
@ -534,21 +525,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"systems_3": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1681028828,
|
|
||||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"tokyonight": {
|
"tokyonight": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -569,42 +545,38 @@
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"host": "gitlab.freedesktop.org",
|
"host": "gitlab.freedesktop.org",
|
||||||
"lastModified": 1697909146,
|
"lastModified": 1698919268,
|
||||||
"narHash": "sha256-jU0I6FoCKnj4zIBL4daosFWh81U1fM719Z6cae8PxSY=",
|
"narHash": "sha256-MDKjcfKyQ4x3U3GnNiGPIUubHSLeQ4Nfp1BpeRkNTfI=",
|
||||||
"owner": "wlroots",
|
"owner": "wlroots",
|
||||||
"repo": "wlroots",
|
"repo": "wlroots",
|
||||||
"rev": "47bf87ade2bd32395615a385ebde1fefbcdf79a2",
|
"rev": "26eac25d7f7d25a5bfbeb308aa09de618a1384ef",
|
||||||
"type": "gitlab"
|
"type": "gitlab"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"host": "gitlab.freedesktop.org",
|
"host": "gitlab.freedesktop.org",
|
||||||
"owner": "wlroots",
|
"owner": "wlroots",
|
||||||
"repo": "wlroots",
|
"repo": "wlroots",
|
||||||
"rev": "47bf87ade2bd32395615a385ebde1fefbcdf79a2",
|
|
||||||
"type": "gitlab"
|
"type": "gitlab"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"xdph": {
|
"xdph": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"hyprland-protocols": [
|
"hyprland-protocols": [
|
||||||
"hyprland",
|
|
||||||
"hyprland-protocols"
|
"hyprland-protocols"
|
||||||
],
|
],
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"hyprland",
|
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
],
|
||||||
"systems": [
|
"systems": [
|
||||||
"hyprland",
|
|
||||||
"systems"
|
"systems"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1697981233,
|
"lastModified": 1699048835,
|
||||||
"narHash": "sha256-y8q4XUwx+gVK7i2eLjfR32lVo7TYvEslyzrmzYEaPZU=",
|
"narHash": "sha256-IKcRTKzlcDsbD5xydRNc9s4c4KjcQHaZgOc5kWPOAtU=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "xdg-desktop-portal-hyprland",
|
"repo": "xdg-desktop-portal-hyprland",
|
||||||
"rev": "22e7a65ff9633e1dedfa5317fdffc49f68de2ff2",
|
"rev": "081b36add935e5c099ae82d6a4db4f3740aad711",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
68
flake.nix
68
flake.nix
|
@ -58,7 +58,6 @@
|
||||||
inputs.nixpkgs-stable.follows = "nixpkgs-stable";
|
inputs.nixpkgs-stable.follows = "nixpkgs-stable";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
### De-dupe
|
### De-dupe
|
||||||
crane = {
|
crane = {
|
||||||
url = "github:ipetkov/crane";
|
url = "github:ipetkov/crane";
|
||||||
|
@ -119,9 +118,6 @@
|
||||||
inputs.systems.follows = "systems";
|
inputs.systems.follows = "systems";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# TODO: Unused, Soon(TM)
|
# TODO: Unused, Soon(TM)
|
||||||
#daeuniverse.url = "github:daeuniverse/flake.nix";
|
#daeuniverse.url = "github:daeuniverse/flake.nix";
|
||||||
#nixos-hardware = {
|
#nixos-hardware = {
|
||||||
|
@ -147,63 +143,66 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self,
|
outputs = {
|
||||||
nixpkgs,
|
self,
|
||||||
berberman,
|
nixpkgs,
|
||||||
disko,
|
berberman,
|
||||||
home-manager,
|
disko,
|
||||||
hosts,
|
home-manager,
|
||||||
hyprland,
|
hosts,
|
||||||
lanzaboote,
|
hyprland,
|
||||||
nix-darwin,
|
lanzaboote,
|
||||||
sops-nix,
|
nix-darwin,
|
||||||
impermanence,
|
sops-nix,
|
||||||
tokyonight,
|
impermanence,
|
||||||
metacubexd,
|
tokyonight,
|
||||||
... } @ inputs: {
|
metacubexd,
|
||||||
|
...
|
||||||
|
} @ inputs: {
|
||||||
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra;
|
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra;
|
||||||
|
|
||||||
### NixOS
|
### NixOS
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
"81FW-NixOS" = nixpkgs.lib.nixosSystem {
|
"81FW-NixOS" = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
specialArgs = { inherit inputs; };
|
specialArgs = {inherit inputs;};
|
||||||
modules = [
|
modules = [
|
||||||
./nixos/presets/desktop.nix # OS preset
|
# OS
|
||||||
./nixos/presets/core/no-bootloader-menu.nix # Addtional, opt-in OS preset(s)
|
./nixos/presets/desktop.nix
|
||||||
|
./nixos/presets/core/no-bootloader-menu.nix
|
||||||
./nixos/presets/desktop/gaming.nix
|
./nixos/presets/desktop/gaming.nix
|
||||||
./nixos/presets/desktop/virtualbox.nix
|
./nixos/presets/desktop/virtualbox.nix
|
||||||
./nixos/presets/desktop/wayland.nix
|
./nixos/presets/desktop/wayland.nix
|
||||||
|
|
||||||
./users/guanranwang/nixos/presets/desktop.nix # User preset
|
# User
|
||||||
./users/guanranwang/nixos/presets/core/clash-meta-client.nix # Addtional, opt-in user preset(s)
|
./users/guanranwang/nixos/presets/desktop.nix
|
||||||
|
./users/guanranwang/nixos/presets/core/clash-meta-client.nix
|
||||||
|
|
||||||
./machines/nixos/81fw-lenovo-legion-y7000 # Hardware
|
# Hardware
|
||||||
./machines/nixos/81fw-lenovo-legion-y7000/machine-1 # Machine
|
./machines/nixos/81fw-lenovo-legion-y7000
|
||||||
|
./machines/nixos/81fw-lenovo-legion-y7000/machine-1
|
||||||
|
|
||||||
{
|
{
|
||||||
# extra home-manager stuff
|
# extra home-manager stuff
|
||||||
home-manager.users.guanranwang = import ./users/guanranwang/home-manager/nixos/presets/desktop/gaming.nix;
|
home-manager.users.guanranwang = import ./users/guanranwang/home-manager/nixos/presets/desktop/gaming.nix;
|
||||||
|
|
||||||
networking.hostName = "81FW-NixOS"; # Hostname
|
networking.hostName = "81FW-NixOS"; # Hostname
|
||||||
time.timeZone = "Asia/Shanghai"; # Timezone
|
time.timeZone = "Asia/Shanghai"; # Timezone
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
### nix-darwin (macOS)
|
### nix-darwin (macOS)
|
||||||
darwinConfigurations = {
|
darwinConfigurations = {
|
||||||
"iMac-macOS" = nix-darwin.lib.darwinSystem {
|
"iMac-macOS" = nix-darwin.lib.darwinSystem {
|
||||||
system = "x86_64-darwin";
|
system = "x86_64-darwin";
|
||||||
specialArgs = { inherit inputs; };
|
specialArgs = {inherit inputs;};
|
||||||
modules = [
|
modules = [
|
||||||
./darwin/presets/desktop.nix # OS preset
|
./darwin/presets/desktop.nix
|
||||||
./users/guanranwang/darwin/presets/desktop.nix # User preset
|
./users/guanranwang/darwin/presets/desktop.nix
|
||||||
./users/guanranwang/darwin/presets/core/proxy.nix # Addtional user preset(s)
|
./users/guanranwang/darwin/presets/core/proxy.nix
|
||||||
./machines/darwin/imac-2017 # Hardware
|
./machines/darwin/imac-2017
|
||||||
|
|
||||||
{
|
{
|
||||||
#home-manager.users.guanranwang = import ./users/guanranwang/home-manager/darwin/presets/desktop/gaming.nix;
|
#home-manager.users.guanranwang = import ./users/guanranwang/home-manager/darwin/presets/desktop/gaming.nix;
|
||||||
|
@ -215,13 +214,12 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
### Home-Manager
|
### Home-Manager
|
||||||
# TODO: Actually figure out how this works
|
# TODO: Actually figure out how this works
|
||||||
homeConfigurations = {
|
homeConfigurations = {
|
||||||
"guanranwang@81fw-nixos" = home-manager.lib.homeManagerConfiguration {
|
"guanranwang@81fw-nixos" = home-manager.lib.homeManagerConfiguration {
|
||||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||||
extraSpecialArgs = { inherit inputs; };
|
extraSpecialArgs = {inherit inputs;};
|
||||||
modules = [
|
modules = [
|
||||||
sops-nix.homeManagerModules.sops
|
sops-nix.homeManagerModules.sops
|
||||||
hyprland.homeManagerModules.default
|
hyprland.homeManagerModules.default
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
{ inputs, ... }:
|
{inputs, ...}: {
|
||||||
|
imports = [inputs.home-manager.darwinModules.home-manager];
|
||||||
{
|
|
||||||
imports = [ inputs.home-manager.darwinModules.home-manager ];
|
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
extraSpecialArgs = { inherit inputs; }; # ??? isnt specialArgs imported by default ???
|
extraSpecialArgs = {inherit inputs;}; # ??? isnt specialArgs imported by default ???
|
||||||
};
|
};
|
||||||
}
|
}
|
|
@ -1,6 +1,4 @@
|
||||||
{ inputs, ... }:
|
{inputs, ...}: {
|
||||||
|
|
||||||
{
|
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
inputs.berberman.overlays.default
|
inputs.berberman.overlays.default
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
{ inputs, disks ? [ "/dev/vdb" ], ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ inputs.disko.nixosModules.disko ];
|
inputs,
|
||||||
|
disks ? ["/dev/sda"],
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [inputs.disko.nixosModules.disko];
|
||||||
|
|
||||||
disko.devices = {
|
disko.devices = {
|
||||||
disk = {
|
disk = {
|
||||||
|
@ -11,7 +13,7 @@
|
||||||
content = {
|
content = {
|
||||||
type = "gpt";
|
type = "gpt";
|
||||||
partitions = {
|
partitions = {
|
||||||
ESP = {
|
"ESP" = {
|
||||||
size = "2G";
|
size = "2G";
|
||||||
type = "EF00";
|
type = "EF00";
|
||||||
content = {
|
content = {
|
||||||
|
@ -19,17 +21,19 @@
|
||||||
format = "vfat";
|
format = "vfat";
|
||||||
mountpoint = "/boot";
|
mountpoint = "/boot";
|
||||||
mountOptions = [
|
mountOptions = [
|
||||||
"defaults" "fmask=0077" "dmask=0077"
|
"defaults"
|
||||||
|
"fmask=0077"
|
||||||
|
"dmask=0077"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
luks = {
|
"luks" = {
|
||||||
#size = "100%";
|
#size = "100%";
|
||||||
end = "-16G";
|
end = "-16G";
|
||||||
content = {
|
content = {
|
||||||
type = "luks";
|
type = "luks";
|
||||||
name = "crypted";
|
name = "crypted";
|
||||||
extraOpenArgs = [ "--allow-discards" ];
|
extraOpenArgs = ["--allow-discards"];
|
||||||
# if you want to use the key for interactive login be sure there is no trailing newline
|
# if you want to use the key for interactive login be sure there is no trailing newline
|
||||||
# for example use `echo -n "password" > /tmp/secret.key`
|
# for example use `echo -n "password" > /tmp/secret.key`
|
||||||
passwordFile = "/tmp/secret.key"; # Interactive
|
passwordFile = "/tmp/secret.key"; # Interactive
|
||||||
|
@ -37,22 +41,22 @@
|
||||||
#additionalKeyFiles = [ "/tmp/additionalSecret.key" ];
|
#additionalKeyFiles = [ "/tmp/additionalSecret.key" ];
|
||||||
content = {
|
content = {
|
||||||
type = "btrfs";
|
type = "btrfs";
|
||||||
extraArgs = [ "-f" ];
|
extraArgs = ["-f"];
|
||||||
mountpoint = "/btrfs";
|
mountpoint = "/btrfs";
|
||||||
subvolumes = {
|
subvolumes = {
|
||||||
"/@home" = {
|
"/@home" = {
|
||||||
mountpoint = "/home";
|
mountpoint = "/home";
|
||||||
mountOptions = [ "compress=zstd" "noatime" ];
|
mountOptions = ["compress=zstd" "noatime"];
|
||||||
};
|
};
|
||||||
"/@nix" = {
|
"/@nix" = {
|
||||||
mountpoint = "/nix";
|
mountpoint = "/nix";
|
||||||
mountOptions = [ "compress=zstd" "noatime" ];
|
mountOptions = ["compress=zstd" "noatime"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
swap = {
|
"swap" = {
|
||||||
size = "100%";
|
size = "100%";
|
||||||
content = {
|
content = {
|
||||||
type = "swap";
|
type = "swap";
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
{ inputs, ... }:
|
{inputs, ...}: {
|
||||||
|
imports = [inputs.home-manager.nixosModules.home-manager];
|
||||||
{
|
|
||||||
imports = [ inputs.home-manager.nixosModules.home-manager ];
|
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
extraSpecialArgs = { inherit inputs; }; # ??? isnt specialArgs imported by default ???
|
extraSpecialArgs = {inherit inputs;}; # ??? isnt specialArgs imported by default ???
|
||||||
};
|
};
|
||||||
}
|
}
|
|
@ -1,7 +1,5 @@
|
||||||
{ inputs, ... }:
|
{inputs, ...}: {
|
||||||
|
imports = [inputs.hosts.nixosModule];
|
||||||
{
|
|
||||||
imports = [ inputs.hosts.nixosModule ];
|
|
||||||
|
|
||||||
networking.stevenBlackHosts = {
|
networking.stevenBlackHosts = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
{ inputs, ... }:
|
{inputs, ...}: {
|
||||||
|
imports = [inputs.impermanence.nixosModules.impermanence];
|
||||||
{
|
|
||||||
imports = [ inputs.impermanence.nixosModules.impermanence ];
|
|
||||||
|
|
||||||
# this folder is where the files will be stored (don't put it in tmpfs)
|
# this folder is where the files will be stored (don't put it in tmpfs)
|
||||||
environment.persistence."/nix/persist/system" = {
|
environment.persistence."/nix/persist/system" = {
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
{ inputs, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ inputs.lanzaboote.nixosModules.lanzaboote ];
|
inputs,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [inputs.lanzaboote.nixosModules.lanzaboote];
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [ sbctl ];
|
environment.systemPackages = with pkgs; [sbctl];
|
||||||
boot.loader.systemd-boot.enable = false;
|
boot.loader.systemd-boot.enable = false;
|
||||||
boot.lanzaboote = {
|
boot.lanzaboote = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
{ inputs, ... }:
|
{inputs, ...}: {
|
||||||
|
imports = [inputs.sops-nix.nixosModules.sops];
|
||||||
{
|
|
||||||
imports = [ inputs.sops-nix.nixosModules.sops ];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
networking.knownNetworkServices = [
|
networking.knownNetworkServices = [
|
||||||
"Ethernet"
|
"Ethernet"
|
||||||
"Wi-Fi"
|
"Wi-Fi"
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{ lib, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
../hardware/misc/audio.nix
|
../hardware/misc/audio.nix
|
||||||
../hardware/misc/bluetooth.nix
|
../hardware/misc/bluetooth.nix
|
||||||
|
@ -13,7 +15,7 @@
|
||||||
(modulesPath + "/installer/scan/not-detected.nix") # what is this
|
(modulesPath + "/installer/scan/not-detected.nix") # what is this
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" ];
|
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid"];
|
||||||
services.fstrim.enable = true;
|
services.fstrim.enable = true;
|
||||||
|
|
||||||
# Nvidia PRIME
|
# Nvidia PRIME
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
../../../../flakes/nixos/lanzaboote.nix
|
../../../../flakes/nixos/lanzaboote.nix
|
||||||
../../../../flakes/nixos/impermanence.nix
|
../../../../flakes/nixos/impermanence.nix
|
||||||
../../../../flakes/nixos/disko.nix
|
../../../../flakes/nixos/disko.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
_module.args.disks = [ "/dev/nvme0n1" ]; # Disko
|
_module.args.disks = ["/dev/nvme0n1"]; # Disko
|
||||||
boot.initrd.systemd.enable = true; # LUKS TPM unlocking
|
boot.initrd.systemd.enable = true; # LUKS TPM unlocking
|
||||||
}
|
}
|
|
@ -1,5 +1,4 @@
|
||||||
{ ... }:
|
{...}:
|
||||||
|
|
||||||
# Logitech
|
# Logitech
|
||||||
{
|
{
|
||||||
hardware.logitech.wireless = {
|
hardware.logitech.wireless = {
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ ... }:
|
{...}:
|
||||||
|
|
||||||
# Xbox accessories
|
# Xbox accessories
|
||||||
{
|
{
|
||||||
hardware = {
|
hardware = {
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
boot.kernelModules = ["kvm-intel"];
|
||||||
{
|
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
|
||||||
hardware.cpu.intel.updateMicrocode = true;
|
hardware.cpu.intel.updateMicrocode = true;
|
||||||
nixpkgs.hostPlatform = "x86_64-linux";
|
nixpkgs.hostPlatform = "x86_64-linux";
|
||||||
}
|
}
|
|
@ -1,10 +1,9 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}:
|
||||||
|
|
||||||
# FOLLOWING https://nixos.wiki/wiki/AMD_GPU DIRECTLY
|
# FOLLOWING https://nixos.wiki/wiki/AMD_GPU DIRECTLY
|
||||||
# I HAVE NO IDEA WHAT AM I DOING
|
# I HAVE NO IDEA WHAT AM I DOING
|
||||||
{
|
{
|
||||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
boot.initrd.kernelModules = ["amdgpu"];
|
||||||
services.xserver.videoDrivers = [ "amdgpu" ];
|
services.xserver.videoDrivers = ["amdgpu"];
|
||||||
|
|
||||||
# OpenCL
|
# OpenCL
|
||||||
hardware.opengl = {
|
hardware.opengl = {
|
||||||
|
|
|
@ -1,19 +1,18 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}:
|
||||||
|
|
||||||
# Following https://nixos.wiki/wiki/Intel_Graphics
|
# Following https://nixos.wiki/wiki/Intel_Graphics
|
||||||
{
|
{
|
||||||
boot.initrd.kernelModules = [ "i915" ]; # if not enabled, plymouth's distro logo wont show for some reason
|
boot.initrd.kernelModules = ["i915"]; # if not enabled, plymouth's distro logo wont show for some reason
|
||||||
nixpkgs.config.packageOverrides = pkgs: { vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; }; };
|
nixpkgs.config.packageOverrides = pkgs: {vaapiIntel = pkgs.vaapiIntel.override {enableHybridCodec = true;};};
|
||||||
|
|
||||||
hardware.opengl = {
|
hardware.opengl = {
|
||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs; [
|
||||||
intel-media-driver # libva_driver_name=ihd
|
intel-media-driver # libva_driver_name=ihd
|
||||||
vaapiIntel # libva_driver_name=i965 (older but works better for firefox/chromium)
|
vaapiIntel # libva_driver_name=i965 (older but works better for firefox/chromium)
|
||||||
vaapiVdpau
|
vaapiVdpau
|
||||||
libvdpau-va-gl
|
libvdpau-va-gl
|
||||||
intel-compute-runtime # intel opencl
|
intel-compute-runtime # intel opencl
|
||||||
intel-media-driver # intel vaapi
|
intel-media-driver # intel vaapi
|
||||||
];
|
];
|
||||||
extraPackages32 = with pkgs; [ pkgsi686Linux.vaapiIntel ];
|
extraPackages32 = with pkgs; [pkgsi686Linux.vaapiIntel];
|
||||||
};
|
};
|
||||||
}
|
}
|
|
@ -1,5 +1,4 @@
|
||||||
{ ... }:
|
{...}:
|
||||||
|
|
||||||
# Nvidia Prime ( multi gpu on laptop )
|
# Nvidia Prime ( multi gpu on laptop )
|
||||||
{
|
{
|
||||||
hardware.nvidia.prime = {
|
hardware.nvidia.prime = {
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
{ config, ... }:
|
{config, ...}:
|
||||||
|
|
||||||
# NVIDIA drivers
|
# NVIDIA drivers
|
||||||
# fuck you nvidia btw
|
# fuck you nvidia btw
|
||||||
{
|
{
|
||||||
|
services.xserver.videoDrivers = ["nvidia"]; # tell xorg to use the nvidia driver, also valid for wayland
|
||||||
services.xserver.videoDrivers = [ "nvidia" ]; # tell xorg to use the nvidia driver, also valid for wayland
|
|
||||||
hardware.nvidia = {
|
hardware.nvidia = {
|
||||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||||
open = false;
|
open = false;
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ lib, ... }:
|
{lib, ...}:
|
||||||
|
|
||||||
# Audio system (pipewire)
|
# Audio system (pipewire)
|
||||||
{
|
{
|
||||||
security.rtkit.enable = true;
|
security.rtkit.enable = true;
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}:
|
||||||
|
|
||||||
# Bluetooth
|
# Bluetooth
|
||||||
{
|
{
|
||||||
# Bluetooth manager
|
# Bluetooth manager
|
||||||
#services.blueman.enable = true;
|
#services.blueman.enable = true;
|
||||||
environment.systemPackages = with pkgs; [ blueberry ];
|
environment.systemPackages = with pkgs; [blueberry];
|
||||||
|
|
||||||
# Bluetooth service
|
# Bluetooth service
|
||||||
hardware.bluetooth = {
|
hardware.bluetooth = {
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ ... }:
|
{...}:
|
||||||
|
|
||||||
# OpenGL
|
# OpenGL
|
||||||
{
|
{
|
||||||
hardware = {
|
hardware = {
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
# TPM is currently broken on latest kernel,
|
# TPM is currently broken on latest kernel,
|
||||||
# but luckily, linux-zen have a patch for it
|
# but luckily, linux-zen have a patch for it
|
||||||
# UPDATE: it got fixed in 6.5.3
|
# UPDATE: it got fixed in 6.5.3
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{ lib, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
../hardware/misc/audio.nix
|
../hardware/misc/audio.nix
|
||||||
../hardware/misc/bluetooth.nix
|
../hardware/misc/bluetooth.nix
|
||||||
|
@ -11,10 +13,10 @@
|
||||||
(modulesPath + "/installer/scan/not-detected.nix") # what is this
|
(modulesPath + "/installer/scan/not-detected.nix") # what is this
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ];
|
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" "sdhci_pci"];
|
||||||
|
|
||||||
# Options from github:NixOS/nixos-hardware
|
# Options from github:NixOS/nixos-hardware
|
||||||
boot.kernelParams = [ "hid_apple.iso_layout=0" ];
|
boot.kernelParams = ["hid_apple.iso_layout=0"];
|
||||||
hardware.facetimehd.enable = true; # TODO: Camera already works before adding this, not sure what is the point...
|
hardware.facetimehd.enable = true; # TODO: Camera already works before adding this, not sure what is the point...
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ lib, ... }:
|
{lib, ...}: {
|
||||||
|
|
||||||
{
|
|
||||||
boot = {
|
boot = {
|
||||||
consoleLogLevel = lib.mkDefault 3;
|
consoleLogLevel = lib.mkDefault 3;
|
||||||
loader = {
|
loader = {
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
./boot.nix
|
./boot.nix
|
||||||
./plymouth.nix
|
./plymouth.nix
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
{ lib, ... }:
|
{lib, ...}: {
|
||||||
|
|
||||||
{
|
|
||||||
boot.plymouth.enable = lib.mkDefault true; # mkDefault for headless devices, check out server.nix
|
boot.plymouth.enable = lib.mkDefault true; # mkDefault for headless devices, check out server.nix
|
||||||
}
|
}
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
# All sysctl-s are from https://madaidans-insecurities.github.io/guides/linux-hardening.html#sysctl
|
# All sysctl-s are from https://madaidans-insecurities.github.io/guides/linux-hardening.html#sysctl
|
||||||
boot.kernel.sysctl = {
|
boot.kernel.sysctl = {
|
||||||
# Kernel self-protection
|
# Kernel self-protection
|
||||||
|
@ -22,7 +20,7 @@
|
||||||
"net.ipv4.conf.all.rp_filter" = "1"; # against IP spoofing
|
"net.ipv4.conf.all.rp_filter" = "1"; # against IP spoofing
|
||||||
"net.ipv4.conf.default.rp_filter" = "1";
|
"net.ipv4.conf.default.rp_filter" = "1";
|
||||||
"net.ipv4.conf.all.accept_redirects" = "0";
|
"net.ipv4.conf.all.accept_redirects" = "0";
|
||||||
"net.ipv4.conf.default.accept_redirects" ="0"; # disable ICMP redirect acceptance and sending, against MITM
|
"net.ipv4.conf.default.accept_redirects" = "0"; # disable ICMP redirect acceptance and sending, against MITM
|
||||||
"net.ipv4.conf.all.secure_redirects" = "0";
|
"net.ipv4.conf.all.secure_redirects" = "0";
|
||||||
"net.ipv4.conf.default.secure_redirects" = "0";
|
"net.ipv4.conf.default.secure_redirects" = "0";
|
||||||
"net.ipv6.conf.all.accept_redirects" = "0";
|
"net.ipv6.conf.all.accept_redirects" = "0";
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
./dns.nix
|
./dns.nix
|
||||||
./firewall.nix
|
./firewall.nix
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
networking.nameservers = [
|
networking.nameservers = [
|
||||||
### Google DNS
|
### Google DNS
|
||||||
"8.8.8.8"
|
"8.8.8.8"
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# Open ports in the firewall.
|
# Open ports in the firewall.
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
{ lib, ... }:
|
{lib, ...}: {
|
||||||
|
|
||||||
{
|
|
||||||
networking.wireless.iwd.enable = lib.mkDefault true;
|
networking.wireless.iwd.enable = lib.mkDefault true;
|
||||||
}
|
}
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
./flake.nix
|
./flake.nix
|
||||||
./nix.nix
|
./nix.nix
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
|
|
||||||
{
|
|
||||||
# Enable Flakes
|
# Enable Flakes
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||||
|
|
||||||
# Install Git
|
# Install Git
|
||||||
environment.systemPackages = [ pkgs.git ];
|
environment.systemPackages = [pkgs.git];
|
||||||
|
|
||||||
# Does not work with Flake based configurations
|
# Does not work with Flake based configurations
|
||||||
system.copySystemConfiguration = false;
|
system.copySystemConfiguration = false;
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
nix = {
|
nix = {
|
||||||
### Auto hard linking
|
### Auto hard linking
|
||||||
settings.auto-optimise-store = true;
|
settings.auto-optimise-store = true;
|
||||||
|
@ -15,7 +13,7 @@
|
||||||
### optimiser
|
### optimiser
|
||||||
optimise = {
|
optimise = {
|
||||||
automatic = true;
|
automatic = true;
|
||||||
dates = [ "03:45" ];
|
dates = ["03:45"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,11 @@
|
||||||
{ lib, ... }:
|
{lib, ...}: {
|
||||||
|
|
||||||
{
|
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
trusted-users = [ "@wheel" ];
|
trusted-users = ["@wheel"];
|
||||||
substituters = [
|
substituters = [
|
||||||
"https://mirrors.ustc.edu.cn/nix-channels/store" # USTC - 中国科学技术大学 Mirror
|
"https://mirrors.ustc.edu.cn/nix-channels/store" # USTC - 中国科学技术大学 Mirror
|
||||||
"https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store" # TUNA - 清华大学 Mirror
|
"https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store" # TUNA - 清华大学 Mirror
|
||||||
"https://mirrors.bfsu.edu.cn/nix-channels/store" # BFSU - 北京外国语大学 Mirror
|
"https://mirrors.bfsu.edu.cn/nix-channels/store" # BFSU - 北京外国语大学 Mirror
|
||||||
"https://mirror.sjtu.edu.cn/nix-channels/store" # SJTU - 上海交通大学 Mirror
|
"https://mirror.sjtu.edu.cn/nix-channels/store" # SJTU - 上海交通大学 Mirror
|
||||||
|
|
||||||
"https://nix-community.cachix.org"
|
"https://nix-community.cachix.org"
|
||||||
"https://berberman.cachix.org"
|
"https://berberman.cachix.org"
|
||||||
|
@ -37,7 +35,6 @@
|
||||||
# Does not work with flake based configurations
|
# Does not work with flake based configurations
|
||||||
copySystemConfiguration = lib.mkDefault true;
|
copySystemConfiguration = lib.mkDefault true;
|
||||||
|
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
# settings for stateful data, like file locations and database versions
|
# settings for stateful data, like file locations and database versions
|
||||||
# on your system were taken. It's perfectly fine and recommended to leave
|
# on your system were taken. It's perfectly fine and recommended to leave
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
./hardware.nix # TODO: move this somewhere else?
|
./hardware.nix # TODO: move this somewhere else?
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
./display-server
|
./display-server
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
./display-server.nix
|
./display-server.nix
|
||||||
./input.nix
|
./input.nix
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
|
|
||||||
{
|
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
excludePackages = with pkgs; [ xterm ];
|
excludePackages = with pkgs; [xterm];
|
||||||
displayManager = {
|
displayManager = {
|
||||||
startx.enable = true;
|
startx.enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
libinput = {
|
libinput = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
|
|
||||||
{
|
|
||||||
# Fonts
|
# Fonts
|
||||||
fonts = {
|
fonts = {
|
||||||
fontDir.enable = true;
|
fontDir.enable = true;
|
||||||
|
@ -38,10 +36,10 @@
|
||||||
fontconfig = {
|
fontconfig = {
|
||||||
cache32Bit = true;
|
cache32Bit = true;
|
||||||
defaultFonts = {
|
defaultFonts = {
|
||||||
emoji = [ "Noto Color Emoji" ];
|
emoji = ["Noto Color Emoji"];
|
||||||
serif = [ "Noto Serif" ];
|
serif = ["Noto Serif"];
|
||||||
sansSerif = [ "Inter" "Noto Sans" ];
|
sansSerif = ["Inter" "Noto Sans"];
|
||||||
monospace = [ "JetBrainsMono Nerd Font" "JetBrains Mono" "FiraCode Nerd Font" "Fira Code" "Noto Sans Mono" ];
|
monospace = ["JetBrainsMono Nerd Font" "JetBrains Mono" "FiraCode Nerd Font" "Fira Code" "Noto Sans Mono"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
# fontconfig is too limited here, and appling it globally is **bad**, use Home Manager instead
|
# fontconfig is too limited here, and appling it globally is **bad**, use Home Manager instead
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
|
|
||||||
{
|
|
||||||
# gnome keyring
|
# gnome keyring
|
||||||
services.gnome.gnome-keyring.enable = true;
|
services.gnome.gnome-keyring.enable = true;
|
||||||
programs.seahorse.enable = true;
|
programs.seahorse.enable = true;
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
|
|
||||||
{
|
|
||||||
services = {
|
services = {
|
||||||
# GNOME applications
|
# GNOME applications
|
||||||
gvfs.enable = true; # nautilus
|
gvfs.enable = true; # nautilus
|
||||||
|
|
|
@ -1,16 +1,14 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
|
|
||||||
{
|
|
||||||
security.polkit.enable = true;
|
security.polkit.enable = true;
|
||||||
environment.systemPackages = with pkgs; [ polkit_gnome ];
|
environment.systemPackages = with pkgs; [polkit_gnome];
|
||||||
|
|
||||||
# polkit_gnome autostart for wms
|
# polkit_gnome autostart for wms
|
||||||
systemd = {
|
systemd = {
|
||||||
user.services.polkit-gnome-authentication-agent-1 = {
|
user.services.polkit-gnome-authentication-agent-1 = {
|
||||||
description = "polkit-gnome-authentication-agent-1";
|
description = "polkit-gnome-authentication-agent-1";
|
||||||
wantedBy = [ "graphical-session.target" ];
|
wantedBy = ["graphical-session.target"];
|
||||||
wants = [ "graphical-session.target" ];
|
wants = ["graphical-session.target"];
|
||||||
after = [ "graphical-session.target" ];
|
after = ["graphical-session.target"];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
|
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
|
|
||||||
{
|
|
||||||
# XDG portal
|
# XDG portal
|
||||||
xdg.portal = {
|
xdg.portal = {
|
||||||
enable = true;
|
enable = true;
|
||||||
wlr.enable = true;
|
wlr.enable = true;
|
||||||
extraPortals = with pkgs; [ xdg-desktop-portal-gtk ]; # disable if on gnome
|
extraPortals = with pkgs; [xdg-desktop-portal-gtk]; # disable if on gnome
|
||||||
};
|
};
|
||||||
}
|
}
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
hardware = {
|
hardware = {
|
||||||
enableRedistributableFirmware = true;
|
enableRedistributableFirmware = true;
|
||||||
#enableAllFirmware = true;
|
#enableAllFirmware = true;
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
./nautilus.nix
|
./nautilus.nix
|
||||||
./sway.nix
|
./sway.nix
|
||||||
|
|
|
@ -1,24 +1,25 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
overlays = [
|
overlays = [
|
||||||
(final: prev:
|
(
|
||||||
{
|
final: prev: {
|
||||||
firefox-unwrapped = prev.firefox-unwrapped.overrideAttrs (old: {
|
firefox-unwrapped = prev.firefox-unwrapped.overrideAttrs (old: {
|
||||||
# Firefox but with .mozilla moved to .config/mozilla
|
# Firefox but with .mozilla moved to .config/mozilla
|
||||||
# .patch file from aur/firefox-xdg
|
# .patch file from aur/firefox-xdg
|
||||||
# dont actually use this, it take ages to build... =.=
|
# dont actually use this, it take ages to build... =.=
|
||||||
patches = (old.patches or []) ++ [
|
patches =
|
||||||
(prev.fetchgit {
|
(old.patches or [])
|
||||||
url = "https://aur.archlinux.org/firefox-xdg.git";
|
++ [
|
||||||
rev = "ab291ab81140867dea4c08e4e1e4e3da0c73e4a6";
|
(prev.fetchgit {
|
||||||
hash = "sha256-6VgCt028qs/Y5kl20qLUYwFI63pItsHPbLimOFIdsyo=";
|
url = "https://aur.archlinux.org/firefox-xdg.git";
|
||||||
sparseCheckout = [
|
rev = "ab291ab81140867dea4c08e4e1e4e3da0c73e4a6";
|
||||||
"firefox-xdg-support.diff"
|
hash = "sha256-6VgCt028qs/Y5kl20qLUYwFI63pItsHPbLimOFIdsyo=";
|
||||||
];
|
sparseCheckout = [
|
||||||
} + "/firefox-xdg-support.diff")
|
"firefox-xdg-support.diff"
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
+ "/firefox-xdg-support.diff")
|
||||||
|
];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,30 +1,33 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
overlays = [
|
overlays = [
|
||||||
(final: prev:
|
(
|
||||||
{
|
final: prev: {
|
||||||
gnome = prev.gnome // {
|
gnome =
|
||||||
# Restore Nautilus's typeahead ability
|
prev.gnome
|
||||||
# .patch file from from aur/nautilus-typeahead
|
// {
|
||||||
nautilus = prev.gnome.nautilus.overrideAttrs (old: {
|
# Restore Nautilus's typeahead ability
|
||||||
patches = (old.patches or []) ++ [
|
# .patch file from from aur/nautilus-typeahead
|
||||||
(prev.fetchgit {
|
nautilus = prev.gnome.nautilus.overrideAttrs (old: {
|
||||||
url = "https://aur.archlinux.org/nautilus-typeahead.git";
|
patches =
|
||||||
### 44.2
|
(old.patches or [])
|
||||||
rev = "dc295b3191818d16550400e645e108d9e265baa3";
|
++ [
|
||||||
hash = "sha256-jCZcmPvmEodDzv+HHp7s+azLKVIno1ue72dQO+WbENU=";
|
(prev.fetchgit {
|
||||||
### 45.0
|
url = "https://aur.archlinux.org/nautilus-typeahead.git";
|
||||||
#rev = "26776193230b0d56f714d31d79c5e716ac413a26";
|
### 44.2
|
||||||
#hash = "sha256-hVWZCQwHzL4j+FcgsEhuumhBkl6d8IIbcYddh08QMJM=";
|
rev = "dc295b3191818d16550400e645e108d9e265baa3";
|
||||||
sparseCheckout = [
|
hash = "sha256-jCZcmPvmEodDzv+HHp7s+azLKVIno1ue72dQO+WbENU=";
|
||||||
"nautilus-restore-typeahead.patch"
|
### 45.0
|
||||||
|
#rev = "26776193230b0d56f714d31d79c5e716ac413a26";
|
||||||
|
#hash = "sha256-hVWZCQwHzL4j+FcgsEhuumhBkl6d8IIbcYddh08QMJM=";
|
||||||
|
sparseCheckout = [
|
||||||
|
"nautilus-restore-typeahead.patch"
|
||||||
|
];
|
||||||
|
}
|
||||||
|
+ "/nautilus-restore-typeahead.patch")
|
||||||
];
|
];
|
||||||
} + "/nautilus-restore-typeahead.patch")
|
});
|
||||||
];
|
};
|
||||||
});
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
overlays = [
|
overlays = [
|
||||||
(final: prev:
|
(
|
||||||
{
|
final: prev: {
|
||||||
prismlauncher = prev.prismlauncher.overrideAttrs (old: {
|
prismlauncher = prev.prismlauncher.overrideAttrs (old: {
|
||||||
# Offline mode for Prism Launcher
|
# Offline mode for Prism Launcher
|
||||||
# .patch file from some Misterio77's nix-config repo
|
# .patch file from some Misterio77's nix-config repo
|
||||||
patches = (old.patches or []) ++ [
|
patches =
|
||||||
(prev.fetchpatch {
|
(old.patches or [])
|
||||||
url = "https://raw.githubusercontent.com/Misterio77/nix-config/main/overlays/offline-mode-prism-launcher.diff";
|
++ [
|
||||||
hash = "sha256-vMcAvhD0Ms4Tvwpzs/YfORc8ki7MNMurdJJ/yswfxFM=";
|
(prev.fetchpatch {
|
||||||
})
|
url = "https://raw.githubusercontent.com/Misterio77/nix-config/main/overlays/offline-mode-prism-launcher.diff";
|
||||||
];
|
hash = "sha256-vMcAvhD0Ms4Tvwpzs/YfORc8ki7MNMurdJJ/yswfxFM=";
|
||||||
|
})
|
||||||
|
];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
overlays = [
|
overlays = [
|
||||||
(final: prev:
|
(
|
||||||
{
|
final: prev: {
|
||||||
sway-unwrapped = prev.sway-unwrapped.overrideAttrs (old: {
|
sway-unwrapped = prev.sway-unwrapped.overrideAttrs (old: {
|
||||||
# Add input panel to sway
|
# Add input panel to sway
|
||||||
# .patch file from https://github.com/swaywm/sway/pull/7226
|
# .patch file from https://github.com/swaywm/sway/pull/7226
|
||||||
patches = (old.patches or []) ++ [
|
patches =
|
||||||
(prev.fetchurl {
|
(old.patches or [])
|
||||||
url = "https://github.com/swaywm/sway/commit/d1c6e44886d1047b3aa6ff6aaac383eadd72f36a.patch";
|
++ [
|
||||||
sha256 = "sha256-UnNnAgXVBPjhF7ytVpGEStbJK1RQuRIci5PgGEvLp80=";
|
(prev.fetchurl {
|
||||||
})
|
url = "https://github.com/swaywm/sway/commit/d1c6e44886d1047b3aa6ff6aaac383eadd72f36a.patch";
|
||||||
];
|
sha256 = "sha256-UnNnAgXVBPjhF7ytVpGEStbJK1RQuRIci5PgGEvLp80=";
|
||||||
|
})
|
||||||
|
];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
overlays = [
|
overlays = [
|
||||||
(final: prev:
|
(
|
||||||
{
|
final: prev: {
|
||||||
ydict = prev.ydict.overrideAttrs (old: {
|
ydict = prev.ydict.overrideAttrs (old: {
|
||||||
# Let ydict follow XDG
|
# Let ydict follow XDG
|
||||||
# .patch file from https://github.com/TimothyYe/ydict/pull/32
|
# .patch file from https://github.com/TimothyYe/ydict/pull/32
|
||||||
# yes i know theres `YDICT_DB`
|
# yes i know theres `YDICT_DB`
|
||||||
patches = (old.patches or []) ++ [
|
patches =
|
||||||
(prev.fetchurl {
|
(old.patches or [])
|
||||||
url = "https://github.com/TimothyYe/ydict/commit/5bb0bc3f44922893a17993e295bbcac82c4a0170.patch";
|
++ [
|
||||||
sha256 = "sha256-Wg7p7dzosbbghSOTDB7duLL4ecmMjQd5trNXqHh29cU=";
|
(prev.fetchurl {
|
||||||
})
|
url = "https://github.com/TimothyYe/ydict/commit/5bb0bc3f44922893a17993e295bbcac82c4a0170.patch";
|
||||||
];
|
sha256 = "sha256-Wg7p7dzosbbghSOTDB7duLL4ecmMjQd5trNXqHh29cU=";
|
||||||
|
})
|
||||||
|
];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
./unfree.nix
|
./unfree.nix
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,22 +1,20 @@
|
||||||
{ lib, ... }:
|
{lib, ...}: {
|
||||||
|
nixpkgs.config.allowUnfreePredicate = pkg:
|
||||||
|
builtins.elem (lib.getName pkg) [
|
||||||
|
"nvidia-x11" # ../hardware/gpu/nvidia.nix
|
||||||
|
#"nvidia-settings"
|
||||||
|
#"nvidia-persistenced"
|
||||||
|
"xow_dongle-firmware" # ../hardware/accessories/xbox.nix
|
||||||
|
"facetimehd-firmware" # ../hardware/hardwares/imac-2017.nix
|
||||||
|
|
||||||
|
"osu-lazer-bin-2023.1026.0" # what?
|
||||||
{
|
"spotify"
|
||||||
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
|
"steam"
|
||||||
"nvidia-x11" # ../hardware/gpu/nvidia.nix
|
"steam-original"
|
||||||
#"nvidia-settings"
|
#"discord"
|
||||||
#"nvidia-persistenced"
|
#"google-chrome"
|
||||||
"xow_dongle-firmware" # ../hardware/accessories/xbox.nix
|
#"lunar-client"
|
||||||
"facetimehd-firmware" # ../hardware/hardwares/imac-2017.nix
|
#"microsoft-edge-stable"
|
||||||
|
#"qq"
|
||||||
"osu-lazer-bin-2023.1026.0" # what?
|
];
|
||||||
"spotify"
|
|
||||||
"steam"
|
|
||||||
"steam-original"
|
|
||||||
#"discord"
|
|
||||||
#"google-chrome"
|
|
||||||
#"lunar-client"
|
|
||||||
#"microsoft-edge-stable"
|
|
||||||
#"qq"
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
powerManagement.cpuFreqGovernor = "performance";
|
powerManagement.cpuFreqGovernor = "performance";
|
||||||
}
|
}
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
./cpu-governor.nix
|
./cpu-governor.nix
|
||||||
./system76-scheduler.nix
|
./system76-scheduler.nix
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
services.power-profiles-daemon.enable = true;
|
services.power-profiles-daemon.enable = true;
|
||||||
}
|
}
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
# Auto-configure CFS and process priorities for improved desktop responsiveness
|
# Auto-configure CFS and process priorities for improved desktop responsiveness
|
||||||
services.system76-scheduler.enable = true;
|
services.system76-scheduler.enable = true;
|
||||||
}
|
}
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
services.tlp = {
|
services.tlp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ config, ... }:
|
{config, ...}:
|
||||||
|
|
||||||
# Imported by default, check out ./desktop.nix or ./server.nix
|
# Imported by default, check out ./desktop.nix or ./server.nix
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
boot.loader = {
|
boot.loader = {
|
||||||
grub.enable = true;
|
grub.enable = true;
|
||||||
grub.device = "/dev/vda"; # or "nodev" for efi only
|
grub.device = "/dev/vda"; # or "nodev" for efi only
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
networking.networkmanager = {
|
networking.networkmanager = {
|
||||||
enable = true;
|
enable = true;
|
||||||
wifi.backend = "iwd";
|
wifi.backend = "iwd";
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
networking = {
|
networking = {
|
||||||
networkmanager = {
|
networkmanager = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
boot.loader.timeout = 0;
|
boot.loader.timeout = 0;
|
||||||
}
|
}
|
|
@ -1,11 +1,9 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
### systemd-resolved
|
### systemd-resolved
|
||||||
services.resolved = {
|
services.resolved = {
|
||||||
enable = true;
|
enable = true;
|
||||||
dnssec = "true";
|
dnssec = "true";
|
||||||
domains = [ "~." ];
|
domains = ["~."];
|
||||||
fallbackDns = [
|
fallbackDns = [
|
||||||
"8.8.8.8#dns.google"
|
"8.8.8.8#dns.google"
|
||||||
"8.8.4.4#dns.google"
|
"8.8.4.4#dns.google"
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
./core.nix
|
./core.nix
|
||||||
../packages/graphical
|
../packages/graphical
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
services.flatpak.enable = true;
|
services.flatpak.enable = true;
|
||||||
services.gnome.core-utilities.enable = false; # remove default gnome pkgs, for example, gnome-music, to use flatpaks instead
|
services.gnome.core-utilities.enable = false; # remove default gnome pkgs, for example, gnome-music, to use flatpaks instead
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
|
|
||||||
{
|
|
||||||
programs.gamemode = {
|
programs.gamemode = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings.custom = {
|
settings.custom = {
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
virtualisation.virtualbox.host.enable = true;
|
virtualisation.virtualbox.host.enable = true;
|
||||||
}
|
}
|
|
@ -1,9 +1,7 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
programs.xwayland.enable = true; # enable XWayland
|
||||||
{
|
|
||||||
programs.xwayland.enable = true; # enable XWayland
|
|
||||||
hardware.nvidia.nvidiaSettings = false; # NVIDIA settings menu, wont do anything on wayland
|
hardware.nvidia.nvidiaSettings = false; # NVIDIA settings menu, wont do anything on wayland
|
||||||
environment.sessionVariables = {
|
environment.sessionVariables = {
|
||||||
"NIXOS_OZONE_WL" = "1"; # let electron applications use wayland
|
"NIXOS_OZONE_WL" = "1"; # let electron applications use wayland
|
||||||
};
|
};
|
||||||
}
|
}
|
|
@ -1,5 +1,4 @@
|
||||||
{ ... }:
|
{...}:
|
||||||
|
|
||||||
# no i dont actually own a server
|
# no i dont actually own a server
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
|
|
@ -1,16 +1,14 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
specialisation = {
|
specialisation = {
|
||||||
bspwm.configuration = {
|
bspwm.configuration = {
|
||||||
system.nixos.tags = [ "bspwm" ];
|
system.nixos.tags = ["bspwm"];
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
displayManager.startx.enable = true;
|
displayManager.startx.enable = true;
|
||||||
windowManager.bspwm.enable = true;
|
windowManager.bspwm.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
plasma.configuration = {
|
plasma.configuration = {
|
||||||
system.nixos.tags = [ "plasma" ];
|
system.nixos.tags = ["plasma"];
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
desktopManager.plasma5.enable = true;
|
desktopManager.plasma5.enable = true;
|
||||||
displayManager.sddm = {
|
displayManager.sddm = {
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
|
|
||||||
{
|
|
||||||
users = {
|
users = {
|
||||||
knownUsers = [ "guanranwang" ];
|
knownUsers = ["guanranwang"];
|
||||||
users."guanranwang" = {
|
users."guanranwang" = {
|
||||||
createHome = true;
|
createHome = true;
|
||||||
description = "Guanran Wang";
|
description = "Guanran Wang";
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
{ inputs, pkgs, ... }:
|
{
|
||||||
|
inputs,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
# README!!:
|
# README!!:
|
||||||
# I HAVE NO IDEA HOW LAUNCHD DAEMON WORKS
|
# I HAVE NO IDEA HOW LAUNCHD DAEMON WORKS
|
||||||
# USE AT YOUR OWN RISK
|
# USE AT YOUR OWN RISK
|
||||||
|
@ -8,7 +11,6 @@
|
||||||
# Remember to manually copy `config.yaml` to `/etc/clash-meta`
|
# Remember to manually copy `config.yaml` to `/etc/clash-meta`
|
||||||
# I have no idea how to get sops-nix working on darwin...
|
# I have no idea how to get sops-nix working on darwin...
|
||||||
#
|
#
|
||||||
|
|
||||||
{
|
{
|
||||||
launchd.daemons."clash-meta" = {
|
launchd.daemons."clash-meta" = {
|
||||||
command = "${pkgs.clash-meta}/bin/clash-meta -d /etc/clash-meta";
|
command = "${pkgs.clash-meta}/bin/clash-meta -d /etc/clash-meta";
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
./core
|
./core
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
{ pkgs, config, lib, inputs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
home = {
|
home = {
|
||||||
# This value determines the Home Manager release that your
|
# This value determines the Home Manager release that your
|
||||||
# configuration is compatible with. This helps avoid breakage
|
# configuration is compatible with. This helps avoid breakage
|
||||||
|
@ -35,7 +39,8 @@
|
||||||
"clock" = "tty-clock -5Ccs";
|
"clock" = "tty-clock -5Ccs";
|
||||||
|
|
||||||
# proxy
|
# proxy
|
||||||
"setproxy" = let proxy = "http://127.0.0.1:7890/";
|
"setproxy" = let
|
||||||
|
proxy = "http://127.0.0.1:7890/";
|
||||||
in "export http_proxy=${proxy} https_proxy=${proxy} ftp_proxy=${proxy} rsync_proxy=${proxy}";
|
in "export http_proxy=${proxy} https_proxy=${proxy} ftp_proxy=${proxy} rsync_proxy=${proxy}";
|
||||||
"unsetproxy" = "set -e http_proxy https_proxy all_proxy"; # fish syntax (?)
|
"unsetproxy" = "set -e http_proxy https_proxy all_proxy"; # fish syntax (?)
|
||||||
};
|
};
|
||||||
|
@ -70,15 +75,17 @@
|
||||||
{
|
{
|
||||||
# should I use flake inputs / fetchurl?
|
# should I use flake inputs / fetchurl?
|
||||||
name = "sudo";
|
name = "sudo";
|
||||||
src = (pkgs.fetchFromGitHub {
|
src =
|
||||||
owner = "ohmyzsh";
|
pkgs.fetchFromGitHub {
|
||||||
repo = "ohmyzsh";
|
owner = "ohmyzsh";
|
||||||
rev = "f8bf8f0029a475831ebfba0799975ede20e08742";
|
repo = "ohmyzsh";
|
||||||
hash = "sha256-9cJQQycahO+vo/YcAHjF+PVhsWxu7pa4MsK8Dgr69k0=";
|
rev = "f8bf8f0029a475831ebfba0799975ede20e08742";
|
||||||
sparseCheckout = [
|
hash = "sha256-9cJQQycahO+vo/YcAHjF+PVhsWxu7pa4MsK8Dgr69k0=";
|
||||||
"plugins/sudo"
|
sparseCheckout = [
|
||||||
];
|
"plugins/sudo"
|
||||||
} + "/plugins/sudo");
|
];
|
||||||
|
}
|
||||||
|
+ "/plugins/sudo";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
initExtra = "zstyle ':fzf-tab:*' fzf-command sk";
|
initExtra = "zstyle ':fzf-tab:*' fzf-command sk";
|
||||||
|
@ -125,7 +132,7 @@
|
||||||
alacritty = {
|
alacritty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
import = [ "${inputs.tokyonight}/extras/alacritty/tokyonight_night.yml" ];
|
import = ["${inputs.tokyonight}/extras/alacritty/tokyonight_night.yml"];
|
||||||
cursor.style = "beam";
|
cursor.style = "beam";
|
||||||
env.WINIT_X11_SCALE_FACTOR = "1";
|
env.WINIT_X11_SCALE_FACTOR = "1";
|
||||||
window = {
|
window = {
|
||||||
|
@ -176,31 +183,31 @@
|
||||||
enableExtensionUpdateCheck = false;
|
enableExtensionUpdateCheck = false;
|
||||||
enableUpdateCheck = false;
|
enableUpdateCheck = false;
|
||||||
userSettings = {
|
userSettings = {
|
||||||
"diffEditor.ignoreTrimWhitespace" = false;
|
"diffEditor.ignoreTrimWhitespace" = false;
|
||||||
"editor.cursorBlinking" = "smooth";
|
"editor.cursorBlinking" = "smooth";
|
||||||
"editor.cursorSmoothCaretAnimation" = "on";
|
"editor.cursorSmoothCaretAnimation" = "on";
|
||||||
"editor.fontFamily" = lib.mkDefault "Monospace";
|
"editor.fontFamily" = lib.mkDefault "Monospace";
|
||||||
"editor.fontWeight" = 600;
|
"editor.fontWeight" = 600;
|
||||||
"editor.tabSize" = 2;
|
"editor.tabSize" = 2;
|
||||||
"explorer.confirmDragAndDrop" = false;
|
"explorer.confirmDragAndDrop" = false;
|
||||||
"explorer.confirmDelete" = false;
|
"explorer.confirmDelete" = false;
|
||||||
"files.autoSave" = "onFocusChange";
|
"files.autoSave" = "onFocusChange";
|
||||||
"files.trimTrailingWhitespace" = true;
|
"files.trimTrailingWhitespace" = true;
|
||||||
"files.trimFinalNewlines" = true;
|
"files.trimFinalNewlines" = true;
|
||||||
"security.workspace.trust.enabled" = false;
|
"security.workspace.trust.enabled" = false;
|
||||||
"telemetry.telemetryLevel" = "off";
|
"telemetry.telemetryLevel" = "off";
|
||||||
"terminal.external.osxExec" = "Alacritty.app";
|
"terminal.external.osxExec" = "Alacritty.app";
|
||||||
"terminal.integrated.cursorBlinking" = true;
|
"terminal.integrated.cursorBlinking" = true;
|
||||||
"update.mode" = "none";
|
"update.mode" = "none";
|
||||||
"window.menuBarVisibility" = "toggle";
|
"window.menuBarVisibility" = "toggle";
|
||||||
"workbench.colorTheme" = "Tokyo Night";
|
"workbench.colorTheme" = "Tokyo Night";
|
||||||
|
|
||||||
# Extensions
|
# Extensions
|
||||||
### Nix IDE
|
### Nix IDE
|
||||||
"nix.enableLanguageServer" = true;
|
"nix.enableLanguageServer" = true;
|
||||||
"nix.serverPath" = "${pkgs.nil}/bin/nil";
|
"nix.serverPath" = "${pkgs.nil}/bin/nil";
|
||||||
### GitLens
|
### GitLens
|
||||||
"gitlens.telemetry.enabled" = false;
|
"gitlens.telemetry.enabled" = false;
|
||||||
};
|
};
|
||||||
extensions = with pkgs.vscode-extensions; [
|
extensions = with pkgs.vscode-extensions; [
|
||||||
### LSP
|
### LSP
|
||||||
|
|
|
@ -1,11 +1,8 @@
|
||||||
{ ... }:
|
{...}: let
|
||||||
|
|
||||||
let
|
|
||||||
configPath = ../common/dotfiles/config;
|
configPath = ../common/dotfiles/config;
|
||||||
#dataPath = ../common/dotfiles/data;
|
#dataPath = ../common/dotfiles/data;
|
||||||
#binPath = ../common/dotfiles/bin;
|
#binPath = ../common/dotfiles/bin;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
xdg.configFile = {
|
xdg.configFile = {
|
||||||
"fish" = {
|
"fish" = {
|
||||||
source = "${configPath}/fish";
|
source = "${configPath}/fish";
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
{ config, pkgs, lib, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
home = {
|
home = {
|
||||||
username = "guanranwang";
|
username = "guanranwang";
|
||||||
homeDirectory = "/Users/guanranwang";
|
homeDirectory = "/Users/guanranwang";
|
||||||
|
@ -14,25 +17,28 @@
|
||||||
paths = config.home.packages;
|
paths = config.home.packages;
|
||||||
pathsToLink = "/Applications";
|
pathsToLink = "/Applications";
|
||||||
};
|
};
|
||||||
in lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
in
|
||||||
toDir="$HOME/Applications/Home Manager Trampolines"
|
lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||||
fromDir="${apps}/Applications/"
|
toDir="$HOME/Applications/Home Manager Trampolines"
|
||||||
rm -rf "$toDir"
|
fromDir="${apps}/Applications/"
|
||||||
mkdir "$toDir"
|
rm -rf "$toDir"
|
||||||
(
|
mkdir "$toDir"
|
||||||
cd "$fromDir"
|
(
|
||||||
for app in *.app; do
|
cd "$fromDir"
|
||||||
/usr/bin/osacompile -o "$toDir/$app" -e 'do shell script "open '$fromDir/$app'"'
|
for app in *.app; do
|
||||||
done
|
/usr/bin/osacompile -o "$toDir/$app" -e 'do shell script "open '$fromDir/$app'"'
|
||||||
)
|
done
|
||||||
'';
|
)
|
||||||
setSystemProxy = let networksetup = /usr/sbin/networksetup;
|
'';
|
||||||
in lib.hm.dag.entryAfter ["writeBoundary"] ''
|
setSystemProxy = let
|
||||||
${networksetup} -setwebproxystate "Wi-fi" on
|
networksetup = /usr/sbin/networksetup;
|
||||||
${networksetup} -setwebproxy "Wi-fi" 127.0.0.1 7890
|
in
|
||||||
${networksetup} -setwebproxystate "Ethernet" on
|
lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||||
${networksetup} -setwebproxy "Ethernet" 127.0.0.1 7890
|
${networksetup} -setwebproxystate "Wi-fi" on
|
||||||
'';
|
${networksetup} -setwebproxy "Wi-fi" 127.0.0.1 7890
|
||||||
|
${networksetup} -setwebproxystate "Ethernet" on
|
||||||
|
${networksetup} -setwebproxy "Ethernet" 127.0.0.1 7890
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
|
@ -57,7 +63,6 @@
|
||||||
ydict
|
ydict
|
||||||
nix-output-monitor
|
nix-output-monitor
|
||||||
|
|
||||||
|
|
||||||
## GUI
|
## GUI
|
||||||
### Music
|
### Music
|
||||||
spotify
|
spotify
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
../../common/home.nix
|
../../common/home.nix
|
||||||
../home.nix
|
../home.nix
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
|
|
||||||
{
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
prismlauncher
|
prismlauncher
|
||||||
];
|
];
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue