More flakes stuff

This commit is contained in:
Riley Apeldoorn 2022-05-15 17:31:45 +02:00
parent d427da7804
commit 7c75d415ff
6 changed files with 58 additions and 24 deletions

16
common.nix Normal file
View file

@ -0,0 +1,16 @@
# Holds common settings for all systems.
{ ... }: {
nix = {
optimise.automatic = true;
extraOptions = ''
experimental-features = nix-command flakes
'';
};
nixpkgs.config.allowUnfree = true;
boot.cleanTmpDir = true;
}

View file

@ -34,16 +34,17 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1652623270,
"narHash": "sha256-DZXGCio58hPeBHVk9o0khafZav23jpOIm4QpbJZThpw=",
"lastModified": 1611574965,
"narHash": "sha256-IYtGS077nJFIqSq6Cb8WEJwbqqd4K7S4vUuwPZKfLeo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d595d207baa598ca62a2da003a96510529fec9e4",
"repo": "nixpkgs-channels",
"rev": "4762fba469e2baa82f983b262e2c06ac2fdaae67",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"ref": "nixos-unstable",
"repo": "nixpkgs-channels",
"type": "github"
}
},

View file

@ -1,14 +1,35 @@
{
inputs = {
nixpkgs.url = github:NixOS/nixpkgs;
home-manager.url = github:nix-community/home-manager;
nixpkgs = {
url = github:NixOS/nixpkgs-channels/nixos-unstable;
};
outputs = { self, nixpkgs, home-manager }: with nixpkgs; {
nixosConfigurations."thor" = lib.nixosSystem {
home-manager = {
url = github:nix-community/home-manager;
};
};
outputs = args: with args.nixpkgs; {
nixosConfigurations = {
"thor" = lib.nixosSystem {
system = "x86_64-linux";
modules = [ ./configuration.nix ];
modules = [
./machines/thor/configuration.nix
./common.nix
];
specialArgs = args;
};
"loki" = lib.nixosSystem {
system = "x86_64-linux";
modules = [
./machines/loki/configuration.nix
./common.nix
];
specialArgs = args;
};
};
};

View file

@ -11,6 +11,8 @@
kak.ide = true;
};
system.stateVersion = "21.11";
networking = {
hostName = "thor";
interfaces.enp9s0.useDHCP = true;

View file

@ -1,6 +1,6 @@
# Global config
# Modules used by most systems.
{ config, lib, pkgs, ... }:
{ config, lib, pkgs, home-manager, ... }:
with lib; with types;
let named = submodule {
@ -104,7 +104,7 @@ let named = submodule {
imports = [
<home-manager/nixos>
home-manager.nixosModule
./kak
./gui
@ -189,8 +189,6 @@ let named = submodule {
loader.efi = {
canTouchEfiVariables = true;
};
cleanTmpDir = true;
};
networking = {
@ -198,7 +196,6 @@ let named = submodule {
useDHCP = false;
};
nixpkgs.config.allowUnfree = true;
security.rtkit.enable = true;
users.users."riley" = {
@ -206,12 +203,5 @@ let named = submodule {
extraGroups = [ "wheel" ]; # Enable sudo for the user.
};
nix = {
optimise.automatic = true;
extraOptions = ''
experimental-features = nix-command flakes
'';
};
};
}

4
scripts/README.md Normal file
View file

@ -0,0 +1,4 @@
# Scripts
This directory contains nix derivations for shell scripts I want to use across
devices.