More flakes stuff
This commit is contained in:
parent
d427da7804
commit
7c75d415ff
6 changed files with 58 additions and 24 deletions
16
common.nix
Normal file
16
common.nix
Normal 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;
|
||||
|
||||
}
|
11
flake.lock
11
flake.lock
|
@ -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"
|
||||
}
|
||||
},
|
||||
|
|
31
flake.nix
31
flake.nix
|
@ -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;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
kak.ide = true;
|
||||
};
|
||||
|
||||
system.stateVersion = "21.11";
|
||||
|
||||
networking = {
|
||||
hostName = "thor";
|
||||
interfaces.enp9s0.useDHCP = true;
|
||||
|
|
|
@ -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
4
scripts/README.md
Normal file
|
@ -0,0 +1,4 @@
|
|||
# Scripts
|
||||
|
||||
This directory contains nix derivations for shell scripts I want to use across
|
||||
devices.
|
Loading…
Reference in a new issue