Compare commits
6 commits
bdba785ab6
...
c568b8dc24
Author | SHA1 | Date | |
---|---|---|---|
|
c568b8dc24 | ||
|
823500e981 | ||
|
339938b213 | ||
|
62364a9db5 | ||
|
d493ea127a | ||
|
4d1af7a40d |
56
flake.nix
Normal file
56
flake.nix
Normal file
|
@ -0,0 +1,56 @@
|
|||
{
|
||||
description = "NixOS system flake";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11";
|
||||
nixos-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-22.11";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nur.url = "github:nix-community/NUR";
|
||||
# TODO: possible make this a flake as well
|
||||
mysecrets = {
|
||||
flake = false;
|
||||
url = "git+ssh://gitea@git.orlives.de:2342/schmittlauch/home-manager_secrets.git";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ self, nixpkgs, nur, ... }@inputs:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
{
|
||||
|
||||
nixosConfigurations.thinknix = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = [ ./nixos/configuration.nix ];
|
||||
# necessary to make the top-level inputs available to system configuration
|
||||
specialArgs = { inherit inputs; };
|
||||
};
|
||||
homeConfigurations.spiollinux = inputs.home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
|
||||
modules = [
|
||||
{
|
||||
imports = [
|
||||
nur.hmModules.nur
|
||||
./home/home.nix
|
||||
];
|
||||
# extends the home config
|
||||
home.username = "spiollinux";
|
||||
home.homeDirectory = "/home/spiollinux";
|
||||
}
|
||||
];
|
||||
# Optionally use extraSpecialArgs
|
||||
# to pass through arguments to home.nix
|
||||
extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,7 +1,4 @@
|
|||
let
|
||||
lib = (import <nixpkgs> {}).lib;
|
||||
|
||||
in
|
||||
{ lib, ...}:
|
||||
{
|
||||
|
||||
firefox.enablePlasmaBrowserIntegration = true;
|
||||
|
|
|
@ -1,12 +1,9 @@
|
|||
{ pkgs, ... }:
|
||||
{ pkgs, inputs, config, ... }:
|
||||
|
||||
with pkgs;
|
||||
let
|
||||
# nix-channel --add https://nixos.org/channels/nixos-unstable nixos-unstable
|
||||
unstable = import <nixos-unstable> { };
|
||||
# nix-channel --add https://github.com/nix-community/NUR/archive/master.tar.gz NUR
|
||||
nur = import <NUR> { inherit pkgs; };
|
||||
myNur = nur.repos.schmittlauch;
|
||||
unstable = inputs.nixos-unstable;
|
||||
|
||||
desktopApps = [
|
||||
firefox
|
||||
|
@ -122,7 +119,7 @@ let
|
|||
reptyr # re-bind running program to other tty
|
||||
xclip
|
||||
unzip
|
||||
myNur.lolcommits # from NUR
|
||||
config.nur.repos.schmittlauch.lolcommits # from NUR
|
||||
];
|
||||
|
||||
nixHelpers = [
|
||||
|
@ -248,7 +245,7 @@ let
|
|||
(iosevka-bin.override {
|
||||
variant = "curly-slab";
|
||||
})
|
||||
myNur.vollkorn
|
||||
config.nur.repos.schmittlauch.vollkorn
|
||||
# TODO: humor-sans
|
||||
];
|
||||
|
||||
|
@ -260,6 +257,8 @@ let
|
|||
in
|
||||
{
|
||||
|
||||
nixpkgs.overlays = (import ./overlays.nix);
|
||||
|
||||
home.packages =
|
||||
desktopApps
|
||||
++ latexApps
|
||||
|
@ -276,7 +275,7 @@ in
|
|||
|
||||
programs.home-manager.enable = true;
|
||||
programs.home-manager.path = "$HOME/.nix-defexpr/channels/home-manager";
|
||||
home.stateVersion = "18.09";
|
||||
home.stateVersion = "22.11";
|
||||
|
||||
programs.direnv =
|
||||
{
|
||||
|
@ -302,7 +301,7 @@ in
|
|||
enable = true;
|
||||
# ssh host config
|
||||
matchBlocks =
|
||||
import ./secrets/ssh_hosts.nix;
|
||||
import "${inputs.mysecrets}/ssh_hosts.nix";
|
||||
};
|
||||
|
||||
programs.tmux = {
|
||||
|
@ -331,7 +330,7 @@ in
|
|||
fonts.fontconfig.enable = true;
|
||||
|
||||
programs.git =
|
||||
let contacts = import ./secrets/contacts.nix;
|
||||
let contacts = import "${inputs.mysecrets}/contacts.nix";
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
{ config, pkgs, lib, inputs, ... }:
|
||||
|
||||
let
|
||||
unstable = import <nixos-unstable> { };
|
||||
unstable = inputs.nixos-unstable;
|
||||
localfork = import /home/spiollinux/src/nixpkgs { };
|
||||
|
||||
in
|
||||
|
@ -234,8 +234,14 @@ in
|
|||
# Enable all sysrq functions (useful to recover from some issues):
|
||||
boot.kernel.sysctl."kernel.sysrq" = 1; # NixOS default: 16 (only the sync command)
|
||||
|
||||
nix = {
|
||||
# expose all flake inputs through nix Path and registry
|
||||
registry = (lib.mapAttrs (_: value: { flake = value; }) inputs) // {
|
||||
nixpkgs.flake = inputs.nixpkgs;
|
||||
};
|
||||
nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry;
|
||||
# keep build-time deps around for offline-rebuilding
|
||||
nix.settings = {
|
||||
settings = {
|
||||
# keep around all inputs necessary for offline-rebuilding the system
|
||||
keep-outputs = true;
|
||||
keep-derivations = true;
|
||||
|
@ -244,6 +250,7 @@ in
|
|||
# use all cores for building
|
||||
cores = 0;
|
||||
};
|
||||
};
|
||||
# override tmpdir for daemon
|
||||
#systemd.services.nix-daemon.environment.TMPDIR = "/var/tmp";
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{ config, lib, pkgs, modulesPath, inputs, ... }:
|
||||
|
||||
|
||||
let
|
||||
|
@ -7,13 +7,8 @@ in
|
|||
{
|
||||
imports =
|
||||
[
|
||||
<nixpkgs/nixos/modules/installer/scan/not-detected.nix>
|
||||
(
|
||||
builtins.fetchGit {
|
||||
url = "https://github.com/NixOS/nixos-hardware";
|
||||
rev = "a4bc66709604ab78abc575b60baa6d23ae027a59";
|
||||
} + "/lenovo/thinkpad/t440s"
|
||||
)
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
(inputs.nixos-hardware + "/lenovo/thinkpad/t440s")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||
|
|
Loading…
Reference in a new issue