flake: format everything using alejandra

This commit is contained in:
Guanran Wang 2023-11-04 18:14:42 +08:00
parent 811c92adb6
commit 98dbc82d27
Signed by: nyancat
SSH key fingerprint: SHA256:8oWGKciPALWut/6WA27oFKofX+6Wtc0gQnsefXLQx/8
117 changed files with 843 additions and 1024 deletions

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
imports = [ imports = [
./dns.nix ./dns.nix
./proxy.nix ./proxy.nix

View file

@ -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"

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
imports = [ imports = [
./flake.nix ./flake.nix
./nix.nix ./nix.nix

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
# Enable Flakes # Enable Flakes
nix.settings.experimental-features = ["nix-command" "flakes"]; nix.settings.experimental-features = ["nix-command" "flakes"];
} }

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
nix = { nix = {
### Auto hard linking ### Auto hard linking
settings.auto-optimise-store = true; settings.auto-optimise-store = true;

View file

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
nix.settings = { nix.settings = {
trusted-users = ["@admin"]; trusted-users = ["@admin"];
substituters = [ substituters = [

View file

@ -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; [

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
imports = [ imports = [
./core.nix ./core.nix
./fonts.nix ./fonts.nix

View file

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
fonts.fonts = with pkgs; [ fonts.fonts = with pkgs; [
(nerdfonts.override {fonts = ["FiraCode" "JetBrainsMono"];}) (nerdfonts.override {fonts = ["FiraCode" "JetBrainsMono"];})
]; ];

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
homebrew = { homebrew = {
enable = true; enable = true;
brews = [ brews = [

View file

@ -1,8 +1,7 @@
{ lib, ... }: {lib, ...}: {
{
# Allow unfree applications # Allow unfree applications
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) [
"spotify" "spotify"
"keka" "keka"
]; ];

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
imports = [ imports = [
./networking ./networking
./nix ./nix

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
homebrew.casks = [ homebrew.casks = [
"steam" "steam"
]; ];

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
imports = [ imports = [
./system.nix ./system.nix
]; ];

View file

@ -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.

View file

@ -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": {

View file

@ -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,7 +143,8 @@
}; };
}; };
outputs = { self, outputs = {
self,
nixpkgs, nixpkgs,
berberman, berberman,
disko, disko,
@ -160,8 +157,8 @@
impermanence, impermanence,
tokyonight, tokyonight,
metacubexd, metacubexd,
... } @ inputs: { ...
} @ inputs: {
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra; formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra;
### NixOS ### NixOS
@ -170,17 +167,20 @@
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
@ -193,17 +193,16 @@
}; };
}; };
### 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,7 +214,6 @@
}; };
}; };
### Home-Manager ### Home-Manager
# TODO: Actually figure out how this works # TODO: Actually figure out how this works
homeConfigurations = { homeConfigurations = {

View file

@ -1,6 +1,4 @@
{ inputs, ... }: {inputs, ...}: {
{
imports = [inputs.home-manager.darwinModules.home-manager]; imports = [inputs.home-manager.darwinModules.home-manager];
home-manager = { home-manager = {

View file

@ -1,6 +1,4 @@
{ inputs, ... }: {inputs, ...}: {
{
nixpkgs.overlays = [ nixpkgs.overlays = [
inputs.berberman.overlays.default inputs.berberman.overlays.default
]; ];

View file

@ -1,6 +1,8 @@
{ inputs, disks ? [ "/dev/vdb" ], ... }:
{ {
inputs,
disks ? ["/dev/sda"],
...
}: {
imports = [inputs.disko.nixosModules.disko]; imports = [inputs.disko.nixosModules.disko];
disko.devices = { disko.devices = {
@ -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,11 +21,13 @@
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 = {
@ -52,7 +56,7 @@
}; };
}; };
}; };
swap = { "swap" = {
size = "100%"; size = "100%";
content = { content = {
type = "swap"; type = "swap";

View file

@ -1,6 +1,4 @@
{ inputs, ... }: {inputs, ...}: {
{
imports = [inputs.home-manager.nixosModules.home-manager]; imports = [inputs.home-manager.nixosModules.home-manager];
home-manager = { home-manager = {

View file

@ -1,6 +1,4 @@
{ inputs, ... }: {inputs, ...}: {
{
imports = [inputs.hosts.nixosModule]; imports = [inputs.hosts.nixosModule];
networking.stevenBlackHosts = { networking.stevenBlackHosts = {

View file

@ -1,6 +1,4 @@
{ 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)

View file

@ -1,6 +1,8 @@
{ inputs, pkgs, ... }:
{ {
inputs,
pkgs,
...
}: {
imports = [inputs.lanzaboote.nixosModules.lanzaboote]; imports = [inputs.lanzaboote.nixosModules.lanzaboote];
environment.systemPackages = with pkgs; [sbctl]; environment.systemPackages = with pkgs; [sbctl];

View file

@ -1,5 +1,3 @@
{ inputs, ... }: {inputs, ...}: {
{
imports = [inputs.sops-nix.nixosModules.sops]; imports = [inputs.sops-nix.nixosModules.sops];
} }

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
imports = [ imports = [
./hardware.nix ./hardware.nix
]; ];

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
networking.knownNetworkServices = [ networking.knownNetworkServices = [
"Ethernet" "Ethernet"
"Wi-Fi" "Wi-Fi"

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
imports = [ imports = [
./hardware.nix ./hardware.nix
]; ];

View file

@ -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

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
imports = [ imports = [
../../../../flakes/nixos/lanzaboote.nix ../../../../flakes/nixos/lanzaboote.nix
../../../../flakes/nixos/impermanence.nix ../../../../flakes/nixos/impermanence.nix

View file

@ -1,5 +1,4 @@
{...}: {...}:
# Logitech # Logitech
{ {
hardware.logitech.wireless = { hardware.logitech.wireless = {

View file

@ -1,5 +1,4 @@
{...}: {...}:
# Xbox accessories # Xbox accessories
{ {
hardware = { hardware = {

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
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";

View file

@ -1,5 +1,4 @@
{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
{ {

View file

@ -1,5 +1,4 @@
{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

View file

@ -1,5 +1,4 @@
{...}: {...}:
# Nvidia Prime ( multi gpu on laptop ) # Nvidia Prime ( multi gpu on laptop )
{ {
hardware.nvidia.prime = { hardware.nvidia.prime = {

View file

@ -1,9 +1,7 @@
{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;

View file

@ -1,5 +1,4 @@
{lib, ...}: {lib, ...}:
# Audio system (pipewire) # Audio system (pipewire)
{ {
security.rtkit.enable = true; security.rtkit.enable = true;

View file

@ -1,5 +1,4 @@
{pkgs, ...}: {pkgs, ...}:
# Bluetooth # Bluetooth
{ {
# Bluetooth manager # Bluetooth manager

View file

@ -1,5 +1,4 @@
{...}: {...}:
# OpenGL # OpenGL
{ {
hardware = { hardware = {

View file

@ -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

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
imports = [ imports = [
./hardware.nix ./hardware.nix
]; ];

View file

@ -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

View file

@ -1,6 +1,4 @@
{ lib, ... }: {lib, ...}: {
{
boot = { boot = {
consoleLogLevel = lib.mkDefault 3; consoleLogLevel = lib.mkDefault 3;
loader = { loader = {

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
imports = [ imports = [
./boot.nix ./boot.nix
./plymouth.nix ./plymouth.nix

View file

@ -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
} }

View file

@ -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

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
imports = [ imports = [
./dns.nix ./dns.nix
./firewall.nix ./firewall.nix

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
networking.nameservers = [ networking.nameservers = [
### Google DNS ### Google DNS
"8.8.8.8" "8.8.8.8"

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
networking.firewall = { networking.firewall = {
enable = true; enable = true;
# Open ports in the firewall. # Open ports in the firewall.

View file

@ -1,5 +1,3 @@
{ lib, ... }: {lib, ...}: {
{
networking.wireless.iwd.enable = lib.mkDefault true; networking.wireless.iwd.enable = lib.mkDefault true;
} }

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
imports = [ imports = [
./flake.nix ./flake.nix
./nix.nix ./nix.nix

View file

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
# Enable Flakes # Enable Flakes
nix.settings.experimental-features = ["nix-command" "flakes"]; nix.settings.experimental-features = ["nix-command" "flakes"];

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
nix = { nix = {
### Auto hard linking ### Auto hard linking
settings.auto-optimise-store = true; settings.auto-optimise-store = true;

View file

@ -1,6 +1,4 @@
{ lib, ... }: {lib, ...}: {
{
nix.settings = { nix.settings = {
trusted-users = ["@wheel"]; trusted-users = ["@wheel"];
substituters = [ substituters = [
@ -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

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
imports = [ imports = [
./hardware.nix # TODO: move this somewhere else? ./hardware.nix # TODO: move this somewhere else?

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
imports = [ imports = [
./display-server ./display-server

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
imports = [ imports = [
./display-server.nix ./display-server.nix
./input.nix ./input.nix

View file

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
services.xserver = { services.xserver = {
enable = true; enable = true;
excludePackages = with pkgs; [xterm]; excludePackages = with pkgs; [xterm];

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
services.xserver = { services.xserver = {
libinput = { libinput = {
enable = true; enable = true;

View file

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
# Fonts # Fonts
fonts = { fonts = {
fontDir.enable = true; fontDir.enable = true;

View file

@ -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;

View file

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
services = { services = {
# GNOME applications # GNOME applications
gvfs.enable = true; # nautilus gvfs.enable = true; # nautilus

View file

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
security.polkit.enable = true; security.polkit.enable = true;
environment.systemPackages = with pkgs; [polkit_gnome]; environment.systemPackages = with pkgs; [polkit_gnome];

View file

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
# XDG portal # XDG portal
xdg.portal = { xdg.portal = {
enable = true; enable = true;

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
hardware = { hardware = {
enableRedistributableFirmware = true; enableRedistributableFirmware = true;
#enableAllFirmware = true; #enableAllFirmware = true;

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
imports = [ imports = [
./nautilus.nix ./nautilus.nix
./sway.nix ./sway.nix

View file

@ -1,15 +1,15 @@
{ ... }: {...}: {
{
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 =
(old.patches or [])
++ [
(prev.fetchgit { (prev.fetchgit {
url = "https://aur.archlinux.org/firefox-xdg.git"; url = "https://aur.archlinux.org/firefox-xdg.git";
rev = "ab291ab81140867dea4c08e4e1e4e3da0c73e4a6"; rev = "ab291ab81140867dea4c08e4e1e4e3da0c73e4a6";
@ -17,7 +17,8 @@
sparseCheckout = [ sparseCheckout = [
"firefox-xdg-support.diff" "firefox-xdg-support.diff"
]; ];
} + "/firefox-xdg-support.diff") }
+ "/firefox-xdg-support.diff")
]; ];
}); });
} }

View file

@ -1,15 +1,17 @@
{ ... }: {...}: {
{
nixpkgs = { nixpkgs = {
overlays = [ overlays = [
(final: prev: (
{ final: prev: {
gnome = prev.gnome // { gnome =
prev.gnome
// {
# Restore Nautilus's typeahead ability # Restore Nautilus's typeahead ability
# .patch file from from aur/nautilus-typeahead # .patch file from from aur/nautilus-typeahead
nautilus = prev.gnome.nautilus.overrideAttrs (old: { nautilus = prev.gnome.nautilus.overrideAttrs (old: {
patches = (old.patches or []) ++ [ patches =
(old.patches or [])
++ [
(prev.fetchgit { (prev.fetchgit {
url = "https://aur.archlinux.org/nautilus-typeahead.git"; url = "https://aur.archlinux.org/nautilus-typeahead.git";
### 44.2 ### 44.2
@ -21,7 +23,8 @@
sparseCheckout = [ sparseCheckout = [
"nautilus-restore-typeahead.patch" "nautilus-restore-typeahead.patch"
]; ];
} + "/nautilus-restore-typeahead.patch") }
+ "/nautilus-restore-typeahead.patch")
]; ];
}); });
}; };

View file

@ -1,14 +1,14 @@
{ ... }: {...}: {
{
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 =
(old.patches or [])
++ [
(prev.fetchpatch { (prev.fetchpatch {
url = "https://raw.githubusercontent.com/Misterio77/nix-config/main/overlays/offline-mode-prism-launcher.diff"; url = "https://raw.githubusercontent.com/Misterio77/nix-config/main/overlays/offline-mode-prism-launcher.diff";
hash = "sha256-vMcAvhD0Ms4Tvwpzs/YfORc8ki7MNMurdJJ/yswfxFM="; hash = "sha256-vMcAvhD0Ms4Tvwpzs/YfORc8ki7MNMurdJJ/yswfxFM=";

View file

@ -1,14 +1,14 @@
{ ... }: {...}: {
{
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 =
(old.patches or [])
++ [
(prev.fetchurl { (prev.fetchurl {
url = "https://github.com/swaywm/sway/commit/d1c6e44886d1047b3aa6ff6aaac383eadd72f36a.patch"; url = "https://github.com/swaywm/sway/commit/d1c6e44886d1047b3aa6ff6aaac383eadd72f36a.patch";
sha256 = "sha256-UnNnAgXVBPjhF7ytVpGEStbJK1RQuRIci5PgGEvLp80="; sha256 = "sha256-UnNnAgXVBPjhF7ytVpGEStbJK1RQuRIci5PgGEvLp80=";

View file

@ -1,15 +1,15 @@
{ ... }: {...}: {
{
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 =
(old.patches or [])
++ [
(prev.fetchurl { (prev.fetchurl {
url = "https://github.com/TimothyYe/ydict/commit/5bb0bc3f44922893a17993e295bbcac82c4a0170.patch"; url = "https://github.com/TimothyYe/ydict/commit/5bb0bc3f44922893a17993e295bbcac82c4a0170.patch";
sha256 = "sha256-Wg7p7dzosbbghSOTDB7duLL4ecmMjQd5trNXqHh29cU="; sha256 = "sha256-Wg7p7dzosbbghSOTDB7duLL4ecmMjQd5trNXqHh29cU=";

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
imports = [ imports = [
./unfree.nix ./unfree.nix
]; ];

View file

@ -1,8 +1,6 @@
{ lib, ... }: {lib, ...}: {
nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) [
{
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"nvidia-x11" # ../hardware/gpu/nvidia.nix "nvidia-x11" # ../hardware/gpu/nvidia.nix
#"nvidia-settings" #"nvidia-settings"
#"nvidia-persistenced" #"nvidia-persistenced"

View file

@ -1,5 +1,3 @@
{ ... }: {...}: {
{
powerManagement.cpuFreqGovernor = "performance"; powerManagement.cpuFreqGovernor = "performance";
} }

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
imports = [ imports = [
./cpu-governor.nix ./cpu-governor.nix
./system76-scheduler.nix ./system76-scheduler.nix

View file

@ -1,5 +1,3 @@
{ ... }: {...}: {
{
services.power-profiles-daemon.enable = true; services.power-profiles-daemon.enable = true;
} }

View file

@ -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;
} }

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
services.tlp = { services.tlp = {
enable = true; enable = true;
settings = { settings = {

View file

@ -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 = [

View file

@ -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

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
networking.networkmanager = { networking.networkmanager = {
enable = true; enable = true;
wifi.backend = "iwd"; wifi.backend = "iwd";

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
networking = { networking = {
networkmanager = { networkmanager = {
enable = true; enable = true;

View file

@ -1,5 +1,3 @@
{ ... }: {...}: {
{
boot.loader.timeout = 0; boot.loader.timeout = 0;
} }

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
### systemd-resolved ### systemd-resolved
services.resolved = { services.resolved = {
enable = true; enable = true;

View file

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
imports = [ imports = [
./core.nix ./core.nix
../packages/graphical ../packages/graphical

View file

@ -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

View file

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
programs.gamemode = { programs.gamemode = {
enable = true; enable = true;
settings.custom = { settings.custom = {

View file

@ -1,5 +1,3 @@
{ ... }: {...}: {
{
virtualisation.virtualbox.host.enable = true; virtualisation.virtualbox.host.enable = true;
} }

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
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 = {

View file

@ -1,5 +1,4 @@
{...}: {...}:
# no i dont actually own a server # no i dont actually own a server
{ {
imports = [ imports = [

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
specialisation = { specialisation = {
bspwm.configuration = { bspwm.configuration = {
system.nixos.tags = ["bspwm"]; system.nixos.tags = ["bspwm"];

View file

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
users = { users = {
knownUsers = ["guanranwang"]; knownUsers = ["guanranwang"];
users."guanranwang" = { users."guanranwang" = {

View file

@ -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";

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
imports = [ imports = [
./core ./core

View file

@ -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,7 +75,8 @@
{ {
# should I use flake inputs / fetchurl? # should I use flake inputs / fetchurl?
name = "sudo"; name = "sudo";
src = (pkgs.fetchFromGitHub { src =
pkgs.fetchFromGitHub {
owner = "ohmyzsh"; owner = "ohmyzsh";
repo = "ohmyzsh"; repo = "ohmyzsh";
rev = "f8bf8f0029a475831ebfba0799975ede20e08742"; rev = "f8bf8f0029a475831ebfba0799975ede20e08742";
@ -78,7 +84,8 @@
sparseCheckout = [ sparseCheckout = [
"plugins/sudo" "plugins/sudo"
]; ];
} + "/plugins/sudo"); }
+ "/plugins/sudo";
} }
]; ];
initExtra = "zstyle ':fzf-tab:*' fzf-command sk"; initExtra = "zstyle ':fzf-tab:*' fzf-command sk";

View file

@ -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";

View file

@ -1,6 +1,9 @@
{ config, pkgs, lib, ... }:
{ {
config,
pkgs,
lib,
...
}: {
home = { home = {
username = "guanranwang"; username = "guanranwang";
homeDirectory = "/Users/guanranwang"; homeDirectory = "/Users/guanranwang";
@ -14,7 +17,8 @@
paths = config.home.packages; paths = config.home.packages;
pathsToLink = "/Applications"; pathsToLink = "/Applications";
}; };
in lib.hm.dag.entryAfter [ "writeBoundary" ] '' in
lib.hm.dag.entryAfter ["writeBoundary"] ''
toDir="$HOME/Applications/Home Manager Trampolines" toDir="$HOME/Applications/Home Manager Trampolines"
fromDir="${apps}/Applications/" fromDir="${apps}/Applications/"
rm -rf "$toDir" rm -rf "$toDir"
@ -26,8 +30,10 @@
done done
) )
''; '';
setSystemProxy = let networksetup = /usr/sbin/networksetup; setSystemProxy = let
in lib.hm.dag.entryAfter ["writeBoundary"] '' networksetup = /usr/sbin/networksetup;
in
lib.hm.dag.entryAfter ["writeBoundary"] ''
${networksetup} -setwebproxystate "Wi-fi" on ${networksetup} -setwebproxystate "Wi-fi" on
${networksetup} -setwebproxy "Wi-fi" 127.0.0.1 7890 ${networksetup} -setwebproxy "Wi-fi" 127.0.0.1 7890
${networksetup} -setwebproxystate "Ethernet" on ${networksetup} -setwebproxystate "Ethernet" on
@ -57,7 +63,6 @@
ydict ydict
nix-output-monitor nix-output-monitor
## GUI ## GUI
### Music ### Music
spotify spotify

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
imports = [ imports = [
../../common/home.nix ../../common/home.nix
../home.nix ../home.nix

View file

@ -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