move files outside of wip and remove the old config

This commit is contained in:
Ruben 2024-04-17 17:27:13 -05:00
commit 7f04adbef2
No known key found for this signature in database
GPG key ID: AE181294E97E4802
14 changed files with 177 additions and 410 deletions

View file

@ -40,6 +40,12 @@
StateDirectory = "dnscrypt-proxy";
};
# enable plymouth because it looks cool :)))
boot.plymouth {
enable = true;
theme = "bgrt";
}
# Enable CUPS to print documents.
services.printing = {
enable = true;

View file

@ -1,138 +0,0 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "thonkpad"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Enable networking
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "America/Chicago";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
# Enable the X11 windowing system.
services.xserver.enable = true;
# Enable the KDE Plasma Desktop Environment.
services.xserver.displayManager.sddm.enable = true;
services.xserver.desktopManager.plasma5.enable = true;
# Configure keymap in X11
services.xserver = {
layout = "us";
xkbVariant = "";
};
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable sound with pipewire.
sound.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# If you want to use JACK applications, uncomment this
#jack.enable = true;
# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
#media-session.enable = true;
};
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
# Define a user account. Don't forget to set a password with passwd.
users.users.ruben = {
isNormalUser = true;
description = "Ruben";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [
firefox
kate
# thunderbird
];
};
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
#
# enable flakes
nix.settings.experimental-features = [ "nix-command" "flakes" ];
environment.systemPackages = with pkgs; [
# git is required for flakes, and either way i use it
git
neovim
wget
curl
];
# set the default editor to neovim
environment.variables.EDITOR = "nvim";
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
# List services that you want to enable:
# Enable the OpenSSH daemon.
# services.openssh.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.11"; # Did you read the comment?
}

55
flake.lock generated
View file

@ -1,16 +1,53 @@
{
"nodes": {
"nixpkgs": {
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1713248628,
"narHash": "sha256-NLznXB5AOnniUtZsyy/aPWOk8ussTuePp2acb9U+ISA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5672bc9dbf9d88246ddab5ac454e82318d094bb8",
"lastModified": 1685599623,
"narHash": "sha256-Tob4CMOVHue0D3RzguDBCtUmX5ji2PsdbQDbIOIKvsc=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "93db05480c0c0f30382d3e80779e8386dcb4f9dd",
"type": "github"
},
"original": {
"owner": "NixOS",
"owner": "nix-community",
"ref": "release-23.05",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1686431482,
"narHash": "sha256-oPVQ/0YP7yC2ztNsxvWLrV+f0NQ2QAwxbrZ+bgGydEM=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "d3bb401dcfc5a46ce51cdfb5762e70cc75d082d2",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1686501370,
"narHash": "sha256-G0WuM9fqTPRc2URKP9Lgi5nhZMqsfHGrdEbrLvAPJcg=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "75a5ebf473cd60148ba9aec0d219f72e5cf52519",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
@ -18,7 +55,9 @@
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable"
}
}
},

142
flake.nix
View file

