Compare commits
No commits in common. "4ba7f801c41e6ca89d4e30cb1dccc4300d721170" and "cee6268a4441f77a3b0bd4dcda620dcb16d0dc53" have entirely different histories.
4ba7f801c4
...
cee6268a44
21
configuration.nix
Normal file
21
configuration.nix
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{ modulesPath, config, lib, pkgs, ... }: {
|
||||||
|
imports = [
|
||||||
|
./hardware-configuration.nix
|
||||||
|
./disk-config.nix
|
||||||
|
];
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
services.openssh.enable = true;
|
||||||
|
|
||||||
|
environment.systemPackages = map lib.lowPrio [
|
||||||
|
pkgs.curl
|
||||||
|
pkgs.gitMinimal
|
||||||
|
];
|
||||||
|
|
||||||
|
users.users.root.openssh.authorizedKeys.keys = [
|
||||||
|
# change this to your ssh key
|
||||||
|
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDCOZgbO0xzciMbBCSC1fZLEY8qIB4c+UK0niwVvaphOPp87xjE+eyeHDhQLntxhTeOgAob24pBmhycAkQXxu0FcDZN7RmZOyNTFFQPd2w8KRgGwUnZtfOFUaT9KxV0xpnfnJN+PeCeys9/jz5XHBzlei0HPuaC85KcKqa1GMNldtFELqa1MySAIQ0mV3TynLooqqjdr2kqou9DPEqC2A2VrdDn2FFc1+RuaiEitmOG2rLUHLSje2R+GN3kkPPtWI/CzapwHC/j7hcgPEPZcAT5Pe+cQqTMXpMGK2ZFsQsgCIhwPfKg/o8LN5QKYm8sJb42OftgTpoUJNMMWvRYv9J1lRa57wLyVNl56wchj/d5kh13CJ+WDR7KnaY00xlRHxXChp9ZU7sqFMgBOlS1OUQv5iDdUerLPrSIr9JqMVtkcP1betqDKFZLJYvRpV35IQX6FsDOuzTYkojX8gKsxPL6Prq0EHwtuatvGxNq/en7VBbzHRpf32+x8luypkFLoKM="
|
||||||
|
];
|
||||||
|
|
||||||
|
system.stateVersion = "24.11";
|
||||||
|
}
|
||||||
@ -3,7 +3,7 @@
|
|||||||
disk = {
|
disk = {
|
||||||
main = {
|
main = {
|
||||||
type = "disk";
|
type = "disk";
|
||||||
device = "/dev/disk/by-id/nvme-Samsung_SSD_990_PRO_2TB_S6Z2NF0W823875P";
|
device = "/dev/nvme0n1";
|
||||||
content = {
|
content = {
|
||||||
type = "gpt";
|
type = "gpt";
|
||||||
partitions = {
|
partitions = {
|
||||||
@ -16,25 +16,17 @@
|
|||||||
mountpoint = "/boot";
|
mountpoint = "/boot";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
system = {
|
luks = {
|
||||||
size = "256G";
|
|
||||||
content = {
|
|
||||||
type = "filesystem";
|
|
||||||
format = "btrfs";
|
|
||||||
mountpoint = "/";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
storage = {
|
|
||||||
size = "100%";
|
size = "100%";
|
||||||
content = {
|
content = {
|
||||||
type = "luks";
|
type = "luks";
|
||||||
name = "storage";
|
name = "crypted";
|
||||||
settings.allowDiscards = true;
|
settings.allowDiscards = true;
|
||||||
passwordFile = "/tmp/secret.key";
|
passwordFile = "/tmp/secret.key";
|
||||||
content = {
|
content = {
|
||||||
type = "filesystem";
|
type = "filesystem";
|
||||||
format = "btrfs";
|
format = "btrfs";
|
||||||
mountpoint = "/storage"; # non-standard folder for unix-like, but good to avoid collisions
|
mountpoint = "/";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
69
flake.lock
generated
69
flake.lock
generated
@ -1,69 +0,0 @@
|
|||||||
{
|
|
||||||
"nodes": {
|
|
||||||
"disko": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1738765162,
|
|
||||||
"narHash": "sha256-3Z40qHaFScWUCVQrGc4Y+RdoPsh1R/wIh+AN4cTXP0I=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "disko",
|
|
||||||
"rev": "ff3568858c54bd306e9e1f2886f0f781df307dff",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "disko",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"home-manager": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1739571712,
|
|
||||||
"narHash": "sha256-0UdSDV/TBY+GuxXLbrLq3l2Fq02ciyKCIMy4qmnfJXQ=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "home-manager",
|
|
||||||
"rev": "6d3163aea47fdb1fe19744e91306a2ea4f602292",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "home-manager",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1739019272,
|
|
||||||
"narHash": "sha256-7Fu7oazPoYCbDzb9k8D/DdbKrC3aU1zlnc39Y8jy/s8=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "fa35a3c8e17a3de613240fea68f876e5b4896aec",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "nixpkgs-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": {
|
|
||||||
"inputs": {
|
|
||||||
"disko": "disko",
|
|
||||||
"home-manager": "home-manager",
|
|
||||||
"nixpkgs": "nixpkgs"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": "root",
|
|
||||||
"version": 7
|
|
||||||
}
|
|
||||||
33
flake.nix
33
flake.nix
@ -1,36 +1,15 @@
|
|||||||
{
|
{
|
||||||
inputs = {
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
inputs.disko.url = "github:nix-community/disko";
|
||||||
|
inputs.disko.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
disko = {
|
outputs = { nixpkgs, disko, ... }:
|
||||||
url = "github:nix-community/disko";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
home-manager = {
|
|
||||||
url = "github:nix-community/home-manager";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs = { nixpkgs, disko, home-manager, ... }:
|
|
||||||
{
|
{
|
||||||
nixosConfigurations.pc = nixpkgs.lib.nixosSystem {
|
nixosConfigurations.hardpc = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
disko.nixosModules.disko
|
disko.nixosModules.disko
|
||||||
./hosts/pc/configuration.nix
|
./configuration.nix
|
||||||
|
|
||||||
home-manager.nixosModules.home-manager
|
|
||||||
{
|
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
|
|
||||||
# TODO replace akulij with your own username
|
|
||||||
home-manager.users.akulij = import ./users/akulij/home.nix;
|
|
||||||
|
|
||||||
# Optionally, use home-manager.extraSpecialArgs to pass arguments to home.nix
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,141 +0,0 @@
|
|||||||
let
|
|
||||||
unstable = import (fetchTarball {
|
|
||||||
url = "https://nixos.org/channels/nixos-unstable/nixexprs.tar.xz";
|
|
||||||
sha256 = "0k9xxn1kz32jbjzgcqxmh7czx0mrpq6zais5pzd86bii50cl40c7";
|
|
||||||
}) { };
|
|
||||||
in
|
|
||||||
{ modulesPath, config, lib, pkgs, ... }: {
|
|
||||||
imports = [
|
|
||||||
./hardware-configuration.nix
|
|
||||||
./disk-config.nix
|
|
||||||
];
|
|
||||||
boot = {
|
|
||||||
initrd.systemd.enable = true;
|
|
||||||
plymouth = {
|
|
||||||
enable = true;
|
|
||||||
theme = "rings";
|
|
||||||
themePackages = with pkgs; [
|
|
||||||
# By default we would install all themes
|
|
||||||
(adi1090x-plymouth-themes.override {
|
|
||||||
selected_themes = [ "rings" ];
|
|
||||||
})
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Enable "Silent Boot"
|
|
||||||
consoleLogLevel = 0;
|
|
||||||
initrd.verbose = false;
|
|
||||||
kernelParams = [
|
|
||||||
"quiet"
|
|
||||||
"splash"
|
|
||||||
"boot.shell_on_fail"
|
|
||||||
"loglevel=3"
|
|
||||||
"rd.systemd.show_status=false"
|
|
||||||
"rd.udev.log_level=3"
|
|
||||||
"udev.log_priority=3"
|
|
||||||
];
|
|
||||||
|
|
||||||
loader = {
|
|
||||||
efi.canTouchEfiVariables = true;
|
|
||||||
systemd-boot.enable = true;
|
|
||||||
systemd-boot.consoleMode = "max";
|
|
||||||
# Hide the OS choice for bootloaders.
|
|
||||||
# It's still possible to open the bootloader list by pressing any key
|
|
||||||
# It will just not appear on screen unless a key is pressed
|
|
||||||
timeout = 0;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# programs.adb.enable = true;
|
|
||||||
services.greetd = {
|
|
||||||
enable = true;
|
|
||||||
settings = rec {
|
|
||||||
initial_session = {
|
|
||||||
command = "${pkgs.hyprland}/bin/Hyprland";
|
|
||||||
user = "akulij";
|
|
||||||
};
|
|
||||||
default_session = initial_session;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.hostName = "pc";
|
|
||||||
|
|
||||||
programs.hyprland = {
|
|
||||||
enable = true;
|
|
||||||
xwayland.enable = true;
|
|
||||||
};
|
|
||||||
programs.steam = {
|
|
||||||
enable = true;
|
|
||||||
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
|
|
||||||
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
|
|
||||||
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
|
|
||||||
};
|
|
||||||
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
|
|
||||||
"steam"
|
|
||||||
"steam-original"
|
|
||||||
"steam-unwrapped"
|
|
||||||
"steam-run"
|
|
||||||
];
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
services.openssh = {
|
|
||||||
enable = true;
|
|
||||||
ports = [ 1440 ];
|
|
||||||
settings = {
|
|
||||||
PasswordAuthentication = true;
|
|
||||||
AllowUsers = null; # Allows all users by default. Can be [ "user1" "user2" ]
|
|
||||||
UseDns = true;
|
|
||||||
X11Forwarding = false;
|
|
||||||
PermitRootLogin = "no"; # "yes", "without-password", "prohibit-password", "forced-commands-only", "no"
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = map lib.lowPrio [
|
|
||||||
# unstable.cope
|
|
||||||
pkgs.curl
|
|
||||||
pkgs.gitMinimal
|
|
||||||
pkgs.neovim
|
|
||||||
pkgs.kitty
|
|
||||||
pkgs.tmux
|
|
||||||
pkgs.ranger
|
|
||||||
pkgs.gparted
|
|
||||||
pkgs.lazygit
|
|
||||||
|
|
||||||
pkgs.firefox
|
|
||||||
pkgs.fuzzel
|
|
||||||
|
|
||||||
pkgs.gamescope
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.git.config.user = {
|
|
||||||
name = "akulij";
|
|
||||||
email = "aakulij@gmail.com";
|
|
||||||
};
|
|
||||||
|
|
||||||
users.users.akulij = {
|
|
||||||
isNormalUser = true;
|
|
||||||
extraGroups = [ "wheel" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
users.users.akulij.openssh.authorizedKeys.keys = [
|
|
||||||
# change this to your ssh key
|
|
||||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDCOZgbO0xzciMbBCSC1fZLEY8qIB4c+UK0niwVvaphOPp87xjE+eyeHDhQLntxhTeOgAob24pBmhycAkQXxu0FcDZN7RmZOyNTFFQPd2w8KRgGwUnZtfOFUaT9KxV0xpnfnJN+PeCeys9/jz5XHBzlei0HPuaC85KcKqa1GMNldtFELqa1MySAIQ0mV3TynLooqqjdr2kqou9DPEqC2A2VrdDn2FFc1+RuaiEitmOG2rLUHLSje2R+GN3kkPPtWI/CzapwHC/j7hcgPEPZcAT5Pe+cQqTMXpMGK2ZFsQsgCIhwPfKg/o8LN5QKYm8sJb42OftgTpoUJNMMWvRYv9J1lRa57wLyVNl56wchj/d5kh13CJ+WDR7KnaY00xlRHxXChp9ZU7sqFMgBOlS1OUQv5iDdUerLPrSIr9JqMVtkcP1betqDKFZLJYvRpV35IQX6FsDOuzTYkojX8gKsxPL6Prq0EHwtuatvGxNq/en7VBbzHRpf32+x8luypkFLoKM="
|
|
||||||
];
|
|
||||||
|
|
||||||
environment.shellAliases = {
|
|
||||||
u = "sudo -E nixos-rebuild switch --flake .#";
|
|
||||||
|
|
||||||
n = "nvim";
|
|
||||||
se = "sudo -E nvim";
|
|
||||||
|
|
||||||
gs = "git status";
|
|
||||||
gd = "git diff";
|
|
||||||
ga = "git add";
|
|
||||||
gc = "git commit";
|
|
||||||
};
|
|
||||||
|
|
||||||
system.stateVersion = "24.11";
|
|
||||||
|
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
|
||||||
}
|
|
||||||
@ -1,31 +0,0 @@
|
|||||||
{ config, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
home.username = "akulij";
|
|
||||||
home.homeDirectory = "/home/akulij";
|
|
||||||
|
|
||||||
programs.git = {
|
|
||||||
enable = true;
|
|
||||||
userName = "akulij";
|
|
||||||
userEmail = "aakulij@gmail.com";
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.bash = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
initExtra = ''
|
|
||||||
# include .profile if it exists
|
|
||||||
# necessary to import env variables set by home-manager
|
|
||||||
[[ -f ~/.profile ]] && . ~/.profile
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
home.sessionVariables = {
|
|
||||||
EDITOR = "nvim";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Let Home Manager install and manage itself.
|
|
||||||
programs.home-manager.enable = true;
|
|
||||||
|
|
||||||
home.stateVersion = "24.11"; # Please read the comment before changing.
|
|
||||||
}
|
|
||||||
Loading…
x
Reference in New Issue
Block a user