mirror of
https://github.com/Moe1369/nixos-config.git
synced 2024-10-18 04:14:08 +02:00
initial upload
This commit is contained in:
commit
8e852a8dd5
18
configuration.nix
Normal file
18
configuration.nix
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{ config, pkgs, pkgs-stable, ... }:
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[
|
||||||
|
./system/boot.nix
|
||||||
|
./system/controller.nix
|
||||||
|
./system/desktop.nix
|
||||||
|
./system/hardware-configuration.nix
|
||||||
|
./system/hardware.nix
|
||||||
|
./system/locale.nix
|
||||||
|
./system/networking.nix
|
||||||
|
./system/systempkgs.nix
|
||||||
|
./system/systemsettings.nix
|
||||||
|
./system/updates.nix
|
||||||
|
./system/users.nix
|
||||||
|
];
|
||||||
|
system.stateVersion = "24.05";
|
||||||
|
}
|
64
flake.lock
Normal file
64
flake.lock
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"home-manager": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1722321190,
|
||||||
|
"narHash": "sha256-WeVWVRqkgrbLzmk6FfJoloJ7Xe7HWD27Pv950IUG2kI=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "4fcd54df7cbb1d79cbe81209909ee8514d6b17a4",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"ref": "master",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1722185531,
|
||||||
|
"narHash": "sha256-veKR07psFoJjINLC8RK4DiLniGGMgF3QMlS4tb74S6k=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "52ec9ac3b12395ad677e8b62106f0b98c1f8569d",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"id": "nixpkgs",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"type": "indirect"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs-stable": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1722221733,
|
||||||
|
"narHash": "sha256-sga9SrrPb+pQJxG1ttJfMPheZvDOxApFfwXCFO0H9xw=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "12bf09802d77264e441f48e25459c10c93eada2e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"id": "nixpkgs",
|
||||||
|
"ref": "nixos-24.05",
|
||||||
|
"type": "indirect"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"home-manager": "home-manager",
|
||||||
|
"nixpkgs": "nixpkgs",
|
||||||
|
"nixpkgs-stable": "nixpkgs-stable"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
37
flake.nix
Normal file
37
flake.nix
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
{
|
||||||
|
description = "Moe.OS";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "nixpkgs/nixos-unstable";
|
||||||
|
nixpkgs-stable.url = "nixpkgs/nixos-24.05";
|
||||||
|
home-manager.url = "github:nix-community/home-manager/master";
|
||||||
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self,nixpkgs,nixpkgs-stable, home-manager, ...}:
|
||||||
|
let
|
||||||
|
lib = nixpkgs.lib;
|
||||||
|
system = "x86_64-linux";
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
pkgs-stable = nixpkgs-stable.legacyPackages.${system};
|
||||||
|
in {
|
||||||
|
nixosConfigurations = {
|
||||||
|
computer-mo = nixpkgs.lib.nixosSystem {
|
||||||
|
inherit system;
|
||||||
|
modules = [./configuration.nix];
|
||||||
|
specialArgs = {
|
||||||
|
inherit pkgs-stable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
homeConfigurations = {
|
||||||
|
mo = home-manager.lib.homeManagerConfiguration {
|
||||||
|
inherit pkgs;
|
||||||
|
modules = [./home.nix];
|
||||||
|
extraSpecialArgs = {
|
||||||
|
inherit pkgs-stable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
22
home.nix
Normal file
22
home.nix
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
{ config, pkgs, pkgs-stable, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.username = "mo";
|
||||||
|
home.homeDirectory = "/home/mo";
|
||||||
|
home.stateVersion = "24.05";
|
||||||
|
home.packages = [
|
||||||
|
];
|
||||||
|
home.file = {
|
||||||
|
};
|
||||||
|
home.sessionVariables = {
|
||||||
|
};
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
userName = "Mohamed C.";
|
||||||
|
userEmail = "mohamed@chrayed.de";
|
||||||
|
extraConfig = {
|
||||||
|
init.defaultBranch = "main";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
10
system/boot.nix
Normal file
10
system/boot.nix
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{ config, pkgs, pkgs-stable, ... }:
|
||||||
|
{
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
boot.plymouth.enable = true;
|
||||||
|
boot.plymouth.theme = "bgrt";
|
||||||
|
boot.initrd.verbose = false;
|
||||||
|
boot.consoleLogLevel = 0;
|
||||||
|
boot.kernelParams = [ "quiet" "splash" "udev.log_level=0" ];
|
||||||
|
}
|
7
system/controller.nix
Normal file
7
system/controller.nix
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{ config, pkgs, pkgs-stable, ... }:
|
||||||
|
{
|
||||||
|
# Ignore Dualsense Touchpad in Desktop
|
||||||
|
services.udev.extraRules =''
|
||||||
|
ACTION=="add|change", KERNEL=="event[0-9]*", ATTRS{name}=="*Wireless Controller Touchpad", ENV{LIBINPUT_IGNORE_DEVICE}="1"
|
||||||
|
'';
|
||||||
|
}
|
9
system/desktop.nix
Normal file
9
system/desktop.nix
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{ config, pkgs, pkgs-stable, ... }:
|
||||||
|
{
|
||||||
|
services.xserver.enable = false;
|
||||||
|
services.displayManager.sddm.wayland.enable = true;
|
||||||
|
services.displayManager.sddm.enable = true;
|
||||||
|
services.desktopManager.plasma6.enable = true;
|
||||||
|
services.displayManager.autoLogin.enable = true;
|
||||||
|
services.displayManager.autoLogin.user = "mo";
|
||||||
|
}
|
39
system/hardware-configuration.nix
Normal file
39
system/hardware-configuration.nix
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
# 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 = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/43f399df-b748-4c6d-bf38-e907ae4b8316";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/C1A2-349B";
|
||||||
|
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.enp11s0.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.wlp10s0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
20
system/hardware.nix
Normal file
20
system/hardware.nix
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{ config, pkgs, pkgs-stable, ... }:
|
||||||
|
{
|
||||||
|
services.fwupd.enable = true;
|
||||||
|
services.printing.enable = true;
|
||||||
|
hardware.bluetooth.enable = true;
|
||||||
|
hardware.bluetooth.powerOnBoot = true;
|
||||||
|
hardware.pulseaudio.enable = false;
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
alsa.support32Bit = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
};
|
||||||
|
services.libinput.enable = false;
|
||||||
|
swapDevices = [ {
|
||||||
|
device = "/var/lib/swapfile";
|
||||||
|
size = 16*1024;
|
||||||
|
} ];
|
||||||
|
}
|
18
system/locale.nix
Normal file
18
system/locale.nix
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{ config, pkgs, pkgs-stable, ... }:
|
||||||
|
{
|
||||||
|
time.timeZone = "Europe/Berlin";
|
||||||
|
i18n.defaultLocale = "de_DE.UTF-8";
|
||||||
|
console.keyMap = "de";
|
||||||
|
services.xserver.xkb.layout = "de";
|
||||||
|
i18n.extraLocaleSettings = {
|
||||||
|
LC_ADDRESS = "de_DE.UTF-8";
|
||||||
|
LC_IDENTIFICATION = "de_DE.UTF-8";
|
||||||
|
LC_MEASUREMENT = "de_DE.UTF-8";
|
||||||
|
LC_MONETARY = "de_DE.UTF-8";
|
||||||
|
LC_NAME = "de_DE.UTF-8";
|
||||||
|
LC_NUMERIC = "de_DE.UTF-8";
|
||||||
|
LC_PAPER = "de_DE.UTF-8";
|
||||||
|
LC_TELEPHONE = "de_DE.UTF-8";
|
||||||
|
LC_TIME = "de_DE.UTF-8";
|
||||||
|
};
|
||||||
|
}
|
5
system/networking.nix
Normal file
5
system/networking.nix
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{ config, pkgs, pkgs-stable, ... }:
|
||||||
|
{
|
||||||
|
networking.hostName = "computer-mo";
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
}
|
31
system/systempkgs.nix
Normal file
31
system/systempkgs.nix
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
{ config, pkgs, pkgs-stable, ... }:
|
||||||
|
{
|
||||||
|
programs.firefox = {
|
||||||
|
enable = true;
|
||||||
|
languagePacks = ["de"];
|
||||||
|
};
|
||||||
|
programs.steam = {
|
||||||
|
enable = true;
|
||||||
|
remotePlay.openFirewall = true;
|
||||||
|
dedicatedServer.openFirewall = true;
|
||||||
|
localNetworkGameTransfers.openFirewall = true;
|
||||||
|
gamescopeSession.enable = true;
|
||||||
|
};
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
environment.systemPackages = with pkgs-stable; [
|
||||||
|
wget
|
||||||
|
git
|
||||||
|
vesktop
|
||||||
|
bitwarden-desktop
|
||||||
|
kdePackages.kate
|
||||||
|
kdePackages.gwenview
|
||||||
|
kdePackages.okular
|
||||||
|
kdePackages.kontact
|
||||||
|
haruna
|
||||||
|
pciutils
|
||||||
|
aha
|
||||||
|
neofetch
|
||||||
|
mangohud
|
||||||
|
];
|
||||||
|
}
|
2
system/systemsettings.nix
Normal file
2
system/systemsettings.nix
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
{ config, pkgs, pkgs-stable, ... }:
|
||||||
|
{}
|
12
system/updates.nix
Normal file
12
system/updates.nix
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{ config, pkgs, pkgs-stable, ... }:
|
||||||
|
{
|
||||||
|
system.autoUpgrade = {
|
||||||
|
enable = true;
|
||||||
|
dates = "04:00";
|
||||||
|
flake = "../flake.nix";
|
||||||
|
flags = [
|
||||||
|
"--update-input" "nixpkgs"
|
||||||
|
];
|
||||||
|
allowReboot = true;
|
||||||
|
};
|
||||||
|
}
|
10
system/users.nix
Normal file
10
system/users.nix
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{ config, pkgs, pkgs-stable,... }:
|
||||||
|
{
|
||||||
|
users.users.mo = {
|
||||||
|
isNormalUser = true;
|
||||||
|
description = "Mohamed Chrayed";
|
||||||
|
extraGroups = [ "networkmanager" "wheel" ];
|
||||||
|
packages = with pkgs; [
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user