mirror of
https://github.com/srid/nixos-config.git
synced 2026-04-04 17:25:35 +08:00
update..
This commit is contained in:
parent
97bdd0158e
commit
c17d5c4f12
4 changed files with 60 additions and 50 deletions
6
Makefile
6
Makefile
|
|
@ -1,2 +1,8 @@
|
|||
all:
|
||||
sudo nixos-rebuild switch && systemctl restart --user emanote
|
||||
|
||||
|
||||
freeupboot:
|
||||
# Delete all but the last few generations
|
||||
sudo nix-env -p /nix/var/nix/profiles/system --delete-generations +5
|
||||
sudo nixos-rebuild boot
|
||||
|
|
|
|||
14
flake.lock
generated
14
flake.lock
generated
|
|
@ -134,11 +134,11 @@
|
|||
"windicss": "windicss"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1630960993,
|
||||
"narHash": "sha256-dDSWCY+3+7tG0ywX26Kw30mFm3hgYrORyQFIegU9jZ8=",
|
||||
"lastModified": 1631224851,
|
||||
"narHash": "sha256-eI11imyDg95pjkwOj46/b+RIWzzp+yPFtJBfMHfFSkY=",
|
||||
"owner": "srid",
|
||||
"repo": "emanote",
|
||||
"rev": "5b70dfa0cbadffc0312e0281b97bcfae422d9cf1",
|
||||
"rev": "cbff9a3704684988468a7e72b200842a8bc8c48d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -601,17 +601,17 @@
|
|||
},
|
||||
"nixpkgs_6": {
|
||||
"locked": {
|
||||
"lastModified": 1631015389,
|
||||
"narHash": "sha256-9SKTwRbp7OQGa4wKTo1wB6ctC2VlaIeKFZ+flqzPuoI=",
|
||||
"lastModified": 1631206977,
|
||||
"narHash": "sha256-o3Dct9aJ5ht5UaTUBzXrRcK1RZt2eG5/xSlWJuUCVZM=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "bc06c93905f60a82d6ebbb78f78cf289257860cc",
|
||||
"rev": "4f6d8095fd51954120a1d08ea5896fe42dc3923b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "bc06c93905f60a82d6ebbb78f78cf289257860cc",
|
||||
"rev": "4f6d8095fd51954120a1d08ea5896fe42dc3923b",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
|
|
|
|||
70
flake.nix
70
flake.nix
|
|
@ -6,7 +6,7 @@
|
|||
# https://status.nixos.org/
|
||||
#
|
||||
# This ensures that we always use the official nix cache.
|
||||
nixpkgs.url = "github:nixos/nixpkgs/bc06c93905f60a82d6ebbb78f78cf289257860cc";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/4f6d8095fd51954120a1d08ea5896fe42dc3923b";
|
||||
|
||||
nixos-hardware.url = github:NixOS/nixos-hardware/master;
|
||||
home-manager.url = "github:nix-community/home-manager";
|
||||
|
|
@ -55,37 +55,41 @@
|
|||
);
|
||||
};
|
||||
in
|
||||
{
|
||||
# The "name" in nixosConfigurations.${name} should match the `hostname`
|
||||
#
|
||||
nixosConfigurations.p71 = mkHomeMachine
|
||||
./hosts/p71.nix
|
||||
[
|
||||
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-p53
|
||||
./features/desktopish
|
||||
#./features/gnome.nix
|
||||
./features/desktopish/guiapps.nix
|
||||
#./features/virtualbox.nix
|
||||
#./features/server-mode.nix
|
||||
# ./features/postgrest.nix
|
||||
./features/server/devserver.nix
|
||||
];
|
||||
nixosConfigurations.x1c7 = mkHomeMachine
|
||||
./hosts/x1c7.nix
|
||||
[
|
||||
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-x1-7th-gen
|
||||
./features/distributed-build.nix
|
||||
./features/gnome.nix
|
||||
./features/desktopish/guiapps.nix
|
||||
];
|
||||
nixosConfigurations.ryzen9 = mkHomeMachine
|
||||
./hosts/ryzen9.nix
|
||||
[
|
||||
./features/server/harden.nix
|
||||
./features/server/devserver.nix
|
||||
./features/ema/emanote.nix
|
||||
./features/lxd.nix
|
||||
];
|
||||
};
|
||||
{
|
||||
# The "name" in nixosConfigurations.${name} should match the `hostname`
|
||||
#
|
||||
nixosConfigurations.p71 = mkHomeMachine
|
||||
./hosts/p71.nix
|
||||
[
|
||||
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-p53
|
||||
./features/desktopish
|
||||
#./features/gnome.nix
|
||||
./features/desktopish/guiapps.nix
|
||||
./features/server/devserver.nix
|
||||
./features/ema/emanote.nix
|
||||
#./features/virtualbox.nix
|
||||
./features/lxd.nix
|
||||
#./features/server-mode.nix
|
||||
# ./features/postgrest.nix
|
||||
./features/server/devserver.nix
|
||||
./features/server/harden.nix
|
||||
];
|
||||
nixosConfigurations.x1c7 = mkHomeMachine
|
||||
./hosts/x1c7.nix
|
||||
[
|
||||
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-x1-7th-gen
|
||||
./features/distributed-build.nix
|
||||
./features/gnome.nix
|
||||
./features/desktopish/guiapps.nix
|
||||
];
|
||||
nixosConfigurations.ryzen9 = mkHomeMachine
|
||||
./hosts/ryzen9.nix
|
||||
[
|
||||
./features/server/harden.nix
|
||||
./features/server/devserver.nix
|
||||
./features/ema/emanote.nix
|
||||
./features/lxd.nix
|
||||
];
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,38 +9,39 @@
|
|||
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
boot.supportedFilesystems = [ "ntfs" ];
|
||||
# https://notes.srid.ca/rtl8821cu
|
||||
boot.extraModulePackages = [ config.boot.kernelPackages.rtl8821cu ];
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/8d755446-15a4-4260-8a13-7529b585666b";
|
||||
{
|
||||
device = "/dev/disk/by-uuid/8d755446-15a4-4260-8a13-7529b585666b";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."crypted".device = "/dev/disk/by-uuid/68eed875-bd65-4178-bca6-3e1db074ed46";
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/nvme0n1p1";
|
||||
{
|
||||
device = "/dev/nvme0n1p1";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
|
||||
# high-resolution display
|
||||
hardware.video.hidpi.enable = lib.mkDefault true;
|
||||
|
||||
|
||||
hardware.pulseaudio.enable = true;
|
||||
hardware.pulseaudio.support32Bit = true; ## If compatibility with 32-bit applications is desired.
|
||||
services.xserver.videoDrivers = [ "nvidia" "intel" ];
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
# boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nix = {
|
||||
package = pkgs.nixFlakes;
|
||||
|
|
@ -52,7 +53,6 @@
|
|||
|
||||
networking.hostName = "p71"; # Define your hostname.
|
||||
networking.networkmanager.enable = true;
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
|
||||
# Per-interface useDHCP will be mandatory in the future, so this generated config
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue