mirror of
https://github.com/Superredstone/nixos.git
synced 2026-03-07 20:28:08 +01:00
Added resolve-inputs
This commit is contained in:
@@ -1,145 +0,0 @@
|
|||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[ # Include the results of the hardware scan.
|
|
||||||
./hardware-configuration.nix
|
|
||||||
./modules
|
|
||||||
];
|
|
||||||
|
|
||||||
nix.gc = {
|
|
||||||
automatic = true;
|
|
||||||
dates = "weekly";
|
|
||||||
options = "--delete-older-than 1w";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Remove old gtkrc file, otherwise it will not work
|
|
||||||
system.userActivationScripts = {
|
|
||||||
removeConflictingFiles = {
|
|
||||||
text = ''
|
|
||||||
rm -f /home/r3ddy/.gtkrc-2.0.backup
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.hostName = "nixos"; # Define your hostname.
|
|
||||||
|
|
||||||
networking.networkmanager.enable = true;
|
|
||||||
networking.firewall.allowedUDPPorts = [ 25565 ];
|
|
||||||
networking.firewall.allowedTCPPorts = [ 25565 ];
|
|
||||||
hardware.bluetooth.enable = true;
|
|
||||||
hardware.bluetooth.powerOnBoot = true;
|
|
||||||
|
|
||||||
time.timeZone = "Europe/Rome";
|
|
||||||
|
|
||||||
# Select internationalisation properties.
|
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
|
||||||
|
|
||||||
i18n.extraLocaleSettings = {
|
|
||||||
LC_ADDRESS = "it_IT.UTF-8";
|
|
||||||
LC_IDENTIFICATION = "it_IT.UTF-8";
|
|
||||||
LC_MEASUREMENT = "it_IT.UTF-8";
|
|
||||||
LC_MONETARY = "it_IT.UTF-8";
|
|
||||||
LC_NAME = "it_IT.UTF-8";
|
|
||||||
LC_NUMERIC = "it_IT.UTF-8";
|
|
||||||
LC_PAPER = "it_IT.UTF-8";
|
|
||||||
LC_TELEPHONE = "it_IT.UTF-8";
|
|
||||||
LC_TIME = "it_IT.UTF-8";
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.sessionVariables = {
|
|
||||||
NIXOS_OZONE_WL = "1"; # Use Wayland when possible (this does not seem to work)
|
|
||||||
ELECTRON_OZONE_PLATFORM_HINT = "wayland";
|
|
||||||
GOPATH = "$HOME/.go";
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
# Enable sound with pipewire.
|
|
||||||
services.pulseaudio.enable = false;
|
|
||||||
security.rtkit.enable = true;
|
|
||||||
|
|
||||||
programs.fish.enable = true; # This must be true before initializing my user
|
|
||||||
users.users.r3ddy = {
|
|
||||||
isNormalUser = true;
|
|
||||||
description = "Patrick Canal";
|
|
||||||
extraGroups = [ "networkmanager" "wheel" "docker" ];
|
|
||||||
shell = pkgs.fish;
|
|
||||||
};
|
|
||||||
|
|
||||||
fonts.packages = with pkgs; [
|
|
||||||
nerd-fonts.jetbrains-mono
|
|
||||||
];
|
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
|
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
# CLI utils
|
|
||||||
appimage-run
|
|
||||||
btop
|
|
||||||
busybox
|
|
||||||
distrobox
|
|
||||||
docker
|
|
||||||
fish
|
|
||||||
fzf
|
|
||||||
git
|
|
||||||
gnumake
|
|
||||||
htop
|
|
||||||
jq
|
|
||||||
killall
|
|
||||||
md2pdf
|
|
||||||
nmap
|
|
||||||
python3
|
|
||||||
ripgrep
|
|
||||||
tree
|
|
||||||
unzip
|
|
||||||
wget
|
|
||||||
wl-clipboard
|
|
||||||
xdotool
|
|
||||||
xorg.xwininfo
|
|
||||||
yad
|
|
||||||
zip
|
|
||||||
zoxide
|
|
||||||
zulu
|
|
||||||
|
|
||||||
# Man pages
|
|
||||||
man-pages
|
|
||||||
|
|
||||||
vim # The only and one great editor
|
|
||||||
# neovim # The only and one great editor improved even further
|
|
||||||
|
|
||||||
# Video card
|
|
||||||
vulkan-tools
|
|
||||||
|
|
||||||
# Gaming
|
|
||||||
dolphin-emu
|
|
||||||
heroic
|
|
||||||
mangohud
|
|
||||||
prismlauncher
|
|
||||||
steam
|
|
||||||
vesktop
|
|
||||||
|
|
||||||
# GUI applications
|
|
||||||
baobab
|
|
||||||
brave
|
|
||||||
kdePackages.xdg-desktop-portal-kde
|
|
||||||
kitty
|
|
||||||
libresprite
|
|
||||||
mpv
|
|
||||||
nextcloud-client
|
|
||||||
spotube
|
|
||||||
telegram-desktop
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.steam.enable = true;
|
|
||||||
programs.steam.remotePlay.openFirewall = true;
|
|
||||||
virtualisation.podman.enable = true;
|
|
||||||
virtualisation.podman.dockerCompat = true;
|
|
||||||
|
|
||||||
programs.virt-manager.enable = true;
|
|
||||||
users.groups.libvirtd.members = ["r3ddy"];
|
|
||||||
virtualisation.libvirtd.enable = true;
|
|
||||||
virtualisation.spiceUSBRedirection.enable = true;
|
|
||||||
|
|
||||||
system.stateVersion = "24.05"; # Did you read the comment?
|
|
||||||
}
|
|
||||||
17
flake.nix
17
flake.nix
@@ -27,22 +27,5 @@
|
|||||||
user = "r3ddy";
|
user = "r3ddy";
|
||||||
email = personalEmail;
|
email = personalEmail;
|
||||||
};
|
};
|
||||||
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
|
|
||||||
modules = [
|
|
||||||
./configuration.nix
|
|
||||||
|
|
||||||
home-manager.nixosModules.home-manager
|
|
||||||
{
|
|
||||||
home-manager.backupFileExtension = "backup";
|
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
home-manager.sharedModules = [
|
|
||||||
nixvim.homeManagerModules.nixvim
|
|
||||||
];
|
|
||||||
|
|
||||||
home-manager.users.r3ddy = import ./home;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,43 +0,0 @@
|
|||||||
# 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 = [ "vmd" "xhci_pci" "nvme" "usb_storage" "sd_mod" ];
|
|
||||||
boot.initrd.kernelModules = [ ];
|
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
|
||||||
boot.extraModulePackages = [ ];
|
|
||||||
|
|
||||||
fileSystems."/" =
|
|
||||||
{ device = "/dev/disk/by-uuid/fcad34c3-e876-44ad-a1d0-a775c936efbf";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
|
|
||||||
boot.initrd.luks.devices."luks-e7fe6c3f-b251-40bf-b053-493097907383".device = "/dev/disk/by-uuid/e7fe6c3f-b251-40bf-b053-493097907383";
|
|
||||||
|
|
||||||
fileSystems."/boot" =
|
|
||||||
{ device = "/dev/disk/by-uuid/78EA-8347";
|
|
||||||
fsType = "vfat";
|
|
||||||
options = [ "fmask=0077" "dmask=0077" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices =
|
|
||||||
[ { device = "/dev/disk/by-uuid/6a9710ed-3f74-40f3-8e3e-e1afaf4cb118"; }
|
|
||||||
];
|
|
||||||
|
|
||||||
# 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.enp3s0.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
}
|
|
||||||
@@ -84,7 +84,7 @@ systemFunc {
|
|||||||
nixConfig
|
nixConfig
|
||||||
nix-homebrew
|
nix-homebrew
|
||||||
nix-homebrew-config
|
nix-homebrew-config
|
||||||
systemPackages
|
# systemPackages
|
||||||
# OSConfig
|
# OSConfig
|
||||||
# TODO: make user config & home-manager optional
|
# TODO: make user config & home-manager optional
|
||||||
home-manager.home-manager
|
home-manager.home-manager
|
||||||
|
|||||||
21
lib/resolve-inputs.nix
Normal file
21
lib/resolve-inputs.nix
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
stable,
|
||||||
|
inputs,
|
||||||
|
system,
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
isDarwin = (import inputs.nixpkgs-unstable { inherit system; }).stdenv.isDarwin;
|
||||||
|
darwin = if stable then inputs.darwin-stable else inputs.darwin-unstable;
|
||||||
|
stable-suffix = if isDarwin then "stable-darwin" else "stable-nixos";
|
||||||
|
nixpkgs-stable = inputs."nixpkgs-${stable-suffix}";
|
||||||
|
nixpkgs = if stable then nixpkgs-stable else inputs.nixpkgs-unstable;
|
||||||
|
home-manager =
|
||||||
|
if stable then inputs."home-manager-${stable-suffix}" else inputs.home-manager-unstable;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit isDarwin nixpkgs-stable;
|
||||||
|
systemFunc = if isDarwin then darwin.lib.darwinSystem else nixpkgs.lib.nixosSystem;
|
||||||
|
home-manager = if isDarwin then home-manager.darwinModules else home-manager.nixosModules;
|
||||||
|
inherit (import nixpkgs { inherit system; }) lib;
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user