@ -1,32 +1,138 @@
# _
# _ __ (_)_ _____ ___
# | '_ \| \ \/ / _ \/ __|
# | | | | |> < (_) \__ \
# |_| |_|_/_/\_\___/|___/
# this configuration file is copied/inspired from https://github.com/chfour/nixos
# with lots of examples and knowledge gained with the standard config from https://github.com/Misterio77/nix-starter-configs
# and also this wonderful book https://nixos-and-flakes.thiscute.world
# shoutouts to yall 🙏
{
description = "nixos flake";
description = "Sneexy's custom nixos configs";
inputs = {
# nix unstable packages cuz defaults are kinda outdated for my taste
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
# nixpkgs from the unstable branch. since stable is a bit too dated
# for my personal taste
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
# nix packages fresh from git. no idea why i'm putting this here but shh
# "fresh from git" master branch of nixpkgs. for packages not yet in unstable
nixpkgs-master.url = "github:NixOS/nixpkgs/master";
# extra packages, such as updated custom linux kernel.
# see https://github.com/chaotic-cx/nyx for more details
# chaotic's team nyx repo which usually contains unstable git packages or custom
# packages, such as modified linux kernels (which we do use here)
chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
# hardware configs
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
# home manager for managing user specific stuff
home-manager = {
url = "github:nix-community/home-manager/release-23.05";
inputs.nixpkgs.follows = "nixpkgs";
};
# plasma manager to allow configuring plasma within nix config
plasma-manager = {
url = "github:pjones/plasma-manager";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
# flake for 06cb:009a fingerprint scanners. to make the fingerprint scanner on my
# thinkpad t480 function.
nixos-06cb-009a-fingerprint-sensor = {
url = "github:ahbnr/nixos-06cb-009a-fingerprint-sensor";
inputs.nixpkgs.follows = "nixpkgs";
};
# hardware flakes for some devices
hardware.url = "github:nixos/nixos-hardware";
};
outputs = { self, nixpkgs, chaotic, ... }@inputs: {
nixosConfigurations.thonkpad = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
# import the original configuration.nix
./configuration.nix
outputs = {
self,
nixpkgs,
nixpkgs-master,
chaotic,
home-manager,
plasma-manager,
nixos-06cb-009a-fingerprint-sensor,
hardware,
...
} @ inputs: let
inherit (self) outputs;
# our systems are all x86_64 unfortunately
systems = [
"x86_64-linux"
];
# 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 {
# setup modules and stuff idk whats going on here
nixosModules = {
declarativeHome = { ... }: {
imports = [ home-manager.nixosModules.home-manager ];
config = {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
};
};
defaults = { ... }: {
nixpkgs.config.allowUnfree = true;
nix.settings = {
experimental-features = [ "nix-command" "flakes" ];
auto-optimise-store = true;
};
environment.stub-ld.enable = false; # 24.05
};
};
# nyx's defauly modules
chaotic.nixosModules.default
];
# NixOS configuration entrypoint
# Available through 'nixos-rebuild --flake .#your-hostname'
nixosConfigurations = {
# main laptop i use daily
"thunkpad" = nixpkgs.lib.nixosSystem rec {
specialArgs = {inherit inputs outputs;};
modules = with self.nixosModules; [
# nixos configuration file (and others) for thunkpad
./machines/thunkpad
declarativeHome ./users/ruben
# fingerprint modules
nixos-06cb-009a-fingerprint-sensor.nixosModules.open-fprintd
nixos-06cb-009a-fingerprint-sensor.nixosModules.python-validity
];
};
# secondary 2 in 1 device, not really used
"thonkpad" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = with self.nixosModules; [
# nixos configuration file (and others) for thonkpad
./machines/thonkpad
declarativeHome ./users/ruben
];
};
};
# Standalone home-manager configuration entrypoint
# Available through 'home-manager --flake .#your-username@your-hostname'
homeConfigurations = {
# TODO: theres probably a better way to do this/specify one home config for all devices
# main device
"thunkpad" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
extraSpecialArgs = {inherit inputs outputs;};
modules = [
./machines/thunkpad
declarativeHome ./users/ruben
];
};
# secondary device
"thonkpad" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
extraSpecialArgs = {inherit inputs outputs;};
modules = [
./machines/thonkpad
declarativeHome ./users/ruben
];
};
};
};
}

66
wip/flake.lock generated
View file

@ -1,66 +0,0 @@
{
"nodes": {
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1685599623,
"narHash": "sha256-Tob4CMOVHue0D3RzguDBCtUmX5ji2PsdbQDbIOIKvsc=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "93db05480c0c0f30382d3e80779e8386dcb4f9dd",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-23.05",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1686431482,
"narHash": "sha256-oPVQ/0YP7yC2ztNsxvWLrV+f0NQ2QAwxbrZ+bgGydEM=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "d3bb401dcfc5a46ce51cdfb5762e70cc75d082d2",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1686501370,
"narHash": "sha256-G0WuM9fqTPRc2URKP9Lgi5nhZMqsfHGrdEbrLvAPJcg=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "75a5ebf473cd60148ba9aec0d219f72e5cf52519",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable"
}
}
},
"root": "root",
"version": 7
}

View file

