mirror of
https://github.com/ivabus/nixos
synced 2024-11-10 02:25:18 +03:00
Add stella machine
This commit is contained in:
parent
4dcd54f79c
commit
0928c2aa8c
7
README.md
Normal file
7
README.md
Normal file
|
@ -0,0 +1,7 @@
|
|||
# NixOS Configuration files.
|
||||
|
||||
## TODO
|
||||
|
||||
- do something with dotfiles installation from [ivabus/dotfiles](https://github.com/ivabus/dotfiles)
|
||||
- install nixos on more machines
|
||||
- write proper readme
|
29
common/base.nix
Normal file
29
common/base.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
nix = {
|
||||
package = pkgs.nixUnstable;
|
||||
extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
neovim
|
||||
wget
|
||||
git
|
||||
curl
|
||||
];
|
||||
|
||||
networking.networkmanager.enable = true;
|
||||
networking.nameservers = [ "1.1.1.1" "1.0.0.1" "8.8.8.8" ];
|
||||
|
||||
i18n.defaultLocale = "ru_RU.UTF-8";
|
||||
console = {
|
||||
font = "${pkgs.terminus_font}/share/consolefonts/ter-u16b.psf.gz";
|
||||
keyMap = "us";
|
||||
packages = with pkgs; [ terminus_font ];
|
||||
};
|
||||
|
||||
}
|
18
common/graphical.nix
Normal file
18
common/graphical.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
firefox
|
||||
alacritty
|
||||
];
|
||||
|
||||
services.xserver.enable = true;
|
||||
services.xserver.displayManager.sddm.enable = true;
|
||||
services.xserver.desktopManager.plasma5.enable = true;
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
}
|
5
common/laptop.nix
Normal file
5
common/laptop.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
networking.wireless.iwd.enable = true;
|
||||
}
|
28
common/user.nix
Normal file
28
common/user.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
users.users.ivabus = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
packages = with pkgs; [
|
||||
tree
|
||||
cargo
|
||||
rustc
|
||||
neofetch
|
||||
];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
programs.gnupg.agent.enable = true;
|
||||
programs.ssh.startAgent = true;
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "my_git_username";
|
||||
userEmail = "my_git_username@gmail.com";
|
||||
};
|
||||
}
|
48
flake.nix
Normal file
48
flake.nix
Normal file
|
@ -0,0 +1,48 @@
|
|||
{
|
||||
|
||||
description = "ivabus's NixOS Flake";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
outputs = { self, nixpkgs, ... }@inputs: {
|
||||
|
||||
nixosConfigurations."stella" = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./common/base.nix
|
||||
./common/laptop.nix
|
||||
./common/user.nix
|
||||
./common/graphical.nix
|
||||
./machines/stella/configuration.nix
|
||||
./machines/stella/hardware.nix
|
||||
];
|
||||
};
|
||||
|
||||
/* These machines will be configured later. */
|
||||
/*
|
||||
nixosConfigurations."celerrime" = nixpkgs.lib.nixosSystem {
|
||||
system = "aarch64-linux";
|
||||
modules = [
|
||||
./machines/celerrime/configuration.nix
|
||||
./user.nix
|
||||
./graphical.nix
|
||||
];
|
||||
};
|
||||
|
||||
nixosConfigurations."vetus" = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./machines/vetus/configuration.nix
|
||||
./
|
||||
];
|
||||
};
|
||||
*/
|
||||
};
|
||||
}
|
1
machines/stella/about.md
Normal file
1
machines/stella/about.md
Normal file
|
@ -0,0 +1 @@
|
|||
Random Ryzen 3 3250U laptop
|
36
machines/stella/configuration.nix
Normal file
36
machines/stella/configuration.nix
Normal file
|
@ -0,0 +1,36 @@
|
|||
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
nix = {
|
||||
package = pkgs.nixUnstable;
|
||||
extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
};
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
networking.hostName = "stella";
|
||||
time.timeZone = "Europe/Moscow";
|
||||
|
||||
services.xserver.videoDrivers=["amdgpu"];
|
||||
boot.initrd.kernelModules=["amdgpu"];
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings.PasswordAuthentication = false;
|
||||
};
|
||||
|
||||
services.dbus.enable = true;
|
||||
fonts.fonts = with pkgs; [
|
||||
noto-fonts
|
||||
noto-fonts-cjk
|
||||
noto-fonts-emoji
|
||||
jetbrains-mono
|
||||
];
|
||||
|
||||
system.stateVersion = "23.05";
|
||||
}
|
||||
|
30
machines/stella/hardware.nix
Normal file
30
machines/stella/hardware.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/e9d47776-8f25-490b-9ea3-ee80ab9d6110";
|
||||
fsType = "btrfs";
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/c2e3757b-b29c-4797-9535-084eb71351e9";
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/4F73-6FFF";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
Loading…
Reference in a new issue