mirror of
https://github.com/youwen5/nixos.git
synced 2024-11-24 17:53:51 -08:00
Merge branch 'next-gen' into macos-working
This commit is contained in:
commit
a435f0d035
15 changed files with 904 additions and 873 deletions
101
flake.lock
101
flake.lock
|
@ -24,11 +24,11 @@
|
|||
},
|
||||
"bleedingpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1723688039,
|
||||
"narHash": "sha256-/QVv3/9gnukdsUZRR5eJQLhcuXBCLe0rGrF5O6w6jA0=",
|
||||
"lastModified": 1724117083,
|
||||
"narHash": "sha256-26Zgap4D9E8PRL9jvc4Df9POMNGFS9fMwKz+SiGrlXI=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "1ad352fd9ea96cebc7862782fa8d0d295c68ff15",
|
||||
"rev": "44f636f8cb95238dabd5f33d00557329c0681cd5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -57,11 +57,11 @@
|
|||
},
|
||||
"catppuccin": {
|
||||
"locked": {
|
||||
"lastModified": 1722997334,
|
||||
"narHash": "sha256-vE5FcKVQ3E0txJKt5w3vOlfcN1XoTAlxK9PnQ/CJavA=",
|
||||
"lastModified": 1724048768,
|
||||
"narHash": "sha256-OZ9OXsPQi+fNdMM7SBPtU8OB1ntLzOvUwA/3zYJY6Eo=",
|
||||
"owner": "catppuccin",
|
||||
"repo": "nix",
|
||||
"rev": "66f4ea170093b62f319f41cebd2337a51b225c5a",
|
||||
"rev": "ff4128f8ea57879050145cf077a27b9d3a9cbf33",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -303,11 +303,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1723202784,
|
||||
"narHash": "sha256-qbhjc/NEGaDbyy0ucycubq4N3//gDFFH3DOmp1D3u1Q=",
|
||||
"lastModified": 1723803910,
|
||||
"narHash": "sha256-yezvUuFiEnCFbGuwj/bQcqg7RykIEqudOy/RBrId0pc=",
|
||||
"owner": "cachix",
|
||||
"repo": "git-hooks.nix",
|
||||
"rev": "c7012d0c18567c889b948781bc74a501e92275d1",
|
||||
"rev": "bfef0ada09e2c8ac55bbcd0831bd0c9d42e651ba",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -367,11 +367,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1723399884,
|
||||
"narHash": "sha256-97wn0ihhGqfMb8WcUgzzkM/TuAxce2Gd20A8oiruju4=",
|
||||
"lastModified": 1723986931,
|
||||
"narHash": "sha256-Fy+KEvDQ+Hc8lJAV3t6leXhZJ2ncU5/esxkgt3b8DEY=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "086f619dd991a4d355c07837448244029fc2d9ab",
|
||||
"rev": "2598861031b78aadb4da7269df7ca9ddfc3e1671",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -388,11 +388,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1723399884,
|
||||
"narHash": "sha256-97wn0ihhGqfMb8WcUgzzkM/TuAxce2Gd20A8oiruju4=",
|
||||
"lastModified": 1723986931,
|
||||
"narHash": "sha256-Fy+KEvDQ+Hc8lJAV3t6leXhZJ2ncU5/esxkgt3b8DEY=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "086f619dd991a4d355c07837448244029fc2d9ab",
|
||||
"rev": "2598861031b78aadb4da7269df7ca9ddfc3e1671",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -404,11 +404,11 @@
|
|||
"homebrew-cask": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1723687108,
|
||||
"narHash": "sha256-yS7kiSJyJzd+mpzAQ1ntrfejGICEhScev6NA0F5rsDE=",
|
||||
"lastModified": 1724120139,
|
||||
"narHash": "sha256-vVE53gBCJPc3/dj7OHvQ7mNuUk1bWVpNR4c0jKe+K9U=",
|
||||
"owner": "homebrew",
|
||||
"repo": "homebrew-cask",
|
||||
"rev": "5feec29994320afeeb5a1a74860a57d9f845bc30",
|
||||
"rev": "606d3429e6fae79849c0eaf4bbcf05ff1570051a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -420,11 +420,11 @@
|
|||
"homebrew-core": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1723681288,
|
||||
"narHash": "sha256-uU0etusCLcip1KNB2FA8/Zpi+hGwAzKX9X32fdFnTNw=",
|
||||
"lastModified": 1724119620,
|
||||
"narHash": "sha256-p+M24z3IDeIJBppaWWTpaz63WMGvi3HGW/mQHQVYpgM=",
|
||||
"owner": "homebrew",
|
||||
"repo": "homebrew-core",
|
||||
"rev": "5bf3c1c505315f0adff00ce8921169fbf7df217c",
|
||||
"rev": "cd06a79081ce6e08b475e01315cdf1cb51952d77",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -433,6 +433,22 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hyprland-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1723474844,
|
||||
"narHash": "sha256-9dyLWfx/PruwHjCZhIvY3jBdNfhID1AbsSU6Wkn284k=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "6404fe89d602c9511c08f4978bcb214032cd3cfc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "6404fe89d602c9511c08f4978bcb214032cd3cfc",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"lanzaboote": {
|
||||
"inputs": {
|
||||
"crane": "crane",
|
||||
|
@ -502,11 +518,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1722924007,
|
||||
"narHash": "sha256-+CQDamNwqO33REJLft8c26NbUi2Td083hq6SvAm2xkU=",
|
||||
"lastModified": 1723859949,
|
||||
"narHash": "sha256-kiaGz4deGYKMjJPOji/JVvSP/eTefrIA3rAjOnOpXl4=",
|
||||
"owner": "LnL7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "91010a5613ffd7ee23ee9263213157a1c422b705",
|
||||
"rev": "076b9a905af8a52b866c8db068d6da475839d97b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -541,11 +557,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1722924007,
|
||||
"narHash": "sha256-+CQDamNwqO33REJLft8c26NbUi2Td083hq6SvAm2xkU=",
|
||||
"lastModified": 1723859949,
|
||||
"narHash": "sha256-kiaGz4deGYKMjJPOji/JVvSP/eTefrIA3rAjOnOpXl4=",
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "91010a5613ffd7ee23ee9263213157a1c422b705",
|
||||
"rev": "076b9a905af8a52b866c8db068d6da475839d97b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -622,11 +638,11 @@
|
|||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1723362943,
|
||||
"narHash": "sha256-dFZRVSgmJkyM0bkPpaYRtG/kRMRTorUIDj8BxoOt1T4=",
|
||||
"lastModified": 1723991338,
|
||||
"narHash": "sha256-Grh5PF0+gootJfOJFenTTxDTYPidA3V28dqJ/WV7iis=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "a58bc8ad779655e790115244571758e8de055e3d",
|
||||
"rev": "8a3354191c0d7144db9756a74755672387b702ba",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -651,11 +667,11 @@
|
|||
"treefmt-nix": "treefmt-nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1723816538,
|
||||
"narHash": "sha256-h37ltjdifkd7iLtMtBXSBBeYSTuBEKMW6ClFoC7nReQ=",
|
||||
"lastModified": 1724118730,
|
||||
"narHash": "sha256-UwtVD2FyD7FjfLLmqGLsCBCQgLC1Jj78e1PhiVb0MJk=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixvim",
|
||||
"rev": "00f32f0430f82c74919c72af84bc95bf5ae434e4",
|
||||
"rev": "39081a41067a7bdb66f6f85a3fee9693ff8a21b1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -673,11 +689,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1723367906,
|
||||
"narHash": "sha256-v1qA4WBGDI2uH/TVqRwuXSBP341W681psbzYJ8zrjog=",
|
||||
"lastModified": 1723969429,
|
||||
"narHash": "sha256-BuewfNEXEf11MIkJY+uvWsdLu1dIvgJqntWChvNdALg=",
|
||||
"owner": "NuschtOS",
|
||||
"repo": "search",
|
||||
"rev": "6ca2c3ae05a915c160512bd41f6810f456c9b30d",
|
||||
"rev": "a05d1805f2a2bc47d230e5e92aecbf69f784f3d0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -721,6 +737,7 @@
|
|||
"home-manager": "home-manager",
|
||||
"homebrew-cask": "homebrew-cask",
|
||||
"homebrew-core": "homebrew-core",
|
||||
"hyprland-stable": "hyprland-stable",
|
||||
"lanzaboote": "lanzaboote",
|
||||
"lix-module": "lix-module",
|
||||
"nix-darwin": "nix-darwin",
|
||||
|
@ -773,11 +790,11 @@
|
|||
},
|
||||
"stablepkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1723556749,
|
||||
"narHash": "sha256-+CHVZnTnIYRLYsARInHYoWkujzcRkLY/gXm3s5bE52o=",
|
||||
"lastModified": 1723938990,
|
||||
"narHash": "sha256-9tUadhnZQbWIiYVXH8ncfGXGvkNq3Hag4RCBEMUk7MI=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "4a92571f9207810b559c9eac203d1f4d79830073",
|
||||
"rev": "c42fcfbdfeae23e68fc520f9182dde9f38ad1890",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -855,11 +872,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1723454642,
|
||||
"narHash": "sha256-S0Gvsenh0II7EAaoc9158ZB4vYyuycvMGKGxIbERNAM=",
|
||||
"lastModified": 1723808491,
|
||||
"narHash": "sha256-rhis3qNuGmJmYC/okT7Dkc4M8CeUuRCSvW6kC2f3hBc=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "349de7bc435bdff37785c2466f054ed1766173be",
|
||||
"rev": "1d07739554fdc4f8481068f1b11d6ab4c1a4167a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
148
flake.nix
148
flake.nix
|
@ -3,38 +3,52 @@
|
|||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
stablepkgs.url = "github:nixos/nixpkgs/nixos-24.05";
|
||||
|
||||
bleedingpkgs.url = "github:nixos/nixpkgs/master";
|
||||
nix-darwin.url = "github:LnL7/nix-darwin";
|
||||
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
nix-darwin = {
|
||||
url = "github:LnL7/nix-darwin";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nix-homebrew.url = "github:zhaofengli-wip/nix-homebrew";
|
||||
|
||||
homebrew-core = {
|
||||
url = "github:homebrew/homebrew-core";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
homebrew-cask = {
|
||||
url = "github:homebrew/homebrew-cask";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
catppuccin.url = "github:catppuccin/nix";
|
||||
|
||||
lanzaboote = {
|
||||
url = "github:nix-community/lanzaboote/v0.4.1";
|
||||
|
||||
# Optional but recommended to limit the size of your system closure.
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
lix-module = {
|
||||
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.90.0.tar.gz";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
apple-silicon = {
|
||||
url = "github:tpwrules/nixos-apple-silicon";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nixvim = {
|
||||
url = "github:nix-community/nixvim";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
@ -55,83 +69,29 @@
|
|||
apple-silicon,
|
||||
...
|
||||
} @ inputs: rec {
|
||||
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra;
|
||||
formatter = with nixpkgs.legacyPackages; {
|
||||
x86_64-linux = x86_64-linux.alejandra;
|
||||
aarch64-linux = aarch64-linux.alejandra;
|
||||
aarch64-darwin = aarch64-darwin.alejandra;
|
||||
};
|
||||
|
||||
nixosConfigurations = {
|
||||
demeter = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs;};
|
||||
system = "x86_64-linux";
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
system = "x86_64-linux";
|
||||
};
|
||||
modules = [
|
||||
./hosts/demeter
|
||||
./modules/nixos/gaming
|
||||
./modules/nixos/audio
|
||||
./modules/nixos/networking
|
||||
./modules/nixos/fonts
|
||||
./modules/nixos/greeter
|
||||
./modules/nixos/core
|
||||
];
|
||||
};
|
||||
|
||||
catppuccin.nixosModules.catppuccin
|
||||
lix-module.nixosModules.default
|
||||
lanzaboote.nixosModules.lanzaboote
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.backupFileExtension = "backup";
|
||||
home-manager.users.youwen = {
|
||||
imports = [
|
||||
./users/youwen/linux/desktop
|
||||
./users/youwen/linux/packages/x86_64
|
||||
./users/youwen/linux/programs
|
||||
./users/youwen/common/neofetch
|
||||
./users/youwen/common/neovim
|
||||
./users/youwen/common
|
||||
inputs.catppuccin.homeManagerModules.catppuccin
|
||||
inputs.nixvim.homeManagerModules.nixvim
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
callisto = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs;};
|
||||
system = "aarch64-linux";
|
||||
modules = [
|
||||
./hosts/callisto
|
||||
./modules/nixos/audio
|
||||
./modules/nixos/networking
|
||||
./modules/nixos/fonts
|
||||
./modules/nixos/greeter
|
||||
./modules/nixos/core
|
||||
|
||||
apple-silicon.nixosModules.apple-silicon-support
|
||||
catppuccin.nixosModules.catppuccin
|
||||
lix-module.nixosModules.default
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.backupFileExtension = "backup";
|
||||
home-manager.users.youwen = {
|
||||
imports = [
|
||||
./users/youwen/common
|
||||
./users/youwen/common/neofetch/asahi-only.nix
|
||||
./users/youwen/linux/laptop
|
||||
./users/youwen/linux/packages/aarch-64
|
||||
./users/youwen/common/neovim
|
||||
|
||||
inputs.catppuccin.homeManagerModules.catppuccin
|
||||
inputs.nixvim.homeManagerModules.nixvim
|
||||
];
|
||||
};
|
||||
}
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
(self: super: {
|
||||
signal-desktop =
|
||||
bleedingpkgs.legacyPackages.${self.system}.signal-desktop;
|
||||
})
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
adrastea = nixpkgs.lib.nixosSystem {
|
||||
|
@ -139,65 +99,13 @@
|
|||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./hosts/adrastea
|
||||
./modules/nixos/gaming
|
||||
./modules/nixos/audio
|
||||
./modules/nixos/networking
|
||||
./modules/nixos/fonts
|
||||
./modules/nixos/greeter
|
||||
./modules/nixos/core
|
||||
|
||||
catppuccin.nixosModules.catppuccin
|
||||
lix-module.nixosModules.default
|
||||
# lanzaboote.nixosModules.lanzaboote
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.backupFileExtension = "backup";
|
||||
home-manager.users.youwen = {
|
||||
imports = [
|
||||
./users/youwen/linux/laptop
|
||||
./users/youwen/linux/packages/x86_64
|
||||
./users/youwen/linux/programs
|
||||
./users/youwen/common/neovim
|
||||
./users/youwen/common
|
||||
./users/youwen/common/neofetch
|
||||
./hosts/adrastea/home-manager-overrides.nix
|
||||
inputs.catppuccin.homeManagerModules.catppuccin
|
||||
inputs.nixvim.homeManagerModules.nixvim
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
formatter.aarch64-darwin = nixpkgs.legacyPackages.aarch64-darwin.alejandra;
|
||||
formatter.aarch64-linux = nixpkgs.legacyPackages.aarch64-linux.alejandra;
|
||||
# Build darwin flake using:
|
||||
# $ darwin-rebuild build --flake .#Youwens-MacBook-Pro
|
||||
darwinConfigurations.phobos = nix-darwin.lib.darwinSystem {
|
||||
specialArgs = {inherit inputs;};
|
||||
modules = [
|
||||
./hosts/phobos
|
||||
home-manager.darwinModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.youwen.imports = [
|
||||
./users/youwen/darwin/darwin-home.nix
|
||||
./users/youwen/common/core.nix
|
||||
./users/youwen/common/neofetch
|
||||
./users/youwen/common/neovim
|
||||
];
|
||||
home-manager.backupFileExtension = "backup";
|
||||
|
||||
# Optionally, use home-manager.extraSpecialArgs to pass
|
||||
# arguments to home.nix
|
||||
}
|
||||
nix-homebrew.darwinModules.nix-homebrew
|
||||
./modules/darwin/homebrew.nix
|
||||
./modules/darwin/yabai.nix
|
||||
./modules/darwin/skhd.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
227
hosts/adrastea/configuration.nix
Executable file
227
hosts/adrastea/configuration.nix
Executable file
|
@ -0,0 +1,227 @@
|
|||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
boot.loader = {
|
||||
efi.canTouchEfiVariables = true;
|
||||
timeout = 15;
|
||||
# Lanzaboote currently replaces the systemd-boot module.
|
||||
# This setting is usually set to true in configuration.nix
|
||||
# generated at installation time. So we force it to false
|
||||
# for now.
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
consoleMode = "auto";
|
||||
};
|
||||
};
|
||||
|
||||
# boot.lanzaboote = {
|
||||
# enable = false;
|
||||
# pkiBundle = "/etc/secureboot";
|
||||
# };
|
||||
|
||||
services.keyd = {
|
||||
enable = true;
|
||||
keyboards = {
|
||||
default = {
|
||||
ids = ["*"];
|
||||
settings = {
|
||||
main = {
|
||||
capslock = "esc";
|
||||
leftalt = "leftcontrol";
|
||||
leftcontrol = "leftalt";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."luks-52d1be6d-b32f-41e0-a6d7-2ff52599fe7c".device = "/dev/disk/by-uuid/52d1be6d-b32f-41e0-a6d7-2ff52599fe7c";
|
||||
|
||||
services.tlp.enable = true;
|
||||
|
||||
networking.hostName = "adrastea"; # Define your hostname.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
# select kernel
|
||||
boot.kernelPackages = pkgs.linuxPackages_zen;
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Los_Angeles";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NAME = "en_US.UTF-8";
|
||||
LC_NUMERIC = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
};
|
||||
|
||||
systemd.services = {NetworkManager-wait-online.enable = false;};
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
# You can disable this if you're only using the Wayland session.
|
||||
services.xserver.enable = false;
|
||||
|
||||
programs.nix-ld = {
|
||||
enable = true;
|
||||
libraries = with pkgs; [icu xorg.libXtst xorg.libXi];
|
||||
};
|
||||
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = true;
|
||||
powerManagement.finegrained = false;
|
||||
open = false;
|
||||
nvidiaSettings = true;
|
||||
prime = {
|
||||
amdgpuBusId = "PCI:4:0:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
offload = {
|
||||
enable = true;
|
||||
enableOffloadCmd = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
hardware.graphics.enable = true;
|
||||
|
||||
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
|
||||
# services.desktopManager.plasma6.enable = true;
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
xkb.layout = "us";
|
||||
xkb.variant = "";
|
||||
};
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.youwen = {
|
||||
isNormalUser = true;
|
||||
description = "Youwen Wu";
|
||||
extraGroups = ["networkmanager" "wheel" "nixos" "realtime"];
|
||||
};
|
||||
|
||||
users.groups.realtime = {};
|
||||
|
||||
nix.settings = {
|
||||
trusted-users = ["root" "youwen"];
|
||||
experimental-features = ["nix-command" "flakes"];
|
||||
};
|
||||
|
||||
services.udev.extraRules = ''
|
||||
KERNEL=="cpu_dma_latency", GROUP="realtime"
|
||||
'';
|
||||
|
||||
security.pam.loginLimits = [
|
||||
{
|
||||
domain = "@realtime";
|
||||
type = "-";
|
||||
item = "rtprio";
|
||||
value = 98;
|
||||
}
|
||||
{
|
||||
domain = "@realtime";
|
||||
type = "-";
|
||||
item = "memlock";
|
||||
value = "unlimited";
|
||||
}
|
||||
{
|
||||
domain = "@realtime";
|
||||
type = "-";
|
||||
item = "nice";
|
||||
value = -11;
|
||||
}
|
||||
];
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
neovim
|
||||
wget
|
||||
git
|
||||
curl
|
||||
librewolf
|
||||
gnumake
|
||||
gcc
|
||||
cachix
|
||||
gnupg
|
||||
openssh
|
||||
python3
|
||||
steam-run
|
||||
|
||||
# deps for neovim compilation
|
||||
lua51Packages.lua
|
||||
lua51Packages.luarocks
|
||||
tree-sitter
|
||||
];
|
||||
|
||||
environment.variables = {
|
||||
EDITOR = "nvim";
|
||||
NIX_AUTO_RUN = 1;
|
||||
};
|
||||
|
||||
# tells electron apps to use Wayland
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
programs.dconf.enable = true;
|
||||
|
||||
programs.hyprland.enable = true;
|
||||
|
||||
programs.zsh.enable = false;
|
||||
programs.fish.enable = true;
|
||||
users.users.youwen.shell = pkgs.fish;
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "24.05"; # Did you read the comment?
|
||||
}
|
250
hosts/adrastea/default.nix
Executable file → Normal file
250
hosts/adrastea/default.nix
Executable file → Normal file
|
@ -1,227 +1,35 @@
|
|||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
{inputs, ...}: {
|
||||
imports = with inputs; [
|
||||
./configuration.nix
|
||||
../../modules/nixos/gaming
|
||||
../../modules/nixos/audio
|
||||
../../modules/nixos/networking
|
||||
../../modules/nixos/fonts
|
||||
../../modules/nixos/greeter
|
||||
../../modules/nixos/core
|
||||
../../overlays
|
||||
|
||||
catppuccin.nixosModules.catppuccin
|
||||
lix-module.nixosModules.default
|
||||
# lanzaboote.nixosModules.lanzaboote
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.backupFileExtension = "backup";
|
||||
home-manager.users.youwen = {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
./home-manager-extras
|
||||
../../users/youwen/linux/laptop
|
||||
../../users/youwen/linux/packages/x86_64
|
||||
../../users/youwen/linux/programs
|
||||
../../users/youwen/common/neovim
|
||||
../../users/youwen/common
|
||||
../../users/youwen/common/neofetch
|
||||
inputs.catppuccin.homeManagerModules.catppuccin
|
||||
inputs.nixvim.homeManagerModules.nixvim
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
boot.loader = {
|
||||
efi.canTouchEfiVariables = true;
|
||||
timeout = 15;
|
||||
# Lanzaboote currently replaces the systemd-boot module.
|
||||
# This setting is usually set to true in configuration.nix
|
||||
# generated at installation time. So we force it to false
|
||||
# for now.
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
consoleMode = "auto";
|
||||
};
|
||||
};
|
||||
|
||||
# boot.lanzaboote = {
|
||||
# enable = false;
|
||||
# pkiBundle = "/etc/secureboot";
|
||||
# };
|
||||
|
||||
services.keyd = {
|
||||
enable = true;
|
||||
keyboards = {
|
||||
default = {
|
||||
ids = ["*"];
|
||||
settings = {
|
||||
main = {
|
||||
capslock = "esc";
|
||||
leftalt = "leftcontrol";
|
||||
leftcontrol = "leftalt";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."luks-52d1be6d-b32f-41e0-a6d7-2ff52599fe7c".device = "/dev/disk/by-uuid/52d1be6d-b32f-41e0-a6d7-2ff52599fe7c";
|
||||
|
||||
services.tlp.enable = true;
|
||||
|
||||
networking.hostName = "adrastea"; # Define your hostname.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
# select kernel
|
||||
boot.kernelPackages = pkgs.linuxPackages_zen;
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Los_Angeles";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NAME = "en_US.UTF-8";
|
||||
LC_NUMERIC = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
};
|
||||
|
||||
systemd.services = {NetworkManager-wait-online.enable = false;};
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
# You can disable this if you're only using the Wayland session.
|
||||
services.xserver.enable = false;
|
||||
|
||||
programs.nix-ld = {
|
||||
enable = true;
|
||||
libraries = with pkgs; [icu xorg.libXtst xorg.libXi];
|
||||
};
|
||||
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = true;
|
||||
powerManagement.finegrained = false;
|
||||
open = false;
|
||||
nvidiaSettings = true;
|
||||
prime = {
|
||||
amdgpuBusId = "PCI:4:0:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
offload = {
|
||||
enable = true;
|
||||
enableOffloadCmd = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
hardware.graphics.enable = true;
|
||||
|
||||
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
|
||||
# services.desktopManager.plasma6.enable = true;
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
xkb.layout = "us";
|
||||
xkb.variant = "";
|
||||
};
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.youwen = {
|
||||
isNormalUser = true;
|
||||
description = "Youwen Wu";
|
||||
extraGroups = ["networkmanager" "wheel" "nixos" "realtime"];
|
||||
};
|
||||
|
||||
users.groups.realtime = {};
|
||||
|
||||
nix.settings = {
|
||||
trusted-users = ["root" "youwen"];
|
||||
experimental-features = ["nix-command" "flakes"];
|
||||
};
|
||||
|
||||
services.udev.extraRules = ''
|
||||
KERNEL=="cpu_dma_latency", GROUP="realtime"
|
||||
'';
|
||||
|
||||
security.pam.loginLimits = [
|
||||
{
|
||||
domain = "@realtime";
|
||||
type = "-";
|
||||
item = "rtprio";
|
||||
value = 98;
|
||||
}
|
||||
{
|
||||
domain = "@realtime";
|
||||
type = "-";
|
||||
item = "memlock";
|
||||
value = "unlimited";
|
||||
}
|
||||
{
|
||||
domain = "@realtime";
|
||||
type = "-";
|
||||
item = "nice";
|
||||
value = -11;
|
||||
}
|
||||
];
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
neovim
|
||||
wget
|
||||
git
|
||||
curl
|
||||
librewolf
|
||||
gnumake
|
||||
gcc
|
||||
cachix
|
||||
gnupg
|
||||
openssh
|
||||
python3
|
||||
steam-run
|
||||
|
||||
# deps for neovim compilation
|
||||
lua51Packages.lua
|
||||
lua51Packages.luarocks
|
||||
tree-sitter
|
||||
];
|
||||
|
||||
environment.variables = {
|
||||
EDITOR = "nvim";
|
||||
NIX_AUTO_RUN = 1;
|
||||
};
|
||||
|
||||
# tells electron apps to use Wayland
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
programs.dconf.enable = true;
|
||||
|
||||
programs.hyprland.enable = true;
|
||||
|
||||
programs.zsh.enable = false;
|
||||
programs.fish.enable = true;
|
||||
users.users.youwen.shell = pkgs.fish;
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "24.05"; # Did you read the comment?
|
||||
}
|
||||
|
|
198
hosts/callisto/configuration.nix
Executable file
198
hosts/callisto/configuration.nix
Executable file
|
@ -0,0 +1,198 @@
|
|||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
# ./apple-silicon-support
|
||||
];
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = false;
|
||||
|
||||
hardware.asahi = {
|
||||
peripheralFirmwareDirectory = ./firmware;
|
||||
useExperimentalGPUDriver = true;
|
||||
experimentalGPUInstallMode = "overlay";
|
||||
};
|
||||
|
||||
boot.extraModprobeConfig = ''
|
||||
options hid_apple iso_layout=0
|
||||
'';
|
||||
|
||||
boot.kernelParams = ["apple_dcp.show_notch=1"];
|
||||
|
||||
networking.hostName = "callisto"; # Define your hostname.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
networking.wireless.iwd = {
|
||||
enable = true;
|
||||
settings.General.EnableNetworkConfiguration = true;
|
||||
};
|
||||
|
||||
nixpkgs.overlays = [inputs.apple-silicon.overlays.apple-silicon-overlay];
|
||||
|
||||
programs.light.enable = true;
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Enable networking
|
||||
# networking.networkmanager.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Los_Angeles";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NAME = "en_US.UTF-8";
|
||||
LC_NUMERIC = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
};
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
# You can disable this if you're only using the Wayland session.
|
||||
services.xserver.enable = false;
|
||||
|
||||
programs.nix-ld = {
|
||||
enable = true;
|
||||
libraries = with pkgs; [icu xorg.libXtst xorg.libXi];
|
||||
};
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
xkb.layout = "us";
|
||||
xkb.variant = "";
|
||||
};
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.youwen = {
|
||||
isNormalUser = true;
|
||||
description = "Youwen Wu";
|
||||
extraGroups = ["networkmanager" "wheel" "nixos" "realtime"];
|
||||
};
|
||||
|
||||
users.groups.realtime = {};
|
||||
|
||||
nix.settings = {
|
||||
trusted-users = ["root" "youwen"];
|
||||
experimental-features = ["nix-command" "flakes"];
|
||||
};
|
||||
|
||||
services.udev.extraRules = ''
|
||||
KERNEL=="cpu_dma_latency", GROUP="realtime"
|
||||
KERNEL=="macsmc-battery", SUBSYSTEM=="power_supply", ATTR{charge_control_end_threshold}="80", ATTR{charge_control_start_threshold}="70"
|
||||
'';
|
||||
|
||||
security.pam.loginLimits = [
|
||||
{
|
||||
domain = "@realtime";
|
||||
type = "-";
|
||||
item = "rtprio";
|
||||
value = 98;
|
||||
}
|
||||
{
|
||||
domain = "@realtime";
|
||||
type = "-";
|
||||
item = "memlock";
|
||||
value = "unlimited";
|
||||
}
|
||||
{
|
||||
domain = "@realtime";
|
||||
type = "-";
|
||||
item = "nice";
|
||||
value = -11;
|
||||
}
|
||||
];
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
neovim
|
||||
wget
|
||||
git
|
||||
curl
|
||||
];
|
||||
|
||||
environment.variables = {
|
||||
EDITOR = "nvim";
|
||||
NIX_AUTO_RUN = 1;
|
||||
};
|
||||
services.keyd = {
|
||||
enable = true;
|
||||
keyboards = {
|
||||
default = {
|
||||
ids = ["*"];
|
||||
settings = {
|
||||
main = {
|
||||
capslock = "esc";
|
||||
leftmeta = "leftcontrol";
|
||||
leftalt = "leftmeta";
|
||||
leftcontrol = "leftalt";
|
||||
rightmeta = "leftalt";
|
||||
rightalt = "layer(rightalt)";
|
||||
};
|
||||
rightalt = {
|
||||
i = "up";
|
||||
j = "left";
|
||||
k = "down";
|
||||
l = "right";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.tlp.enable = true;
|
||||
|
||||
# tells electron apps to use Wayland
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
programs.dconf.enable = true;
|
||||
|
||||
programs.hyprland.enable = true;
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "24.11"; # Did you read the comment?
|
||||
|
||||
programs.zsh.enable = false;
|
||||
programs.fish.enable = true;
|
||||
users.users.youwen.shell = pkgs.fish;
|
||||
}
|
219
hosts/callisto/default.nix
Executable file → Normal file
219
hosts/callisto/default.nix
Executable file → Normal file
|
@ -1,198 +1,33 @@
|
|||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
{inputs, ...}: {
|
||||
imports = with inputs; [
|
||||
./configuration.nix
|
||||
../../modules/nixos/audio
|
||||
../../modules/nixos/networking
|
||||
../../modules/nixos/fonts
|
||||
../../modules/nixos/greeter
|
||||
../../modules/nixos/core
|
||||
../../overlays
|
||||
|
||||
apple-silicon.nixosModules.apple-silicon-support
|
||||
catppuccin.nixosModules.catppuccin
|
||||
lix-module.nixosModules.default
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.backupFileExtension = "backup";
|
||||
home-manager.users.youwen = {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
# ./apple-silicon-support
|
||||
../../users/youwen/common
|
||||
../../users/youwen/common/neofetch/asahi-only.nix
|
||||
../../users/youwen/linux/laptop
|
||||
../../users/youwen/linux/packages/aarch-64
|
||||
../../users/youwen/common/neovim
|
||||
|
||||
inputs.catppuccin.homeManagerModules.catppuccin
|
||||
inputs.nixvim.homeManagerModules.nixvim
|
||||
];
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = false;
|
||||
|
||||
hardware.asahi = {
|
||||
peripheralFirmwareDirectory = ./firmware;
|
||||
useExperimentalGPUDriver = true;
|
||||
experimentalGPUInstallMode = "overlay";
|
||||
};
|
||||
|
||||
boot.extraModprobeConfig = ''
|
||||
options hid_apple iso_layout=0
|
||||
'';
|
||||
|
||||
boot.kernelParams = ["apple_dcp.show_notch=1"];
|
||||
|
||||
networking.hostName = "callisto"; # Define your hostname.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
networking.wireless.iwd = {
|
||||
enable = true;
|
||||
settings.General.EnableNetworkConfiguration = true;
|
||||
};
|
||||
|
||||
nixpkgs.overlays = [inputs.apple-silicon.overlays.apple-silicon-overlay];
|
||||
|
||||
programs.light.enable = true;
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Enable networking
|
||||
# networking.networkmanager.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Los_Angeles";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NAME = "en_US.UTF-8";
|
||||
LC_NUMERIC = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
};
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
# You can disable this if you're only using the Wayland session.
|
||||
services.xserver.enable = false;
|
||||
|
||||
programs.nix-ld = {
|
||||
enable = true;
|
||||
libraries = with pkgs; [icu xorg.libXtst xorg.libXi];
|
||||
};
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
xkb.layout = "us";
|
||||
xkb.variant = "";
|
||||
};
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.youwen = {
|
||||
isNormalUser = true;
|
||||
description = "Youwen Wu";
|
||||
extraGroups = ["networkmanager" "wheel" "nixos" "realtime"];
|
||||
};
|
||||
|
||||
users.groups.realtime = {};
|
||||
|
||||
nix.settings = {
|
||||
trusted-users = ["root" "youwen"];
|
||||
experimental-features = ["nix-command" "flakes"];
|
||||
};
|
||||
|
||||
services.udev.extraRules = ''
|
||||
KERNEL=="cpu_dma_latency", GROUP="realtime"
|
||||
KERNEL=="macsmc-battery", SUBSYSTEM=="power_supply", ATTR{charge_control_end_threshold}="80", ATTR{charge_control_start_threshold}="70"
|
||||
'';
|
||||
|
||||
security.pam.loginLimits = [
|
||||
{
|
||||
domain = "@realtime";
|
||||
type = "-";
|
||||
item = "rtprio";
|
||||
value = 98;
|
||||
}
|
||||
{
|
||||
domain = "@realtime";
|
||||
type = "-";
|
||||
item = "memlock";
|
||||
value = "unlimited";
|
||||
}
|
||||
{
|
||||
domain = "@realtime";
|
||||
type = "-";
|
||||
item = "nice";
|
||||
value = -11;
|
||||
}
|
||||
];
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
neovim
|
||||
wget
|
||||
git
|
||||
curl
|
||||
];
|
||||
|
||||
environment.variables = {
|
||||
EDITOR = "nvim";
|
||||
NIX_AUTO_RUN = 1;
|
||||
};
|
||||
services.keyd = {
|
||||
enable = true;
|
||||
keyboards = {
|
||||
default = {
|
||||
ids = ["*"];
|
||||
settings = {
|
||||
main = {
|
||||
capslock = "esc";
|
||||
leftmeta = "leftcontrol";
|
||||
leftalt = "leftmeta";
|
||||
leftcontrol = "leftalt";
|
||||
rightmeta = "leftalt";
|
||||
rightalt = "layer(rightalt)";
|
||||
};
|
||||
rightalt = {
|
||||
i = "up";
|
||||
j = "left";
|
||||
k = "down";
|
||||
l = "right";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.tlp.enable = true;
|
||||
|
||||
# tells electron apps to use Wayland
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
programs.dconf.enable = true;
|
||||
|
||||
programs.hyprland.enable = true;
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "24.11"; # Did you read the comment?
|
||||
|
||||
programs.zsh.enable = false;
|
||||
programs.fish.enable = true;
|
||||
users.users.youwen.shell = pkgs.fish;
|
||||
}
|
||||
|
|
210
hosts/demeter/configuration.nix
Executable file
210
hosts/demeter/configuration.nix
Executable file
|
@ -0,0 +1,210 @@
|
|||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
boot.loader = {
|
||||
efi.canTouchEfiVariables = true;
|
||||
timeout = 15;
|
||||
# Lanzaboote currently replaces the systemd-boot module.
|
||||
# This setting is usually set to true in configuration.nix
|
||||
# generated at installation time. So we force it to false
|
||||
# for now.
|
||||
systemd-boot = {
|
||||
enable = false;
|
||||
consoleMode = "auto";
|
||||
};
|
||||
};
|
||||
|
||||
boot.lanzaboote = {
|
||||
enable = true;
|
||||
pkiBundle = "/etc/secureboot";
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."luks-af320a0f-b388-43f5-b5a3-af2b47cfc716".device = "/dev/disk/by-uuid/af320a0f-b388-43f5-b5a3-af2b47cfc716";
|
||||
|
||||
networking.hostName = "demeter"; # Define your hostname.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
# select kernel
|
||||
boot.kernelPackages = pkgs.linuxPackages_zen;
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Los_Angeles";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NAME = "en_US.UTF-8";
|
||||
LC_NUMERIC = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
};
|
||||
|
||||
systemd.services = {NetworkManager-wait-online.enable = false;};
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
# You can disable this if you're only using the Wayland session.
|
||||
services.xserver.enable = false;
|
||||
|
||||
programs.nix-ld = {
|
||||
enable = true;
|
||||
libraries = with pkgs; [icu xorg.libXtst xorg.libXi];
|
||||
};
|
||||
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = true;
|
||||
powerManagement.finegrained = false;
|
||||
open = false;
|
||||
nvidiaSettings = true;
|
||||
};
|
||||
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
};
|
||||
|
||||
services.blueman.enable = true;
|
||||
|
||||
hardware.graphics.enable = true;
|
||||
|
||||
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
|
||||
services.flatpak.enable = true;
|
||||
|
||||
# services.desktopManager.plasma6.enable = true;
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
xkb.layout = "us";
|
||||
xkb.variant = "";
|
||||
};
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.youwen = {
|
||||
isNormalUser = true;
|
||||
description = "Youwen Wu";
|
||||
extraGroups = ["networkmanager" "wheel" "nixos" "realtime"];
|
||||
};
|
||||
|
||||
users.groups.realtime = {};
|
||||
|
||||
nix.settings = {
|
||||
trusted-users = ["root" "youwen"];
|
||||
experimental-features = ["nix-command" "flakes"];
|
||||
};
|
||||
|
||||
services.udev.extraRules = ''
|
||||
KERNEL=="cpu_dma_latency", GROUP="realtime"
|
||||
'';
|
||||
|
||||
security.pam.loginLimits = [
|
||||
{
|
||||
domain = "@realtime";
|
||||
type = "-";
|
||||
item = "rtprio";
|
||||
value = 98;
|
||||
}
|
||||
{
|
||||
domain = "@realtime";
|
||||
type = "-";
|
||||
item = "memlock";
|
||||
value = "unlimited";
|
||||
}
|
||||
{
|
||||
domain = "@realtime";
|
||||
type = "-";
|
||||
item = "nice";
|
||||
value = -11;
|
||||
}
|
||||
];
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
neovim
|
||||
wget
|
||||
git
|
||||
curl
|
||||
librewolf
|
||||
gnumake
|
||||
gcc
|
||||
cachix
|
||||
gnupg
|
||||
openssh
|
||||
python3
|
||||
steam-run
|
||||
|
||||
# deps for neovim compilation
|
||||
lua51Packages.lua
|
||||
lua51Packages.luarocks
|
||||
tree-sitter
|
||||
];
|
||||
|
||||
environment.variables = {
|
||||
EDITOR = "nvim";
|
||||
NIX_AUTO_RUN = 1;
|
||||
};
|
||||
|
||||
# tells electron apps to use Wayland
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
programs.dconf.enable = true;
|
||||
|
||||
programs.hyprland.enable = true;
|
||||
|
||||
programs.zsh.enable = false;
|
||||
programs.fish.enable = true;
|
||||
users.users.youwen.shell = pkgs.fish;
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "24.05"; # Did you read the comment?
|
||||
}
|
232
hosts/demeter/default.nix
Executable file → Normal file
232
hosts/demeter/default.nix
Executable file → Normal file
|
@ -1,210 +1,42 @@
|
|||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
pkgs,
|
||||
lib,
|
||||
system,
|
||||
...
|
||||
}: {
|
||||
imports = with inputs; [
|
||||
./configuration.nix
|
||||
../../modules/nixos/gaming
|
||||
../../modules/nixos/audio
|
||||
../../modules/nixos/networking
|
||||
../../modules/nixos/fonts
|
||||
../../modules/nixos/greeter
|
||||
../../modules/nixos/core
|
||||
../../overlays
|
||||
|
||||
catppuccin.nixosModules.catppuccin
|
||||
lix-module.nixosModules.default
|
||||
lanzaboote.nixosModules.lanzaboote
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.backupFileExtension = "backup";
|
||||
home-manager.extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
inherit system;
|
||||
};
|
||||
home-manager.users.youwen = {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
../../users/youwen/linux/desktop
|
||||
../../users/youwen/linux/packages/x86_64
|
||||
../../users/youwen/linux/programs
|
||||
../../users/youwen/common/neofetch
|
||||
../../users/youwen/common/neovim
|
||||
../../users/youwen/common
|
||||
catppuccin.homeManagerModules.catppuccin
|
||||
nixvim.homeManagerModules.nixvim
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
boot.loader = {
|
||||
efi.canTouchEfiVariables = true;
|
||||
timeout = 15;
|
||||
# Lanzaboote currently replaces the systemd-boot module.
|
||||
# This setting is usually set to true in configuration.nix
|
||||
# generated at installation time. So we force it to false
|
||||
# for now.
|
||||
systemd-boot = {
|
||||
enable = false;
|
||||
consoleMode = "auto";
|
||||
};
|
||||
};
|
||||
|
||||
boot.lanzaboote = {
|
||||
enable = true;
|
||||
pkiBundle = "/etc/secureboot";
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."luks-af320a0f-b388-43f5-b5a3-af2b47cfc716".device = "/dev/disk/by-uuid/af320a0f-b388-43f5-b5a3-af2b47cfc716";
|
||||
|
||||
networking.hostName = "demeter"; # Define your hostname.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
# select kernel
|
||||
boot.kernelPackages = pkgs.linuxPackages_zen;
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Los_Angeles";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NAME = "en_US.UTF-8";
|
||||
LC_NUMERIC = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
};
|
||||
|
||||
systemd.services = {NetworkManager-wait-online.enable = false;};
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
# You can disable this if you're only using the Wayland session.
|
||||
services.xserver.enable = false;
|
||||
|
||||
programs.nix-ld = {
|
||||
enable = true;
|
||||
libraries = with pkgs; [icu xorg.libXtst xorg.libXi];
|
||||
};
|
||||
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = true;
|
||||
powerManagement.finegrained = false;
|
||||
open = false;
|
||||
nvidiaSettings = true;
|
||||
};
|
||||
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
};
|
||||
|
||||
services.blueman.enable = true;
|
||||
|
||||
hardware.graphics.enable = true;
|
||||
|
||||
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
|
||||
services.flatpak.enable = true;
|
||||
|
||||
# services.desktopManager.plasma6.enable = true;
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
xkb.layout = "us";
|
||||
xkb.variant = "";
|
||||
};
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.youwen = {
|
||||
isNormalUser = true;
|
||||
description = "Youwen Wu";
|
||||
extraGroups = ["networkmanager" "wheel" "nixos" "realtime"];
|
||||
};
|
||||
|
||||
users.groups.realtime = {};
|
||||
|
||||
nix.settings = {
|
||||
trusted-users = ["root" "youwen"];
|
||||
experimental-features = ["nix-command" "flakes"];
|
||||
};
|
||||
|
||||
services.udev.extraRules = ''
|
||||
KERNEL=="cpu_dma_latency", GROUP="realtime"
|
||||
'';
|
||||
|
||||
security.pam.loginLimits = [
|
||||
{
|
||||
domain = "@realtime";
|
||||
type = "-";
|
||||
item = "rtprio";
|
||||
value = 98;
|
||||
}
|
||||
{
|
||||
domain = "@realtime";
|
||||
type = "-";
|
||||
item = "memlock";
|
||||
value = "unlimited";
|
||||
}
|
||||
{
|
||||
domain = "@realtime";
|
||||
type = "-";
|
||||
item = "nice";
|
||||
value = -11;
|
||||
}
|
||||
];
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
neovim
|
||||
wget
|
||||
git
|
||||
curl
|
||||
librewolf
|
||||
gnumake
|
||||
gcc
|
||||
cachix
|
||||
gnupg
|
||||
openssh
|
||||
python3
|
||||
steam-run
|
||||
|
||||
# deps for neovim compilation
|
||||
lua51Packages.lua
|
||||
lua51Packages.luarocks
|
||||
tree-sitter
|
||||
];
|
||||
|
||||
environment.variables = {
|
||||
EDITOR = "nvim";
|
||||
NIX_AUTO_RUN = 1;
|
||||
};
|
||||
|
||||
# tells electron apps to use Wayland
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
programs.dconf.enable = true;
|
||||
|
||||
programs.hyprland.enable = true;
|
||||
|
||||
programs.zsh.enable = false;
|
||||
programs.fish.enable = true;
|
||||
users.users.youwen.shell = pkgs.fish;
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "24.05"; # Did you read the comment?
|
||||
}
|
||||
|
|
|
@ -1,39 +0,0 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules =
|
||||
[ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/2616d86c-aac2-4780-9527-7b11192e783f";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/B826-E14B";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp6s0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode =
|
||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
0
hosts/demeter/home-manager/default.nix
Normal file
0
hosts/demeter/home-manager/default.nix
Normal file
57
hosts/phobos/configuration.nix
Executable file
57
hosts/phobos/configuration.nix
Executable file
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# Expose the package set, including overlays, for convenience.
|
||||
# darwinPackages = inputs.self.darwinConfigurations."Youwens-MacBook-Pro".pkgs;
|
||||
|
||||
# List packages installed in system profile. To search by name, run:
|
||||
# $ nix-env -qaP | grep wget
|
||||
environment.systemPackages = with pkgs; [];
|
||||
|
||||
# Use a custom configuration.nix location.
|
||||
# $ darwin-rebuild switch -I darwin-config=$HOME/.config/nixpkgs/darwin/configuration.nix
|
||||
# environment.darwinConfig = "$HOME/.config/nixpkgs/darwin/configuration.nix";
|
||||
|
||||
# Auto upgrade nix package and the daemon service.
|
||||
services.nix-daemon.enable = true;
|
||||
# nix.package = pkgs.nix;
|
||||
|
||||
nix.settings.experimental-features = "nix-command flakes";
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# Create /etc/zshrc that loads the nix-darwin environment.
|
||||
programs.zsh.enable = true; # default shell on catalina
|
||||
programs.fish.enable = true;
|
||||
programs.bash.enable = true;
|
||||
|
||||
system.configurationRevision =
|
||||
config.self.rev or config.self.dirtyRev or null;
|
||||
|
||||
nixpkgs.hostPlatform = "aarch64-darwin";
|
||||
|
||||
# Used for backwards compatibility, please read the changelog before changing.
|
||||
# $ darwin-rebuild changelog
|
||||
system.stateVersion = 4;
|
||||
|
||||
users.users.youwen = {
|
||||
home = "/Users/youwen";
|
||||
description = "Youwen Wu";
|
||||
shell = pkgs.fish;
|
||||
};
|
||||
|
||||
security.pam.enableSudoTouchIdAuth = true;
|
||||
|
||||
fonts = {
|
||||
packages = with pkgs; [
|
||||
noto-fonts
|
||||
noto-fonts-cjk
|
||||
noto-fonts-emoji
|
||||
(nerdfonts.override {fonts = ["CascadiaCode"];})
|
||||
(google-fonts.override {fonts = ["Lora"];})
|
||||
];
|
||||
};
|
||||
}
|
75
hosts/phobos/default.nix
Executable file → Normal file
75
hosts/phobos/default.nix
Executable file → Normal file
|
@ -1,57 +1,22 @@
|
|||
{
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# Expose the package set, including overlays, for convenience.
|
||||
# darwinPackages = inputs.self.darwinConfigurations."Youwens-MacBook-Pro".pkgs;
|
||||
|
||||
# List packages installed in system profile. To search by name, run:
|
||||
# $ nix-env -qaP | grep wget
|
||||
environment.systemPackages = with pkgs; [];
|
||||
|
||||
# Use a custom configuration.nix location.
|
||||
# $ darwin-rebuild switch -I darwin-config=$HOME/.config/nixpkgs/darwin/configuration.nix
|
||||
# environment.darwinConfig = "$HOME/.config/nixpkgs/darwin/configuration.nix";
|
||||
|
||||
# Auto upgrade nix package and the daemon service.
|
||||
services.nix-daemon.enable = true;
|
||||
# nix.package = pkgs.nix;
|
||||
|
||||
nix.settings.experimental-features = "nix-command flakes";
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# Create /etc/zshrc that loads the nix-darwin environment.
|
||||
programs.zsh.enable = true; # default shell on catalina
|
||||
programs.fish.enable = true;
|
||||
programs.bash.enable = true;
|
||||
|
||||
system.configurationRevision =
|
||||
config.self.rev or config.self.dirtyRev or null;
|
||||
|
||||
nixpkgs.hostPlatform = "aarch64-darwin";
|
||||
|
||||
# Used for backwards compatibility, please read the changelog before changing.
|
||||
# $ darwin-rebuild changelog
|
||||
system.stateVersion = 4;
|
||||
|
||||
users.users.youwen = {
|
||||
home = "/Users/youwen";
|
||||
description = "Youwen Wu";
|
||||
shell = pkgs.fish;
|
||||
};
|
||||
|
||||
security.pam.enableSudoTouchIdAuth = true;
|
||||
|
||||
fonts = {
|
||||
packages = with pkgs; [
|
||||
noto-fonts
|
||||
noto-fonts-cjk
|
||||
noto-fonts-emoji
|
||||
(nerdfonts.override {fonts = ["CascadiaCode"];})
|
||||
(google-fonts.override {fonts = ["Lora"];})
|
||||
{inputs, ...}: {
|
||||
imports = with inputs; [
|
||||
./configuration.nix
|
||||
home-manager.darwinModules.home-manager
|
||||
{
|
||||
extraSpecialArgs = {inherit inputs;};
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.youwen.imports = [
|
||||
../../users/youwen/darwin/darwin-home.nix
|
||||
../../users/youwen/common/core.nix
|
||||
../../users/youwen/common/neofetch
|
||||
../../users/youwen/common/neovim
|
||||
];
|
||||
home-manager.backupFileExtension = "backup";
|
||||
}
|
||||
nix-homebrew.darwinModules.nix-homebrew
|
||||
../../modules/darwin/homebrew.nix
|
||||
../../modules/darwin/yabai.nix
|
||||
../../modules/darwin/skhd.nix
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
7
overlays/default.nix
Normal file
7
overlays/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{inputs, ...}: {
|
||||
nixpkgs.overlays = [
|
||||
(self: super: {
|
||||
typst-lsp = inputs.stablepkgs.legacyPackages.${self.system}.typst-lsp;
|
||||
})
|
||||
];
|
||||
}
|
|
@ -1,6 +1,12 @@
|
|||
{pkgs, ...}: {
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
system,
|
||||
...
|
||||
}: {
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
package = inputs.stablepkgs.legacyPackages.${system}.hyprland;
|
||||
settings = {
|
||||
exec-once = ["waypaper --restore"];
|
||||
"$mod" = "SUPER";
|
||||
|
|
Loading…
Reference in a new issue