desktop-2024-08-30-13-22-30
This commit is contained in:
@ -1,9 +1,6 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
let
|
|
||||||
unstable = import <nixos-unstable> { config.allowUnfree = true; };
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
environment.systemPackages = with unstable.pkgs; [
|
environment.systemPackages = with pkgs.unstable; [
|
||||||
brave
|
brave
|
||||||
chromium
|
chromium
|
||||||
firefox
|
firefox
|
||||||
|
@ -1,7 +1,4 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
let
|
|
||||||
unstable = import <nixos-unstable> {};
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
environment.shells = with pkgs; [ bashInteractive zsh ];
|
environment.shells = with pkgs; [ bashInteractive zsh ];
|
||||||
|
|
||||||
@ -61,7 +58,7 @@ in
|
|||||||
networkmanager.dns = "none";
|
networkmanager.dns = "none";
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with unstable.pkgs; [
|
environment.systemPackages = with pkgs.unstable; [
|
||||||
ack
|
ack
|
||||||
borgbackup
|
borgbackup
|
||||||
borgmatic
|
borgmatic
|
||||||
|
@ -1,10 +1,4 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, outputs, ... }:
|
||||||
let
|
|
||||||
unstable = import <nixos-unstable> {
|
|
||||||
config.allowUnfree = true;
|
|
||||||
};
|
|
||||||
nix-gaming = import (builtins.fetchTarball "https://github.com/fufexan/nix-gaming/archive/master.tar.gz");
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
programs = {
|
programs = {
|
||||||
gamescope = {
|
gamescope = {
|
||||||
@ -13,22 +7,23 @@ in
|
|||||||
};
|
};
|
||||||
steam = {
|
steam = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = unstable.pkgs.steam.override {
|
package = pkgs.unstable.steam.override {
|
||||||
extraPkgs = pkgs: with unstable.pkgs; [
|
extraPkgs = pkgs: [
|
||||||
gamescope
|
pkgs.gamescope
|
||||||
mangohud
|
pkgs.mangohud
|
||||||
libkrb5
|
# libkrb5
|
||||||
keyutils
|
# keyutils
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with unstable.pkgs; [
|
environment.systemPackages = with pkgs.unstable; [
|
||||||
(lutris.override {
|
(lutris.override {
|
||||||
extraPkgs = pkgs: with unstable.pkgs; [
|
extraPkgs = pkgs: [
|
||||||
gamescope mangohud
|
pkgs.gamescope
|
||||||
];
|
pkgs.mangohud
|
||||||
|
];
|
||||||
})
|
})
|
||||||
|
|
||||||
heroic
|
heroic
|
||||||
|
@ -1,7 +1,4 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ pkgs, ... }:
|
||||||
# let
|
|
||||||
# unstable = import <nixos-unstable> { config.allowUnfree = true; };
|
|
||||||
# in
|
|
||||||
{
|
{
|
||||||
virtualisation = {
|
virtualisation = {
|
||||||
libvirtd = {
|
libvirtd = {
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, inputs, home-manager, ... }:
|
||||||
let unstable = import <nixos-unstable> { config.allowUnfree = true; };
|
{
|
||||||
in {
|
imports = [ inputs.home-manager.nixosModules.home-manager ];
|
||||||
imports = [ <home-manager/nixos> ];
|
|
||||||
networking = {
|
networking = {
|
||||||
firewall.enable = false;
|
firewall.enable = false;
|
||||||
networkmanager = { enable = true; };
|
networkmanager = { enable = true; };
|
||||||
@ -62,7 +61,7 @@ in {
|
|||||||
# };
|
# };
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with unstable.pkgs; [
|
environment.systemPackages = with pkgs.unstable; [
|
||||||
alacritty
|
alacritty
|
||||||
czkawka # fslint before
|
czkawka # fslint before
|
||||||
grsync
|
grsync
|
||||||
@ -83,7 +82,7 @@ in {
|
|||||||
programs = {
|
programs = {
|
||||||
vscode = {
|
vscode = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = unstable.pkgs.vscode;
|
package = pkgs.unstable.vscode;
|
||||||
};
|
};
|
||||||
|
|
||||||
mpv = {
|
mpv = {
|
||||||
@ -97,7 +96,7 @@ in {
|
|||||||
|
|
||||||
kitty = {
|
kitty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = unstable.pkgs.kitty;
|
package = pkgs.unstable.kitty;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
enable_audio_bell false
|
enable_audio_bell false
|
||||||
|
|
||||||
|
@ -1,9 +1,15 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, inputs, ... }:
|
||||||
let
|
let
|
||||||
unstable = import <nixos-unstable> { config.allowUnfree = true; };
|
|
||||||
secrets = import ./secrets.nix;
|
secrets = import ./secrets.nix;
|
||||||
in {
|
in
|
||||||
imports = [ <home-manager/nixos> ];
|
{
|
||||||
|
imports = [
|
||||||
|
inputs.home-manager.nixosModules.home-manager
|
||||||
|
{
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
users = {
|
users = {
|
||||||
@ -41,15 +47,12 @@ in {
|
|||||||
nix-ld.enable = true;
|
nix-ld.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
|
|
||||||
environment.pathsToLink = [ "/share/zsh" ];
|
environment.pathsToLink = [ "/share/zsh" ];
|
||||||
|
|
||||||
home-manager.users.alex = { pkgs, ... }: {
|
home-manager.users.alex = { pkgs, ... }: {
|
||||||
home = {
|
home = {
|
||||||
stateVersion = "24.05";
|
stateVersion = "24.05";
|
||||||
packages = with unstable.pkgs; [
|
packages = with pkgs.unstable; [
|
||||||
# atop
|
# atop
|
||||||
broot
|
broot
|
||||||
ffmpeg
|
ffmpeg
|
||||||
@ -141,7 +144,7 @@ in {
|
|||||||
plugins = [
|
plugins = [
|
||||||
{
|
{
|
||||||
name = "powerlevel10k";
|
name = "powerlevel10k";
|
||||||
src = unstable.pkgs.zsh-powerlevel10k;
|
src = pkgs.unstable.zsh-powerlevel10k;
|
||||||
file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
|
file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
@ -159,10 +162,6 @@ in {
|
|||||||
"-g C" = "| wc -l";
|
"-g C" = "| wc -l";
|
||||||
"-g G" = "| grep --ignore-case";
|
"-g G" = "| grep --ignore-case";
|
||||||
bat = "upower -i /org/freedesktop/UPower/devices/battery_BAT0";
|
bat = "upower -i /org/freedesktop/UPower/devices/battery_BAT0";
|
||||||
brightness-max =
|
|
||||||
"echo 4794 | sudo tee /sys/class/backlight/intel_backlight/brightness";
|
|
||||||
brightness-power-save =
|
|
||||||
"echo 2300 | sudo tee /sys/class/backlight/intel_backlight/brightness";
|
|
||||||
ff = "find . -type f -iname";
|
ff = "find . -type f -iname";
|
||||||
l = "eza --group-directories-first -l -g";
|
l = "eza --group-directories-first -l -g";
|
||||||
ll = "eza --group-directories-first -l -g";
|
ll = "eza --group-directories-first -l -g";
|
||||||
|
39
flake.lock
generated
39
flake.lock
generated
@ -1,5 +1,42 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
|
"home-manager": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1720042825,
|
||||||
|
"narHash": "sha256-A0vrUB6x82/jvf17qPCpxaM+ulJnD8YZwH9Ci0BsAzE=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "e1391fb22e18a36f57e6999c7a9f966dc80ac073",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"ref": "release-24.05",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixos-hardware": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1724878143,
|
||||||
|
"narHash": "sha256-UjpKo92iZ25M05kgSOw/Ti6VZwpgdlOa73zHj8OcaDk=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixos-hardware",
|
||||||
|
"rev": "95c3dfe6ef2e96ddc1ccdd7194e3cda02ca9a8ef",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "master",
|
||||||
|
"repo": "nixos-hardware",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1724855419,
|
"lastModified": 1724855419,
|
||||||
@ -34,6 +71,8 @@
|
|||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"home-manager": "home-manager",
|
||||||
|
"nixos-hardware": "nixos-hardware",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable"
|
"nixpkgs-unstable": "nixpkgs-unstable"
|
||||||
}
|
}
|
||||||
|
41
flake.nix
41
flake.nix
@ -5,31 +5,42 @@
|
|||||||
# Nixpkgs
|
# Nixpkgs
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
|
||||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
nixos-hardware.url = "github:nixos/nixos-hardware/master";
|
||||||
|
|
||||||
# # Home manager
|
# Home manager
|
||||||
# home-manager.url = "github:nix-community/home-manager/release-24.05";
|
home-manager = {
|
||||||
# home-manager.inputs.nixpkgs.follows = "nixpkgs-unstable";
|
url = "github:nix-community/home-manager/release-24.05";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, nixos-hardware, ... } @ inputs:
|
||||||
{ self
|
|
||||||
, nixpkgs
|
|
||||||
, nixpkgs-unstable
|
|
||||||
# , home-manager
|
|
||||||
, ...
|
|
||||||
} @ inputs:
|
|
||||||
let
|
let
|
||||||
inherit (self) outputs;
|
inherit (self) outputs;
|
||||||
system = "x86_64-linux";
|
|
||||||
|
# Supported systems for your flake packages, shell, etc.
|
||||||
|
systems = [
|
||||||
|
"aarch64-linux"
|
||||||
|
"i686-linux"
|
||||||
|
"x86_64-linux"
|
||||||
|
"aarch64-darwin"
|
||||||
|
"x86_64-darwin"
|
||||||
|
];
|
||||||
|
|
||||||
|
# This is a function that generates an attribute by calling a function you
|
||||||
|
# pass to it, with each system as an argument
|
||||||
|
forAllSystems = nixpkgs.lib.genAttrs systems;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# NixOS configuration entrypoint
|
overlays = import ./overlays { inherit inputs; };
|
||||||
# Available through 'nixos-rebuild --flake .#your-hostname'
|
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
desktop = nixpkgs.lib.nixosSystem {
|
desktop = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
specialArgs = { inherit inputs outputs; };
|
specialArgs = { inherit inputs outputs; };
|
||||||
# > Our main nixos configuration file <
|
modules = [
|
||||||
modules = [ ./machine/desktop.nix ];
|
./machine/desktop.nix
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
39
machine/desktop-hardware-configuration.nix
Normal file
39
machine/desktop-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" "usb_storage" "usbhid" "sd_mod" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/d43faf8e-ec90-4735-a1a4-aff6897604b2";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
boot.initrd.luks.devices."luks-ba8eb308-e85f-4cee-9993-88c5ba0966ea".device = "/dev/disk/by-uuid/ba8eb308-e85f-4cee-9993-88c5ba0966ea";
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/1838-7DA8";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
|
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.enp8s0.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.wlp6s0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
@ -1,18 +1,41 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, inputs, outputs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
secrets = import ../configs/secrets.nix;
|
secrets = import ../configs/secrets.nix;
|
||||||
be = import ../configs/borg-exclude.nix;
|
be = import ../configs/borg-exclude.nix;
|
||||||
wireguard = import ../configs/wireguard.nix;
|
wireguard = import ../configs/wireguard.nix;
|
||||||
unstable = import <nixos-unstable> { config.allowUnfree = true; };
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
nixpkgs = {
|
||||||
|
# You can add overlays here
|
||||||
|
overlays = [
|
||||||
|
# Add overlays your own flake exports (from overlays and pkgs dir):
|
||||||
|
outputs.overlays.additions
|
||||||
|
outputs.overlays.modifications
|
||||||
|
outputs.overlays.unstable-packages
|
||||||
|
|
||||||
|
# You can also add overlays exported from other flakes:
|
||||||
|
# neovim-nightly-overlay.overlays.default
|
||||||
|
|
||||||
|
# Or define it inline, for example:
|
||||||
|
# (final: prev: {
|
||||||
|
# hi = final.hello.overrideAttrs (oldAttrs: {
|
||||||
|
# patches = [ ./change-hello-to-hi.patch ];
|
||||||
|
# });
|
||||||
|
# })
|
||||||
|
];
|
||||||
|
# Configure your nixpkgs instance
|
||||||
|
config = {
|
||||||
|
# Disable if you don't want unfree packages
|
||||||
|
allowUnfree = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
<nixos-hardware/common/cpu/amd/default.nix>
|
./desktop-hardware-configuration.nix
|
||||||
<nixos-hardware/common/cpu/amd/pstate.nix>
|
inputs.nixos-hardware.nixosModules.common-cpu-amd
|
||||||
<nixos-hardware/common/cpu/amd/zenpower.nix>
|
inputs.nixos-hardware.nixosModules.common-cpu-amd-pstate
|
||||||
<nixos-hardware/common/pc/ssd>
|
inputs.nixos-hardware.nixosModules.common-cpu-amd-zenpower
|
||||||
/etc/nixos/hardware-configuration.nix
|
inputs.nixos-hardware.nixosModules.common-pc-ssd
|
||||||
../configs/browser.nix
|
../configs/browser.nix
|
||||||
../configs/common.nix
|
../configs/common.nix
|
||||||
../configs/docker.nix
|
../configs/docker.nix
|
||||||
@ -23,16 +46,8 @@ in
|
|||||||
../configs/user.nix
|
../configs/user.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# nixpkgs.localSystem = {
|
|
||||||
# gcc.arch = "znver2";
|
|
||||||
# gcc.tune = "znver2";
|
|
||||||
# system = "x86_64-linux";
|
|
||||||
# };
|
|
||||||
|
|
||||||
nix.settings.system-features = [ "nixos-test" "benchmark" "big-parallel" "kvm" "gccarch-znver2" ];
|
nix.settings.system-features = [ "nixos-test" "benchmark" "big-parallel" "kvm" "gccarch-znver2" ];
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
initrd.systemd.enable = true;
|
initrd.systemd.enable = true;
|
||||||
loader = {
|
loader = {
|
||||||
@ -50,7 +65,7 @@ in
|
|||||||
description = "AMDGPU Control Daemon";
|
description = "AMDGPU Control Daemon";
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
after = [ "multi-user.target" ];
|
after = [ "multi-user.target" ];
|
||||||
serviceConfig = { ExecStart = "${unstable.pkgs.lact}/bin/lact daemon"; };
|
serviceConfig = { ExecStart = "${pkgs.unstable.lact}/bin/lact daemon"; };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -79,7 +94,7 @@ in
|
|||||||
keyMap = "us";
|
keyMap = "us";
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with unstable.pkgs; [
|
environment.systemPackages = with pkgs.unstable; [
|
||||||
lact
|
lact
|
||||||
amdgpu_top
|
amdgpu_top
|
||||||
|
|
||||||
|
23
overlays/default.nix
Normal file
23
overlays/default.nix
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# This file defines overlays
|
||||||
|
{ inputs, ... }: {
|
||||||
|
# This one brings our custom packages from the 'pkgs' directory
|
||||||
|
additions = final: _prev: import ../pkgs final.pkgs;
|
||||||
|
|
||||||
|
# This one contains whatever you want to overlay
|
||||||
|
# You can change versions, add patches, set compilation flags, anything really.
|
||||||
|
# https://nixos.wiki/wiki/Overlays
|
||||||
|
modifications = final: prev: {
|
||||||
|
# example = prev.example.overrideAttrs (oldAttrs: rec {
|
||||||
|
# ...
|
||||||
|
# });
|
||||||
|
};
|
||||||
|
|
||||||
|
# When applied, the unstable nixpkgs set (declared in the flake inputs) will
|
||||||
|
# be accessible through 'pkgs.unstable'
|
||||||
|
unstable-packages = final: _prev: {
|
||||||
|
unstable = import inputs.nixpkgs-unstable {
|
||||||
|
system = final.system;
|
||||||
|
config.allowUnfree = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
5
pkgs/default.nix
Normal file
5
pkgs/default.nix
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# Custom packages, that can be defined similarly to ones from nixpkgs
|
||||||
|
# You can build them using 'nix build .#example'
|
||||||
|
pkgs: {
|
||||||
|
# example = pkgs.callPackage ./example { };
|
||||||
|
}
|
Reference in New Issue
Block a user