This commit is contained in:
meml0rz
2024-11-10 15:27:02 +01:00
parent 9f418460b8
commit de96d883c3
7 changed files with 66 additions and 37 deletions

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, pkgs-stable,... }:
let let
home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/master.tar.gz"; home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/master.tar.gz";
in in
@ -14,15 +14,6 @@ in
nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings.experimental-features = [ "nix-command" "flakes" ];
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
#boot.loader = {
# grub = {
# enable = true;
# useOSProber = true;
# device = "nodev";
# efiSupport = true;
# };
#};
networking.hostName = "poggers"; networking.hostName = "poggers";
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
@ -54,7 +45,7 @@ in
bluetooth = { bluetooth = {
enable = true; enable = true;
}; };
graphics = { opengl = {
enable = true; enable = true;
}; };
rtl-sdr = { rtl-sdr = {
@ -78,7 +69,8 @@ in
extraGroups = [ "wheel" "docker" "audio" "video" "dialout" "plugdev" ]; extraGroups = [ "wheel" "docker" "audio" "video" "dialout" "plugdev" ];
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages =
(with pkgs; [
# sys # sys
unzip unzip
yt-dlp yt-dlp
@ -88,12 +80,12 @@ in
curl curl
dosfstools dosfstools
ntfs3g ntfs3g
waybar
# cli # cli
neofetch neofetch
fastfetch fastfetch
onefetch onefetch
neovim
vim vim
weechat weechat
ranger ranger
@ -128,10 +120,20 @@ in
usbmuxd usbmuxd
pulseaudio pulseaudio
]; ])
++
(with pkgs-stable; [
wezterm
]);
networking.firewall.allowedTCPPorts = [ 80 1337 8080 ];
networking.firewall.enable = false;
networking = {
firewall = {
enable = true;
allowedTCPPorts = [ 80 1337 8080 ];
};
};
security = { security = {
doas = { doas = {

18
flake.lock generated
View File

@ -15,9 +15,25 @@
"type": "indirect" "type": "indirect"
} }
}, },
"nixpkgs-stable": {
"locked": {
"lastModified": 1730963269,
"narHash": "sha256-rz30HrFYCHiWEBCKHMffHbMdWJ35hEkcRVU0h7ms3x0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "83fb6c028368e465cd19bb127b86f971a5e41ebc",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-24.05",
"type": "indirect"
}
},
"root": { "root": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs",
"nixpkgs-stable": "nixpkgs-stable"
} }
} }
}, },

View File

@ -1,18 +1,26 @@
{ {
description = "My first flake!"; description = "My NixOS Configuration";
inputs = { inputs = {
nixpkgs-stable.url = "nixpkgs/nixos-24.05";
nixpkgs.url = "nixpkgs/nixos-unstable"; nixpkgs.url = "nixpkgs/nixos-unstable";
}; };
outputs = { self, nixpkgs, ... }: outputs = { self, nixpkgs, nixpkgs-stable, ... }:
let let
system = "x86_64-linux";
lib = nixpkgs.lib; lib = nixpkgs.lib;
pkgs = nixpkgs.legacyPackages.${system};
pkgs-stable = nixpkgs-stable.legacyPackages.${system};
in { in {
nixosConfigurations = { nixosConfigurations = {
default = lib.nixosSystem { default = lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ ./configuration.nix ]; modules = [ ./configuration.nix ];
specialArgs = {
inherit pkgs-stable;
};
}; };
}; };
}; };

View File

@ -8,18 +8,18 @@
[ (modulesPath + "/installer/scan/not-detected.nix") [ (modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" =
{ device = "/dev/disk/by-label/NIXROOT"; { device = "/dev/disk/by-uuid/0869359e-4c7e-4410-aab0-55bc72a45e0b";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" =
{ device = "/dev/disk/by-label/ESP"; { device = "/dev/disk/by-uuid/7C74-E1AE";
fsType = "vfat"; fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ]; options = [ "fmask=0022" "dmask=0022" ];
}; };
@ -31,10 +31,8 @@
# 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.enp0s31f6.useDHCP = lib.mkDefault true; # networking.interfaces.enp4s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wwp0s20f0u3i12.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
} }

View File

@ -4,16 +4,12 @@
[ [
./nix/sway.nix ./nix/sway.nix
./nix/user.nix ./nix/user.nix
./nix/nvim.nix
]; ];
home.enableNixpkgsReleaseCheck = false; home.enableNixpkgsReleaseCheck = false;
home.stateVersion = "24.05"; home.stateVersion = "24.05";
home.packages = with pkgs; [
waybar
];
home.file = { home.file = {
# WEZTERM # WEZTERM
".config/wezterm/wezterm.lua".source = ./raw/wezterm/wezterm.lua; ".config/wezterm/wezterm.lua".source = ./raw/wezterm/wezterm.lua;

9
modules/nix/nvim.nix Normal file
View File

@ -0,0 +1,9 @@
{ config, pkgs, ... }:
{
programs.neovim = {
enable = true;
plugins = with pkgs.vimPlugins; [
vimsence
]
};
}

View File

@ -11,7 +11,7 @@
config = rec { config = rec {
modifier = "Mod4"; modifier = "Mod4";
terminal = "${pkgs.wezterm}/bin/wezterm"; terminal = "wezterm";
menu = "${pkgs.rofi}/bin/rofi -show drun -c .config/rofi/config.rasi"; menu = "${pkgs.rofi}/bin/rofi -show drun -c .config/rofi/config.rasi";
startup = [ startup = [
{command = "${pkgs.swaybg}/bin/swaybg -i $HOME/.wp/skull_purple.png";} {command = "${pkgs.swaybg}/bin/swaybg -i $HOME/.wp/skull_purple.png";}