uhhhh
This commit is contained in:
parent
fd02aaf883
commit
689e1cd642
60
flake.lock
60
flake.lock
|
@ -1,38 +1,6 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"home-manager": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": "nixpkgs"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1712386041,
|
|
||||||
"narHash": "sha256-dA82pOMQNnCJMAsPG7AXG35VmCSMZsJHTFlTHizpKWQ=",
|
|
||||||
"path": "/nix/store/9613fxrf433y10fz18ccixj4zpmdibzq-source",
|
|
||||||
"rev": "d6bb9f934f2870e5cbc5b94c79e9db22246141ff",
|
|
||||||
"type": "path"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"id": "home-manager",
|
|
||||||
"type": "indirect"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
|
||||||
"lastModified": 1705331948,
|
|
||||||
"narHash": "sha256-qjQXfvrAT1/RKDFAMdl8Hw3m4tLVvMCc8fMqzJv0pP4=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "b8dd8be3c790215716e7c12b247f45ca525867e2",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "nixos-23.11",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs-unstable": {
|
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1712791164,
|
"lastModified": 1712791164,
|
||||||
"narHash": "sha256-3sbWO1mbpWsLepZGbWaMovSO7ndZeFqDSdX0hZ9nVyw=",
|
"narHash": "sha256-3sbWO1mbpWsLepZGbWaMovSO7ndZeFqDSdX0hZ9nVyw=",
|
||||||
|
@ -48,7 +16,14 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs",
|
||||||
|
"stable": "stable",
|
||||||
|
"unstable": "unstable"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"stable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1712867921,
|
"lastModified": 1712867921,
|
||||||
"narHash": "sha256-edTFV4KldkCMdViC/rmpJa7oLIU8SE/S35lh/ukC7bg=",
|
"narHash": "sha256-edTFV4KldkCMdViC/rmpJa7oLIU8SE/S35lh/ukC7bg=",
|
||||||
|
@ -64,11 +39,20 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": {
|
"unstable": {
|
||||||
"inputs": {
|
"locked": {
|
||||||
"home-manager": "home-manager",
|
"lastModified": 1712791164,
|
||||||
"nixpkgs": "nixpkgs_2",
|
"narHash": "sha256-3sbWO1mbpWsLepZGbWaMovSO7ndZeFqDSdX0hZ9nVyw=",
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable"
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "1042fd8b148a9105f3c0aca3a6177fd1d9360ba5",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
45
flake.nix
45
flake.nix
|
@ -1,18 +1,15 @@
|
||||||
{
|
{
|
||||||
description = "Your new nix config";
|
description = "My NixOS config";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
# Nixpkgs
|
# Nixpkgs
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
stable.url = "github:nixos/nixpkgs/nixos-23.11";
|
||||||
# You can access packages and modules from different nixpkgs revs
|
# You can access packages and modules from different nixpkgs revs
|
||||||
# at the same time. Here's an working example:
|
# at the same time. Here's an working example:
|
||||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
# Also see the 'unstable-packages' overlay at 'overlays/default.nix'.
|
# Also see the 'unstable-packages' overlay at 'overlays/default.nix'.
|
||||||
|
|
||||||
# Home manager
|
|
||||||
# home-manager.url = "github:nix-community/home-manager/release-23.11";
|
|
||||||
# home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
|
|
||||||
# TODO: Add any other flake you might need
|
# TODO: Add any other flake you might need
|
||||||
# hardware.url = "github:nixos/nixos-hardware";
|
# hardware.url = "github:nixos/nixos-hardware";
|
||||||
|
|
||||||
|
@ -24,8 +21,8 @@
|
||||||
outputs = {
|
outputs = {
|
||||||
self,
|
self,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
nixpkgs-unstable,
|
stable,
|
||||||
home-manager,
|
unstable,
|
||||||
...
|
...
|
||||||
} @ inputs: let
|
} @ inputs: let
|
||||||
inherit (self) outputs;
|
inherit (self) outputs;
|
||||||
|
@ -50,59 +47,37 @@
|
||||||
# Reusable nixos modules you might want to export
|
# Reusable nixos modules you might want to export
|
||||||
# These are usually stuff you would upstream into nixpkgs
|
# These are usually stuff you would upstream into nixpkgs
|
||||||
nixosModules = import ./modules/nixos;
|
nixosModules = import ./modules/nixos;
|
||||||
# Reusable home-manager modules you might want to export
|
|
||||||
# These are usually stuff you would upstream into home-manager
|
|
||||||
homeManagerModules = import ./modules/home-manager;
|
|
||||||
|
|
||||||
# NixOS configuration entrypoint
|
# NixOS configuration entrypoint
|
||||||
# Available through 'nixos-rebuild build --flake .#phoenix'
|
# Available through 'nixos-rebuild build --flake .#phoenix'
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
phoenix = nixpkgs-unstable.lib.nixosSystem {
|
phoenix = unstable.lib.nixosSystem {
|
||||||
specialArgs = {inherit inputs outputs;};
|
specialArgs = {inherit inputs outputs;};
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/phoenix/configuration.nix
|
./hosts/phoenix/configuration.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
pc = nixpkgs-unstable.lib.nixosSystem {
|
pc = unstable.lib.nixosSystem {
|
||||||
specialArgs = {inherit inputs outputs;};
|
specialArgs = {inherit inputs outputs;};
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/pc/configuration.nix
|
./hosts/pc/configuration.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
stuff = nixpkgs.lib.nixosSystem {
|
stuff = stable.lib.nixosSystem {
|
||||||
specialArgs = {inherit inputs outputs;};
|
specialArgs = {inherit inputs outputs;};
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/stuff/configuration.nix
|
./hosts/stuff/configuration.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
enry = nixpkgs.lib.nixosSystem {
|
enry = stable.lib.nixosSystem {
|
||||||
specialArgs = {inherit inputs outputs;};
|
specialArgs = {inherit inputs outputs;};
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/enry/configuration.nix
|
./hosts/enry/configuration.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Standalone home-manager configuration entrypoint
|
|
||||||
# Available through 'home-manager --flake .#user@phoenix'
|
|
||||||
# homeConfigurations = {
|
|
||||||
# "user@phoenix" = home-manager.lib.homeManagerConfiguration {
|
|
||||||
# pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
|
|
||||||
# extraSpecialArgs = {inherit inputs outputs;};
|
|
||||||
# modules = [
|
|
||||||
# ./hosts/phoenix/home.nix
|
|
||||||
# ];
|
|
||||||
# };
|
|
||||||
# "user@stuff" = home-manager.lib.homeManagerConfiguration {
|
|
||||||
# pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
|
|
||||||
# extraSpecialArgs = {inherit inputs outputs;};
|
|
||||||
# modules = [
|
|
||||||
# ./hosts/stuff/home.nix
|
|
||||||
# ];
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
17
hosts/README.md
Normal file
17
hosts/README.md
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
# Hosts
|
||||||
|
|
||||||
|
## enry
|
||||||
|
|
||||||
|
This is my Raspberry Pi 3B+ inside my electrical cabinet.
|
||||||
|
|
||||||
|
## pc
|
||||||
|
|
||||||
|
My main PC.
|
||||||
|
|
||||||
|
## phoenix
|
||||||
|
|
||||||
|
My old laptop.
|
||||||
|
|
||||||
|
## stuff
|
||||||
|
|
||||||
|
A friend's laptop.
|
|
@ -35,7 +35,7 @@
|
||||||
extraGroups = ["networkmanager" "wheel" "dialout" "syncthing"];
|
extraGroups = ["networkmanager" "wheel" "dialout" "syncthing"];
|
||||||
initialPassword = "correcthorsebatterystaple";
|
initialPassword = "correcthorsebatterystaple";
|
||||||
openssh.authorizedKeys.keys = [
|
openssh.authorizedKeys.keys = [
|
||||||
"SHA256:RrcbPCE9BPVLAEhERm81NwXA28OKpn9U6irR2vG7K5I user@phoenix";
|
"SHA256:RrcbPCE9BPVLAEhERm81NwXA28OKpn9U6irR2vG7K5I user@phoenix"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,68 +0,0 @@
|
||||||
# This is your home-manager configuration file
|
|
||||||
# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix)
|
|
||||||
{
|
|
||||||
inputs,
|
|
||||||
outputs,
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
# You can import other home-manager modules here
|
|
||||||
imports = [
|
|
||||||
# If you want to use modules your own flake exports (from modules/home-manager):
|
|
||||||
# outputs.homeManagerModules.example
|
|
||||||
|
|
||||||
# Or modules exported from other flakes (such as nix-colors):
|
|
||||||
# inputs.nix-colors.homeManagerModules.default
|
|
||||||
|
|
||||||
# You can also split up your configuration and import pieces of it here:
|
|
||||||
# ./nvim.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
nixpkgs = {
|
|
||||||
# You can add overlays here
|
|
||||||
overlays = [
|
|
||||||
# Add overlays your own flake exports (from overlays and pkgs dir):
|
|
||||||
outputs.overlays.additions
|
|
||||||
outputs.overlays.modifications
|
|
||||||
outputs.overlays.unstable-packages
|
|
||||||
|
|
||||||
# You can also add overlays exported from other flakes:
|
|
||||||
# neovim-nightly-overlay.overlays.default
|
|
||||||
|
|
||||||
# Or define it inline, for example:
|
|
||||||
# (final: prev: {
|
|
||||||
# hi = final.hello.overrideAttrs (oldAttrs: {
|
|
||||||
# patches = [ ./change-hello-to-hi.patch ];
|
|
||||||
# });
|
|
||||||
# })
|
|
||||||
];
|
|
||||||
# Configure your nixpkgs instance
|
|
||||||
config = {
|
|
||||||
# Disable if you don't want unfree packages
|
|
||||||
allowUnfree = true;
|
|
||||||
# Workaround for https://github.com/nix-community/home-manager/issues/2942
|
|
||||||
allowUnfreePredicate = _: true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
home = {
|
|
||||||
username = "user";
|
|
||||||
homeDirectory = "/home/user";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Add stuff for your user as you see fit:
|
|
||||||
# programs.neovim.enable = true;
|
|
||||||
# home.packages = with pkgs; [ steam ];
|
|
||||||
|
|
||||||
# Enable home-manager and git
|
|
||||||
programs.home-manager.enable = true;
|
|
||||||
programs.git.enable = true;
|
|
||||||
|
|
||||||
# Nicely reload system units when changing configs
|
|
||||||
systemd.user.startServices = "sd-switch";
|
|
||||||
|
|
||||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
|
||||||
home.stateVersion = "23.05";
|
|
||||||
}
|
|
|
@ -1,68 +0,0 @@
|
||||||
# This is your home-manager configuration file
|
|
||||||
# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix)
|
|
||||||
{
|
|
||||||
inputs,
|
|
||||||
outputs,
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
# You can import other home-manager modules here
|
|
||||||
imports = [
|
|
||||||
# If you want to use modules your own flake exports (from modules/home-manager):
|
|
||||||
# outputs.homeManagerModules.example
|
|
||||||
|
|
||||||
# Or modules exported from other flakes (such as nix-colors):
|
|
||||||
# inputs.nix-colors.homeManagerModules.default
|
|
||||||
|
|
||||||
# You can also split up your configuration and import pieces of it here:
|
|
||||||
# ./nvim.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
nixpkgs = {
|
|
||||||
# You can add overlays here
|
|
||||||
overlays = [
|
|
||||||
# Add overlays your own flake exports (from overlays and pkgs dir):
|
|
||||||
outputs.overlays.additions
|
|
||||||
outputs.overlays.modifications
|
|
||||||
outputs.overlays.unstable-packages
|
|
||||||
|
|
||||||
# You can also add overlays exported from other flakes:
|
|
||||||
# neovim-nightly-overlay.overlays.default
|
|
||||||
|
|
||||||
# Or define it inline, for example:
|
|
||||||
# (final: prev: {
|
|
||||||
# hi = final.hello.overrideAttrs (oldAttrs: {
|
|
||||||
# patches = [ ./change-hello-to-hi.patch ];
|
|
||||||
# });
|
|
||||||
# })
|
|
||||||
];
|
|
||||||
# Configure your nixpkgs instance
|
|
||||||
config = {
|
|
||||||
# Disable if you don't want unfree packages
|
|
||||||
allowUnfree = true;
|
|
||||||
# Workaround for https://github.com/nix-community/home-manager/issues/2942
|
|
||||||
allowUnfreePredicate = _: true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
home = {
|
|
||||||
username = "user";
|
|
||||||
homeDirectory = "/home/user";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Add stuff for your user as you see fit:
|
|
||||||
# programs.neovim.enable = true;
|
|
||||||
# home.packages = with pkgs; [ steam ];
|
|
||||||
|
|
||||||
# Enable home-manager and git
|
|
||||||
programs.home-manager.enable = true;
|
|
||||||
programs.git.enable = true;
|
|
||||||
|
|
||||||
# Nicely reload system units when changing configs
|
|
||||||
systemd.user.startServices = "sd-switch";
|
|
||||||
|
|
||||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
|
||||||
home.stateVersion = "23.05";
|
|
||||||
}
|
|
|
@ -1,68 +0,0 @@
|
||||||
# This is your home-manager configuration file
|
|
||||||
# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix)
|
|
||||||
{
|
|
||||||
inputs,
|
|
||||||
outputs,
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
# You can import other home-manager modules here
|
|
||||||
imports = [
|
|
||||||
# If you want to use modules your own flake exports (from modules/home-manager):
|
|
||||||
# outputs.homeManagerModules.example
|
|
||||||
|
|
||||||
# Or modules exported from other flakes (such as nix-colors):
|
|
||||||
# inputs.nix-colors.homeManagerModules.default
|
|
||||||
|
|
||||||
# You can also split up your configuration and import pieces of it here:
|
|
||||||
# ./nvim.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
nixpkgs = {
|
|
||||||
# You can add overlays here
|
|
||||||
overlays = [
|
|
||||||
# Add overlays your own flake exports (from overlays and pkgs dir):
|
|
||||||
outputs.overlays.additions
|
|
||||||
outputs.overlays.modifications
|
|
||||||
outputs.overlays.unstable-packages
|
|
||||||
|
|
||||||
# You can also add overlays exported from other flakes:
|
|
||||||
# neovim-nightly-overlay.overlays.default
|
|
||||||
|
|
||||||
# Or define it inline, for example:
|
|
||||||
# (final: prev: {
|
|
||||||
# hi = final.hello.overrideAttrs (oldAttrs: {
|
|
||||||
# patches = [ ./change-hello-to-hi.patch ];
|
|
||||||
# });
|
|
||||||
# })
|
|
||||||
];
|
|
||||||
# Configure your nixpkgs instance
|
|
||||||
config = {
|
|
||||||
# Disable if you don't want unfree packages
|
|
||||||
allowUnfree = true;
|
|
||||||
# Workaround for https://github.com/nix-community/home-manager/issues/2942
|
|
||||||
allowUnfreePredicate = _: true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
home = {
|
|
||||||
username = "user";
|
|
||||||
homeDirectory = "/home/user";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Add stuff for your user as you see fit:
|
|
||||||
# programs.neovim.enable = true;
|
|
||||||
# home.packages = with pkgs; [ steam ];
|
|
||||||
|
|
||||||
# Enable home-manager and git
|
|
||||||
programs.home-manager.enable = true;
|
|
||||||
programs.git.enable = true;
|
|
||||||
|
|
||||||
# Nicely reload system units when changing configs
|
|
||||||
systemd.user.startServices = "sd-switch";
|
|
||||||
|
|
||||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
|
||||||
home.stateVersion = "23.11";
|
|
||||||
}
|
|
Loading…
Reference in a new issue