@ -1,138 +0,0 @@
# _
# _ __ (_)_ _____ ___
# | '_ \| \ \/ / _ \/ __|
# | | | | |> < (_) \__ \
# |_| |_|_/_/\_\___/|___/
# this configuration file is copied/inspired from https://github.com/chfour/nixos
# with lots of examples and knowledge gained with the standard config from https://github.com/Misterio77/nix-starter-configs
# and also this wonderful book https://nixos-and-flakes.thiscute.world
# shoutouts to yall 🙏
{
description = "Sneexy's custom nixos configs";
inputs = {
# nixpkgs from the unstable branch. since stable is a bit too dated
# for my personal taste
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
# "fresh from git" master branch of nixpkgs. for packages not yet in unstable
nixpkgs-master.url = "github:NixOS/nixpkgs/master";
# chaotic's team nyx repo which usually contains unstable git packages or custom
# packages, such as modified linux kernels (which we do use here)
chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
# home manager for managing user specific stuff
home-manager = {
url = "github:nix-community/home-manager/release-23.05";
inputs.nixpkgs.follows = "nixpkgs";
};
# plasma manager to allow configuring plasma within nix config
plasma-manager = {
url = "github:pjones/plasma-manager";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
# flake for 06cb:009a fingerprint scanners. to make the fingerprint scanner on my
# thinkpad t480 function.
nixos-06cb-009a-fingerprint-sensor = {
url = "github:ahbnr/nixos-06cb-009a-fingerprint-sensor";
inputs.nixpkgs.follows = "nixpkgs";
};
# hardware flakes for some devices
hardware.url = "github:nixos/nixos-hardware";
};
outputs = {
self,
nixpkgs,
nixpkgs-master,
chaotic,
home-manager,
plasma-manager,
nixos-06cb-009a-fingerprint-sensor,
hardware,
...
} @ inputs: let
inherit (self) outputs;
# our systems are all x86_64 unfortunately
systems = [
"x86_64-linux"
];
# 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 {
# setup modules and stuff idk whats going on here
nixosModules = {
declarativeHome = { ... }: {
imports = [ home-manager.nixosModules.home-manager ];
config = {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
};
};
defaults = { ... }: {
nixpkgs.config.allowUnfree = true;
nix.settings = {
experimental-features = [ "nix-command" "flakes" ];
auto-optimise-store = true;
};
environment.stub-ld.enable = false; # 24.05
};
};
# NixOS configuration entrypoint
# Available through 'nixos-rebuild --flake .#your-hostname'
nixosConfigurations = {
# main laptop i use daily
"thunkpad" = nixpkgs.lib.nixosSystem rec {
specialArgs = {inherit inputs outputs;};
modules = with self.nixosModules; [
# nixos configuration file (and others) for thunkpad
./machines/thunkpad
declarativeHome ./users/ruben
# fingerprint modules
nixos-06cb-009a-fingerprint-sensor.nixosModules.open-fprintd
nixos-06cb-009a-fingerprint-sensor.nixosModules.python-validity
];
};
# secondary 2 in 1 device, not really used
"thonkpad" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = with self.nixosModules; [
# nixos configuration file (and others) for thonkpad
./machines/thonkpad
declarativeHome ./users/ruben
];
};
};
# Standalone home-manager configuration entrypoint
# Available through 'home-manager --flake .#your-username@your-hostname'
homeConfigurations = {
# TODO: theres probably a better way to do this/specify one home config for all devices
# main device
"thunkpad" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
extraSpecialArgs = {inherit inputs outputs;};
modules = [
./machines/thunkpad
declarativeHome ./users/ruben
];
};
# secondary device
"thonkpad" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
extraSpecialArgs = {inherit inputs outputs;};
modules = [
./machines/thonkpad
declarativeHome ./users/ruben
];
};
};
};
}

View file

@ -1,42 +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 = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/dcbcf320-de12-4231-b6de-31e906800cc0";
fsType = "btrfs";
options = [ "subvol=@" ];
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/D09A-8677";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/76cd7c6e-ea9b-46e2-bcac-6f84e56f6b0d"; }
];
# 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.enp0s31f6.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}