This commit is contained in:
Yingjie Wang 2024-05-21 06:37:47 -04:00
parent d8d53e3ffb
commit 02069036d1
12 changed files with 83 additions and 123 deletions

View File

@ -1,41 +0,0 @@
{
disko.devices = {
disk = {
my-disk = {
device = "/dev/sdb";
type = "disk";
content = {
type = "gpt";
partitions = {
ESP = {
type = "EF00";
size = "256M";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
swap = {
size = "8G";
content = {
type = "swap";
resumeDevice = true;
};
};
root = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};
};
};
};
};
}

View File

@ -9,11 +9,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1711099426, "lastModified": 1713532798,
"narHash": "sha256-HzpgM/wc3aqpnHJJ2oDqPBkNsqWbW0WfWUO8lKu8nGk=", "narHash": "sha256-wtBhsdMJA3Wa32Wtm1eeo84GejtI43pMrFrmwLXrsEc=",
"owner": "numtide", "owner": "numtide",
"repo": "devshell", "repo": "devshell",
"rev": "2d45b54ca4a183f2fdcf4b19c895b64fbf620ee8", "rev": "12e914740a25ea1891ec619bb53cf5e6ca922e40",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -60,11 +60,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1712014858, "lastModified": 1715865404,
"narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=", "narHash": "sha256-/GJvTdTpuDjNn84j82cU6bXztE0MSkdnTWClUCRub78=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "9126214d0a59633752a136528f5f3b9aa8565b7d", "rev": "8dc45382d5206bd292f9c2768b8058a8fd8311d9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -73,6 +73,21 @@
"type": "github" "type": "github"
} }
}, },
"flake-root": {
"locked": {
"lastModified": 1713493429,
"narHash": "sha256-ztz8JQkI08tjKnsTpfLqzWoKFQF4JGu2LRz8bkdnYUk=",
"owner": "srid",
"repo": "flake-root",
"rev": "bc748b93b86ee76e2032eecda33440ceb2532fcd",
"type": "github"
},
"original": {
"owner": "srid",
"repo": "flake-root",
"type": "github"
}
},
"flake-utils": { "flake-utils": {
"inputs": { "inputs": {
"systems": "systems" "systems": "systems"
@ -91,24 +106,6 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"gitignore": { "gitignore": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -138,11 +135,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1713294767, "lastModified": 1715930644,
"narHash": "sha256-LmaabaQZdx52MPGKPRt9Opoc9Gd9RbwvCdysUUYQoXI=", "narHash": "sha256-W9pyM3/vePxrffHtzlJI6lDS3seANQ+Nqp+i58O46LI=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "fa8c16e2452bf092ac76f09ee1fb1e9f7d0796e7", "rev": "e3ad5108f54177e6520535768ddbf1e6af54b59d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -159,11 +156,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1712989663, "lastModified": 1715930644,
"narHash": "sha256-r2X/DIAyKOLiHoncjcxUk1TENWDTTaigRBaY53Cts/w=", "narHash": "sha256-W9pyM3/vePxrffHtzlJI6lDS3seANQ+Nqp+i58O46LI=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "40ab43ae98cb3e6f07eaeaa3f3ed56d589da21b0", "rev": "e3ad5108f54177e6520535768ddbf1e6af54b59d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -180,11 +177,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1711763326, "lastModified": 1715901937,
"narHash": "sha256-sXcesZWKXFlEQ8oyGHnfk4xc9f2Ip0X/+YZOq3sKviI=", "narHash": "sha256-eMyvWP56ZOdraC2IOvZo0/RTDcrrsqJ0oJWDC76JTak=",
"owner": "lnl7", "owner": "lnl7",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "36524adc31566655f2f4d55ad6b875fb5c1a4083", "rev": "ffc01182f90118119930bdfc528c1ee9a39ecef8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -195,11 +192,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1713248628, "lastModified": 1716137900,
"narHash": "sha256-NLznXB5AOnniUtZsyy/aPWOk8ussTuePp2acb9U+ISA=", "narHash": "sha256-sowPU+tLQv8GlqtVtsXioTKeaQvlMz/pefcdwg8MvfM=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "5672bc9dbf9d88246ddab5ac454e82318d094bb8", "rev": "6c0b7a92c30122196a761b440ac0d46d3d9954f1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -211,11 +208,11 @@
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1713145326, "lastModified": 1716218643,
"narHash": "sha256-m7+IWM6mkWOg22EC5kRUFCycXsXLSU7hWmHdmBfmC3s=", "narHash": "sha256-i/E7gzQybvcGAYDRGDl39WL6yVk30Je/NXypBz6/nmM=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "53a2c32bc66f5ae41a28d7a9a49d321172af621e", "rev": "a8695cbd09a7ecf3376bd62c798b9864d20f86ee",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -230,19 +227,21 @@
"devshell": "devshell", "devshell": "devshell",
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"flake-root": "flake-root",
"home-manager": "home-manager_2", "home-manager": "home-manager_2",
"nix-darwin": "nix-darwin", "nix-darwin": "nix-darwin",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"pre-commit-hooks": "pre-commit-hooks" "pre-commit-hooks": "pre-commit-hooks",
"treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
"lastModified": 1713294906, "lastModified": 1716274770,
"narHash": "sha256-xJJZdCBzVFpVppaYyUK4lTTNOnbAxrjhodoJL3Oi91E=", "narHash": "sha256-uljGfzFKetmvwYyfMCa3WY7jZbRnN/g7C/qk0/bKsWA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixvim", "repo": "nixvim",
"rev": "514a51877df9fe41ffc38c5237e3c4e5327e7607", "rev": "c9f3d15796c80c336662e9dd2a0d6820e5fa2841",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -254,7 +253,6 @@
"pre-commit-hooks": { "pre-commit-hooks": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat_2",
"flake-utils": "flake-utils_2",
"gitignore": "gitignore", "gitignore": "gitignore",
"nixpkgs": [ "nixpkgs": [
"nixvim", "nixvim",
@ -266,11 +264,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1712897695, "lastModified": 1715870890,
"narHash": "sha256-nMirxrGteNAl9sWiOhoN5tIHyjBbVi5e2tgZUgZlK3Y=", "narHash": "sha256-nacSOeXtUEM77Gn0G4bTdEOeFIrkCBXiyyFZtdGwuH0=",
"owner": "cachix", "owner": "cachix",
"repo": "pre-commit-hooks.nix", "repo": "pre-commit-hooks.nix",
"rev": "40e6053ecb65fcbf12863338a6dcefb3f55f1bf8", "rev": "fa606cccd7b0ccebe2880051208e4a0f61bfc8c1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -302,18 +300,24 @@
"type": "github" "type": "github"
} }
}, },
"systems_2": { "treefmt-nix": {
"inputs": {
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1715940852,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "narHash": "sha256-wJqHMg/K6X3JGAE9YLM0LsuKrKb4XiBeVaoeMNlReZg=",
"owner": "nix-systems", "owner": "numtide",
"repo": "default", "repo": "treefmt-nix",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", "rev": "2fba33a182602b9d49f0b2440513e5ee091d838b",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-systems", "owner": "numtide",
"repo": "default", "repo": "treefmt-nix",
"type": "github" "type": "github"
} }
} }

View File

@ -24,7 +24,7 @@
in { in {
# nixos - system hostname # nixos - system hostname
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem { nixosConfigurations.nixos-c940 = nixpkgs.lib.nixosSystem {
specialArgs = { specialArgs = {
pkgs-stable = import nixpkgs-stable { pkgs-stable = import nixpkgs-stable {
inherit system; inherit system;
@ -38,7 +38,7 @@
]; ];
}; };
homeConfigurations.amper = home-manager.lib.homeManagerConfiguration { homeConfigurations.wyj = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
modules = [ ./home-manager/home.nix ]; modules = [ ./home-manager/home.nix ];
}; };

View File

@ -6,8 +6,8 @@
]; ];
home = { home = {
username = "amper"; username = "wyj";
homeDirectory = "/home/amper"; homeDirectory = "/home/wyj";
stateVersion = "23.11"; stateVersion = "23.11";
}; };
} }

View File

@ -1,7 +1,7 @@
{ {
programs.git = { programs.git = {
enable = true; enable = true;
userName = "Andrey0189"; userName = "Yingjie Wang";
userEmail = "varnavsky06@gmail.com"; userEmail = "phywyj@gmail.com";
}; };
} }

View File

@ -6,7 +6,7 @@
settings = { settings = {
"$mainMod" = "SUPER"; "$mainMod" = "SUPER";
monitor = ",preferred,auto,1"; monitor = ",preferred,auto,2";
env = [ env = [
"XDG_CURRENT_DESKTOP,Hyprland" "XDG_CURRENT_DESKTOP,Hyprland"

View File

@ -9,9 +9,9 @@
./modules/xserver.nix ./modules/xserver.nix
]; ];
networking.hostName = "nixos"; # Define your hostname. networking.hostName = "nixos-c940"; # Define your hostname.
time.timeZone = "Asia/Tashkent"; # Set your time zone. time.timeZone = "America/New_York"; # Set your time zone.
i18n.defaultLocale = "en_US.UTF-8"; # Select internationalisation properties. i18n.defaultLocale = "en_US.UTF-8"; # Select internationalisation properties.

View File

@ -8,30 +8,26 @@
[ (modulesPath + "/installer/scan/not-detected.nix") [ (modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "sd_mod" ]; boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" =
{ device = "/dev/disk/by-uuid/c3c28b79-eb8b-4a45-8ee2-5576e82cb4e5"; { device = "/dev/disk/by-uuid/a751720d-df78-43c3-bc1e-fabdc168fbc2";
fsType = "ext4"; fsType = "ext4";
}; };
swapDevices = swapDevices = [ ];
[ { device = "/dev/disk/by-uuid/3e9f0c85-9a78-44ad-a29c-84afc3b257cc"; }
{ device = "/dev/disk/by-uuid/d80806ff-1b8c-4cac-b7f8-593e030abcda"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's # (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 # 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`. # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true; networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp2s0.useDHCP = lib.mkDefault true; # networking.interfaces.enp0s20f0u1.useDHCP = lib.mkDefault true;
# networking.interfaces.virbr0.useDHCP = lib.mkDefault true; # networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
} }

View File

@ -1,6 +1,3 @@
{ {
boot.loader.systemd-boot.enable = true; boot.loader.grub.device = "nodev";
boot.loader.efi.canTouchEfiVariables = true;
boot.initrd.kernelModules = [ "amdgpu" ];
boot.kernelParams = [ "psmouse.synaptics_intertouch=0" ];
} }

View File

@ -11,6 +11,7 @@
./hyprland.nix ./hyprland.nix
./trim.nix ./trim.nix
./bluetooth.nix ./bluetooth.nix
./services.nix
./nixvim/nixvim.nix ./nixvim/nixvim.nix
]; ];
} }

View File

@ -0,0 +1,3 @@
{
services.openssh.enable = true;
}

View File

@ -4,14 +4,14 @@
users = { users = {
defaultUserShell = pkgs.zsh; defaultUserShell = pkgs.zsh;
users.amper = { users.wyj = {
isNormalUser = true; isNormalUser = true;
description = "Ampersand"; description = "Yingjie Wang";
extraGroups = [ "networkmanager" "wheel" "input" "libvirtd" ]; extraGroups = [ "networkmanager" "wheel" "input" "libvirtd" ];
packages = with pkgs; []; packages = with pkgs; [];
}; };
}; };
# Enable automatic login for the user. # Enable automatic login for the user.
services.getty.autologinUser = "amper"; #services.getty.autologinUser = "amper";
} }